Skip to main content

Crate navi_core

Crate navi_core 

Source

Re-exports§

pub use branch_race::BranchCandidate;
pub use branch_race::BranchHypothesis;
pub use branch_race::BranchRacePlanner;
pub use branch_race::BranchRaceReport;
pub use branch_race::BranchRaceRequest;
pub use branch_race::BranchStrategy;
pub use branch_race::ScoredBranchCandidate;
pub use capability::Capability;
pub use capability::CapabilityDecision;
pub use capability::CapabilityGrant;
pub use capability::CapabilityLedger;
pub use capability::CapabilityLedgerEntry;
pub use capability::CapabilityScope;
pub use capability::capabilities_from_tool_metadata;
pub use compact::AUTO_COMPACT_THRESHOLD_PERCENT;
pub use compact::CompactOutcome;
pub use compact::CompactState;
pub use compact::CompactThreshold;
pub use compact::compact_summary_user_message;
pub use config::AcpAgentConfig;
pub use config::AcpConfig;
pub use config::AttachmentModelsConfig;
pub use config::BackgroundModelEntry;
pub use config::BackgroundModelsConfig;
pub use config::GoalsConfig;
pub use config::HarnessProfile;
pub use config::LoadedConfig;
pub use config::McpConfig;
pub use config::McpServerConfig;
pub use config::ModelOption;
pub use config::ModelTaskSize;
pub use config::NaviConfig;
pub use config::PermissionMode;
pub use config::PluginConfig;
pub use config::ProviderConfig;
pub use config::ProviderKind;
pub use config::ProviderModelConfig;
pub use config::ProviderRequestOptions;
pub use config::SecurityConfig;
pub use config::ToolCallingMode;
pub use config::ToolPromptManifest;
pub use config::UpdatesConfig;
pub use config::VoiceConfig;
pub use config::WasmPluginConfig;
pub use config::available_model_options;
pub use config::billable_input_split;
pub use config::canonical_provider_id;
pub use config::default_request_options_for;
pub use config::effective_context_window;
pub use config::effective_tool_calling_mode;
pub use config::estimate_token_cost_usd;
pub use config::estimate_token_cost_usd_with_cache;
pub use config::invalidate_registry_catalog_cache;
pub use config::is_free_model_name;
pub use config::model_cache_list_pricing;
pub use config::model_can_run_publicly;
pub use config::model_list_pricing;
pub use config::model_supports_attachment;
pub use config::provider_catalog;
pub use config::provider_credit_unit;
pub use config::provider_request_model_name;
pub use config::provider_uses_credits;
pub use config::resolve_provider_config;
pub use config::save_global_config;
pub use config::save_project_config;
pub use config::set_registry_store;
pub use config::usd_to_provider_credits;
pub use context::ContextPacket;
pub use context::ContextSource;
pub use credentials::CommandCodeCredentialMetadata;
pub use credentials::CredentialAccountInfo;
pub use credentials::CredentialSource;
pub use credentials::CredentialStatus;
pub use credentials::CredentialStore;
pub use credentials::XAI_GROK_CLI_OAUTH_KIND;
pub use credentials::is_model_usable_oauth_kind;
pub use credentials::resolve_provider_api_key;
pub use credentials::resolve_provider_api_key_for_project;
pub use credentials::resolve_provider_credential_status;
pub use dataset::DatasetRow;
pub use dataset::DatasetRowType;
pub use dataset::export_jsonl;
pub use dataset::trace_to_dataset_rows;
pub use dataset::traces_to_eval_candidates;
pub use effect::BlastRadius;
pub use effect::EffectAnalyzer;
pub use effect::EffectReport;
pub use effect::PostDecision;
pub use eval::EvalCase;
pub use eval::EvalCaseMetrics;
pub use eval::EvalCaseResult;
pub use eval::EvalMode;
pub use eval::EvalRun;
pub use eval::EvalRunMetrics;
pub use eval::EvalRunner;
pub use eval::EvalSuite;
pub use eval::eval_case_from_trace;
pub use event::AgentEvent;
pub use event::ApprovalDecision;
pub use event::ApprovalRequest;
pub use event::ApprovalRisk;
pub use event::PlanReviewDecision;
pub use event::PlanReviewRequest;
pub use event::PlanReviewResponse;
pub use event::QuestionOption;
pub use event::QuestionRequest;
pub use event::QuestionResponse;
pub use event::RuntimeEvent;
pub use event::RuntimeEventKind;
pub use event::SubagentTranscriptItem;
pub use event::SubagentTranscriptKind;
pub use event::SudoPasswordRequest;
pub use event::SudoPasswordResponse;
pub use goal::CreateGoalTool;
pub use goal::GetGoalTool;
pub use goal::GoalExtension;
pub use goal::GoalId;
pub use goal::GoalRuntimeHandle;
pub use goal::GoalService;
pub use goal::GoalStatus;
pub use goal::GoalTask;
pub use goal::SessionGoal;
pub use goal::TaskStatus;
pub use goal::UpdateGoalChecklistTool;
pub use goal::UpdateGoalTool;
pub use goal::build_host_set_goal_user_prompt;
pub use goal::goal_tool_definitions;
pub use harness::AgentRunState;
pub use harness::HarnessPolicy;
pub use harness::build_system_prompt;
pub use harness::build_system_prompt_with_memory;
pub use harness::compact_tool_observation;
pub use harness::record_tool_call;
pub use harness::select_harness_policy;
pub use harness::tool_error_result;
pub use harness_pack::CapabilityInventory;
pub use harness_pack::GraphEdge;
pub use harness_pack::GraphNode;
pub use harness_pack::GraphSpec;
pub use harness_pack::HarnessApplyResult;
pub use harness_pack::HarnessPack;
pub use harness_pack::HarnessPackStore;
pub use harness_pack::LoopSpec;
pub use harness_pack::MaterializeOptions;
pub use harness_pack::VerifierKind;
pub use harness_pack::VerifierSpec as HarnessVerifierSpec;
pub use harness_pack::apply_harness_for_skills;
pub use harness_pack::build_capability_inventory;
pub use harness_pack::capability_card;
pub use harness_pack::effective_allow_tools_for_pack;
pub use harness_pack::filter_tools_to_inventory;
pub use harness_pack::harness_pack_dir;
pub use harness_pack::inventory_from_tool_names;
pub use harness_pack::list_harness_ids;
pub use harness_pack::load_pack;
pub use harness_pack::materialize_after_save;
pub use harness_pack::materialize_from_skill;
pub use harness_pack::merge_allow_tools;
pub use harness_pack::write_pack;
pub use logging::LoggingGuard;
pub use logging::LoggingRuntimeConfig;
pub use logging::init_logging;
pub use logging::log_dir;
pub use logging::log_path;
pub use mcp_firewall::McpFirewallDecision;
pub use mcp_firewall::McpFirewallPolicy;
pub use mcp_firewall::McpProvenance;
pub use mcp_firewall::McpTaint;
pub use model::AttachmentKind;
pub use model::BINARY_REASONING_LEVELS;
pub use model::ContentPart;
pub use model::DEFAULT_REASONING_LEVELS;
pub use model::ModelMessage;
pub use model::ModelProvider;
pub use model::ModelRequest;
pub use model::ModelResponse;
pub use model::ModelRole;
pub use model::ModelStream;
pub use model::ModelStreamEvent;
pub use model::ThinkingConfig;
pub use model::ThinkingRequest;
pub use model::effort_display_label;
pub use model::is_binary_effort_model;
pub use model::parse_reasoning_level;
pub use model::resolve_effort_label;
pub use model::resolve_model_thinking_level;
pub use model::thinking_levels_for_model;
pub use model_router::ModelRoute;
pub use model_router::ModelRouteRole;
pub use model_router::ModelRouter;
pub use model_router::ModelScorecard;
pub use notify::NotificationUrgency;
pub use notify::NotifyRequest;
pub use notify::notify_desktop;
pub use notify::open_url;
pub use operational_memory::MemoryScope;
pub use operational_memory::OperationalMemoryEntry;
pub use operational_memory::OperationalMemoryStore;
pub use patch::PatchProposal;
pub use plan_mode::AgentMode;
pub use plan_mode::ProposedPlan;
pub use plan_mode::ProposedPlanParser;
pub use plan_mode::is_tool_allowed_in_plan_mode;
pub use plan_mode::is_tool_allowed_in_plan_mode_named;
pub use plan_store::Plan;
pub use plan_store::PlanLineComment;
pub use plan_store::PlanStatus;
pub use plan_store::PlanStep;
pub use plan_store::PlanStore;
pub use plan_store::format_plan_feedback;
pub use plan_store::plan_view_lines;
pub use plan_store::project_plan_file_path;
pub use plan_store::read_plan_file;
pub use plan_store::session_plan_file_path;
pub use plan_store::title_from_markdown;
pub use plan_store::write_plan_file;
pub use prompt::PromptCache;
pub use prompt::RenderedPrompt;
pub use prompt::SystemPromptInput;
pub use prompt::SystemPromptRenderer;
pub use recap::RECAP_LONG_TAIL_CHARS;
pub use recap::RECAP_MAX_DISPLAY_CHARS;
pub use recap::RECAP_MAX_LINES;
pub use recap::clamp_recap_summary;
pub use recap::llm_recap;
pub use recap::local_recap;
pub use recap::local_recap_with_tools;
pub use recap::should_suppress_recap;
pub use replay_gate::ReplayGateConfig;
pub use replay_gate::ReplayGateReport;
pub use replay_gate::SuperiorityGateReport;
pub use replay_gate::evaluate_replay_gate;
pub use replay_gate::evaluate_superiority_gate;
pub use replay_gate::unsafe_guarded_auto_approval_count;
pub use repo_intelligence::ChurnRecord;
pub use repo_intelligence::DependencyEdge;
pub use repo_intelligence::ImportRecord;
pub use repo_intelligence::IndexedFile;
pub use repo_intelligence::RankedSymbolRecord;
pub use repo_intelligence::ReferenceRecord;
pub use repo_intelligence::RepoIndex;
pub use repo_intelligence::RepoIntelligenceCache;
pub use repo_intelligence::SymbolRecord;
pub use repo_intelligence::TestTarget;
pub use repo_intelligence::TextMatchRecord;
pub use repo_intelligence::build_index;
pub use repo_intelligence::dependency_edges;
pub use repo_intelligence::discover_tests;
pub use repo_intelligence::goto_symbol;
pub use repo_intelligence::ranked_symbol_matches;
pub use repo_intelligence::references;
pub use repo_intelligence::search_symbols;
pub use repo_intelligence::search_text_matches;
pub use rewind::MAX_REWIND_BLOB_BYTES;
pub use rewind::PROMPT_PREVIEW_CHARS;
pub use rewind::RestoreSummary;
pub use rewind::RewindFileEntry;
pub use rewind::RewindPointMeta;
pub use rewind::RewindStore;
pub use runtime::AgentRuntime;
pub use runtime::AgentRuntimeOptions;
pub use runtime::ApprovalResolver;
pub use runtime::MemoryExtractionModel;
pub use runtime::PlanReviewResolver;
pub use runtime::QuestionResolver;
pub use runtime::SudoPasswordResolver;
pub use runtime::TurnCanceller;
pub use runtime_components::CompactionStrategy;
pub use runtime_components::DefaultCompactionStrategy;
pub use runtime_components::DefaultHarnessDriver;
pub use runtime_components::DefaultPromptBuilder;
pub use runtime_components::DefaultToolSecurityPolicy;
pub use runtime_components::HarnessDriver;
pub use runtime_components::NoopSessionHooks;
pub use runtime_components::PermissiveSecurityPolicy;
pub use runtime_components::PromptBuilder;
pub use runtime_components::RuntimeComponents;
pub use runtime_components::SessionHooks;
pub use runtime_components::ToolSecurityPolicy;
pub use security::SecurityDecision;
pub use security::SecurityPolicy;
pub use security::WritePathScope;
pub use session::SessionId;
pub use session::SessionRuntime;
pub use session::SessionSnapshot;
pub use session::SessionSnapshotInfo;
pub use session::SessionStore;
pub use session::SessionUsageSnapshot;
pub use session::clean_session_title;
pub use session::session_title_from_events;
pub use session_replay::model_messages_from_agent_events;
pub use session_replay::rehydrate_tool_content_parts;
pub use session_title::SessionTitleHandle;
pub use session_title::SessionTitleTool;
pub use setup::SETUP_INTERVIEW_COMPLETE_MARKER;
pub use setup::SETUP_INTERVIEW_PROMPT;
pub use skill_mining::SkillDraft;
pub use skill_mining::SkillReplayReport;
pub use skill_mining::activate_skill_after_replay;
pub use skill_mining::draft_skill_from_traces;
pub use skills::CREATE_SKILL_ID;
pub use skills::HARNESS_AUTHOR_ID;
pub use skills::ParsedSkillFile;
pub use skills::SKILL_POOLS_ID;
pub use skills::SkillManifest;
pub use skills::SkillSource;
pub use skills::SkillStore;
pub use skills::SkillWriteRequest;
pub use skills::SkillWriteResult;
pub use skills::SkillWriteScope;
pub use skills::active_skills;
pub use skills::builtin_skills;
pub use skills::delete_skill;
pub use skills::discover_configured_skills;
pub use skills::list_installed_skills;
pub use skills::load_skill_by_id;
pub use skills::parse_skill_file;
pub use skills::parse_skill_md;
pub use skills::parse_skill_toml;
pub use skills::project_skill_key;
pub use skills::skill_is_editable;
pub use skills::skill_tool_allowlist;
pub use skills::slugify_skill_id;
pub use skills::write_skill;
pub use tool::background::BackgroundCommandSnapshot;
pub use tool::background::BackgroundTaskStatus;
pub use tool::registry::ToolRegistry;
pub use tool::registry::ToolSet;
pub use tool::registry::phases;
pub use tool::AgentBackend;
pub use tool::AgentProfile;
pub use tool::ApprovalMode;
pub use tool::MockAgentBackend;
pub use tool::PolicyAgentBackend;
pub use tool::ProviderBuilderFn;
pub use tool::RepoExploreTool;
pub use tool::SubagentBridgeBackend;
pub use tool::SubagentTool;
pub use tool::Tool;
pub use tool::ToolDefinition;
pub use tool::ToolExecutor;
pub use tool::ToolExposure;
pub use tool::ToolInvocation;
pub use tool::ToolKind;
pub use tool::ToolMetadata;
pub use tool::ToolResult;
pub use tool::ToolRisk;
pub use tool::WorkerProbeBackend;
pub use tool::WorkflowTool;
pub use tool::capabilities;
pub use tool::workflow_tool_description;
pub use trace::ApprovalTrace;
pub use trace::ToolCallTrace;
pub use trace::TraceStore;
pub use trace::TurnMetrics;
pub use trace::TurnOutcome;
pub use trace::TurnTrace;
pub use trace::VerifierTrace;
pub use trace::turn_traces_from_events;
pub use update::UpdateInfo;
pub use update::apply_update;
pub use update::check_for_update;
pub use update::current_version;
pub use update::normalize_version;
pub use update::version_is_newer;
pub use background_model::BackgroundModelResolver;
pub use background_model::ResolvedBackgroundModel;
pub use benchmark::BenchAgentConfig;
pub use benchmark::BenchCase;
pub use benchmark::BenchCaseMetrics;
pub use benchmark::BenchCaseResult;
pub use benchmark::BenchCompareConfig;
pub use benchmark::BenchComparison;
pub use benchmark::BenchRun;
pub use benchmark::BenchRunMetrics;
pub use benchmark::BenchSuite;
pub use benchmark::aggregate_bench_metrics;
pub use benchmark::compare_bench_runs;
pub use memory::HistoryStore;
pub use memory::MemoryManager;
pub use memory::MemoryStore;
pub use memory::SessionCheckpoint;
pub use registry::RegistryTranscriptionModel;
pub use registry::RegistryTranscriptionProvider;
pub use registry::TranscriptionModelPricing;
pub use registry::TranscriptionProviderKind;
pub use registry::embedded_transcription_provider_schema;
pub use registry::embedded_transcription_providers;
pub use transcription_catalog::find_transcription_provider;
pub use transcription_catalog::resolve_transcription_model;
pub use transcription_catalog::transcription_provider_catalog;
pub use verifier::VerificationStore;
pub use verifier::VerifierResult;
pub use verifier::VerifierRunner;
pub use verifier::VerifierSpec;

