Skip to main content

supercode_interchange/
lib.rs

1//! Provider-neutral canonical data for coding-agent session interchange.
2//!
3//! This crate is the dependency base for Supercode's translators, optional
4//! reversible reducer, and optional native runtime. During the compatibility
5//! migration it first owns canonical messages and their deterministic token
6//! estimates; session containers and native codecs move here next without
7//! changing their public shapes.
8
9#![warn(missing_docs)]
10
11pub mod catalog;
12mod error;
13mod fidelity;
14mod message;
15mod native_store;
16pub mod session;
17pub mod session_tree;
18pub mod sidecar;
19mod token_estimator;
20pub mod watch;
21
22pub use catalog::{
23    DiscoveryPage, DiscoveryQuery, HarnessCatalog, HarnessHomes, HarnessId, SessionDescriptor,
24    SessionLocator, SessionPreviewCandidate, StorageLocator,
25};
26pub use error::{InterchangeError, InterchangeError as Error, Result};
27pub use fidelity::{
28    core_messages, measure_fidelity, messages_equal, messages_equal_multimodal, replay_eligible,
29    replay_excluded, Fidelity, FidelityMetric, FidelityResidue,
30};
31pub use message::{
32    is_tool_error, mark_tool_error, mark_tool_outcome_unknown, tool_outcome, ChatMessage,
33    FunctionCall, Role, ToolCall, ToolOutcome, TOOL_ERROR_METADATA_KEY,
34    TOOL_OUTCOME_UNKNOWN_METADATA_KEY,
35};
36#[doc(hidden)]
37pub use native_store::load_native_store_family;
38pub use session::{Session, SessionFormat, SessionMeta, SessionSource};
39pub use token_estimator::{estimate_tokens, estimate_view_tokens, format_commas};
40pub use watch::{SessionFollower, SessionSnapshotReason, SessionWatchEvent};