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 fs_secure;
15pub mod hash;
16pub mod math;
17pub mod net;
18pub mod patterns;
19pub mod policy;
20pub mod quarantine;
21pub mod sanitize;
22pub mod secret;
23pub mod spawner;
24pub mod text;
25pub mod trust_level;
26pub mod types;
27
28/// Prefix embedded in tool output bodies when the full output was stored externally.
29///
30/// Format: `[full output stored — ID: {uuid} — {bytes} bytes, use read_overflow tool to retrieve]`
31pub const OVERFLOW_NOTICE_PREFIX: &str = "[full output stored \u{2014} ID: ";
32
33pub use policy::{PolicyLlmClient, PolicyMessage, PolicyRole};
34pub use spawner::BlockingSpawner;
35pub use trust_level::SkillTrustLevel;
36pub use types::{SessionId, ToolDefinition, ToolName};
37
38#[cfg(feature = "treesitter")]
39pub mod treesitter;