Expand description
Compatibility facade for Awaken contract crates.
New runtime-facing code should depend on awaken-runtime-contract. New
server/store-facing code should depend on awaken-server-contract. This
crate preserves the historical awaken-contract import path by re-exporting
both surfaces.
Re-exports§
pub use awaken_server_contract as server_contract;
Modules§
- agent_
spec_ patch - Field-level override for
AgentSpec. - builtin_
seed - Carrier types for binary-supplied built-in specs (“seed”).
- cancellation
- Cooperative cancellation token for agent runs.
- config_
loader - Generic configuration loading utilities for YAML/JSON config files.
- config_
record - Metadata envelope wrapping any spec stored in ConfigStore.
- config_
validation - contract
- identity
- Content-addressed identity helpers for prompts, tool descriptions, and skills. See ADR-0030 D1.
- model
- periodic_
refresh - Reusable periodic-refresh primitive for registry managers.
- registry_
spec - Serializable agent definition — pure data, no trait objects.
- secret
- Secret value newtype that redacts itself in
Debug/Displaywhile still round-tripping throughserde. - skill_
allowed_ tools - skill_
spec - Skill registry record managed through ConfigStore.
- skill_
spec_ patch - Field-level override for
SkillSpec. - state
- thread
- Thread types for persistent conversation state.
- time
- tool_
spec - Tool registry record. The
descriptionfield is the only field exposed to the patch surface (ADR-0029); other fields are read-only snapshots taken fromToolDescriptorat seed time. - tool_
spec_ patch - Field-level override for
ToolSpec(ADR-0029).
Structs§
- A2aServer
Spec - Named A2A server connection profile used by admin/control-plane surfaces.
- Agent
Event Normalization Context - Scope and metadata used when normalizing runtime events that do not carry thread or run identifiers themselves.
- Agent
Spec - Serializable agent definition referencing registries by ID.
- Agent
Spec Patch - Patch for built-in agent customization.
- Allowed
Tool - Parsed
allowed-toolstoken. - Append
Options - Options supplied when appending a canonical event.
- Append
Result - Result returned by an append call.
- Audit
Event - A self-contained audit record for a single admin action.
- Builtin
Seed Set - A complete seed payload: the binary’s version tag plus all specs it wants present.
- Cancellation
Handle - Write-only handle that can signal cancellation.
- Cancellation
Token - A cooperative cancellation token.
- Canonical
Event - EventStore append output.
- Canonical
Event Draft - EventStore append input. Store-assigned fields are intentionally absent.
- Canonical
Event Id - Stable canonical event identifier assigned by an [
EventWriter]. - Canonical
Event Kind - Protocol-neutral canonical event kind.
- Config
Change Event - A config change notification emitted by a store implementation.
- Config
Record - Wrapper carrying a spec plus provenance + lifecycle metadata.
- Config
Revision Ref - Editing-store revision included in a publication audit boundary.
- Diagnostic
Event - Non-replay diagnostic event.
- Dispatch
Signal Entry - One durable dispatch delivery signal pulled from a backend work queue.
- Durable
Event Sink - EventSink wrapper that forwards live events and stages canonical drafts.
- Event
Cursor - Opaque cursor for a single
EventScope. - Event
Page - Paged canonical event list response.
- Event
Scope Ids - Denormalized ids derived from event scopes.
- Failed
Scheduled Actions - Live
RunCommand Entry - Entry yielded by a
LiveRunCommandStream: the command plus the receipt the consumer mustackonce the run has received it. - Live
RunTarget - Exact live-run target for cross-node ephemeral control.
- Mailbox
Interrupt - Result of a mailbox interrupt operation.
- Mailbox
Interrupt Details - Detailed result of a mailbox interrupt operation.
- Mailbox
Live Control Source - Adapter exposing any
MailboxStoreas a runtimeLiveRunCommandSource. - McpRestart
Policy - Restart policy for MCP server connections.
- McpServer
Spec - Serializable MCP server configuration used to construct a live MCP tool registry.
- Modalities
- Set of modalities a model accepts on input and produces on output.
- Model
Pool Spec - A named pool of member models, addressable like a single model.
- Model
Spec - Serializable model offering: addressing (id, provider, upstream model), intrinsic capabilities (context window, max output tokens, modalities, knowledge cutoff), and per-million-token pricing.
- Mutation
Batch - A batch of state mutation operations.
- NoConfig
Patch - Empty patch for spec types that do not support field-level overrides.
- Normalized
Canonical Event - A normalized canonical event draft with its durability class.
- Outbox
Enqueue Result - Outbox
Message - Outbox
Message Draft - Pending
Scheduled Actions - Periodic
Refresher - A reusable handle for a single periodic background task.
- Persisted
State - Pinned
Registry Entry - One published runtime-config version pinned by a run.
- Pinned
Registry Manifest - Pinned published runtime-config graph attached to one run.
- Pool
Member Spec - One member of a
ModelPoolSpec, referencing aModelSpecby id. - Pool
Routing Policy - How a session picks its initial member and how long that choice is held.
- Pool
Switch Policy - When the pool abandons the active member for another one.
- Profile
Entry - A single profile entry stored in the profile store.
- Protocol
Replay Append Result - Result returned by an append call.
- Protocol
Replay Cursor - Opaque cursor for a single protocol replay stream.
- Protocol
Replay Draft - ProtocolReplayLog append input. Store-assigned fields are intentionally absent.
- Protocol
Replay Id - Stable protocol replay row identifier assigned by a
ProtocolReplayWriter. - Protocol
Replay Page - Paged protocol replay response.
- Protocol
Replay Record - Persisted protocol replay row.
- Protocol
Stream Key - Protocol stream selection.
- Provider
Spec - Serializable provider configuration used to construct an LLM executor.
- Record
Meta - Provenance + lifecycle metadata for a stored spec.
- Redacted
String - String wrapper whose
Debug/Displayimplementations never reveal the underlying value, and whose buffer is zeroized on drop. - Registry
Graph Validation Report - Registry
Graph Validation Request - Registry
Publication - Atomic published graph snapshot.
- Registry
Resource Publish - One resource value to publish inside an atomic registry publication.
- Registry
Retention Policy - ADR-0035 D19 retention policy. A historical version is eligible for physical purge only when every rule below allows it; the absence of a rule is permissive.
- RunDispatch
- A run dispatch persisted in the mailbox queue.
- RunDispatch
Parts - Explicit persisted representation used by store codecs.
- RunDispatch
Result - Durable runtime-result projection for the dispatch that consumed a run.
- Scope
Context - ScopeId
- Scoped
Agent Event Normalizer - Default normalizer for one runtime stream.
- Scoped
Config Store - Scoped
Mailbox Store - Scoped
Outbox Store - Scoped
Protocol Replay Log - Scoped
Thread RunStore - Server
Canonical Event - Server-authored canonical event attached to the same thread commit as the state transition that made the fact true.
- Skill
Argument Spec - Formal argument metadata for a skill activation.
- Skill
Spec - ConfigStore representation of a skill.
- Skill
Spec Patch - Snapshot
- Source
Event Cursor - Canonical event cursor referenced by a protocol replay row.
- Staged
Canonical Event - Staged canonical event together with its append options.
- Standard
Registry Graph Validator - State
Command - A command that carries state mutations, scheduled actions, and effects.
- State
KeyOptions - State
Map - State
Scope - Identifies a shared state scope at runtime.
- Subscribe
Handle - Result returned when a live subscription is opened.
- Thread
- A persistent conversation thread (metadata only).
- Thread
Commit - One atomic thread commit.
- Thread
Commit Outcome - Runtime-facing outcome for a successful thread commit.
- Thread
Commit Staged Outcome - Identifiers assigned by stores during a successful staged commit.
- Thread
Commit Staged Writes - Event/outbox writes committed atomically with a checkpoint, supplied by
server-side writers: the runtime tee’s canonical drafts (drained from the
dispatch
EventBuffer), server-authored canonical events, and inline outbox rows. - Thread
Metadata - Thread metadata.
- Tool
Call Progress State - Canonical progress state for a tool call execution.
- Tool
Spec - Tool
Spec Patch - Transaction
Scope Id - Opaque equality marker identifying the set of stores that can share a single backend transaction.
- Typed
Effect - Typed
Versioned Registry - Typed view over a kind-scoped published runtime-config registry.
- Version
Ref - A concrete published version reference.
- Versioned
Record - One immutable published runtime-config version.
- Versioned
Resource State - Mutable state for one published resource identity.
Enums§
- Allowed
Tool Parse Error - Audit
Action - Action that triggered an audit event.
- Builtin
Spec - A single spec the binary wants to seed into ConfigStore.
- Commit
Error - Failure surface for
CommitCoordinator::commit_checkpoint. - Config
Change Kind - Type of config mutation that was published by a store notification.
- Config
Record Error - Error returned while decoding a
ConfigRecordor applying its overrides. - Config
Validation Error - Event
Publish Error - Failure surface for advisory server canonical publication.
- Event
Scope - Query and ordering scope for canonical events.
- Event
Scope Family - Standard event-scope family.
- Event
Store Error - Errors returned by canonical event store implementations.
- Event
Visibility - Visibility and redaction hint for canonical events.
- Fidelity
Class - Durability class used by compacted and full-fidelity event capture.
- Home
Strategy - Strategy for choosing a session’s home member.
- Json
Value - Represents any valid JSON value.
- KeyScope
- Lifetime scope for a state key.
- Live
Control Error - Live
Delivery Outcome - Outcome of a live-control delivery call — lets the caller decide
whether to fall back to the durable queue.
NoSubscribermeans no node acknowledged the command; the command was either lost in transit or the run failed to accept it. Callers must treatNoSubscriberas “did not deliver” and fall back to durable dispatch. - Live
RunCommand - Control command delivered to an active run’s owning node (out-of-band
relative to durable dispatch). Consumed by the runtime forwarder attached
to each
RunHandle; unsubscribed targets silently drop commands (best effort — steering is ephemeral by design). - McpTransport
Kind - Transport type for an MCP server connection.
- Merge
Strategy - Parallel merge strategy for a state key.
- Modality
- Input/output modality supported by a model.
- Outbox
Error - Outbox
Nack Outcome - Outbox
Status - Phase
- Lifecycle phase within an agent run.
- Pool
Member Role - Eligibility of a pool member for initial home selection.
- Profile
Owner - Identifies who owns a profile entry.
- Progress
Status - Protocol
Replay Error - Errors returned by protocol replay log implementations.
- Protocol
Replay Redaction State - Redaction state of a replay row.
- Publish
Outcome - Result of publishing a resource version.
- Record
Source - Who wrote this record into ConfigStore.
- Registry
Graph Validation Error - Registry
Reference Policy - Request
Surface - RunDispatch
Status - Six-state lifecycle for a dispatch attempt.
- Runtime
Event Durability - Runtime event durability mode used by
DurableEventSink. - Scope
Error - Server
Event Publish Outcome - Outcome for advisory server canonical publication through an outbox.
- Skill
Spec Context - Execution mode for a config-managed skill.
- State
Error - Sticky
Scope - Lifetime over which a session holds its active member.
- Subscribe
Start - Start position for event subscription.
- Unknown
Field Policy - Unknown-field behavior for a serializable config surface.
- Unknown
KeyPolicy - Version
Selector - Versioned
Registry Error - Errors returned by versioned registry stores.
Constants§
- A2A_
SERVER_ ID_ OPTION - AGENT_
SPEC_ PATCH_ UNKNOWN_ FIELD_ POLICY - AGENT_
SPEC_ UNKNOWN_ FIELD_ POLICY AgentSpecandAgentSpecPatchreject unknown fields.- DEFAULT_
SCOPE_ ID - MODEL_
POOL_ SPEC_ UNKNOWN_ FIELD_ POLICY - MODEL_
SPEC_ UNKNOWN_ FIELD_ POLICY - OUTBOX_
LANE_ CANONICAL - OUTBOX_
LANE_ PROTOCOL_ REPLAY - OUTBOX_
TARGET_ A2A_ WEBHOOK - OUTBOX_
TARGET_ PROTOCOL_ FANOUT - OUTBOX_
TARGET_ PROTOCOL_ PROJECTOR - PROVIDER_
SPEC_ UNKNOWN_ FIELD_ POLICY ProviderSpec’s serde implementation is intentionally lenient for read-time compatibility, but config write/validate surfaces reject unknown fields so operators do not persist silently ignored provider settings.- REGISTRY_
KIND_ AGENT - REGISTRY_
KIND_ MODEL - REGISTRY_
KIND_ MODEL_ POOL - REGISTRY_
KIND_ PLUGIN_ CONFIG - REGISTRY_
KIND_ PROVIDER - REGISTRY_
KIND_ SKILL - REGISTRY_
KIND_ TOOL - SKILL_
SPEC_ UNKNOWN_ FIELD_ POLICY - TOOL_
CALL_ PROGRESS_ ACTIVITY_ TYPE - Constants for activity type identification.
Traits§
- Agent
Event Normalizer - Converts runtime
AgentEvents to protocol-neutral canonical event drafts. - Canonical
Event Stager - Stage canonical event drafts produced during phase execution.
- Commit
Coordinator - Cross-store atomic commit boundary (ADR-0036 D2).
- Config
Change Notifier - Optional native notification capability for a
ConfigStore. - Config
Change Subscriber - Blocking/streaming receiver for store-native config change notifications.
- Config
Record Merge - Spec types that can apply
RecordMeta::user_overridesat read time. - Config
Store - Async CRUD store for namespaced JSON configuration documents.
- Diagnostic
Event Publisher - Fire-and-forget diagnostic event publisher.
- Dispatch
Signal Receipt - Receipt for a durable dispatch delivery signal.
- Effect
Spec - Event
Lookup - Lookup canonical events by stable event id.
- Event
Reader - Read canonical event history.
- Event
Store - Full canonical event store capability.
- Event
Subscriber - Subscribe to canonical event history and live tail.
- Event
Writer - Append canonical events.
- Live
Command Receipt - Completion receipt for a delivered
LiveRunCommand. Consumers callLiveCommandReceipt::ackonly after the run has actually accepted the command (e.g. the inbox channel returned success). A dropped receipt signals the producer that delivery did not complete, and the producer’sdeliver_liveresolves asLiveDeliveryOutcome::NoSubscriberso the caller can fall back to durable dispatch. Producers MUST NOT observeDelivereduntil the receipt has been acknowledged. - Live
RunCommand Source - Mailbox
Store - Persistent mailbox queue with lease-based distributed claim.
- Outbox
Server Event Publisher - Long-lived publisher for advisory server-authored canonical events.
- Outbox
Store - Outbox store contract (ADR-0034 D9/D10).
- Plugin
Config Key - Typed plugin configuration key.
- Prepared
Skill Specs - Prepared, validated skill registry replacement.
- Profile
Key - A typed key for profile storage.
- Profile
Store - Raw profile storage backend.
- Protocol
Replay Log - Full protocol replay-log capability.
- Protocol
Replay Lookup - Load a persisted protocol replay row by durable row identity.
- Protocol
Replay Reader - Read protocol replay history.
- Protocol
Replay Writer - Append protocol replay rows.
- Registry
Graph Validator - Scheduled
Action Spec - Skill
Spec Sink - Sink used by runtime/config managers that publish DB-managed skill specs to a live skill registry without depending on the concrete skills extension.
- Staged
Commit Coordinator - A
CommitCoordinatorthat can additionally commit staged event/outbox writes atomically with the thread commit. Store coordinators implement this; the runtime-facingCommitCoordinator::commit_checkpointis equivalent to a staged commit withThreadCommitStagedWrites::default. - State
Key - Typed
Tool - A strongly-typed tool trait that derives its descriptor schema from
Args. - Versioned
Registry Retention - Capability-based view onto a versioned registry store that exposes
purge planning. Implementations MUST NOT purge anything in dry-run
mode and MUST treat current pointers and any version referenced by a
retained publication or
protected_versionsentry as ineligible. - Versioned
Registry Store - Async server/store contract for immutable published runtime-config versions.
Functions§
- a2a_
server_ id - build_
rollback_ metadata - Normalize rollback metadata so it always carries
restored_frompointing at the source version, per ADR-0035 D4. Callers may supply additional metadata fields, but therestored_fromkey is reserved: supplying it with a value other thanto_versionis rejected, and when absent it is injected automatically. - canonical_
registry_ json_ bytes - Canonical JSON bytes used as the persisted hash source (ADR-0035 D3).
- decode_
config_ record - Decode a value into
ConfigRecord<T>, accepting either an envelope or a legacy bare spec. This does not validateRecordMeta::user_overrides. - effective_
config_ record - Apply
RecordMeta::user_overridesto the record’s base spec. - effective_
visible_ config_ records - Decode visible records and return their effective specs.
- extract_
meta_ revision - Extract the
meta.revisioninteger from a stored config document. - generate_
tool_ schema - Generate a JSON Schema for
Tthat is suitable for LLM tool calling. - is_
skill_ allowed_ tool_ pattern - Return true when an allowed-tools
tool_idshould be treated as a matcher rather than an exact tool id. - merge_
agent_ spec - Apply a
AgentSpecPatchon top of a baseAgentSpec, producing the effective spec passed to the resolver. - merge_
skill_ spec - merge_
tool_ spec - Apply a
ToolSpecPatchon top of aToolSpec.Nonekeeps the base value,Some(v)replaces it. Read-only fields (id, name, category, parameters_schema) are untouched — patch shape statically excludes them. - now_ms
- Returns the current time in milliseconds since the UNIX epoch.
- parse_
skill_ allowed_ tool_ token - Parse one
allowed-toolstoken. - parse_
skill_ allowed_ tools - Parse an
allowed-toolsstring into ordered tokens. - registry_
content_ hash - Compute the ADR-0035 content hash for a canonical published value envelope.
- sanitize_
for_ llm - Sanitize a JSON Schema value in-place to be LLM-friendly.
- scoped_
key - set_
a2a_ server_ id - sort_
publication_ entries - Sort publication entries by
(kind, id)so different store backends expose the sameRegistryPublication.entriesorder. Callers should apply this to entries before persisting; readers can rely on the resulting order being stable across backends. - unscoped_
key - validate_
against_ schema - Validate
argsagainst a JSON Schema, returning an error with joined messages on failure. - validate_
agent_ spec - Validate and decode an
AgentSpec. - validate_
agent_ spec_ patch - Validate and decode an
AgentSpecPatch. - validate_
config_ record - Validate and decode a config record envelope, accepting legacy bare specs.
RecordMeta::user_overridesmust decode as the patch type forT. - validate_
config_ record_ overrides - Validate
RecordMeta::user_overridesfor an already decoded record. - validate_
model_ pool_ spec - Validate and decode a
ModelPoolSpecfrom JSON for config write surfaces. - validate_
model_ pool_ spec_ struct - Validate an already-constructed
ModelPoolSpec. - validate_
model_ spec - Validate and decode a
ModelSpecfrom JSON for config write surfaces. - validate_
model_ spec_ struct - Validate an already-constructed
ModelSpec. - validate_
provider_ spec - Validate and decode a
ProviderSpecfor config write surfaces. - validate_
skill_ allowed_ tool_ pattern - Validate a pattern-like allowed-tools matcher using the same parser used by runtime permission rules and agent tool-pattern configuration.
- validate_
skill_ spec - Validate and decode a
SkillSpecfor config write surfaces. - validate_
unique_ model_ ids - Validate that a slice of
ModelSpeccontains no duplicateidvalues.
Type Aliases§
- Canonical
Event Stream - Live canonical event stream.
- Checkpoint
Deprecated - Compatibility name retained for existing call sites.
- Checkpoint
Commit Outcome Deprecated - Compatibility name retained for existing call sites.
- Checkpoint
Staged Writes Deprecated - Compatibility name retained for existing server/store call sites.
- Live
RunCommand Stream - Stream of
LiveRunCommandEntryconsumed by the owning node’s runtime forwarder. - Scoped
Versioned Registry