Skip to main content

Crate zeph_common

Crate zeph_common 

Source
Expand description

Shared utility functions and security primitives for Zeph crates.

This crate provides pure utility functions (text manipulation, network helpers, sanitization primitives), security primitives (Secret, VaultError), and strongly-typed identifiers (ToolName, SessionId) that are needed by multiple crates. It has no zeph-* dependencies. The optional treesitter feature adds tree-sitter query constants and helpers.

Re-exports§

pub use clock::ClockSource;
pub use clock::FixedClock;
pub use clock::SystemClock;
pub use fidelity::ContextFidelity;
pub use fidelity::PlannedToolHint;
pub use math::EmbeddingVector;
pub use math::Normalized;
pub use math::Unnormalized;
pub use monotonic::monotonic_millis;
pub use policy::PolicyLlmClient;
pub use policy::PolicyMessage;
pub use policy::PolicyRole;
pub use sanitize::IdentitySanitizer;
pub use sanitize::OutputSanitizer;
pub use security_event::SecurityEventCategory;
pub use spawner::BlockingSpawner;
pub use task_supervisor::BlockingError;
pub use task_supervisor::BlockingHandle;
pub use task_supervisor::MAX_RESTART_DELAY;
pub use task_supervisor::RestartPolicy;
pub use task_supervisor::TaskDescriptor;
pub use task_supervisor::TaskHandle;
pub use task_supervisor::TaskSnapshot;
pub use task_supervisor::TaskStatus;
pub use task_supervisor::TaskSupervisor;
pub use text::format_tokens;
pub use trust_level::SkillTrustLevel;
pub use turn_trust_floor::TurnTrustFloor;
pub use types::ProviderName;
pub use types::SessionId;
pub use types::SessionIdError;
pub use types::SkillName;
pub use types::StopHint;
pub use types::ToolDefinition;
pub use types::ToolName;

Modules§

anchor
Vault-anchor downgrade-resistance primitives (issue #6449).
audit
Shared audit signal types used by both the sanitizer and memory subsystems.
clock
Injectable wall-clock source (#6361).
config
Shared runtime configuration structs used across multiple crates.
error_taxonomy
Shared error classification enums for tool invocation failures.
fidelity
Fidelity types for Context-Adaptive Memory (CAM).
fs_secure
Filesystem helpers that create files with owner-only permissions (0o600) on Unix.
hash
Hash utilities: BLAKE3 hex digests and fast SipHash-based u64 hashing.
hash_chain
Keyed-BLAKE3 hash-chain primitive for tamper-evident, append-only JSONL history.
llm_response
Helpers for extracting structured content embedded in free-form LLM prose.
math
Mathematical utilities for vector operations.
memory
Shared memory interface types used by both zeph-memory (Layer 1) and zeph-context (Layer 1) without a cross-layer dependency.
monotonic
Process-lifetime monotonic millisecond clock shared across crates.
net
Network utilities shared across crates.
path_guard
Classifier for the “relative paths only, no ..” policy used by every attachment-loading entry point that has no sandbox/allowed_paths configuration available to it (currently /image).
patterns
Shared injection-detection patterns for the security sanitization layers.
pidfile
Shared flock(2)-backed advisory pid-file guard.
policy
Policy LLM client trait and minimal message types.
quarantine
Quarantine-denied tool list shared between zeph-tools and zeph-skills.
sanitize
Shared sanitization primitives.
secret
secrets
Canonical secret-token and path prefixes shared by redaction layers across crates.
security
Shared sandbox-boundary check for allowed_paths-style path validation.
security_event
Security event category shared across Zeph crates.
spawner
Dependency-inversion trait for supervised blocking thread spawns.
task_supervisor
Supervised lifecycle task manager for long-running named services.
text
String utility functions for Unicode-safe text manipulation.
timestamp
UTC timestamp helpers shared across the workspace.
tool_classification
Read-only tool classification shared between zeph-tools and zeph-orchestration.
trust_level
Trust tier enum for skill execution permissions.
turn_trust_floor
Shared, monotonically-downgradable trust floor for a single agent turn (#6701).
types
Strongly-typed identifiers and shared tool types across zeph-* crates.

Constants§

OVERFLOW_NOTICE_PREFIX
Prefix embedded in tool output bodies when the full output was stored externally.