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 message;
14mod native_store;
15pub mod ontology;
16pub mod session;
17pub mod session_tree;
18pub mod sidecar;
19mod token_estimator;
20pub mod watch;
21pub mod world;
22
23pub use catalog::{
24    CodexHistoryTopicIndex, DiscoveryPage, DiscoveryQuery, HarnessCatalog, HarnessHomes, HarnessId,
25    SessionDescriptor, SessionLocator, SessionPreviewCandidate, StorageLocator,
26};
27pub use error::{InterchangeError, InterchangeError as Error, Result};
28pub use message::{
29    is_tool_error, mark_tool_error, mark_tool_outcome_unknown, tool_outcome, ChatMessage,
30    FunctionCall, Role, ToolCall, ToolOutcome, TOOL_ERROR_METADATA_KEY,
31    TOOL_OUTCOME_UNKNOWN_METADATA_KEY,
32};
33#[doc(hidden)]
34pub use native_store::load_native_store_family;
35pub use ontology::{
36    core_messages, measure_fidelity, messages_equal, messages_equal_multimodal, replay_eligible,
37    replay_excluded, ArtifactFidelity, Binding, EndReason, Fidelity, FidelityMetric,
38    FidelityResidue, Residue, SecretRef, Vault, WorldCodec,
39};
40pub use session::{
41    CrossSurface, OrchestrationNouns, Recurrence, Session, SessionFormat, SessionMeta,
42    SessionSource, SurfaceKey, Trigger, WorkspaceKind, WorkspaceRef,
43};
44pub use token_estimator::{estimate_tokens, estimate_view_tokens, format_commas};
45pub use watch::{SessionFollower, SessionSnapshotReason, SessionWatchEvent};