Expand description
The Worker contract (CONTEXT.md §8).
Anything that takes a subtask and does it is a worker. Two families
(harness, API) share this one contract. The trait and its data types live in
rinne-core because the loop engine’s dispatcher (Phase 3) consumes the
trait, while the concrete transports and adapters live in rinne-workers.
Structs§
- Constraints
- Per-invocation limits and steering (
CONTEXT.md§10 budgets). - Context
Packet - The assembled context for one node, shaped per worker family by the context
assembler (
CONTEXT.md§12). - Execute
Request - Everything a worker needs to do one unit of work (
CONTEXT.md§8). - Execute
Result - The normalized result every adapter returns (
CONTEXT.md§8). - Inlined
File - A file inlined into an API worker’s context.
- McpServer
Spec - Everything a harness needs to launch/connect an MCP server itself — the
provision path (
MCP_SKILLS.md§6). A harness with a node’smcp_serversruns the tools natively rather than Rinne driving the host loop. - Quota
Model - A worker’s quota modeled as a refilling token bucket (
CONTEXT.md§13). - Tool
Spec - 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). - Worker
Descriptor - The full self-description a worker advertises to the scheduler.
Enums§
- Auth
Mode - How a worker authenticates (
CONTEXT.md§9). Surfaced bydoctorso the user always knows which workers are free and which are metered. - Capability
- A capability a worker can satisfy (
CONTEXT.md§8). - Exec
Status - How an execution ended.
- Latency
Profile - 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. - McpTransport
Kind - How an MCP server is reached. Mirrors the config transport but lives here so
the worker adapters need no dependency on
rinne-config. - Role
- The role a node plays in the DAG (
CONTEXT.md§10). Defined here becauseexecutetakes a role; the DAG types in Phase 3 reuse it. - Transport
- The transport a worker speaks over (
CONTEXT.md§8, §14).Acpis reserved for V2 and not implemented in v1. - Worker
Event - A single streamed event from a running worker.
- Worker
Family - 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.
Traits§
- Tool
Executor - 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 adyn ToolExecutorand 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§
- emit
- Convenience: send an event, ignoring the error if the receiver is gone (e.g. the run was cancelled and the dispatcher dropped its end).
- format_
token_ count - Format a token count for status lines (
0,350,1.2k,2.0M).
Type Aliases§
- Event
Sink - The sink a worker writes events to. The dispatcher owns the receiver.