Skip to main content

Module bundle_conversation

Module bundle_conversation 

Source
Expand description

What an export carries of an agent’s conversation: the history store’s compact form, one file per session (SPEC_HISTORY_COMPACT_FORM_ONLY section 3, the bundle export row). The export reads the store only. It never reads a provider’s own session file: that file is a second, raw copy of the conversation that AgentMux removes by session id when a session ends, so an export that copied it would put a copy back that the history guarantee takes away.

A session is a zone of the global transcript store: the agent’s current one, and each archive an ended session left (agent:<id>:archive:<ms>). Each is rendered as newline-delimited JSON, one line per message: the fragments of a streamed reply are dropped where the complete line proves them redundant, and a reply that was cut off is one interrupted line. A value srv holds secret is replaced by the withhold mark.

Structs§

Conversation
One session an export can carry.

Functions§

compact_ndjson
The compact form of output followed by the fragments in live, with every value srv holds secret withheld.
conversations
The sessions of an agent that have content, newest first: the current one, then the archives by their time.
render
The compact form of one session, as newline-delimited JSON. output and output.live are read together, so a reply in progress is not lost.