Modules§

attachment_store
Durable content-addressed storage for multimodal attachments.
background_model
Background model resolver — selects cheap models for background tasks based on capability profiles from the SQLite registry.
benchmark
Agentic benchmark schema and comparison helpers.
branch_race
Branch racing primitives.
cancel
capability
Capability ledger for auditable zero-trust tool execution.
compact
config
context
credentials
dataset
Trace-to-dataset export for evals, routing, and permission tuning.
effect
Effect-based permissions: analyse what a tool execution actually affected on disk and make post-execution security decisions.
eval
Local eval harness for measuring NAVI harness behavior.
event
goal
harness
harness_pack
Harness packs: local compilation of skills into loop/graph specs.
logging
mcp_firewall
MCP firewall helpers for untrusted server/tool content.
memory
model
model_router
Benchmark-driven model routing contracts.
notify
Cross-platform desktop notifications and URL opening.
operational_memory
Structured operational memory entries and retrieval.
patch
plan_mode
Plan Mode — a collaboration phase where the agent designs a plan before execution.
plan_store
SQLite-backed plan persistence (reviewable work plans).
prompt
recap
Session recap — short post-turn summary after each successful turn.
registry
Remote provider registry backed by a local SQLite cache.
repetition
replay_gate
Continuous learning replay and superiority gates.
repo_intelligence
Repository intelligence: compact symbol, dependency, and test discovery.
rewind
Durable per-user-turn file snapshots for session rewind.
runtime
runtime_components
sandbox
security
session
session_replay
Rebuild model conversation history from persisted AgentEvent streams.
session_title
Session-title state shared between the runtime and the agent tool.
setup
skill_mining
Trace-driven skill mining.
skills
tool
trace
transcription_catalog
Catalog of remote transcription / dictation providers.
turn
update
NAVI self-update: check GitHub Releases and apply via the official installer.
verifier
Core verifier API for NAVI.

Structs§

ProviderId
Canonical provider identity. Eliminates string-match routing.