Skip to main content

zeph_core/
lib.rs

1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Agent loop, configuration loading, and context builder.
5
6pub mod agent;
7#[allow(clippy::missing_errors_doc, clippy::must_use_candidate)]
8pub mod bootstrap;
9pub mod channel;
10pub mod config;
11pub mod config_watcher;
12pub mod context;
13pub mod cost;
14pub mod daemon;
15pub mod debug_dump;
16pub mod file_watcher;
17pub mod instructions;
18pub mod metrics;
19pub mod pipeline;
20pub mod project;
21pub mod redact;
22
23// Re-export experiments module to preserve internal import paths (e.g., `crate::experiments::ExperimentEngine`).
24pub mod experiments {
25    pub use zeph_experiments::{
26        BenchmarkCase, BenchmarkSet, CaseScore, ConfigSnapshot, EvalError, EvalReport, Evaluator,
27        ExperimentEngine, ExperimentResult, ExperimentSessionReport, ExperimentSource,
28        GenerationOverrides, GridStep, JudgeOutput, Neighborhood, ParameterKind, ParameterRange,
29        Random, SearchSpace, Variation, VariationGenerator, VariationValue,
30    };
31}
32pub mod lsp_hooks;
33
34/// Re-export zeph-orchestration crate as a module to preserve internal import paths.
35pub mod orchestration {
36    pub use zeph_orchestration::*;
37    // Re-export submodules so `crate::orchestration::graph::*` paths continue to work.
38    pub use zeph_orchestration::{
39        aggregator, command, dag, error, graph, planner, router, scheduler,
40    };
41    // Re-export OrchestrationConfig to preserve the `crate::orchestration::OrchestrationConfig` path.
42    pub use crate::config::OrchestrationConfig;
43}
44
45pub mod http;
46pub mod memory_tools;
47pub mod overflow_tools;
48pub mod runtime_layer;
49pub mod skill_loader;
50/// Re-export zeph-subagent crate as a module to preserve internal import paths.
51pub mod subagent {
52    pub use zeph_subagent::*;
53    // Re-export submodules so `crate::subagent::def::*` paths continue to work.
54    pub use zeph_subagent::{
55        command, def, error, filter, grants, hooks, manager, memory, resolve, state, transcript,
56    };
57}
58pub use zeph_common::text;
59
60#[cfg(test)]
61pub mod testing;
62
63pub use agent::Agent;
64pub use agent::error::AgentError;
65pub use agent::session_config::{AgentSessionConfig, CONTEXT_BUDGET_RESERVE_RATIO};
66pub use agent::state::AdversarialPolicyInfo;
67pub use agent::state::ProviderConfigSnapshot;
68pub use channel::{
69    Attachment, AttachmentKind, Channel, ChannelError, ChannelMessage, LoopbackChannel,
70    LoopbackEvent, LoopbackHandle, StopHint, ToolOutputData, ToolOutputEvent, ToolStartData,
71    ToolStartEvent,
72};
73pub use config::{Config, ConfigError};
74pub use skill_loader::SkillLoaderExecutor;
75pub use zeph_common::hash::blake3_hex as content_hash;
76pub use zeph_sanitizer::exfiltration::{
77    ExfiltrationEvent, ExfiltrationGuard, ExfiltrationGuardConfig, extract_flagged_urls,
78};
79pub use zeph_sanitizer::{
80    ContentIsolationConfig, ContentSanitizer, ContentSource, ContentSourceKind, ContentTrustLevel,
81    InjectionFlag, QuarantineConfig, SanitizedContent,
82};
83pub use zeph_tools::executor::DiffData;
84
85// Re-export vault module to preserve internal import paths (e.g., `crate::vault::VaultProvider`).
86pub mod vault {
87    pub use zeph_vault::{
88        AgeVaultError, AgeVaultProvider, ArcAgeVaultProvider, EnvVaultProvider, Secret, VaultError,
89        VaultProvider, default_vault_dir,
90    };
91
92    #[cfg(any(test, feature = "mock"))]
93    pub use zeph_vault::MockVaultProvider;
94}