Skip to main content

Crate av_core

Crate av_core 

Source
Expand description

AgentVisor AI core primitives shared by every crate in the workspace.

Provides: identifiers (UUIDv7), wall/monotonic time helpers, the approximate tokenizer used for budgets and compression ratios, SHA-256 digest helpers, a dependency-free Prometheus-text metrics registry, and common error types.

Re-exports§

pub use error::CoreError;
pub use ids::new_event_uid;
pub use ids::new_session_id;
pub use ids::InstanceUid;
pub use ids::SessionId;

Modules§

digest
SHA-256 digest helpers used by receipts, chains, and audit stubs.
error
Core error type shared across AgentVisor AI crates.
fsutil
Cross-platform filesystem helpers.
hash
Non-cryptographic hash helpers.
ids
Identifier newtypes. UUIDv7 gives time-ordered ids (useful for log locality) while remaining globally unique.
metrics
Dependency-free metrics registry rendering Prometheus text exposition format. Counters and histograms only (what the SLA criteria need), all lock-free on the hot path (atomics; registration takes a short mutex).
text
Unicode text guards: block characters that let hostile input spoof how logs, receipts, and identifiers look on a terminal.
time
Time helpers.
tokens
Deterministic approximate tokenizer.
units
Unit-conversion constants shared workspace-wide.