Skip to main content

Crate af_agent_session

Crate af_agent_session 

Source
Expand description

Event-sourced Agent sessions. The append-only log is the conversation SSOT; messages, runs, interactions and UI state are deterministic projections.

Structs§

OpenToolCall
A tool call awaiting its result.
ProjectedContext
Injected context as projected for UI and replay.
ProjectedMessage
Message as projected for UI and replay.
RecordedToolCall
A tool call as recorded in AssistantToolCalls.
SessionEvent
One committed Session event with its position in the log.
SessionProjection
Deterministic projection of a Session log used by the runtime, recovery and UI.

Enums§

ContentBlock
Typed content unit; UI and models parse types, never prose conventions.
DeliveryMode
How queued input reaches a Run.
Event
Every model-visible fact and lifecycle transition of a Session. The log is the source of truth; everything else is a projection.
EventError
Invariant violated while applying an event.
InteractionKind
What the Run asks the user for.
InteractionResolution
How the user resolved an interaction.
RunState
Projected lifecycle state of one Run: live, parked on an interaction, or terminal.
RunStatus
Terminal Run status.
ToolAuthorizationStatus
Authorization outcome of a tool call.

Constants§

SESSION_EVENT_FORMAT_VERSION
Wire/storage format of Event; only structural changes bump it.

Traits§

SessionEventStore
Append-only Session event storage.

Functions§

cancel_events
Events that close an interrupted Run as cancelled.
failure_events
Events that close an interrupted Run as failed with error_code.
recovery_events
Events that close an interrupted Run as failed with worker_restarted, so recovery starts from a clean lifecycle.
session_deletion_events
Events that tombstone a Session and close its Runs.
text
One text content block.