vox-db-types API Reference (generated)
Crate: vox-db-types · Version: 0.6.0 · Target: Library (lib.rs)
Pure-data L0 leaf for vox-db: row types, IDs, schema descriptors.
Crate Overview
Section titled “Crate Overview”vox-db-types — Pure data types for vox-db
Section titled “vox-db-types — Pure data types for vox-db”Lightweight crate holding parameter and row structs used by the vox-db facade.
Consumers that only need types (not connection-bearing operations) can depend on
this crate to avoid pulling in turso and other heavy operational deps.
vox-db re-exports everything here for back-compat: vox_db::SaveSnippetParams
resolves the same as vox_db_types::SaveSnippetParams.
Public API Surface
Section titled “Public API Surface”Modules
Section titled “Modules”| Module | Description |
|---|---|
circuit | Circuit-breaker state enum (CircuitState) for vox_db::circuit_breaker. |
workspace_journey | Workspace-journey store mode enum (WorkspaceJourneyStoreMode). |
exec_time | Execution time telemetry types (ExecOutcome, ExecTimeRecord, ToolLatencyProfile). |
hash | Hashing utilities (content_hash). |
eval_params | Parameters for [crate::EvalRunParams] (RLHF / dogfood eval-run recording). |
store_types | Request parameters, row shapes, and MENS observation/training types (formerly vox_db::store::types::*). |
research | SCIENTIA / research-session row DTOs. |
kb_text | KB-text sanitizer and provenance newtypes (TRUST-05). |
ids | Typed string-ID newtypes for DB row fields (UUIDs, hashes, human-readable IDs). |
retrieval | Hybrid retrieval planning types and rank-fusion helpers (vector + keyword search). Shared contracts used by MCP, the orchestrator, and VoxDb-backed retrieval surfaces. |
| Type | Description |
|---|---|
MemoryParams | Alias kept for back-compat (vox_db::MemoryParams). |
Dependency Topology
Section titled “Dependency Topology”Diagram source
graph { direction: right node vox_db_types: "vox-db-types" node vox_db: "vox-db" vox_db -> vox_db_types node vox_package: "vox-package" vox_package -> vox_db_types node vox_scientia: "vox-scientia" vox_scientia -> vox_db_types}Reverse Dependents (Used By)
Section titled “Reverse Dependents (Used By)”| Consumer Crate | Role |
|---|---|
vox-db | Direct workspace dependent |
vox-package | Direct workspace dependent |
vox-scientia | Direct workspace dependent |
Deep Public Symbols (Source-Anchored)
Section titled “Deep Public Symbols (Source-Anchored)”| Kind | Symbol | Signature | Source | Description |
|---|---|---|---|---|
type | MemoryParams | pub type MemoryParams<'a> = store_types::SaveMemoryParams<'a> | crates/vox-db-types/src/lib.rs#L48 | Alias kept for back-compat (vox_db::MemoryParams). |
enum | circuit::CircuitState | pub enum CircuitState | crates/vox-db-types/src/circuit.rs#L12-L19 | Three states a circuit breaker can be in. |
struct | eval_params::EvalRunParams | pub struct EvalRunParams<'a> | crates/vox-db-types/src/eval_params.rs#L5-L22 | Parameters for vox_db::VoxDb::record_eval_run. |
struct | exec_time::ExecTimeRecord | pub struct ExecTimeRecord<'a> | crates/vox-db-types/src/exec_time.rs#L9-L21 | Write-path record for one execution observation. |
enum | exec_time::ExecOutcome | pub enum ExecOutcome | crates/vox-db-types/src/exec_time.rs#L24-L28 | — |
fn | exec_time::as_str | pub fn as_str(self) -> &'static str | crates/vox-db-types/src/exec_time.rs#L31-L37 | — |
struct | exec_time::ToolLatencyProfile | pub struct ToolLatencyProfile | crates/vox-db-types/src/exec_time.rs#L42-L54 | Historical latency profile returned by vox_db::VoxDb::query_tool_latency. |
fn | hash::content_hash | pub fn content_hash(data: &[u8]) -> String | crates/vox-db-types/src/hash.rs#L6-L11 | Compute a SHA3-512 hash of the given data, returning Base32Hex-encoded string. |
struct | ids::$name | pub struct $name(pub String) | crates/vox-db-types/src/ids.rs#L14 | — |
fn | ids::new | pub fn new(s: impl Into<String>) -> Self | crates/vox-db-types/src/ids.rs#L17 | — |
fn | ids::as_str | pub fn as_str(&self) -> &str | crates/vox-db-types/src/ids.rs#L18 | — |
fn | ids::into_string | pub fn into_string(self) -> String | crates/vox-db-types/src/ids.rs#L19 | — |
fn | kb_text::sanitize | pub fn sanitize(raw: &str) -> String | crates/vox-db-types/src/kb_text.rs#L56-L66 | Sanitize untrusted text. Fixed pass order, repeated to a bounded fixpoint: (1) strip invisible codepoints (so evasion characters cannot split a later match), (2) strip HTML comments (unterminated strips to end), (3) neutralize images (inline, reference, HTML img) unless the target is relative or its host is allowlisted, (4) neutralize role tokens. Works on Unicode scalar values, applies no normalization and always returns valid UTF-8. Idempotent. If the passes have not converged after MAX_PASSES the input is adversarially nested and the result is "" (fail closed). |
struct | kb_text::SanitizedText | pub struct SanitizedText(String) | crates/vox-db-types/src/kb_text.rs#L325 | Text that has passed through [sanitize]. The field is private and there is no Default, From<String> or Deserialize, so the only way to build one is [SanitizedText::new]. A tuple-struct literal does not compile outside this module: compile_fail let _ = vox_db_types::kb_text::SanitizedText("raw".to_string()); The constructor sanitizes: let t = vox_db_types::kb_text::SanitizedText::new("a\u{200B}b"); assert_eq!(t.as_str(), "ab"); |
fn | kb_text::new | pub fn new(raw: &str) -> Self | crates/vox-db-types/src/kb_text.rs#L329-L331 | Sanitize raw and wrap the result. |
fn | kb_text::as_str | pub fn as_str(&self) -> &str | crates/vox-db-types/src/kb_text.rs#L332-L334 | — |
fn | kb_text::into_string | pub fn into_string(self) -> String | crates/vox-db-types/src/kb_text.rs#L335-L337 | — |
struct | kb_text::ContentHash | pub struct ContentHash(String) | crates/vox-db-types/src/kb_text.rs#L350 | A blake3 content hash stored as blake3:<64 lowercase hex>. Hashing itself stays in vox-crypto consumers; this type only validates the encoded form. |
fn | kb_text::from_blake3_hex | pub fn from_blake3_hex(hex: &str) -> Result<Self, String> | crates/vox-db-types/src/kb_text.rs#L354-L363 | Accept exactly 64 lowercase hex characters. |
fn | kb_text::as_str | pub fn as_str(&self) -> &str | crates/vox-db-types/src/kb_text.rs#L364-L366 | — |
enum | kb_text::FindingOrigin | pub enum FindingOrigin | crates/vox-db-types/src/kb_text.rs#L372-L383 | Where a KB finding came from. |
fn | kb_text::as_db_str | pub fn as_db_str(self) -> &'static str | crates/vox-db-types/src/kb_text.rs#L398-L411 | — |
fn | kb_text::from_db_str | pub fn from_db_str(s: &str) -> Result<Self, String> | crates/vox-db-types/src/kb_text.rs#L413-L418 | Fallible: an unknown string is an error, never a default variant. |
enum | kb_text::FindingStatus | pub enum FindingStatus | crates/vox-db-types/src/kb_text.rs#L424-L430 | Review state of a KB finding. |
fn | kb_text::as_db_str | pub fn as_db_str(self) -> &'static str | crates/vox-db-types/src/kb_text.rs#L440-L448 | — |
fn | kb_text::from_db_str | pub fn from_db_str(s: &str) -> Result<Self, String> | crates/vox-db-types/src/kb_text.rs#L450-L455 | Fallible: an unknown string is an error, never a default variant. |
struct | research::ResearchSessionRecord | pub struct ResearchSessionRecord | crates/vox-db-types/src/research.rs#L4-L11 | — |
struct | research::ResearchSessionSummary | pub struct ResearchSessionSummary | crates/vox-db-types/src/research.rs#L14-L21 | — |
struct | research::ResearchArtifactRecord | pub struct ResearchArtifactRecord | crates/vox-db-types/src/research.rs#L24-L30 | — |
struct | research::ScientiaClaimWithVerdict | pub struct ScientiaClaimWithVerdict | crates/vox-db-types/src/research.rs#L35-L46 | An extracted SCIENTIA claim joined to its latest (non-span) verdict, for a publication’s claim ledger view. |
struct | research::ClaimsPendingCounts | pub struct ClaimsPendingCounts | crates/vox-db-types/src/research.rs#L50-L57 | Global claims-pending counts for the SCIENTIA dashboard. |
struct | research::ResearchSearchResult | pub struct ResearchSearchResult | crates/vox-db-types/src/research.rs#L61-L66 | Result hit from full-text or pattern search across research artifacts. |
struct | research::CachedClaimVerdict | pub struct CachedClaimVerdict | crates/vox-db-types/src/research.rs#L70-L76 | Cached claim verification verdict from historical research sessions. |
enum | research::ResearchDefectClass | pub enum ResearchDefectClass | crates/vox-db-types/src/research.rs#L81-L90 | Defect classification for code generated from misleading external research. |
fn | research::as_str | pub fn as_str(&self) -> &'static str | crates/vox-db-types/src/research.rs#L93-L100 | — |
enum | research::MisguidanceReporter | pub enum MisguidanceReporter | crates/vox-db-types/src/research.rs#L126-L137 | Actor or pipeline stage that reported research misguidance. |
fn | research::as_str | pub fn as_str(&self) -> &'static str | crates/vox-db-types/src/research.rs#L140-L148 | — |
struct | research::RecordMisguidanceParams | pub struct RecordMisguidanceParams | crates/vox-db-types/src/research.rs#L174-L187 | Parameter block for recording a research misguidance event into VoxDb. |
struct | research::ResearchMisguidanceRecord | pub struct ResearchMisguidanceRecord | crates/vox-db-types/src/research.rs#L191-L208 | Persisted research misguidance event row. |
struct | research::DomainReputationRecord | pub struct DomainReputationRecord | crates/vox-db-types/src/research.rs#L212-L219 | Persisted domain reputation summary row. |
enum | retrieval::RetrievalEvidenceSource | pub enum RetrievalEvidenceSource | crates/vox-db-types/src/retrieval.rs#L12-L22 | Which retrieval branch produced evidence for a hit (or both after hybrid fusion). |
fn | retrieval::merge | pub fn merge(self, other: Self) -> Self | crates/vox-db-types/src/retrieval.rs#L26-L36 | Combines evidence from two hits of the same chunk (e.g. vector + FTS overlap). |
enum | retrieval::RetrievalMode | pub enum RetrievalMode | crates/vox-db-types/src/retrieval.rs#L42-L49 | How a [RetrievalQuery] should be interpreted upstream. |
struct | retrieval::RetrievalQuery | pub struct RetrievalQuery | crates/vox-db-types/src/retrieval.rs#L53-L62 | Inputs for a retrieval request (caller maps to concrete SQL or RPC). |
enum | retrieval::SearchIntent | pub enum SearchIntent | crates/vox-db-types/src/retrieval.rs#L78-L90 | What kind of information need is being served by the current search. |