Skip to main content

Module session

Module session 

Source
Expand description

Agent sessions (ACP) methods + supporting types.

Mirrors the durable session surface in packages/core/src/session-api.ts. Agent types are resolved dynamically from projected package manifests; the client has no hardcoded agent registry.

The sidecar owns ACP JSON-RPC, adapter restoration, and SQLite history. This client exposes typed durable operations and exact upstream ACP data types, not a second raw JSON-RPC session API.

Structs§

AgentExitEvent
AgentMessage
AgentRegistryEntry
A registry agent entry from list_agents. Mirrors the TS AgentRegistryEntry. The client is npm-agnostic and parses no manifests: list_agents is a sidecar ACP RPC that enumerates the projected /opt/agentos packages. The entry is just the agent id; installed is always true (the package is materialized into the VM at boot).
AvailableCommandsUpdate
Available commands are ready or have changed
ConfigOptionUpdate
Session configuration options have been updated.
ContentChunk
A streamed item of content
CurrentModeUpdate
The current mode of the session has changed
DurableSessionEventEntry
EphemeralSessionEventEntry
HistoryPage
ListSessionsInput
OpenSessionInput
Immutable options used to open a durable AgentOS session. Omitted fields are forwarded as omissions so the sidecar remains the single owner of defaults.
PendingPermissionRequest
PermissionOption
An option presented to the user when requesting permission.
Plan
An execution plan for accomplishing complex tasks.
PromptInput
PromptResult
ReadHistoryInput
RequestPermissionRequest
Request for user permission to execute a tool call.
RequestPermissionResponse
Response to a permission request.
SessionCapabilities
SessionConfig
SessionConfigOption
A session configuration option selector and its current state.
SessionInfo
SQLite-backed session metadata. Reading it never starts an ACP adapter.
SessionInfoUpdate
Update to session metadata. All fields are optional to support partial updates.
SessionPage
ToolCall
Represents a tool call that the language model has requested.
ToolCallUpdate
An update to an existing tool call.
UsageUpdate
Context window and cost update for a session.

Enums§

AgentRestartOutcome
An unexpected ACP adapter process exit — a crash from the host’s perspective (any spontaneous exit without unload_session, including exit code 0). Mirrors the wire AcpAgentExitedEvent and the TS AgentExitEvent.
CancelPromptStatus
ContentBlock
Content blocks represent displayable information in the Agent Client Protocol.
DurableEventKind
DurableSessionEvent
EphemeralEventKind
EphemeralSessionEvent
McpServerConfig
Configuration for connecting to an MCP (Model Context Protocol) server.
PermissionEventStatus
PermissionPolicy
PermissionResponseStatus
PermissionTerminalReason
RequestPermissionOutcome
The outcome of a permission request.
SessionConfigValue
Native ACP configuration values are deliberately limited to the protocol’s string and boolean variants.
SessionState
SessionStreamEntry
SessionSubscriptionError
A bounded live session subscription fell behind. Durable updates remain in SQLite and can be recovered with read_history; ephemeral deltas cannot be recovered.
SessionUpdate
Different types of updates that can be sent during session processing.
StopReason
Reasons why an agent stops processing a prompt turn.

Type Aliases§

AgentExitStream
AgentExitSubscription
DurableSessionEventStream
DurableSessionEventSubscription
Meta
Value attached to a given ACP type on the _meta field.