Skip to main content

cookie_agent_engine/
lib.rs

1//! The transport-free single-conversation cookie agent runtime.
2
3pub mod actor;
4mod config_store;
5mod delegation_api;
6pub mod delegation_events;
7pub mod events;
8mod goal_projection;
9pub mod grant_journal;
10mod mcp;
11mod media;
12mod model_bridge;
13mod model_history;
14mod model_policy;
15mod model_snapshots;
16mod ownership;
17pub mod permissions;
18mod plugin;
19mod policy;
20pub(crate) mod runtime;
21mod runtime_snapshot;
22pub mod session;
23#[cfg(test)]
24mod test_support;
25mod tool_api;
26mod usage;
27
28pub use cookie_agent_protocol::PersistedToolResult;
29pub use delegation_api::{DelegateAwait, DelegateHandle, DelegateInvocation};
30pub use mcp::{McpRegistry, McpServerState, McpServerStatus};
31pub use media::{AttachmentGate, approved_media_type, attachment_gate_error, gate_attachment};
32pub use plugin::{EngineEvent, PluginRegistry, PluginState, PluginStatus};
33/// Stable `send_message:<code>` error strings carried by
34/// [`EngineError::Messaging`]. The tool layer surfaces them verbatim so sending
35/// models can react predictably (retry, back off, or give up).
36pub use runtime::handles::SubagentScope;
37pub use runtime::messaging_api::{
38    MESSAGE_DISABLED, MESSAGE_ENGINE_SHUTDOWN, MESSAGE_INBOX_FULL, MESSAGE_INFLIGHT_FULL,
39    MESSAGE_INVALID_ARGUMENTS, MESSAGE_INVALID_BODY, MESSAGE_MAX_HOPS_EXCEEDED,
40    MESSAGE_NOT_TREE_PEER, MESSAGE_SELF_SEND, MESSAGE_UNKNOWN_SESSION,
41};
42pub use runtime::{
43    AgentMessageHandle, AgentMessageInvocation, AgentRecipientState, ApprovalRespondFailure,
44    ArtifactReadPage, Engine, EngineError, EngineHistoryView, EngineOptions, SkillInvocation,
45};
46pub use runtime_snapshot::PublishedRuntime;
47pub use tool_api::{
48    PreparedExecutor, PreparedSerializationKey, PreparedTool, ProgressSink, PromptSection,
49    SessionToolContext, StdinWrite, ToolCall, ToolCompletion, ToolConcurrency, ToolError,
50    ToolExecutionContext, ToolPreparationContext, ToolProgress, ToolProvider,
51    ToolResultTruncationPolicy, ToolSpec, ToolStdin, TurnAgentContext,
52};
53
54pub(crate) use runtime::ArtifactRouter;
55#[cfg(test)]
56pub(crate) use runtime::{ArtifactStore, test_session_id};