Expand description
meerkat-core - Core agent logic for Meerkat (no I/O deps)
This crate contains all the core types, traits, and logic for Meerkat agents. It is intentionally free of I/O dependencies to enable easy testing and embedding.
Re-exports§
pub use agent::Agent;pub use agent::AgentBuilder;pub use agent::AgentLlmClient;pub use agent::AgentRunner;pub use agent::AgentSessionStore;pub use agent::AgentToolDispatcher;pub use agent::BindOutcome;pub use agent::CommsCapabilityError;pub use agent::CommsRuntime;pub use agent::DispatcherCapabilities;pub use agent::ExternalToolUpdate;pub use agent::FilteredToolDispatcher;pub use agent::LlmStreamResult;pub use agent::select_tool_catalog_mode;pub use agent::should_compose_tool_catalog_control_plane;pub use blob::BlobId;pub use blob::BlobPayload;pub use blob::BlobRef;pub use blob::BlobStore;pub use blob::BlobStoreError;pub use budget::Budget;pub use budget::BudgetLimits;pub use budget::BudgetPool;pub use checkpoint::SessionCheckpointer;pub use comms::CommsCommand;pub use comms::EventStream;pub use comms::InputSource;pub use comms::PeerDirectoryEntry;pub use comms::PeerDirectorySource;pub use comms::PeerName;pub use comms::PeerReachability;pub use comms::PeerReachabilityReason;pub use comms::SendError;pub use comms::SendReceipt;pub use comms::StreamError;pub use comms::StreamScope;pub use comms_drain_lifecycle_authority::CommsDrainLifecycleAuthority;pub use comms_drain_lifecycle_authority::CommsDrainLifecycleEffect;pub use comms_drain_lifecycle_authority::CommsDrainLifecycleError;pub use comms_drain_lifecycle_authority::CommsDrainLifecycleInput;pub use comms_drain_lifecycle_authority::CommsDrainLifecycleMutator;pub use comms_drain_lifecycle_authority::CommsDrainLifecycleTransition;pub use comms_drain_lifecycle_authority::CommsDrainMode;pub use comms_drain_lifecycle_authority::CommsDrainPhase;pub use comms_drain_lifecycle_authority::DrainExitReason;pub use compact::CompactionConfig;pub use compact::CompactionContext;pub use compact::CompactionResult;pub use compact::Compactor;pub use compact::SESSION_COMPACTION_CADENCE_KEY;pub use compact::SessionCompactionCadence;pub use memory::MemoryMetadata;pub use memory::MemoryResult;pub use memory::MemoryStore;pub use memory::MemoryStoreError;pub use model_registry::ModelRegistry;pub use model_registry::ModelRegistryEntry;pub use model_registry::SelfHostedServerRef;pub use peer_meta::PeerMeta;pub use completion_feed::CompletionBatch;pub use completion_feed::CompletionEnrichmentData;pub use completion_feed::CompletionEnrichmentProvider;pub use completion_feed::CompletionEntry;pub use completion_feed::CompletionFeed;pub use completion_feed::CompletionSeq;pub use config::AgentConfig;pub use config::BudgetConfig;pub use config::CallTimeoutOverride;pub use config::CommsAuthMode;pub use config::CommsRuntimeConfig;pub use config::CommsRuntimeMode;pub use config::Config;pub use config::ConfigDelta;pub use config::ConfigError;pub use config::ConfigScope;pub use config::HookEntryConfig;pub use config::HookRunOverrides;pub use config::HookRuntimeConfig;pub use config::HooksConfig;pub use config::LimitsConfig;pub use config::ModelDefaults;pub use config::PlainEventSource;pub use config::ProviderConfig;pub use config::ProviderSettings;pub use config::ProviderToolsConfig;pub use config::RetryConfig;pub use config::SelfHostedApiStyle;pub use config::SelfHostedConfig;pub use config::SelfHostedModelConfig;pub use config::SelfHostedServerConfig;pub use config::SelfHostedTransport;pub use config::ShellDefaults;pub use config::StorageConfig;pub use config::StoreConfig;pub use config::ToolsConfig;pub use config_runtime::ConfigEnvelope;pub use config_runtime::ConfigEnvelopePolicy;pub use config_runtime::ConfigRuntime;pub use config_runtime::ConfigRuntimeError;pub use config_runtime::ConfigSnapshot;pub use config_store::ConfigResolvedPaths;pub use config_store::ConfigStore;pub use config_store::ConfigStoreMetadata;pub use config_store::FileConfigStore;pub use config_store::MemoryConfigStore;pub use config_store::TaggedConfigStore;pub use error::AgentError;pub use error::ToolError;pub use event::AgentEvent;pub use event::BudgetType;pub use event::EventEnvelope;pub use event::ExternalToolDelta;pub use event::ExternalToolDeltaPhase;pub use event::ScopedAgentEvent;pub use event::StreamScopeFrame;pub use event::ToolConfigChangeOperation;pub use event::ToolConfigChangedPayload;pub use event::VerboseEventConfig;pub use event::agent_event_type;pub use event::compare_event_envelopes;pub use event::format_verbose_event;pub use event::format_verbose_event_with_config;pub use event_injector::EventInjector;pub use event_injector::EventInjectorError;pub use event_tap::EventTap;pub use event_tap::EventTapState;pub use event_tap::new_event_tap;pub use event_tap::tap_emit;pub use event_tap::tap_send_terminal;pub use event_tap::tap_try_send;pub use gateway::Availability;pub use gateway::AvailabilityCheck;pub use gateway::DynamicToolComposite;pub use gateway::ToolGateway;pub use gateway::ToolGatewayBuilder;pub use hooks::HookCapability;pub use hooks::HookDecision;pub use hooks::HookEngine;pub use hooks::HookEngineError;pub use hooks::HookExecutionMode;pub use hooks::HookExecutionReport;pub use hooks::HookFailurePolicy;pub use hooks::HookId;pub use hooks::HookInvocation;pub use hooks::HookLlmRequest;pub use hooks::HookLlmResponse;pub use hooks::HookOutcome;pub use hooks::HookPatch;pub use hooks::HookPatchEnvelope;pub use hooks::HookPoint;pub use hooks::HookReasonCode;pub use hooks::HookRevision;pub use hooks::HookToolCall;pub use hooks::HookToolResult;pub use hooks::apply_tool_result_patch;pub use hooks::default_failure_policy;pub use image_content::MissingBlobBehavior;pub use image_content::collect_blob_ids_from_blocks;pub use image_content::collect_blob_ids_from_messages;pub use image_content::externalize_content_blocks;pub use image_content::externalize_content_input;pub use image_content::externalize_messages_from;pub use image_content::hydrate_content_blocks;pub use image_content::hydrate_content_input;pub use image_content::hydrate_messages_for_execution;pub use interaction::InboxInteraction;pub use interaction::InteractionContent;pub use interaction::InteractionId;pub use interaction::PeerInputCandidate;pub use interaction::PeerInputClass;pub use interaction::ResponseStatus;pub use lifecycle::ConversationAppend;pub use lifecycle::ConversationAppendRole;pub use lifecycle::ConversationContextAppend;pub use lifecycle::CoreExecutor;pub use lifecycle::CoreExecutorError;pub use lifecycle::CoreRenderable;pub use lifecycle::InputId;pub use lifecycle::RunApplyBoundary;pub use lifecycle::RunBoundaryReceipt;pub use lifecycle::RunControlCommand;pub use lifecycle::RunEvent;pub use lifecycle::RunId;pub use lifecycle::RunPrimitive;pub use lifecycle::StagedRunInput;pub use mcp_config::McpConfig;pub use mcp_config::McpConfigError;pub use mcp_config::McpScope;pub use mcp_config::McpServerConfig;pub use mcp_config::McpServerWithScope;pub use model_defaults::ModelOperationalDefaultsResolver;pub use ops::AsyncOpRef;pub use ops::ConcurrencyLimits;pub use ops::ContextStrategy;pub use ops::ForkBranch;pub use ops::ForkBudgetPolicy;pub use ops::OpEvent;pub use ops::OperationId;pub use ops::OperationPolicy;pub use ops::OperationResult;pub use ops::OperationSpec;pub use ops::ResultShape;pub use ops::SessionEffect;pub use ops::SpawnSpec;pub use ops::ToolAccessPolicy;pub use ops::ToolDispatchOutcome;pub use ops::WaitPolicy;pub use ops::WorkKind;pub use ops_lifecycle::OperationCompletionWatch;pub use ops_lifecycle::OperationKind;pub use ops_lifecycle::OperationLifecycleSnapshot;pub use ops_lifecycle::OperationPeerHandle;pub use ops_lifecycle::OperationProgressUpdate;pub use ops_lifecycle::OperationStatus;pub use ops_lifecycle::OperationTerminalOutcome;pub use ops_lifecycle::OpsLifecycleError;pub use ops_lifecycle::OpsLifecycleRegistry;pub use ops_lifecycle::WaitAllResult;pub use ops_lifecycle::WaitAllSatisfied;pub use prompt::AGENTS_MD_MAX_BYTES;pub use prompt::DEFAULT_SYSTEM_PROMPT;pub use prompt::SystemPromptConfig;pub use provider::Provider;pub use retry::RetryPolicy;pub use runtime_bootstrap::ContextConfig;pub use runtime_bootstrap::RealmConfig;pub use runtime_bootstrap::RealmLocator;pub use runtime_bootstrap::RealmSelection;pub use runtime_bootstrap::RuntimeBootstrap;pub use runtime_bootstrap::RuntimeBootstrapError;pub use runtime_bootstrap::default_state_root;pub use runtime_bootstrap::derive_workspace_realm_id;pub use runtime_bootstrap::generate_realm_id;pub use runtime_epoch::EpochCursorSnapshot;pub use runtime_epoch::EpochCursorState;pub use runtime_epoch::RuntimeBuildMode;pub use runtime_epoch::RuntimeEpochId;pub use runtime_epoch::SessionRuntimeBindings;pub use schema::CompiledSchema;pub use schema::MeerkatSchema;pub use schema::SchemaCompat;pub use schema::SchemaError;pub use schema::SchemaFormat;pub use schema::SchemaWarning;pub use service::AppendSystemContextRequest;pub use service::AppendSystemContextResult;pub use service::AppendSystemContextStatus;pub use service::CreateSessionRequest;pub use service::DeferredPromptPolicy;pub use service::MobToolsBuildArgs;pub use service::MobToolsFactory;pub use service::SessionBuildOptions;pub use service::SessionControlError;pub use service::SessionError;pub use service::SessionHistoryPage;pub use service::SessionHistoryQuery;pub use service::SessionInfo;pub use service::SessionQuery;pub use service::SessionService;pub use service::SessionServiceCommsExt;pub use service::SessionServiceControlExt;pub use service::SessionServiceHistoryExt;pub use service::SessionSummary;pub use service::SessionUsage;pub use service::SessionView;pub use service::StageToolResultsRequest;pub use service::StageToolResultsResult;pub use service::StartTurnRequest;pub use service::TurnToolOverlay;pub use session::DeferredFirstTurnPhase;pub use session::PendingDeferredPrompt;pub use session::PendingSystemContextAppend;pub use session::PendingToolResultsMessage;pub use session::SESSION_BUILD_STATE_KEY;pub use session::SESSION_DEFERRED_TURN_STATE_KEY;pub use session::SESSION_SYSTEM_CONTEXT_STATE_KEY;pub use session::SESSION_TOOL_VISIBILITY_STATE_KEY;pub use session::SESSION_VERSION;pub use session::SYSTEM_CONTEXT_SEPARATOR;pub use session::SeenSystemContextKey;pub use session::SeenSystemContextState;pub use session::Session;pub use session::SessionBuildState;pub use session::SessionDeferredTurnState;pub use session::SessionLlmIdentity;pub use session::SessionMeta;pub use session::SessionMetadata;pub use session::SessionSystemContextState;pub use session::SessionToolVisibilityState;pub use session::SessionTooling;pub use session::SystemContextStageError;pub use session::ToolCategoryOverride;pub use session::ToolVisibilityWitness;pub use session_recovery::BUILD_ONLY_RECOVERY_OVERRIDE_ERROR;pub use session_recovery::RecoveredSessionBuild;pub use session_recovery::SurfaceSessionRecoveryContext;pub use session_recovery::SurfaceSessionRecoveryError;pub use session_recovery::SurfaceSessionRecoveryOverrides;pub use session_recovery::build_recovered_session;pub use session_recovery::has_build_only_turn_overrides;pub use session_recovery::has_materialization_overrides;pub use session_recovery::session_allows_first_turn_build_overrides;pub use session_store::SessionFilter;pub use session_store::SessionStore;pub use session_store::SessionStoreError;pub use state::LoopState;pub use tool_catalog::ToolCatalogCapabilities;pub use tool_catalog::ToolCatalogDeferredEligibility;pub use tool_catalog::ToolCatalogEntry;pub use tool_catalog::ToolCatalogLoadRejectedReason;pub use tool_catalog::ToolCatalogLoadResolution;pub use tool_catalog::ToolCatalogMode;pub use tool_catalog::ToolPlaneClass;pub use tool_catalog::deferred_session_entry_count;pub use tool_catalog::deferred_session_schema_volume;pub use tool_catalog::select_catalog_mode_from_snapshot;pub use tool_scope::ComposedToolFilter;pub use tool_scope::EXTERNAL_TOOL_FILTER_METADATA_KEY;pub use tool_scope::ToolFilter;pub use tool_scope::ToolScope;pub use tool_scope::ToolScopeHandle;pub use tool_scope::ToolScopeRevision;pub use tool_scope::ToolScopeStageError;pub use turn_boundary::TurnBoundaryHook;pub use turn_boundary::TurnBoundaryMessage;pub use turn_execution_authority::ContentShape;pub use turn_execution_authority::TurnExecutionAuthority;pub use turn_execution_authority::TurnExecutionEffect;pub use turn_execution_authority::TurnExecutionInput;pub use turn_execution_authority::TurnExecutionMutator;pub use turn_execution_authority::TurnExecutionTransition;pub use turn_execution_authority::TurnPhase;pub use turn_execution_authority::TurnPrimitiveKind;pub use turn_execution_authority::TurnTerminalOutcome;pub use types::ArtifactRef;pub use types::AssistantBlock;pub use types::AssistantMessage;pub use types::BlockAssistantMessage;pub use types::ContentBlock;pub use types::ContentInput;pub use types::HandlingMode;pub use types::ImageData;pub use types::Message;pub use types::OutputSchema;pub use types::ProviderMeta;pub use types::RunResult;pub use types::SUPPORTED_VIDEO_MEDIA_TYPES;pub use types::SecurityMode;pub use types::SessionId;pub use types::StopReason;pub use types::SystemMessage;pub use types::SystemNoticeKind;pub use types::SystemNoticeMessage;pub use types::ToolCall;pub use types::ToolCallIter;pub use types::ToolCallView;pub use types::ToolDef;pub use types::ToolProvenance;pub use types::ToolResult;pub use types::ToolSourceKind;pub use types::Usage;pub use types::UserMessage;pub use types::VideoData;pub use types::has_images;pub use types::has_non_text_content;pub use types::has_video;pub use types::is_supported_video_media_type;pub use types::validate_inline_video_blocks;
Modules§
- agent
- Agent - the core agent orchestrator
- blob
- budget
- Budget enforcement for Meerkat
- checkpoint
- Session checkpointing trait for periodic persistence.
- comms
- Canonical communication API types for Meerkat.
- comms_
drain_ lifecycle_ authority - RMAT/MTAS sealed authority for the CommsDrainLifecycle machine.
- compact
- Compactor trait — provider-agnostic context compaction.
- completion_
feed - Canonical completion delivery seam for async operation terminals.
- config
- Configuration for Meerkat
- config_
runtime - Realm-scoped config runtime with generation CAS semantics.
- config_
store - Config store abstraction.
- error
- Core error types for Meerkat
- event
- Agent events for streaming output
- event_
injector - Transport-agnostic event injection trait.
- event_
tap - Interaction-scoped event tap for streaming events to per-interaction subscribers.
- gateway
- Tool gateway for composing multiple tool dispatchers
- generated
- hooks
- Hook contracts and engine interfaces.
- image_
content - interaction
- Interaction types for the core agent loop.
- lifecycle
- v9 Canonical Lifecycle — core run primitives.
- mcp_
config - MCP server configuration loading and management
- memory
- MemoryStore trait — semantic memory indexing for discarded conversation history.
- model_
defaults - Core-owned trait seam for model operational defaults lookup.
- model_
registry - Effective model registry merged from built-in catalog and configured self-hosted aliases.
- ops
- Async operation types for Meerkat
- ops_
lifecycle - Canonical async-operation lifecycle seam for shared child/background work.
- peer_
meta - Supplementary metadata for peer discovery.
- prompt
- System prompt configuration and AGENTS.md support
- provider
- Provider enumeration shared across interfaces.
- retry
- Retry policy for transient errors
- runtime_
bootstrap - Surface/runtime bootstrap contracts shared across interfaces.
- runtime_
epoch - Runtime epoch identity and session runtime bindings.
- schema
- Meerkat-native schema abstraction and normalization.
- service
- SessionService trait — canonical lifecycle abstraction.
- session
- Session management for Meerkat
- session_
recovery - session_
store - SessionStore trait — canonical session persistence contract.
- skills
- Skill system contracts for Meerkat.
- skills_
config - Skills configuration types.
- state
- State projection for the agent loop.
- time_
compat - wasm32-safe time types.
- tool_
catalog - tool_
scope - Tool visibility scope and external filter staging.
- turn_
boundary - Turn-boundary hooks for composing prompt input.
- turn_
execution_ authority - Machine authority for the TurnExecution state machine.
- types
- Core types for Meerkat