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