pub struct TranscriptPayload<'a> {
pub session: IngestEnvelope<'a>,
pub agent_id: Option<&'a str>,
pub agent_type: Option<&'a str>,
pub description: Option<&'a str>,
pub tool_use_id: Option<&'a str>,
pub kind: Option<&'a str>,
pub records: &'a RawValue,
}Expand description
Ingest body for one transcript file, mirroring tapes’
ingest.TranscriptPayload.
Fields§
§session: IngestEnvelope<'a>Session the transcript belongs to.
agent_id: Option<&'a str>Absent for the main transcript; the subagent id otherwise. Matches Go’s
omitempty by omitting None.
agent_type: Option<&'a str>Subagent type from agent-<id>.meta.json, omitted when empty.
description: Option<&'a str>Task description from agent-<id>.meta.json, omitted when empty.
tool_use_id: Option<&'a str>The Task tool_use that forked this subagent — the causal edge the tapes
deriver attaches. Omitted when empty.
kind: Option<&'a str>Lifecycle qualifier for a Codex sub_agent_activity anchor row.
Some("interacted") marks a re-entry record — a send_message or
followup_task aimed at an already-spawned thread, with agent_id the
target thread and tool_use_id the triggering call. None means spawn
evidence, which is the legacy default and the only thing a transcript
file ever is: build_payload therefore always leaves it unset, and an
anchor builder sets it through this field directly.
The server keys a raw row’s dedup on the payload bytes and reads the
latest version per (session, agent, lifecycle kind), so an interacted
row versions separately from the started anchor it shares an
agent_id with rather than superseding it. That is also why the field
is Option with skip_serializing_if rather than an empty-string
sentinel, and why it sits after tool_use_id: a spawn row’s bytes
must stay identical to what earlier builds already ingested.
records: &'a RawValueThe transcript’s JSONL content as a JSON array, verbatim.