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