Expand description
Per-session state: holds the AgentRuntime, working directory,
turn counter, transcript, and a [CancellationToken] for cooperative
abort for a single ACP session.
AcpSessionManager is a lightweight HashMap-based registry. It is
owned by the server’s dispatch loop. No parallel session-management
infrastructure exists outside this module — all lifecycle state is
tracked through the AgentRuntime and this simple container.
§Session persistence (ACP-S1-02)
Sessions are persisted to <persistence_dir>/<session_id>/:
transcript.jsonl– one JSON line perMessage.metadata.json– session metadata (system prompt, MCP configs, turn count).
Every message object in the saved transcript has an id field matching
the SHA-256 content hash (first 12 hex chars), computed by
crate::acp::bridge::sha256_first_12.
Structs§
- AcpSession
- State for one active ACP session.
- AcpSession
Manager - Registry of active ACP sessions, keyed by
SessionId. - Compaction
Hint - A compaction hint entry, identifying which turn indices are safe to compress.
- Saved
Message - A message saved to the JSONL transcript, with a content-hash
idfield. - Session
Metadata - Metadata saved alongside the session transcript.
- Summarized
Context - The result of local transcript summarization (ACP-S1-04).
Functions§
- apply_
compaction_ hints - Apply compaction hints to saved messages (sets compressible field).
- compute_
compaction_ hints - Compute compaction hints for a list of saved messages.
- summarize_
transcript - Produce a summary paragraph of the transcript using a local heuristic.
Type Aliases§
- Session
Id - A unique session identifier.