zeph_common/lib.rs
1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Shared utility functions and security primitives for Zeph crates.
5//!
6//! This crate provides pure utility functions (text manipulation, network helpers,
7//! sanitization primitives), security primitives (`Secret`, `VaultError`), and
8//! strongly-typed identifiers (`ToolName`, `SessionId`) that are needed by multiple crates.
9//! It has no `zeph-*` dependencies. The optional `treesitter` feature adds tree-sitter
10//! query constants and helpers.
11
12pub mod config;
13pub mod error_taxonomy;
14pub mod hash;
15pub mod math;
16pub mod net;
17pub mod patterns;
18pub mod policy;
19pub mod quarantine;
20pub mod sanitize;
21pub mod secret;
22pub mod spawner;
23pub mod text;
24pub mod trust_level;
25pub mod types;
26
27/// Prefix embedded in tool output bodies when the full output was stored externally.
28///
29/// Format: `[full output stored — ID: {uuid} — {bytes} bytes, use read_overflow tool to retrieve]`
30pub const OVERFLOW_NOTICE_PREFIX: &str = "[full output stored \u{2014} ID: ";
31
32pub use policy::{PolicyLlmClient, PolicyMessage, PolicyRole};
33pub use spawner::BlockingSpawner;
34pub use trust_level::SkillTrustLevel;
35pub use types::{SessionId, ToolDefinition, ToolName};
36
37#[cfg(feature = "treesitter")]
38pub mod treesitter;