Skip to main content

a3s_code_core/
lib.rs

1//! A3S Code Core Library
2//!
3//! Harness-driven runtime for coding agents.
4//!
5//! `Agent` and `AgentSession` are the primary 2.0 API. Lower-level session
6//! runtime state is internal; persistence data flows through `store::SessionData`.
7//!
8//! ## Quick Start
9//!
10//! ```rust,no_run
11//! use a3s_code_core::{Agent, AgentEvent};
12//!
13//! # async fn run() -> anyhow::Result<()> {
14//! // From an ACL-compatible config file path (.acl)
15//! let agent = Agent::new("agent.acl").await?;
16//!
17//! // Create a workspace-bound session
18//! let session = agent.session_async("/my-project", None).await?;
19//!
20//! // Non-streaming
21//! let result = session.send("What files handle auth?", None).await?;
22//! println!("{}", result.text);
23//!
24//! // Streaming (AgentEvent is #[non_exhaustive])
25//! let (mut rx, _handle) = session.stream("Refactor auth", None).await?;
26//! while let Some(event) = rx.recv().await {
27//!     match event {
28//!         AgentEvent::TextDelta { text } => print!("{text}"),
29//!         AgentEvent::End { .. } => break,
30//!         _ => {} // required: #[non_exhaustive]
31//!     }
32//! }
33//! # Ok(())
34//! # }
35//! ```
36//!
37//! ## Disposable Workers
38//!
39//! ```rust,no_run
40//! use a3s_code_core::{Agent, SessionOptions, WorkerAgentSpec};
41//!
42//! # async fn run() -> anyhow::Result<()> {
43//! let agent = Agent::new("agent.acl").await?;
44//! let frontend = WorkerAgentSpec::implementer(
45//!     "frontend-cow",
46//!     "Small verified frontend fixes",
47//! )
48//! .with_model_ref("openai/gpt-4o")
49//! .with_max_steps(24);
50//!
51//! let session = agent.session_async(
52//!     "/my-project",
53//!     Some(SessionOptions::new().with_worker_agent(frontend)),
54//! ).await?;
55//! # Ok(())
56//! # }
57//! ```
58//!
59//! ## Architecture
60//!
61//! ```text
62//! Agent (config-driven facade)
63//!   +-- AgentSession (workspace-bound execution API)
64//!       +-- internal turn runner
65//!       +-- ContextAssembler / ContextProvider
66//!       +-- ToolSelector
67//!       +-- ToolExecutor
68//!       +-- ProgramExecutor (PTC)
69//!       +-- SkillRegistry
70//!       +-- Permission / confirmation
71//!       +-- Trace / artifacts / verification evidence
72//!
73//! Advanced infrastructure:
74//!   +-- optional lane queues for explicit external/hybrid dispatch
75//! ```
76
77pub(crate) mod agent;
78pub(crate) mod agent_api;
79pub mod agent_protocol;
80pub mod agent_protocol_harness;
81pub mod agent_protocol_host;
82pub(crate) mod bounded_io;
83pub mod budget;
84pub mod capability;
85pub(crate) mod child_run;
86pub mod code_intelligence;
87pub mod cognitive_context;
88pub mod commands;
89pub(crate) mod compaction;
90pub mod config;
91pub mod content_digest;
92pub mod context;
93pub mod core_event_log;
94pub mod core_identity;
95pub mod durable_memory;
96#[cfg(feature = "dynamic-workflow")]
97pub mod dynamic_workflow;
98pub mod embedding;
99pub mod error;
100#[cfg(feature = "evaluation")]
101pub mod evaluation;
102pub mod event_protocol;
103pub mod execution_identity;
104#[cfg(feature = "dynamic-workflow")]
105pub mod flow_graph;
106pub(crate) mod git;
107pub mod harness_evidence;
108pub mod hitl;
109pub mod hooks;
110pub mod host_env;
111pub(crate) mod language;
112pub mod llm;
113pub mod loop_checkpoint;
114pub mod mcp;
115pub mod memory;
116#[cfg(feature = "headless-search")]
117pub mod moli_runtime;
118pub mod orchestration;
119pub(crate) mod ordered_parallel;
120pub mod permissions;
121pub mod planning;
122pub mod program;
123pub(crate) mod prompts;
124pub mod queue;
125pub mod release;
126#[cfg(feature = "research")]
127pub mod research;
128pub mod retention;
129pub(crate) mod retry;
130pub mod rl_trajectory;
131pub mod run;
132pub mod run_control;
133pub(crate) mod safety_gate;
134pub mod sandbox;
135pub mod sdk_capabilities;
136#[cfg(feature = "headless-search")]
137pub mod search_runtime;
138pub mod security;
139#[cfg(feature = "serve")]
140pub mod serve;
141pub mod session_checkpoint;
142pub(crate) mod session_lane_queue;
143pub mod skills;
144pub(crate) mod sse;
145#[cfg(feature = "state-graph")]
146pub mod state_graph;
147pub mod store;
148pub mod subagent;
149pub mod subagent_task_tracker;
150pub mod task_scheduler;
151pub mod telemetry;
152#[cfg(feature = "telemetry")]
153pub mod telemetry_otel;
154#[cfg(test)]
155pub(crate) mod test_support;
156pub(crate) mod text;
157pub(crate) mod tool_confirmation;
158pub mod tools;
159pub mod trace;
160pub mod use_runtime_tasks;
161pub mod verification;
162pub mod workspace;
163
164// Re-export key types at crate root for ergonomic usage
165pub use agent::{AgentEvent, AgentExecutionFailure, AgentResult, ModelMiddlewareHealthSnapshot};
166pub use agent_api::{
167    Agent, AgentRunSpawn, AgentSession, ProjectedFlowHandle, ProjectedUiHandle, ReadFileOptions,
168    SessionBuilder, SessionOptions, ToolCallResult,
169};
170pub use agent_protocol::{
171    AgentProtocolChangeSetRequestV1, AgentProtocolChangeSetV1, AgentProtocolCommandActionV1,
172    AgentProtocolCommandReceiptV1, AgentProtocolCommandV1, AgentProtocolError,
173    AgentProtocolEventPageRequestV1, AgentProtocolEventPageV1, AgentProtocolEventRecordV1,
174    AgentProtocolRunCancelV1, AgentProtocolRunIdentityV1, AgentProtocolRunRecoverExactV1,
175    AgentProtocolRunRecoverV1, AgentProtocolRunStartV1, AgentProtocolRunStateV1,
176    AGENT_PROTOCOL_CHANGE_SET_ENCODING_V1, AGENT_PROTOCOL_CHANGE_SET_FORMAT_V1,
177    AGENT_PROTOCOL_CHANGE_SET_HTTP_PATH_V1, AGENT_PROTOCOL_COMMAND_HTTP_PATH_V1,
178    AGENT_PROTOCOL_EVENT_PAGE_HTTP_PATH_V1, AGENT_PROTOCOL_MAX_CHANGE_SET_BYTES,
179    AGENT_PROTOCOL_MAX_CHANGE_SET_RESPONSE_BYTES, AGENT_PROTOCOL_MAX_EVENTS_PER_PAGE,
180    AGENT_PROTOCOL_MAX_EVENT_METADATA_BYTES, AGENT_PROTOCOL_MAX_EVENT_PAGE_BYTES,
181    AGENT_PROTOCOL_MAX_EVENT_PAYLOAD_BYTES, AGENT_PROTOCOL_MAX_EVENT_RECORD_BYTES,
182    AGENT_PROTOCOL_MAX_EVENT_TYPE_BYTES, AGENT_PROTOCOL_MAX_ID_BYTES,
183    AGENT_PROTOCOL_MAX_PROMPT_BYTES, AGENT_PROTOCOL_MAX_REASON_BYTES, AGENT_PROTOCOL_V1,
184};
185pub use agent_protocol_harness::{
186    AgentProtocolCheckpointRecoveryError, AgentProtocolHarness, AgentProtocolHarnessError,
187    AGENT_PROTOCOL_HARNESS_MAX_SESSIONS,
188};
189pub use agent_protocol_host::{
190    AgentProtocolExactRecoveryError, AgentProtocolHost, AgentProtocolHostError,
191};
192pub use code_intelligence::{
193    CodeDiagnostic, CodeDiagnosticSeverity, CodeIntelligenceCapabilities, CodeIntelligenceError,
194    CodeIntelligenceLanguageStatus, CodeIntelligenceResult, CodeIntelligenceState,
195    CodeIntelligenceStatus, CodeLocation, CodePosition, CodeQueryResult, CodeRange, CodeSymbolKind,
196    DocumentRevision, DocumentSnapshot, DocumentSymbol, LanguageId, LocalCodeIntelligence,
197    NavigationKind, SymbolInformation, WorkspaceCodeIntelligence,
198};
199pub use cognitive_context::{
200    CognitiveContextDocumentV1, CognitiveContextError, CognitiveContextLimits,
201    CognitiveContextProvider, CognitiveContextRequestV1, CognitiveContextResponseV1,
202    CognitiveContextResult, CognitiveContextSession, CognitiveKnowledgeBindingV1,
203    CognitiveKnowledgeCitationV1, CognitivePackageBindingV1,
204    COGNITIVE_CONTEXT_REQUEST_DIGEST_DOMAIN, COGNITIVE_CONTEXT_REQUEST_SCHEMA,
205    COGNITIVE_CONTEXT_RESPONSE_SCHEMA, COGNITIVE_KNOWLEDGE_BINDING_SCHEMA,
206    COGNITIVE_PACKAGE_BINDING_SCHEMA, OKF_KNOWLEDGE_CITATION_SCHEMA,
207    OKF_KNOWLEDGE_READ_REQUEST_SCHEMA, OKF_KNOWLEDGE_SEARCH_REQUEST_SCHEMA,
208};
209pub use config::{
210    AutoDelegationConfig, CodeConfig, ModelConfig, ModelCost, ModelLimit, ModelModalities,
211    OsConfig, ProviderConfig,
212};
213pub use content_digest::{digest_bytes, digest_json, validate_digest};
214pub use core_event_log::{
215    CoreEventLog, CoreEventLogError, CoreLogAppendOutcomeV1, CoreLogEntryV1, CoreLogPageV1,
216    CoreLogVerificationV1, CORE_LOG_ENTRY_DIGEST_DOMAIN_V1, CORE_LOG_ENTRY_SCHEMA_V1,
217    CORE_LOG_GENESIS_PREVIOUS_DIGEST,
218};
219pub use core_identity::{
220    ArtifactRef, CapabilityStamp, CoreEventIdentity, CoreIdentity, CoreIdentityError,
221    EvidenceCursor, LogicalClock, ManualLogicalClock, OperationId, SourceRevision,
222    SystemLogicalClock, CORE_EVENT_IDENTITY_DIGEST_DOMAIN_V1, CORE_EVENT_IDENTITY_SCHEMA_V1,
223    CORE_EVENT_PAYLOAD_DIGEST_DOMAIN_V1, CORE_IDENTITY_MAX_ARTIFACT_BYTES,
224    CORE_IDENTITY_MAX_EVENT_TYPE_BYTES, CORE_IDENTITY_MAX_ID_BYTES,
225    CORE_IDENTITY_MAX_MEDIA_TYPE_BYTES, CORE_IDENTITY_MAX_PAYLOAD_BYTES, CORE_IDENTITY_SCHEMA_V1,
226};
227pub use durable_memory::{
228    DurableMemoryActivation, DurableMemoryBindingV1, DurableMemoryMode, DurableMemoryRecallChannel,
229    DurableMemoryRecallHit, DurableMemoryRecallPolicy, DurableMemoryRecallPreview,
230    DurableMemorySemanticBindingV1, DurableMemorySemanticError, DurableMemorySemanticRecall,
231    DurableMemorySemanticRecallPolicy, DurableMemorySemanticRefreshCheckpoint,
232    DurableMemorySemanticRefreshReceipt, DurableMemorySession, DurableMemoryUse,
233    DURABLE_MEMORY_BINDING_SCHEMA_VERSION, DURABLE_MEMORY_CONTEXT_ID_PROFILE_V1,
234    DURABLE_MEMORY_CONTEXT_ID_PROFILE_V2, DURABLE_MEMORY_HYBRID_BINDING_SCHEMA_VERSION,
235    DURABLE_MEMORY_RETRIEVAL_PROFILE_V1, DURABLE_MEMORY_SEMANTIC_BINDING_SCHEMA_V1,
236    DURABLE_MEMORY_SEMANTIC_FUSION_PROFILE_V1,
237    DURABLE_MEMORY_SEMANTIC_REFRESH_CHECKPOINT_SCHEMA_V1,
238    DURABLE_MEMORY_SEMANTIC_REFRESH_PROFILE_V1,
239};
240#[cfg(feature = "dynamic-workflow")]
241pub use dynamic_workflow::{
242    dynamic_workflow_claim_identity, dynamic_workflow_continuation_identity,
243    dynamic_workflow_execution_plan, dynamic_workflow_step_identity, dynamic_workflow_store_path,
244    register_dynamic_workflow, register_dynamic_workflow_with_event_store,
245    register_dynamic_workflow_with_scheduler, CrossProcessFlowEventStore,
246    DynamicWorkflowAdmissionStats, DynamicWorkflowControl, DynamicWorkflowControlDiagnostics,
247    DynamicWorkflowControlSnapshot, DynamicWorkflowHealthSnapshot, DynamicWorkflowRuntime,
248    DynamicWorkflowScriptLimits, DynamicWorkflowTool, DYNAMIC_WORKFLOW_RUNTIME_BUILD_ID,
249    DYNAMIC_WORKFLOW_STORE_RELATIVE_PATH,
250};
251pub use embedding::{
252    EmbeddingBatchRequest, EmbeddingBatchResponse, EmbeddingError, EmbeddingExecution,
253    EmbeddingExecutor, EmbeddingExecutorConfig, EmbeddingFailureKind, EmbeddingInput,
254    EmbeddingNormalization, EmbeddingProvider, EmbeddingProviderDescriptor, EmbeddingProviderError,
255    EmbeddingResult, EmbeddingVector,
256};
257pub use error::SessionBuildResource;
258pub use error::{CodeError, Result};
259#[cfg(feature = "evaluation")]
260pub use evaluation::{
261    AuxiliaryCapabilityProfileV1, AuxiliaryExecutor, AuxiliaryModeV1, AuxiliaryRunContextV1,
262    AuxiliaryRunError, AuxiliaryRunHandle, AuxiliaryRunOutputV1, AuxiliaryRunService,
263    AuxiliaryRunSnapshotV1, AuxiliaryRunSpecV1, AuxiliaryRunStateV1, EvaluationBoundaryV1,
264    EvaluationDispatch, EvaluationDispatchClaimOutcome, EvaluationDispatchLedger,
265    EvaluationDispatchLedgerError, EvaluationDispatchOutcome, EvaluationPlanV1, EvaluationPolicy,
266    EvaluationProtocolError, EvaluationRecordV1, EvaluationResultSink, EvaluationResultV1,
267    EvaluationStoreError, EvaluationSupervisor, EvaluationWireEnvelopeV1,
268    EvaluationWireKindDescriptorV1, EvaluationWireKindV1, EvaluationWireTypeV1,
269    EvaluationWriteOutcomeV1, EventCursorV1, EvidenceArtifactV1, EvidenceContentModeV1,
270    EvidenceError, EvidenceEventV1, EvidenceLimitsV1, EvidenceReadRequestV1, EvidenceReader,
271    EvidenceRunStateV1, EvidenceSnapshotV1, ExecutionFactInputV1, ExecutionFactJournal,
272    ExecutionFactKindV1, ExecutionFactPageV1, ExecutionFactRecorder, ExecutionFactSnapshotV1,
273    ExecutionFactV1, ExecutionFrameV1, ExecutionTargetV1, FactAppendOutcomeV1,
274    FileEvaluationDispatchLedger, FileEvaluationResultStore, IdentityError,
275    InMemoryAuxiliaryRunService, InMemoryEvaluationDispatchLedger, InMemoryEvaluationResultStore,
276    InMemoryExecutionFactJournal, JournalError, RunEvidenceReader, StructuredAuxiliaryExecutor,
277    SupervisorError, AUXILIARY_MAX_OUTPUT_BYTES, AUXILIARY_MAX_STEPS, AUXILIARY_OUTPUT_SCHEMA_V1,
278    AUXILIARY_RUN_SCHEMA_V1, AUXILIARY_SNAPSHOT_SCHEMA_V1, EVALUATION_DISPATCH_LEASE_GRACE_MS,
279    EVALUATION_DISPATCH_LEDGER_DEFAULT_MAX_RECORDS, EVALUATION_DISPATCH_LEDGER_MAX_BYTES,
280    EVALUATION_DISPATCH_LEDGER_SCHEMA_V1, EVALUATION_DISPATCH_MIN_LEASE_MS,
281    EVALUATION_MAX_COOLDOWN_MS, EVALUATION_MAX_ID_BYTES, EVALUATION_MAX_PENDING,
282    EVALUATION_PLAN_SCHEMA_V1, EVALUATION_PROTOCOL_MAX_MESSAGE_BYTES,
283    EVALUATION_PROTOCOL_SCHEMA_V1, EVALUATION_PROTOCOL_VERSION_V1, EVALUATION_RECORD_SCHEMA_V1,
284    EVALUATION_RESULT_SCHEMA_V1, EVALUATION_RESULT_STORE_DEFAULT_MAX_RECORDS,
285    EVALUATION_RESULT_STORE_MAX_BYTES, EVALUATION_RESULT_STORE_SCHEMA_V1,
286    EVALUATION_WIRE_KIND_DESCRIPTORS_V1, EVIDENCE_MAX_ARTIFACTS, EVIDENCE_MAX_ARTIFACT_BYTES,
287    EVIDENCE_MAX_EVENTS, EVIDENCE_MAX_EVENT_BYTES, EVIDENCE_MAX_PROMPT_BYTES,
288    EVIDENCE_MAX_RESULT_BYTES, EVIDENCE_SNAPSHOT_SCHEMA_V1, EXECUTION_FACT_SCHEMA_V1,
289    EXECUTION_FRAME_SCHEMA_V1, EXECUTION_TARGET_SCHEMA_V1,
290};
291pub use event_protocol::{
292    run_event_envelope_v1, AgentEventProjectionV1, AgentEventTypeV1, EventEnvelopeV1,
293    EventProtocolError, AGENT_EVENT_TYPES_V1, EVENT_ENVELOPE_V1_VERSION,
294};
295#[cfg(feature = "dynamic-workflow")]
296pub use flow_graph::{
297    run_object_id as flow_run_object_id, step_object_id as flow_step_object_id,
298    FileFlowDecisionLedger, FlowDecision, FlowDecisionClaimOutcome, FlowDecisionClaimState,
299    FlowDecisionDispatchError, FlowDecisionDispatcher, FlowDecisionHealthSnapshot,
300    FlowDecisionHealthStatus, FlowDecisionLedger, FlowDecisionRequest, FlowDecisionSink,
301    FlowDecisionStep, FlowGraphHealthSnapshot, FlowGraphHealthStatus, FlowGraphObserver,
302    MemoryFlowDecisionLedger, FLOW_GRAPH_SOURCE,
303};
304pub use harness_evidence::{
305    HarnessEvidenceError, ModelInputKindV1, ModelInputSnapshotV1, ModelPresentationApplicationV1,
306    ModelPresentationSnapshotV1, ModelUsageSnapshotV1, RunCapabilitySnapshotV1,
307    RunPolicyCeilingSnapshotV1, ToolRequestOriginV1, ToolRequestSnapshotV1,
308    ToolResultContextUsageV1, WorkspaceCapabilitySnapshotV1,
309    WorkspaceRetrievalCapabilitySnapshotV1, MODEL_INPUT_SNAPSHOT_V1_SCHEMA,
310    MODEL_PRESENTATION_SNAPSHOT_V1_SCHEMA, MODEL_USAGE_SNAPSHOT_V1_SCHEMA,
311    RUN_CAPABILITY_SNAPSHOT_V1_SCHEMA, TOOL_REQUEST_SNAPSHOT_V1_SCHEMA,
312};
313pub use llm::{
314    clear_http_metrics_callback, set_http_metrics_callback, AnthropicClient, Attachment,
315    ContentBlock, HttpMetricsCallback, HttpMetricsRecord, ImageSource, LlmClient, LlmResponse,
316    Message, ModelGenerationAdmission, ModelGenerationAdmissionError, ModelGenerationConcurrency,
317    ModelGenerationPermit, ModelGenerationPool, ModelGenerationPoolError,
318    ModelGenerationPoolHealthSnapshot, OpenAiClient, TokenUsage,
319};
320#[cfg(feature = "headless-search")]
321pub use moli_runtime::{
322    default_moli_version, ensure_moli, moli_runtime_info, packaged_moli, MoliRuntimeInfo,
323    MOLI_RUNTIME_INFO_SCHEMA_V1,
324};
325pub use orchestration::{
326    execute_loop, execute_pipeline, execute_steps_parallel, execute_steps_parallel_resumable,
327    workflow_step_execution_identity, workflow_step_result_receipt, AgentExecutor, AgentStepSpec,
328    BudgetSnapshot, LoopDecision, PipelineStage, StepOutcome, Workflow, WorkflowBudget,
329    WorkflowBuilder, WorkflowCheckpoint, WorkflowEvent, WorkflowStepRecord,
330    WORKFLOW_CHECKPOINT_SCHEMA_VERSION,
331};
332pub use prompts::{
333    infer_user_reply_language, output_language_contract, resolve_product_output_language,
334    AgentStyle, DetectionConfidence, PlanningMode, SystemPromptSlots,
335};
336#[cfg(feature = "research")]
337pub use research::{
338    ResearchArtifactKindV1, ResearchCitationV1, ResearchClaimStatusV1, ResearchClaimV1,
339    ResearchContractError, ResearchEventV1, ResearchEvidenceCompletenessV1,
340    ResearchEvidenceFactKindV1, ResearchEvidenceFactV1, ResearchEvidenceGraphV1,
341    ResearchProtocolError, ResearchProvenanceReceiptV1, ResearchReproducibilityManifestV1,
342    ResearchReproducibilityV1, ResearchRerunLineageV1, ResearchReviewBatchV1,
343    ResearchReviewCategoryV1, ResearchReviewFindingV1, ResearchReviewLocationV1,
344    ResearchReviewSeverityV1, ResearchReviewStatusV1, ResearchRunStatusV1, ResearchRunV1,
345    ResearchWireEnvelopeV1, ResearchWireKindDescriptorV1, ResearchWireKindV1, ResearchWireTypeV1,
346    ResearchWorkflowPlanV1, ResearchWorkflowStepV1, RESEARCH_ARTIFACT_KINDS,
347    RESEARCH_CITATION_SCHEMA_V1, RESEARCH_CLAIM_SCHEMA_V1, RESEARCH_EVENT_SCHEMA_V1,
348    RESEARCH_EVIDENCE_FACT_SCHEMA_V1, RESEARCH_EVIDENCE_GRAPH_SCHEMA_V1,
349    RESEARCH_MAX_EVIDENCE_GRAPH_CITATIONS, RESEARCH_MAX_EVIDENCE_GRAPH_CLAIMS,
350    RESEARCH_MAX_REVIEW_FINDINGS, RESEARCH_MAX_WORKFLOW_STEPS, RESEARCH_PROTOCOL_MAX_MESSAGE_BYTES,
351    RESEARCH_PROTOCOL_SCHEMA_V1, RESEARCH_PROTOCOL_VERSION_V1,
352    RESEARCH_PROVENANCE_RECEIPT_SCHEMA_V1, RESEARCH_REPRODUCIBILITY_MANIFEST_SCHEMA_V1,
353    RESEARCH_RERUN_LINEAGE_SCHEMA_V1, RESEARCH_REVIEW_BATCH_SCHEMA_V1,
354    RESEARCH_REVIEW_FINDING_SCHEMA_V1, RESEARCH_RUN_SCHEMA_V1, RESEARCH_WIRE_KIND_DESCRIPTORS_V1,
355    RESEARCH_WORKFLOW_PLAN_SCHEMA_V1, RESEARCH_WORKFLOW_STEP_SCHEMA_V1,
356};
357pub use rl_trajectory::{RlTrajectoryConfig, RlTrajectoryMode, RlTrajectoryRecorder};
358pub use run::{
359    ActiveToolSnapshot, InMemoryRunStore, RunEventRecord, RunHandle, RunRecord, RunReservation,
360    RunSnapshot, RunStatus, RunWorkspaceChangeSet, RunWorkspaceChangeSetError,
361};
362pub use run_control::{
363    InterruptRequest, RunControlCommand, RunControlError, RunControlErrorInfo, RunControlOperation,
364    RunControlReceipt, RunControlReceiptState, RunControlRequest, RunControlSnapshot, SteerRequest,
365    RUN_CONTROL_MAX_ID_BYTES, RUN_CONTROL_MAX_INPUT_BYTES, RUN_CONTROL_MAX_QUEUE,
366    RUN_CONTROL_MAX_REASON_BYTES, RUN_CONTROL_MAX_SEEN_REQUESTS, RUN_CONTROL_RECEIPT_SCHEMA_V1,
367    RUN_CONTROL_REQUEST_SCHEMA_V1,
368};
369pub use sdk_capabilities::{
370    sdk_baseline_capabilities, sdk_capabilities, sdk_capabilities_schema, CapabilityTier,
371    SdkCapability, SDK_CAPABILITIES_SCHEMA_V1, SDK_CAPABILITIES_SCHEMA_V2,
372};
373pub use session_checkpoint::{
374    SdkSessionCheckpointExportV1, SessionCheckpointDescriptorV1, SessionCheckpointError,
375    SessionCheckpointExportSink, SessionCheckpointExportV1, SessionCheckpointPayloadV1,
376    SessionLogicalResumeEvidenceV1, SessionSnapshotEvidenceV1,
377    SESSION_CHECKPOINT_DESCRIPTOR_SCHEMA_V1, SESSION_CHECKPOINT_ENCODING_V1,
378    SESSION_CHECKPOINT_FORMAT_V1, SESSION_CHECKPOINT_LOGICAL_RESUME_SEMANTICS_V1,
379    SESSION_CHECKPOINT_MAX_CONTENT_BYTES, SESSION_CHECKPOINT_MEDIA_TYPE_V1,
380    SESSION_CHECKPOINT_PAYLOAD_SCHEMA_V1, SESSION_LOGICAL_RESUME_EVIDENCE_SCHEMA_V1,
381    SESSION_SNAPSHOT_EVIDENCE_SCHEMA_V1,
382};
383#[cfg(feature = "state-graph")]
384pub use state_graph::{
385    graph_event_head, Behavior, BehaviorContext, BehaviorError, EventFilter, ExternalEvent,
386    ExternalProjectionOutcome, FileGraphEventStore, FnBehavior, GraphDiff, GraphEvent,
387    GraphEventRecord, GraphEventStore, GraphObject, GraphPatch, GraphRelation, GraphRuntime,
388    GraphSaveOutcome, MemoryGraphEventStore, ObjectId, PatchOperation, RelationId, ReplayError,
389    RuntimeError as GraphRuntimeError, RuntimeLimits, StateGraph, GRAPH_EVENT_SCHEMA_VERSION,
390};
391pub use subagent::{
392    AgentDefinition, AgentRegistry, CattleAgentKind, CattleAgentSpec, ConfirmationInheritance,
393    WorkerAgentKind, WorkerAgentSpec,
394};
395pub use subagent_task_tracker::{
396    InMemorySubagentTaskTracker, SubagentProgressEntry, SubagentStatus, SubagentTaskSnapshot,
397};
398pub use task_scheduler::{
399    TaskLease, TaskPriority, TaskPriorityCounts, TaskScheduler, TaskSchedulerConfig,
400    TaskSchedulerError, TaskSchedulerHealthSnapshot, TaskSchedulerQuota,
401    TaskSchedulerQuotaHealthSnapshot, TaskSchedulerQuotaSnapshot, TaskSchedulerStats,
402    TASK_SCHEDULER_MAX_QUOTAS, TASK_SCHEDULER_MAX_SCOPE_BYTES,
403    TASK_SCHEDULER_QUOTA_HEALTH_RETENTION,
404};
405pub use tools::{
406    ImmutableContentAdapter, ImmutableContentAdapterBindingV1, ImmutableContentAdapterSession,
407    ImmutableContentDescriptorV1, ImmutableContentError, ImmutableContentKindV1,
408    ImmutableContentReferenceV1, ImmutableContentResult, ImmutableContentWriteRequestV1,
409    SdkImmutableContentWriteRequestV1, ToolPresentationError, ToolPresentationModeV1,
410    ToolPresentationProfileV1, IMMUTABLE_CONTENT_ADAPTER_BINDING_SCHEMA_V1,
411    IMMUTABLE_CONTENT_DESCRIPTOR_SCHEMA_V1, IMMUTABLE_CONTENT_REFERENCE_SCHEMA_V1,
412    TOOL_PRESENTATION_PROFILE_V1_SCHEMA, TOOL_RESULT_CONTENT_MEDIA_TYPE,
413};
414pub use tools::{ToolCapabilities, ToolErrorKind, ToolOutputKind, ToolResultTrustV1};
415pub use use_runtime_tasks::{
416    UsePlanScope, UsePlanScopeKind, UseProjectedLifecycleIdentity, UseRuntimeTaskDispatcher,
417    UseRuntimeTaskError, UseRuntimeTaskExecutionV1, UseRuntimeTaskProjectionAdapter,
418    UseRuntimeTaskProjectionV1, UseRuntimeTaskRequestV1, UseRuntimeTaskResult,
419    MAX_USE_RUNTIME_TASK_ARGUMENTS, MAX_USE_RUNTIME_TASK_ARGUMENT_BYTES,
420    MAX_USE_RUNTIME_TASK_OUTPUT_BYTES, MAX_USE_RUNTIME_TASK_TIMEOUT_MS,
421    USE_RUNTIME_TASK_REQUEST_SCHEMA, USE_RUNTIME_TASK_RESULT_SCHEMA,
422};
423pub use workspace::{
424    ChunkCatalogLimits, ChunkCatalogSnapshot, ChunkingConfig, CommandOutput, CommandOutputObserver,
425    CommandOutputSummary, CommandRequest, CustomWorkspaceChunkingStrategy,
426    FixedWindowChunkingOptions, GrepCandidateIndex, GrepCandidateSelection, LexicalSearchHit,
427    LexicalSearchRequest, LexicalSearchResult, LocalWorkspaceAccessPolicy, LocalWorkspaceBackend,
428    LocalWorkspaceFile, LocalWorkspaceFileStatus, LocalWorkspaceManifest,
429    LocalWorkspaceManifestSnapshot, ManifestWorkspaceBackend, RecentWorkspaceFile,
430    RecursiveChunkingOptions, RemoteGitBackend, RemoteGitBackendConfig, RemoteGitConflict,
431    SharedGrepCandidateIndex, UnconstrainedGrepCandidateIndex, VirtualPathResolver,
432    WorkspaceCapabilities, WorkspaceChunk, WorkspaceChunkCatalog, WorkspaceChunkId,
433    WorkspaceChunkRange, WorkspaceChunkingError, WorkspaceChunkingInput, WorkspaceChunkingStrategy,
434    WorkspaceCommandRunner, WorkspaceDirEntry, WorkspaceEligibilityPolicy,
435    WorkspaceEmbeddingBatchMetrics, WorkspaceError, WorkspaceFileChange, WorkspaceFileChangeKind,
436    WorkspaceFileSystem, WorkspaceFileSystemExt, WorkspaceFileType, WorkspaceGit,
437    WorkspaceGitBranch, WorkspaceGitCheckoutOutput, WorkspaceGitCheckoutRequest,
438    WorkspaceGitCommit, WorkspaceGitCreateBranchRequest, WorkspaceGitCreateWorktreeRequest,
439    WorkspaceGitDiffRequest, WorkspaceGitRemote, WorkspaceGitRemoveWorktreeRequest,
440    WorkspaceGitStash, WorkspaceGitStashProvider, WorkspaceGitStashRequest, WorkspaceGitStatus,
441    WorkspaceGitWorktree, WorkspaceGitWorktreeMutation, WorkspaceGitWorktreeProvider,
442    WorkspaceGlobRequest, WorkspaceGlobResult, WorkspaceGrepOutcome, WorkspaceGrepRequest,
443    WorkspaceGrepResult, WorkspaceHybridChannelRank, WorkspaceHybridChannelStatus,
444    WorkspaceHybridFallbackReason, WorkspaceHybridSearchHit, WorkspaceHybridSearchRequest,
445    WorkspaceHybridSearchResult, WorkspaceIndexError, WorkspaceLexicalEngine, WorkspacePath,
446    WorkspacePathResolver, WorkspacePersistentIndex, WorkspacePersistentIndexPhase,
447    WorkspacePersistentIndexStatus, WorkspaceRef, WorkspaceRerankAlgorithm,
448    WorkspaceRerankFallbackReason, WorkspaceRerankMode, WorkspaceRerankOptions,
449    WorkspaceRerankStatus, WorkspaceResult, WorkspaceRetrievalChannel, WorkspaceRetrievalError,
450    WorkspaceRetrievalOptions, WorkspaceRetrievalPhase, WorkspaceRetrievalResult,
451    WorkspaceRetrievalRuntime, WorkspaceRetrievalStatus, WorkspaceSearch,
452    WorkspaceSemanticFallbackReason, WorkspaceSemanticIndexLimits, WorkspaceSemanticSearchHit,
453    WorkspaceSemanticSearchRequest, WorkspaceSemanticSearchResult, WorkspaceServices,
454    WorkspaceServicesBuilder, WorkspaceTextRange, WorkspaceTextReader, WorkspaceVersionConflict,
455    WorkspaceWriteOutcome,
456};
457#[cfg(feature = "s3")]
458pub use workspace::{S3BackendConfig, S3WorkspaceBackend};
459#[cfg(feature = "grep-trigram")]
460pub use workspace::{
461    TrigramGrepCandidateIndex, TrigramGrepCandidateIndexError, AUTO_GREP_TRIGRAM_MAX_FILES,
462    GREP_TRIGRAM_INDEX_RELATIVE_DIR,
463};