Skip to content

vox-search API Reference (generated)

Crate: vox-search · Version: 0.6.0 · Target: Library (lib.rs)

Shared local-first retrieval execution: memory hybrid, repo inventory, document chunks (RAG), policy, and optional lexical/vector backends

Shared local-first retrieval execution for MCP, orchestrator, CLI, and A2A bridges.

  • [policy::SearchPolicy] — versioned tunables + VOX_SEARCH_* env overrides.
  • [context::SearchRuntimeContext] — repo root, optional VoxDb handle, memory paths.
  • [execution::execute_search_plan] — memory hybrid + knowledge + chunks + repo inventory.
  • [bundle::run_search_with_verification] — automatic verification pass.
  • Optional Tantivy (tantivy-lexical, the KB Library index in library) and Qdrant (qdrant-vector) backends.
FeatureDefault / Enables
defaultqdrant-vector, tavily, tantivy-lexical
qdrant-vector—
tantivy-lexicaldep:tantivy
tavily—
web-scrapedep:scraper, dep:html2text
DependencyKind
vox-actor-runtimeNormal
vox-bounded-fsNormal
vox-configNormal
vox-dbNormal
vox-http-clientNormal
vox-kb-facetsNormal
vox-secretsNormal
vox-cryptoDevelopment
ModuleDescription
a2a_contract—
arxiv—
bundle—
capture—
context—
corroboration—
crag—
crawler—
duckduckgo—
embedding_env—
embeddings—
evaluation—
execution—
fuzzy_trigram—
ingest—
kb_eval—
kb_ids—
kb_inbox—
kb_injection—
kb_rewrite_guard—
kb_staleness—
llm_query_expansion—
memory_hybrid—
mens_research_subagent—
novelty—
openalex—
parallel_exploration—
policy—
probe—
research—
safety_governor—
scraper—
search_circuit_breaker—
searxng—
semantic_fsIntent-oriented repo path discovery (AgentOS semantic filesystem bridge).
spa_fallback—
symbol_proximity—
tavily_budget—
tavily_extract—
tavily_research—
term_density_reranker—
trust—
unified—
web_dispatcher—
wikipedia—
library—
tavily—
vector_qdrant—
Dependency Topology, diagram 117 nodes, 16 edges: vox-search → vox-actor-runtime; vox-search → vox-bounded-fs; vox-search → vox-config; vox-search → vox-crypto; vox-search → vox-db; vox-search → vox-http-client; vox-search → vox-kb-facets; vox-search → vox-secrets; vox-cli → vox-search; vox-cli-research → vox-search; vox-gui → …vox-searchvox-actor-runtimevox-bounded-fsvox-configvox-cryptovox-dbvox-http-clientvox-kb-facetsvox-secretsvox-clivox-cli-researchvox-guivox-orchestratorvox-orchestrator-mcpvox-plugin-publicationvox-research-shimvox-scientia
Diagram source
graph {
direction: right
node vox_search: "vox-search"
node vox_actor_runtime: "vox-actor-runtime"
vox_search -> vox_actor_runtime
node vox_bounded_fs: "vox-bounded-fs"
vox_search -> vox_bounded_fs
node vox_config: "vox-config"
vox_search -> vox_config
node vox_crypto: "vox-crypto"
vox_search -> vox_crypto
node vox_db: "vox-db"
vox_search -> vox_db
node vox_http_client: "vox-http-client"
vox_search -> vox_http_client
node vox_kb_facets: "vox-kb-facets"
vox_search -> vox_kb_facets
node vox_secrets: "vox-secrets"
vox_search -> vox_secrets
node vox_cli: "vox-cli"
vox_cli -> vox_search
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_search
node vox_gui: "vox-gui"
vox_gui -> vox_search
node vox_orchestrator: "vox-orchestrator"
vox_orchestrator -> vox_search
node vox_orchestrator_mcp: "vox-orchestrator-mcp"
vox_orchestrator_mcp -> vox_search
node vox_plugin_publication: "vox-plugin-publication"
vox_plugin_publication -> vox_search
node vox_research_shim: "vox-research-shim"
vox_research_shim -> vox_search
node vox_scientia: "vox-scientia"
vox_scientia -> vox_search
}
Consumer CrateRole
vox-cliDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-guiDirect workspace dependent
vox-orchestratorDirect workspace dependent
vox-orchestrator-mcpDirect workspace dependent
vox-plugin-publicationDirect workspace dependent
vox-research-shimDirect workspace dependent
vox-scientiaDirect workspace dependent
KindSymbolSignatureSourceDescription
structa2a_contract::A2ARetrievalRequestpub struct A2ARetrievalRequestcrates/vox-search/src/a2a_contract.rs#L11-L18Agent asks peer or parent for grounded evidence.
structa2a_contract::A2ADurableArtifactpub struct A2ADurableArtifactcrates/vox-search/src/a2a_contract.rs#L21-L28Reference to a securely persisted retrieval artifact, replacing inline prompt injection risks.
structa2a_contract::A2ARetrievalResponsepub struct A2ARetrievalResponsecrates/vox-search/src/a2a_contract.rs#L32-L49Evidence package returned to the requester.
fna2a_contract::from_search_passpub fn from_search_pass(crates/vox-search/src/a2a_contract.rs#L54Maps a finished [SearchExecution] + diagnostics into the wire snapshot (request correlation only).
structa2a_contract::A2ARetrievalRefinementpub struct A2ARetrievalRefinementcrates/vox-search/src/a2a_contract.rs#L88-L93Follow-up refinement (contradiction / weak recall) for shared critique loops.
fnarxiv::normalize_arxiv_urlpub fn normalize_arxiv_url(raw: &str) -> Stringcrates/vox-search/src/arxiv.rs#L21-L51Normalizes arXiv identifiers or URLs into canonical https://arxiv.org/abs/{id} format, stripping any version suffix like v1, v2, etc.
structarxiv::ArXivClientpub struct ArXivClientcrates/vox-search/src/arxiv.rs#L58—
fnarxiv::parse_atom_xmlpub fn parse_atom_xml(xml: &str, limit: usize) -> anyhow::Result<Vec<SearxngResult>>crates/vox-search/src/arxiv.rs#L62Parse Atom XML feed from arXiv, extracting entry nodes into SearxngResult up to limit.
fnarxiv::searchpub async fn search(crates/vox-search/src/arxiv.rs#L234Query arXiv API with query string, limit, and optional base URL override.
enumbundle::RetrievalTriggerModepub enum RetrievalTriggerModecrates/vox-search/src/bundle.rs#L16-L20Trigger mode parity with MCP (kept numeric-free here; MCP maps to its enum).
fnbundle::run_search_with_verificationpub async fn run_search_with_verification(crates/vox-search/src/bundle.rs#L27Run planner + optional second pass using policy thresholds. AutoChatPreamble always excludes Untrusted hits (D-03, WR-08), whatever policy the caller passed; the Tavily CRAG leg does not fire under that exclusion (CR-01).
fnbundle::search_plan_valuepub fn search_plan_value(plan: &SearchPlan) -> Valuecrates/vox-search/src/bundle.rs#L274-L276JSON snapshots for telemetry fields carried by MCP envelopes.
fnbundle::diagnostics_valuepub fn diagnostics_value(diag: &SearchDiagnostics) -> Valuecrates/vox-search/src/bundle.rs#L278-L280—
structcapture::CapturedWebHitpub struct CapturedWebHitcrates/vox-search/src/capture.rs#L9-L18One web hit handed to a capture sink.
traitcapture::WebFindingCapturepub trait WebFindingCapture: Send + Synccrates/vox-search/src/capture.rs#L21-L23Fire-and-forget sink; the implementor owns spawning and error logging.
structcontext::SearchRuntimeContextpub struct SearchRuntimeContextcrates/vox-search/src/context.rs#L12-L25Cross-platform retrieval runtime inputs (orchestrator, MCP, CLI).
fncontext::newpub fn new(crates/vox-search/src/context.rs#L42New context; callers should canonicalize repo_root when possible.
fncontext::with_trace_idpub fn with_trace_id(mut self, trace_id: Option<String>) -> Selfcrates/vox-search/src/context.rs#L60-L63Attach a trace id for [crate::execution::execute_search_plan] telemetry and sidecar headers.
fncontext::with_web_capturepub fn with_web_capture(mut self, sink: Option<Arc<dyn WebFindingCapture>>) -> Selfcrates/vox-search/src/context.rs#L67-L70Attach (or clear) the web-hit capture sink.
structcorroboration::CorroboratingHitpub struct CorroboratingHitcrates/vox-search/src/corroboration.rs#L9-L12—
structcorroboration::CorroborationCountpub struct CorroborationCountcrates/vox-search/src/corroboration.rs#L15-L18—
fncorroboration::countpub fn count(&self) -> usizecrates/vox-search/src/corroboration.rs#L21-L23—
fncorroboration::count_corroborationpub fn count_corroboration(claim_id: &str, hits: &[CorroboratingHit]) -> CorroborationCountcrates/vox-search/src/corroboration.rs#L42-L54—
structcrag::CragRouterpub struct CragRoutercrates/vox-search/src/crag.rs#L6Logic for Corrective RAG (CRAG) expansion and multi-hop query generation.
fncrag::expand_queries_from_partial_evidencepub fn expand_queries_from_partial_evidence(crates/vox-search/src/crag.rs#L11Generates refined sub-queries based on initial research hits and the original query. Used for iterative multi-hop research loops.
fncrag::expand_queries_with_llm_or_heuristicpub fn expand_queries_with_llm_or_heuristic(crates/vox-search/src/crag.rs#L101Use LLM-generated queries when available; fall back to heuristic. Caps output at 4 queries. Pass None or Some(&[]) to use heuristic.
fncrag::should_continuepub fn should_continue(current_quality: f64, target_quality: f64, hops_remaining: u8) -> boolcrates/vox-search/src/crag.rs#L121-L123Determines if a research pass should continue based on quality score.
fncrawler::normalize_crawl_urlpub fn normalize_crawl_url(url: &Url) -> Urlcrates/vox-search/src/crawler.rs#L11-L16—
fncrawler::extract_candidate_linkspub fn extract_candidate_links(html: &str, base_url: &str, allow_origin: &str) -> Vec<String>crates/vox-search/src/crawler.rs#L18-L50—
fncrawler::score_and_prioritize_linkspub fn score_and_prioritize_links(links: &[String]) -> Vec<(String, u32)>crates/vox-search/src/crawler.rs#L52-L79—
fncrawler::crawl_domain_depthpub async fn crawl_domain_depth(crates/vox-search/src/crawler.rs#L81—
structduckduckgo::DdgResultpub struct DdgResultcrates/vox-search/src/duckduckgo.rs#L4-L9—
enumduckduckgo::DdgTopicItempub enum DdgTopicItemcrates/vox-search/src/duckduckgo.rs#L13-L21—
structduckduckgo::DdgResponsepub struct DdgResponsecrates/vox-search/src/duckduckgo.rs#L24-L27—
structduckduckgo::DuckDuckGoClientpub struct DuckDuckGoClientcrates/vox-search/src/duckduckgo.rs#L29—
fnduckduckgo::searchpub async fn search(crates/vox-search/src/duckduckgo.rs#L36Pruned DuckDuckGo search stub. DuckDuckGo fallback has been retired in favor of parallel multi-source keyless retrieval (arXiv, OpenAlex, Wikipedia).
fnembedding_env::embedding_config_from_envpub fn embedding_config_from_env() -> Option<LlmConfig>crates/vox-search/src/embedding_env.rs#L18-L100Build embedding configuration from well-known providers.
fnembedding_env::default_local_embedding_configpub fn default_local_embedding_config() -> LlmConfigcrates/vox-search/src/embedding_env.rs#L111-L135Build a zero-API-key provider = "local" embedding configuration (EMB-01).
fnembedding_env::embedding_config_or_localpub fn embedding_config_or_local() -> LlmConfigcrates/vox-search/src/embedding_env.rs#L140-L142Prefer explicit environment/Clavis API provider when configured, falling back to the zero-key provider = "local" configuration (EMB-01, EMB-05).
structembeddings::EmbeddingServicepub struct EmbeddingServicecrates/vox-search/src/embeddings.rs#L10-L13Generate query vectors and optionally persist rows into embeddings.
fnembeddings::newpub fn new(db: Arc<VoxDb>, config: LlmConfig) -> Selfcrates/vox-search/src/embeddings.rs#L17-L19New service bound to a [vox_db::VoxDb] handle and provider configuration.
fnembeddings::embed_and_storepub async fn embed_and_store(crates/vox-search/src/embeddings.rs#L22Generate an embedding for text and store it in the database.
fnembeddings::embed_querypub async fn embed_query(&self, query: &str) -> Result<Vec<f32>, String>crates/vox-search/src/embeddings.rs#L51-L59Generate a vector for a search query.
fnembeddings::llm_configpub fn llm_config(&self) -> &LlmConfigcrates/vox-search/src/embeddings.rs#L63-L65Underlying model configuration (for telemetry).
fnembeddings::dbpub fn db(&self) -> &Arc<VoxDb>crates/vox-search/src/embeddings.rs#L69-L71Shared database handle.