Expand description
Provider-neutral canonical data for coding-agent session interchange.
This crate is the dependency base for Supercode’s translators, optional reversible reducer, and optional native runtime. During the compatibility migration it first owns canonical messages and their deterministic token estimates; session containers and native codecs move here next without changing their public shapes.
Re-exports§
pub use catalog::DiscoveryPage;pub use catalog::DiscoveryQuery;pub use catalog::HarnessCatalog;pub use catalog::HarnessHomes;pub use catalog::HarnessId;pub use catalog::SessionDescriptor;pub use catalog::SessionLocator;pub use catalog::SessionPreviewCandidate;pub use catalog::StorageLocator;pub use session::Session;pub use session::SessionFormat;pub use session::SessionMeta;pub use session::SessionSource;pub use watch::SessionFollower;pub use watch::SessionSnapshotReason;pub use watch::SessionWatchEvent;
Modules§
- catalog
- Discovery and durable addressing for sessions written by external harnesses.
- session
- Natively load — and continue — real Claude Code and Codex sessions.
- session_
tree - P5-5 (design §2 module 21
session.tree: “D5 in-place tree, rewind-anywhere, branch summaries, entry labels”; §2.1 D-6session.tree → core.session(tree-addressable transcript); §2.2 C7; §5.2 P5 row 5: “loaders are already tree-aware (C7 resolution); adds in-place rewind/branch/label on the native store”). - sidecar
- The supercode-native v2 wire record for a conversation turn appended after import.
- watch
- Passive, change-triggered following of local coding-harness sessions.
Structs§
- Chat
Message - A single message in a conversation.
- Fidelity
Metric - Result of measuring one actual translation cell.
- Fidelity
Residue - Measured residue of one actual export/reload cell.
- Function
Call - The function payload of a
ToolCall. - Tool
Call - A request from the model to invoke a tool.
Enums§
- Error
- An error at a native session-format boundary.
- Fidelity
- How faithfully a reconstruction reproduces its source.
- Interchange
Error - An error at a native session-format boundary.
- Role
- Who authored a
ChatMessage. - Tool
Outcome - The structural outcome known for a tool-result message.
Constants§
- TOOL_
ERROR_ METADATA_ KEY - Canonical metadata key marking a tool result as a structured error.
- TOOL_
OUTCOME_ UNKNOWN_ METADATA_ KEY - Canonical metadata key marking a tool result whose outcome is unknown.
Functions§
- core_
messages - Canonical messages participating in cross-format fidelity scoring.
- estimate_
tokens - Deterministic token estimate:
ceil(utf8_bytes / 4). - estimate_
view_ tokens - Estimate the serialized wire size of canonical messages.
- format_
commas - Render
nwith comma thousands separators. - is_
tool_ error - Whether a message carries the canonical structured-error marker.
- mark_
tool_ error - Stamp a tool-result message as a structured error.
- mark_
tool_ outcome_ unknown - Stamp a tool-result message as having no structurally known outcome.
- measure_
fidelity - Measure an export/reload cell without applying a regression floor.
- messages_
equal - Compare semantic message fields shared by the supported harnesses.
- messages_
equal_ multimodal - Compare semantics plus multimodal parts and tool names.
- replay_
eligible - The replayable subsequence of a canonical transcript.
- replay_
excluded - Whether a source message was intentionally outside the replayable slice.
- tool_
outcome - Return the canonical structural outcome for a tool-result message.
Type Aliases§
- Result
- Result type for interchange operations.