Skip to main content

navi_core/
lib.rs

1pub mod attachment_store;
2pub mod benchmark;
3pub mod branch_race;
4pub mod cancel;
5pub mod capability;
6pub mod compact;
7pub mod config;
8pub mod context;
9pub mod credentials;
10pub mod dataset;
11pub mod effect;
12pub mod eval;
13pub mod event;
14mod fs_util;
15pub mod goal;
16pub mod harness;
17pub mod harness_pack;
18pub mod logging;
19pub mod mcp_firewall;
20pub mod memory;
21pub mod model;
22pub mod model_router;
23pub mod notify;
24pub mod operational_memory;
25pub mod patch;
26pub mod plan_mode;
27pub mod plan_store;
28pub mod prompt;
29mod provider_id;
30pub mod recap;
31pub mod registry;
32pub mod repetition;
33pub mod replay_gate;
34pub mod repo_intelligence;
35pub mod rewind;
36pub mod runtime;
37pub mod runtime_components;
38pub mod sandbox;
39pub mod security;
40pub mod session;
41pub mod session_replay;
42pub mod session_title;
43pub mod setup;
44pub mod skill_mining;
45pub mod skills;
46pub mod tool;
47pub mod trace;
48pub mod transcription_catalog;
49pub mod turn;
50pub mod update;
51pub mod verifier;
52
53pub mod background_model;
54
55pub use branch_race::{
56    BranchCandidate, BranchHypothesis, BranchRacePlanner, BranchRaceReport, BranchRaceRequest,
57    BranchStrategy, ScoredBranchCandidate,
58};
59pub use capability::{
60    Capability, CapabilityDecision, CapabilityGrant, CapabilityLedger, CapabilityLedgerEntry,
61    CapabilityScope, capabilities_from_tool_metadata,
62};
63pub use compact::{
64    AUTO_COMPACT_THRESHOLD_PERCENT, CompactOutcome, CompactState, CompactThreshold,
65    compact_summary_user_message,
66};
67pub use config::{
68    AcpAgentConfig, AcpConfig, AttachmentModelsConfig, BackgroundModelEntry,
69    BackgroundModelsConfig, GoalsConfig, HarnessProfile, LoadedConfig, McpConfig, McpServerConfig,
70    ModelOption, ModelTaskSize, NaviConfig, PermissionMode, PluginConfig, ProviderConfig,
71    ProviderKind, ProviderModelConfig, ProviderRequestOptions, SecurityConfig, ToolCallingMode,
72    ToolPromptManifest, UpdatesConfig, VoiceConfig, WasmPluginConfig, available_model_options,
73    billable_input_split, canonical_provider_id, default_request_options_for,
74    effective_context_window, effective_tool_calling_mode, estimate_token_cost_usd,
75    estimate_token_cost_usd_with_cache, invalidate_registry_catalog_cache, is_free_model_name,
76    model_cache_list_pricing, model_can_run_publicly, model_list_pricing,
77    model_supports_attachment, provider_catalog, provider_credit_unit, provider_request_model_name,
78    provider_uses_credits, resolve_provider_config, save_global_config, save_project_config,
79    set_registry_store, usd_to_provider_credits,
80};
81pub use context::{ContextPacket, ContextSource};
82pub use credentials::{
83    CommandCodeCredentialMetadata, CredentialAccountInfo, CredentialSource, CredentialStatus,
84    CredentialStore, XAI_GROK_CLI_OAUTH_KIND, is_model_usable_oauth_kind, resolve_provider_api_key,
85    resolve_provider_api_key_for_project, resolve_provider_credential_status,
86};
87pub use dataset::{
88    DatasetRow, DatasetRowType, export_jsonl, trace_to_dataset_rows, traces_to_eval_candidates,
89};
90pub use effect::{BlastRadius, EffectAnalyzer, EffectReport, PostDecision};
91pub use eval::{
92    EvalCase, EvalCaseMetrics, EvalCaseResult, EvalMode, EvalRun, EvalRunMetrics, EvalRunner,
93    EvalSuite, eval_case_from_trace,
94};
95pub use event::{
96    AgentEvent, ApprovalDecision, ApprovalRequest, ApprovalRisk, PlanReviewDecision,
97    PlanReviewRequest, PlanReviewResponse, QuestionOption, QuestionRequest, QuestionResponse,
98    RuntimeEvent, RuntimeEventKind, SubagentTranscriptItem, SubagentTranscriptKind,
99    SudoPasswordRequest, SudoPasswordResponse,
100};
101pub use goal::{
102    CreateGoalTool, GetGoalTool, GoalExtension, GoalId, GoalRuntimeHandle, GoalService, GoalStatus,
103    GoalTask, SessionGoal, TaskStatus, UpdateGoalChecklistTool, UpdateGoalTool,
104    build_host_set_goal_user_prompt, goal_tool_definitions,
105};
106pub use harness::{
107    AgentRunState, HarnessPolicy, build_system_prompt, build_system_prompt_with_memory,
108    compact_tool_observation, record_tool_call, select_harness_policy, tool_error_result,
109};
110pub use harness_pack::{
111    CapabilityInventory, GraphEdge, GraphNode, GraphSpec, HarnessApplyResult, HarnessPack,
112    HarnessPackStore, LoopSpec, MaterializeOptions, VerifierKind,
113    VerifierSpec as HarnessVerifierSpec, apply_harness_for_skills, build_capability_inventory,
114    capability_card, effective_allow_tools_for_pack, filter_tools_to_inventory, harness_pack_dir,
115    inventory_from_tool_names, list_harness_ids, load_pack, materialize_after_save,
116    materialize_from_skill, merge_allow_tools, write_pack,
117};
118pub use logging::{LoggingGuard, LoggingRuntimeConfig, init_logging, log_dir, log_path};
119pub use mcp_firewall::{McpFirewallDecision, McpFirewallPolicy, McpProvenance, McpTaint};
120pub use model::{
121    AttachmentKind, BINARY_REASONING_LEVELS, ContentPart, DEFAULT_REASONING_LEVELS, ModelMessage,
122    ModelProvider, ModelRequest, ModelResponse, ModelRole, ModelStream, ModelStreamEvent,
123    ThinkingConfig, ThinkingRequest, effort_display_label, is_binary_effort_model,
124    parse_reasoning_level, resolve_effort_label, resolve_model_thinking_level,
125    thinking_levels_for_model,
126};
127pub use model_router::{ModelRoute, ModelRouteRole, ModelRouter, ModelScorecard};
128pub use notify::{NotificationUrgency, NotifyRequest, notify_desktop, open_url};
129pub use operational_memory::{MemoryScope, OperationalMemoryEntry, OperationalMemoryStore};
130pub use patch::PatchProposal;
131pub use plan_mode::{
132    AgentMode, ProposedPlan, ProposedPlanParser, is_tool_allowed_in_plan_mode,
133    is_tool_allowed_in_plan_mode_named,
134};
135pub use plan_store::{
136    Plan, PlanLineComment, PlanStatus, PlanStep, PlanStore, format_plan_feedback, plan_view_lines,
137    project_plan_file_path, read_plan_file, session_plan_file_path, title_from_markdown,
138    write_plan_file,
139};
140pub use prompt::{PromptCache, RenderedPrompt, SystemPromptInput, SystemPromptRenderer};
141pub use provider_id::ProviderId;
142pub use recap::{
143    RECAP_LONG_TAIL_CHARS, RECAP_MAX_DISPLAY_CHARS, RECAP_MAX_LINES, clamp_recap_summary,
144    llm_recap, local_recap, local_recap_with_tools, should_suppress_recap,
145};
146pub use replay_gate::{
147    ReplayGateConfig, ReplayGateReport, SuperiorityGateReport, evaluate_replay_gate,
148    evaluate_superiority_gate, unsafe_guarded_auto_approval_count,
149};
150pub use repo_intelligence::{
151    ChurnRecord, DependencyEdge, ImportRecord, IndexedFile, RankedSymbolRecord, ReferenceRecord,
152    RepoIndex, RepoIntelligenceCache, SymbolRecord, TestTarget, TextMatchRecord, build_index,
153    dependency_edges, discover_tests, goto_symbol, ranked_symbol_matches, references,
154    search_symbols, search_text_matches,
155};
156pub use rewind::{
157    MAX_REWIND_BLOB_BYTES, PROMPT_PREVIEW_CHARS, RestoreSummary, RewindFileEntry, RewindPointMeta,
158    RewindStore,
159};
160pub use runtime::{
161    AgentRuntime, AgentRuntimeOptions, ApprovalResolver, MemoryExtractionModel, PlanReviewResolver,
162    QuestionResolver, SudoPasswordResolver, TurnCanceller,
163};
164pub use runtime_components::{
165    CompactionStrategy, DefaultCompactionStrategy, DefaultHarnessDriver, DefaultPromptBuilder,
166    DefaultToolSecurityPolicy, HarnessDriver, NoopSessionHooks, PermissiveSecurityPolicy,
167    PromptBuilder, RuntimeComponents, SessionHooks, ToolSecurityPolicy,
168};
169pub use security::{SecurityDecision, SecurityPolicy, WritePathScope};
170pub use session::{
171    SessionId, SessionRuntime, SessionSnapshot, SessionSnapshotInfo, SessionStore,
172    SessionUsageSnapshot, clean_session_title, session_title_from_events,
173};
174pub use session_replay::{model_messages_from_agent_events, rehydrate_tool_content_parts};
175pub use session_title::{SessionTitleHandle, SessionTitleTool};
176pub use setup::{SETUP_INTERVIEW_COMPLETE_MARKER, SETUP_INTERVIEW_PROMPT};
177pub use skill_mining::{
178    SkillDraft, SkillReplayReport, activate_skill_after_replay, draft_skill_from_traces,
179};
180pub use skills::{
181    CREATE_SKILL_ID, HARNESS_AUTHOR_ID, ParsedSkillFile, SKILL_POOLS_ID, SkillManifest,
182    SkillSource, SkillStore, SkillWriteRequest, SkillWriteResult, SkillWriteScope, active_skills,
183    builtin_skills, delete_skill, discover_configured_skills, list_installed_skills,
184    load_skill_by_id, parse_skill_file, parse_skill_md, parse_skill_toml, project_skill_key,
185    skill_is_editable, skill_tool_allowlist, slugify_skill_id, write_skill,
186};
187pub use tool::background::{BackgroundCommandSnapshot, BackgroundTaskStatus};
188pub use tool::registry::{ToolRegistry, ToolSet, phases};
189pub use tool::{
190    AgentBackend, AgentProfile, ApprovalMode, MockAgentBackend, PolicyAgentBackend,
191    ProviderBuilderFn, RepoExploreTool, SubagentBridgeBackend, SubagentTool, Tool, ToolDefinition,
192    ToolExecutor, ToolExposure, ToolInvocation, ToolKind, ToolMetadata, ToolResult, ToolRisk,
193    WorkerProbeBackend, WorkflowTool, capabilities, workflow_tool_description,
194};
195pub use trace::{
196    ApprovalTrace, ToolCallTrace, TraceStore, TurnMetrics, TurnOutcome, TurnTrace, VerifierTrace,
197    turn_traces_from_events,
198};
199pub use update::{
200    UpdateInfo, apply_update, check_for_update, current_version, normalize_version,
201    version_is_newer,
202};
203
204pub use background_model::{BackgroundModelResolver, ResolvedBackgroundModel};
205pub use benchmark::{
206    BenchAgentConfig, BenchCase, BenchCaseMetrics, BenchCaseResult, BenchCompareConfig,
207    BenchComparison, BenchRun, BenchRunMetrics, BenchSuite, aggregate_bench_metrics,
208    compare_bench_runs,
209};
210pub use memory::{HistoryStore, MemoryManager, MemoryStore, SessionCheckpoint};
211pub use registry::{
212    RegistryTranscriptionModel, RegistryTranscriptionProvider, TranscriptionModelPricing,
213    TranscriptionProviderKind, embedded_transcription_provider_schema,
214    embedded_transcription_providers,
215};
216pub use transcription_catalog::{
217    find_transcription_provider, resolve_transcription_model, transcription_provider_catalog,
218};
219pub use verifier::{VerificationStore, VerifierResult, VerifierRunner, VerifierSpec};