Skip to main content

Crate rinne_core

Crate rinne_core 

Source
Expand description

rinne-core — the blackboard implementation (file tree + SQLite state) and the wiring glue. The shared types and seams live in rinne-types and the loop engine in rinne-loop (MCP_SKILLS.md §15); this crate re-exports both so existing rinne_core::… paths keep resolving.

Re-exports§

pub use blackboard::require_plan;
pub use blackboard::Blackboard;
pub use state::State;

Modules§

blackboard
The blackboard: the single source of truth on disk (CONTEXT.md §12).
dag
The JSON DAG: the plan the loop executes (CONTEXT.md §10).
error
Shared error and result types used across the Rinne library crates.
pool
Pool profiling: tier whatever workers are actually present (CONTEXT.md §7).
priors
Static capability priors for known models (CONTEXT.md §7).
replanner
The replanner hook (CONTEXT.md §12).
state
Machine state in SQLite (CONTEXT.md §12, §14).
worker
The Worker contract (CONTEXT.md §8).

Structs§

Constraints
Per-invocation limits and steering (CONTEXT.md §10 budgets).
ContextPacket
The assembled context for one node, shaped per worker family by the context assembler (CONTEXT.md §12).
Engine
The loop engine over a blackboard, owned plan, and worker registry.
EngineOptions
Tunable limits for a run, merged from config and the plan’s own budget.
ExecuteRequest
Everything a worker needs to do one unit of work (CONTEXT.md §8).
ExecuteResult
The normalized result every adapter returns (CONTEXT.md §8).
HumanSession
Per-run human control overlay, merged over config at plan/run time.
InlinedFile
A file inlined into an API worker’s context.
McpServerSpec
Everything a harness needs to launch/connect an MCP server itself — the provision path (MCP_SKILLS.md §6). A harness with a node’s mcp_servers runs the tools natively rather than Rinne driving the host loop.
NamedCheckpoint
A named human review gate.
Node
One node in the DAG (CONTEXT.md §10 field reference).
Plan
A complete plan (CONTEXT.md §10).
QuotaModel
A worker’s quota modeled as a refilling token bucket (CONTEXT.md §13).
ResumeInput
A user’s response when resuming a parked run (CONTEXT.md §11).
RolePins
Role pins set via /human or rinne human ….
RunReport
The outcome of a run.
Skill
One installed skill.
ToolSpec
An MCP tool offered to a worker for the host agentic loop (MCP_SKILLS.md §6). Carries the full argument schema; the cheap catalog layer the planner plans over is only id+description.
Usage
Token / time accounting for one invocation (CONTEXT.md §8 usage).
WorkerDescriptor
The full self-description a worker advertises to the scheduler.
WorkerRegistry
A set of available workers, in the user’s preference order. The composition root (the CLI) builds this from config + doctor; the engine consumes it.

Enums§

AuthMode
How a worker authenticates (CONTEXT.md §9). Surfaced by doctor so the user always knows which workers are free and which are metered.
Capability
A capability a worker can satisfy (CONTEXT.md §8).
CheckpointTrigger
When a named gate fires.
EngineEvent
Engine events for the interface / status to render.
ExecStatus
How an execution ended.
HumanDecision
A human’s decision at a checkpoint / evaluator (CONTEXT.md §11).
LatencyProfile
A coarse latency expectation (CONTEXT.md §8, §21). Harness workers spawn a process and wait on model think time, so they are inherently slower than a raw API call.
McpTransportKind
How an MCP server is reached. Mirrors the config transport but lives here so the worker adapters need no dependency on rinne-config.
NodeStatus
The lifecycle status of a node (MCP_SKILLS.md §12 scheduler).
OnFail
A parsed failure policy (CONTEXT.md §10 on_fail).
RinneError
The canonical error type for Rinne’s library crates.
Role
The role a node plays in the DAG (CONTEXT.md §10). Defined here because execute takes a role; the DAG types in Phase 3 reuse it.
StopReason
Why a run stopped.
Transport
The transport a worker speaks over (CONTEXT.md §8, §14). Acp is reserved for V2 and not implemented in v1.
WorkerEvent
A single streamed event from a running worker.
WorkerFamily
The worker family (CONTEXT.md §8). Drives dispatch and context assembly: a harness is an autonomous agent given a chunky task; an API worker is a raw model given a precise instruction with context inlined.

Constants§

BLACKBOARD_DIR
The on-disk blackboard directory name, relative to the working repo.
GATE_ACTIVE_KEY
Blackboard meta key: active gate name.
HUMAN_SESSION_FILE
Filename inside the blackboard directory.

Traits§

Replanner
Amends a plan in light of new state. Implemented by the conductor.
ToolExecutor
Executes an MCP tool call on behalf of the host agentic loop (MCP_SKILLS.md §6). The trait seam keeps the worker adapters MCP-agnostic: an API worker holds a dyn ToolExecutor and calls it when the model emits a tool call; the concrete implementation (over a warm MCP connection pool) lives in the wiring layer.
Worker
A unit of work that can be dispatched to (CONTEXT.md §8).

Functions§

format_token_count
Format a token count for status lines (0, 350, 1.2k, 2.0M).

Type Aliases§

EngineSink
EventSink
The sink a worker writes events to. The dispatcher owns the receiver.
Result
The crate-wide result alias.