Skip to content

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.

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.

ModuleDescription
circuitCircuit-breaker state enum (CircuitState) for vox_db::circuit_breaker.
workspace_journeyWorkspace-journey store mode enum (WorkspaceJourneyStoreMode).
exec_timeExecution time telemetry types (ExecOutcome, ExecTimeRecord, ToolLatencyProfile).
hashHashing utilities (content_hash).
eval_paramsParameters for [crate::EvalRunParams] (RLHF / dogfood eval-run recording).
store_typesRequest parameters, row shapes, and MENS observation/training types (formerly vox_db::store::types::*).
researchSCIENTIA / research-session row DTOs.
kb_textKB-text sanitizer and provenance newtypes (TRUST-05).
idsTyped string-ID newtypes for DB row fields (UUIDs, hashes, human-readable IDs).
retrievalHybrid retrieval planning types and rank-fusion helpers (vector + keyword search). Shared contracts used by MCP, the orchestrator, and VoxDb-backed retrieval surfaces.
TypeDescription
MemoryParamsAlias kept for back-compat (vox_db::MemoryParams).
Dependency Topology, diagram 14 nodes, 3 edges: vox-db → vox-db-types; vox-package → vox-db-types; vox-scientia → vox-db-typesvox-db-typesvox-dbvox-packagevox-scientia
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
}
Consumer CrateRole
vox-dbDirect workspace dependent
vox-packageDirect workspace dependent
vox-scientiaDirect workspace dependent
KindSymbolSignatureSourceDescription
typeMemoryParamspub type MemoryParams<'a> = store_types::SaveMemoryParams<'a>crates/vox-db-types/src/lib.rs#L48Alias kept for back-compat (vox_db::MemoryParams).
enumcircuit::CircuitStatepub enum CircuitStatecrates/vox-db-types/src/circuit.rs#L12-L19Three states a circuit breaker can be in.
structeval_params::EvalRunParamspub struct EvalRunParams<'a>crates/vox-db-types/src/eval_params.rs#L5-L22Parameters for vox_db::VoxDb::record_eval_run.
structexec_time::ExecTimeRecordpub struct ExecTimeRecord<'a>crates/vox-db-types/src/exec_time.rs#L9-L21Write-path record for one execution observation.
enumexec_time::ExecOutcomepub enum ExecOutcomecrates/vox-db-types/src/exec_time.rs#L24-L28—
fnexec_time::as_strpub fn as_str(self) -> &'static strcrates/vox-db-types/src/exec_time.rs#L31-L37—
structexec_time::ToolLatencyProfilepub struct ToolLatencyProfilecrates/vox-db-types/src/exec_time.rs#L42-L54Historical latency profile returned by vox_db::VoxDb::query_tool_latency.
fnhash::content_hashpub fn content_hash(data: &[u8]) -> Stringcrates/vox-db-types/src/hash.rs#L6-L11Compute a SHA3-512 hash of the given data, returning Base32Hex-encoded string.
structids::$namepub struct $name(pub String)crates/vox-db-types/src/ids.rs#L14—
fnids::newpub fn new(s: impl Into<String>) -> Selfcrates/vox-db-types/src/ids.rs#L17—
fnids::as_strpub fn as_str(&self) -> &strcrates/vox-db-types/src/ids.rs#L18—
fnids::into_stringpub fn into_string(self) -> Stringcrates/vox-db-types/src/ids.rs#L19—
fnkb_text::sanitizepub fn sanitize(raw: &str) -> Stringcrates/vox-db-types/src/kb_text.rs#L56-L66Sanitize 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).
structkb_text::SanitizedTextpub struct SanitizedText(String)crates/vox-db-types/src/kb_text.rs#L325Text 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");
fnkb_text::newpub fn new(raw: &str) -> Selfcrates/vox-db-types/src/kb_text.rs#L329-L331Sanitize raw and wrap the result.
fnkb_text::as_strpub fn as_str(&self) -> &strcrates/vox-db-types/src/kb_text.rs#L332-L334—
fnkb_text::into_stringpub fn into_string(self) -> Stringcrates/vox-db-types/src/kb_text.rs#L335-L337—
structkb_text::ContentHashpub struct ContentHash(String)crates/vox-db-types/src/kb_text.rs#L350A blake3 content hash stored as blake3:<64 lowercase hex>. Hashing itself stays in vox-crypto consumers; this type only validates the encoded form.
fnkb_text::from_blake3_hexpub fn from_blake3_hex(hex: &str) -> Result<Self, String>crates/vox-db-types/src/kb_text.rs#L354-L363Accept exactly 64 lowercase hex characters.
fnkb_text::as_strpub fn as_str(&self) -> &strcrates/vox-db-types/src/kb_text.rs#L364-L366—
enumkb_text::FindingOriginpub enum FindingOrigincrates/vox-db-types/src/kb_text.rs#L372-L383Where a KB finding came from.
fnkb_text::as_db_strpub fn as_db_str(self) -> &'static strcrates/vox-db-types/src/kb_text.rs#L398-L411—
fnkb_text::from_db_strpub fn from_db_str(s: &str) -> Result<Self, String>crates/vox-db-types/src/kb_text.rs#L413-L418Fallible: an unknown string is an error, never a default variant.
enumkb_text::FindingStatuspub enum FindingStatuscrates/vox-db-types/src/kb_text.rs#L424-L430Review state of a KB finding.
fnkb_text::as_db_strpub fn as_db_str(self) -> &'static strcrates/vox-db-types/src/kb_text.rs#L440-L448—
fnkb_text::from_db_strpub fn from_db_str(s: &str) -> Result<Self, String>crates/vox-db-types/src/kb_text.rs#L450-L455Fallible: an unknown string is an error, never a default variant.
structresearch::ResearchSessionRecordpub struct ResearchSessionRecordcrates/vox-db-types/src/research.rs#L4-L11—
structresearch::ResearchSessionSummarypub struct ResearchSessionSummarycrates/vox-db-types/src/research.rs#L14-L21—
structresearch::ResearchArtifactRecordpub struct ResearchArtifactRecordcrates/vox-db-types/src/research.rs#L24-L30—
structresearch::ScientiaClaimWithVerdictpub struct ScientiaClaimWithVerdictcrates/vox-db-types/src/research.rs#L35-L46An extracted SCIENTIA claim joined to its latest (non-span) verdict, for a publication’s claim ledger view.
structresearch::ClaimsPendingCountspub struct ClaimsPendingCountscrates/vox-db-types/src/research.rs#L50-L57Global claims-pending counts for the SCIENTIA dashboard.
structresearch::ResearchSearchResultpub struct ResearchSearchResultcrates/vox-db-types/src/research.rs#L61-L66Result hit from full-text or pattern search across research artifacts.
structresearch::CachedClaimVerdictpub struct CachedClaimVerdictcrates/vox-db-types/src/research.rs#L70-L76Cached claim verification verdict from historical research sessions.
enumresearch::ResearchDefectClasspub enum ResearchDefectClasscrates/vox-db-types/src/research.rs#L81-L90Defect classification for code generated from misleading external research.
fnresearch::as_strpub fn as_str(&self) -> &'static strcrates/vox-db-types/src/research.rs#L93-L100—
enumresearch::MisguidanceReporterpub enum MisguidanceReportercrates/vox-db-types/src/research.rs#L126-L137Actor or pipeline stage that reported research misguidance.
fnresearch::as_strpub fn as_str(&self) -> &'static strcrates/vox-db-types/src/research.rs#L140-L148—
structresearch::RecordMisguidanceParamspub struct RecordMisguidanceParamscrates/vox-db-types/src/research.rs#L174-L187Parameter block for recording a research misguidance event into VoxDb.
structresearch::ResearchMisguidanceRecordpub struct ResearchMisguidanceRecordcrates/vox-db-types/src/research.rs#L191-L208Persisted research misguidance event row.
structresearch::DomainReputationRecordpub struct DomainReputationRecordcrates/vox-db-types/src/research.rs#L212-L219Persisted domain reputation summary row.
enumretrieval::RetrievalEvidenceSourcepub enum RetrievalEvidenceSourcecrates/vox-db-types/src/retrieval.rs#L12-L22Which retrieval branch produced evidence for a hit (or both after hybrid fusion).
fnretrieval::mergepub fn merge(self, other: Self) -> Selfcrates/vox-db-types/src/retrieval.rs#L26-L36Combines evidence from two hits of the same chunk (e.g. vector + FTS overlap).
enumretrieval::RetrievalModepub enum RetrievalModecrates/vox-db-types/src/retrieval.rs#L42-L49How a [RetrievalQuery] should be interpreted upstream.
structretrieval::RetrievalQuerypub struct RetrievalQuerycrates/vox-db-types/src/retrieval.rs#L53-L62Inputs for a retrieval request (caller maps to concrete SQL or RPC).
enumretrieval::SearchIntentpub enum SearchIntentcrates/vox-db-types/src/retrieval.rs#L78-L90What kind of information need is being served by the current search.