Skip to main content

proofborne_core/
lib.rs

1//! Stable, serializable primitives shared by every Proofborne surface.
2//!
3//! The JSON shapes in this crate form the v0.1 compatibility boundary. Internal
4//! orchestration APIs may change while the project is pre-1.0.
5
6mod agent;
7mod agent_graph;
8mod auth;
9mod canonical;
10mod compaction;
11mod context;
12mod contract;
13mod event;
14mod provider;
15mod routing;
16mod tool;
17
18pub use agent::{
19    AGENT_PROTOCOL_VERSION, AgentAuthority, AgentBudget, AgentError, AgentRole,
20    DelegationInvalidation, DelegationInvalidationReason, DelegationPlan, HandoffChange,
21    HandoffChangeKind, HandoffReceipt, MergeReceipt, ReviewDecision, ReviewFinding, ReviewReceipt,
22    WorkspaceLease,
23};
24pub use agent_graph::{
25    AGENT_GRAPH_PROTOCOL_VERSION, AgentAuthorityTemplate, AgentGraphBudget, AgentGraphError,
26    AgentGraphNode, AgentGraphNodeTemplate, AgentGraphOutcome, AgentGraphPlan, AgentGraphTemplate,
27    AgentNodeState, SchedulerDecision, SchedulerDecisionKind, SchedulerReceipt,
28};
29pub use auth::{
30    AUTH_PROTOCOL_VERSION, AuthBindings, AuthError, AuthReceipt, AuthReceiptOutcome,
31    TokenLifecycleEvent, TokenStatus, resolve_token_status, transition_token,
32};
33pub use canonical::{canonical_json_bytes, hash_bytes, hash_json};
34pub use compaction::{
35    COMPACTION_ALGORITHM_VERSION, COMPACTION_TOKEN_ESTIMATOR, CompactionBudget,
36    CompactionContextKind, CompactionDecision, CompactionError, CompactionPlan, CompactionPriority,
37    CompactionReceipt, CompactionSelectionReason, CompactionUsage, ContextSelection,
38};
39pub use context::{
40    ContextAuthority, ContextError, ContextInvalidation, ContextInvalidationReason, ContextItem,
41    ContextKind, ContextScope, ContextSource, MemoryItem, MemoryStatus, SecretTaint,
42};
43pub use contract::{
44    ArtifactRef, AssuranceLevel, ClaimScope, Criterion, CriterionEvaluation, CriterionState,
45    Evidence, EvidenceFreshness, EvidenceKind, EvidenceLink, EvidenceRequirement, ProofError,
46    ProofEvaluation, ProofGraph, ProofTermination, RunOutcome, TaskContract, Waiver,
47};
48pub use event::{EventEnvelope, EventError, SCHEMA_VERSION, verify_event_chain};
49pub use provider::{
50    ConversationItem, ProviderCapabilities, ProviderError, ProviderRequest, ProviderStreamEvent,
51    ProviderTurn, StopReason, TokenUsage,
52};
53pub use routing::{
54    MODEL_CATALOG_VERSION, ModelCatalog, ModelDescriptor, ModelPricing, ROUTING_ALGORITHM_VERSION,
55    ROUTING_PRICE_TOKEN_SCALE, RoutingAttemptOutcome, RoutingAttemptReceipt, RoutingBindings,
56    RoutingCandidate, RoutingCapability, RoutingContextSource, RoutingError,
57    RoutingExclusionReason, RoutingPlan, RoutingReceipt, RoutingReceiptOutcome,
58    RoutingRequirements, RoutingSelection,
59};
60pub use tool::{ActionClass, ToolCall, ToolDefinition, ToolResult};