Skip to main content

Module common

Module common 

Source
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.
ImageSource
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§

ArtifactSource
Where an artifact’s contents live.
Block
A single content block. Tagged by type on the wire to match the Anthropic block shape every harness is reconciled against.
Role
Who authored a message. Tool results ride on Role::User messages, per the Anthropic convention every harness is normalized into.
StopReason
Why an assistant turn ended. Other keeps any harness-specific reason round-trippable rather than collapsing it.
Tool
A canonical tool invocation.
ToolOutput
The result payload of a tool call: text, or the harness’s structured output kept as JSON.