Expand description
Shared wire types and runtime contracts for the halter workspace.
This crate contains the serializable protocol structs that the runtime, providers, hooks, tools, and session stores exchange. It intentionally stays dependency-light and mostly data-oriented so higher-level crates can agree on event, message, provider, and resource shapes without depending on each other.
Structs§
- Agent
Def - Loaded agent definition used by subagent tools.
- AgentId
- Opaque identifier for a protocol
AgentId. - Agent
Name - String newtype for a protocol
AgentName. - Assembled
Prompt - Fully assembled prompt and transcript material ready for provider encoding.
- Assistant
Message - Assistant message assembled from provider stream events.
- BlockId
- Opaque identifier for a protocol
BlockId. - Cache
Breakpoints - Marks the four section boundaries the runtime asks codecs to expose as cache breakpoints when the underlying provider supports them.
- Close
Subagent Request - Request payload for closing a subagent.
- Close
Subagent Response - Response returned after closing a subagent.
- Compacted
Context - Provider-native compacted context items carried across turns.
- Compaction
Result - Result of applying a compaction output to session state.
- Compaction
Window - Split of messages selected for provider compaction.
- Context
Plan - Context manager output consumed by prompt assembly and provider codecs.
- Delta
Item - Text delta emitted into the public session event stream.
- Elision
Marker - Marker describing content omitted from the active context.
- File
View Entry - Cached metadata for a file view.
- File
View Slice - File-view data included in a context plan.
- Hook
Output Entry - Human-readable hook output shown on a run summary.
- Hook
RunSummary - Public record of one hook handler execution.
- Hook
Warning - Warning emitted while loading plugin hook files.
- Instruction
File - Instruction file loaded into a resource snapshot.
- Line
Anchor - Small content anchor used to detect shifted viewed ranges.
- Memory
Item - Long-lived memory item available to context planning.
- Message
Id - Opaque identifier for a protocol
MessageId. - ModelId
- String newtype for a protocol
ModelId. - Observed
State - Environment facts captured while building a context plan.
- Pending
Event - An event produced during turn execution, before the session store has
assigned a sequence. Convert to
SessionEventviainto_committedonce the store has allocated a sequence number. Holdingsequence-less events until commit makes the commit-then-publish invariant type-enforced. - Pending
Tool Call - Tool call that has been emitted but not yet answered.
- Plugin
Id - Opaque identifier for a protocol
PluginId. - Plugin
Manifest - Manifest data loaded from a plugin root.
- Prompt
Id - Opaque identifier for a protocol
PromptId. - Prompt
Registry - Named prompt segments loaded from resources.
- Prompt
Segment - Prompt fragment assembled before provider encoding.
- Prompt
Segment Id - Opaque identifier for a protocol
PromptSegmentId. - Provider
Capabilities - Capability flags advertised by a provider adapter.
- Provider
Compaction Request - Request sent to a provider for context compaction.
- Provider
Compaction Response - Provider response containing compacted context items.
- Provider
Error - Error surfaced by a provider adapter.
- Provider
Name - String newtype for a protocol
ProviderName. - Provider
Request - Request sent from the runtime to a provider for normal generation.
- Replay
Meta - Provider metadata preserved on assistant messages for replay and diagnostics.
- Resolved
Model - Fully resolved model and provider configuration.
- Resource
Snapshot - Complete resource set visible to a session runtime.
- Revision
- String newtype for a protocol
Revision. - Send
Subagent Input Request - Request payload for sending additional input to a subagent.
- Session
Blueprint - Immutable session metadata created at session start.
- Session
Event - An event that has been committed to the session store and therefore has
been assigned a monotonic
sequenceby the commit boundary. Construct aSessionEventonly viaPendingEvent::into_committed,SessionEvent::new_committed, or deserialization — thesequencefield is intentionally not publicly settable. - Session
Id - Opaque identifier for a protocol
SessionId. - Session
State - Mutable state persisted for a session.
- Skill
Def - Loaded skill definition made available to prompt assembly.
- SkillId
- Opaque identifier for a protocol
SkillId. - Skill
Name - String newtype for a protocol
SkillName. - Spawn
Subagent Request - Request payload for the
spawn_subagenttool. - Subagent
Ref - Link from a parent session to a spawned subagent session.
- Subagent
Result - Final output returned from a completed subagent.
- Subagent
Spec Wire - Minimal subagent spec used by session commands.
- Subagent
Status - Snapshot of a subagent’s visible state.
- Summary
Slice - Summary retained after older context has been compacted.
- System
Message - System instruction message carried in the transcript.
- Thinking
Block - Provider thinking block with optional replay signature.
- Tool
Alias - String newtype for a protocol
ToolAlias. - Tool
Call - Tool invocation requested by an assistant message.
- Tool
Call Id - Opaque identifier for a protocol
ToolCallId. - Tool
Capabilities - Capabilities exposed by a tool specification.
- Tool
Error - Error returned by a tool execution.
- Tool
Execution Outcome - Completed tool execution paired with the original call.
- Tool
Name - String newtype for a protocol
ToolName. - Tool
Result Message - Result message that answers a prior
ToolCall. - Tool
Spec - Provider-visible tool declaration.
- Transcript
Window - Active transcript window after pruning and compaction planning.
- Turn
- User-submitted work unit for a session.
- TurnId
- Opaque identifier for a protocol
TurnId. - Usage
- Token accounting reported by providers and accumulated by sessions.
- User
Message - User message, including text and optional media parts.
- Viewed
Range - Inclusive range of file lines previously shown to the model.
- Wait
Subagent Request - Request payload for waiting on one or more subagents.
- Wait
Subagent Response - Response from a subagent wait operation.
Enums§
- ApiKind
- Wire API shape a resolved model expects its provider to use.
- Assistant
Part - Part of an assistant message.
- Cache
Scope - Whether a segment can participate in prefix caching.
- Delivery
- Delivery semantics for committed session events.
- Hook
Handler Type - Backend used to execute a configured hook handler.
- Hook
Output Kind - Category assigned to a hook output entry.
- Hook
RunStatus - Lifecycle state of one hook run.
- Hook
Session Start Source - Source reason passed to session-start hooks.
- Hook
Warning Severity - Severity for non-fatal hook loading problems.
- Message
- A transcript item visible to providers and session stores.
- Message
Signal - Relative value of a message when pruning context before compaction.
- Model
Role - Logical model slot selected by a turn or subagent request.
- Prompt
Segment Kind - Logical prompt section for cache breakpoint placement.
- Provider
Compaction Strategy - Provider
Kind - Provider family used for capability selection and registry lookup.
- Prune
Signal Threshold - Highest message-signal tier eligible for pre-compaction pruning.
- Reasoning
Effort - Provider reasoning budget requested for a model.
- Session
Command - Command accepted by a session control plane.
- Session
Event Payload - Event payload emitted by the session runtime.
- Stop
Reason - Why an assistant message ended.
- Stream
Event - Incremental provider output event.
- Subagent
Event Forwarding - Controls whether child subagent events are forwarded into the parent stream.
- Subagent
State - Runtime state of a spawned subagent.
- Tool
Call IdPolicy - How provider tool-call ids are assigned and normalized.
- Tool
Concurrency - Scheduler hint for how tool calls may be batched.
- Tool
Result - Output returned by a tool execution.
- User
Part - Part of a user message.
- Volatility
- How often a prompt segment is expected to change.
Constants§
- DEFAULT_
TEMPERATURE - Historical sampling temperature used by older config resolution. Provider
requests now omit temperature unless
[providers.<name>].temperatureis configured explicitly.
Type Aliases§
- Content
Hash - Stable hash of prompt, resource, file-view, or context content.
- File
View Cache - Per-session cache of file ranges already shown to the model.
- Media
Type - MIME/media type label used for binary message parts.
- Replay
Signature - Provider-issued signature attached to replayable reasoning blocks.
- Shared
Str - Shared string payloads stay as
Stringfor now; this is the swap point for any futureArc<str>migration. - Timestamp
- UTC timestamp used throughout session and event records.