Skip to main content

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 text;
23pub mod trust_level;
24pub mod types;
25
26/// Prefix embedded in tool output bodies when the full output was stored externally.
27///
28/// Format: `[full output stored — ID: {uuid} — {bytes} bytes, use read_overflow tool to retrieve]`
29pub const OVERFLOW_NOTICE_PREFIX: &str = "[full output stored \u{2014} ID: ";
30
31pub use policy::{PolicyLlmClient, PolicyMessage, PolicyRole};
32pub use trust_level::SkillTrustLevel;
33pub use types::{SessionId, ToolDefinition, ToolName};
34
35#[cfg(feature = "treesitter")]
36pub mod treesitter;