Expand description
Canonical model used as the conversion hub.
Where harnesses disagree on representation, this module uses one canonical
shape. Harness-specific detail needed for same-harness round trips lives in
typed optional fields. Opaque JSON is limited to open boundaries: unmodeled
tool inputs/outputs and the Tool::Raw catch-all for MCP and unknown
tools.
A Transcript<Common> pairs a Meta with a
Vec<Message>. The model is harness-agnostic: it does not record where it
came from.
Structs§
- Artifact
- A named file carried by a conversation.
- EditOp
- One find/replace within a
Tool::MultiEdit. - Image
Source - A base64-encoded inline image.
- Message
- One turn in the conversation: a role and its content blocks, plus the assistant-only attribution fields when present.
- Meta
- Session-level metadata, common to every harness.
- Usage
- Token accounting for one assistant turn.
Enums§
- Artifact
Source - Where an artifact’s contents live.
- Block
- A single content block. Tagged by
typeon the wire to match the Anthropic block shape every harness is reconciled against. - Role
- Who authored a message. Tool results ride on
Role::Usermessages, per the Anthropic convention every harness is normalized into. - Stop
Reason - Why an assistant turn ended.
Otherkeeps any harness-specific reason round-trippable rather than collapsing it. - Tool
- A canonical tool invocation.
- Tool
Output - The result payload of a tool call: text, or the harness’s structured output kept as JSON.