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`).
24#[cfg(feature = "experiments")]
25pub mod experiments {
26    pub use zeph_experiments::{
27        BenchmarkCase, BenchmarkSet, CaseScore, ConfigSnapshot, EvalError, EvalReport, Evaluator,
28        ExperimentEngine, ExperimentResult, ExperimentSessionReport, ExperimentSource,
29        GenerationOverrides, GridStep, JudgeOutput, Neighborhood, ParameterKind, ParameterRange,
30        Random, SearchSpace, Variation, VariationGenerator, VariationValue,
31    };
32}
33
34#[cfg(feature = "lsp-context")]
35pub mod lsp_hooks;
36
37/// Re-export zeph-orchestration crate as a module to preserve internal import paths.
38pub mod orchestration {
39    pub use zeph_orchestration::*;
40    // Re-export submodules so `crate::orchestration::graph::*` paths continue to work.
41    pub use zeph_orchestration::{
42        aggregator, command, dag, error, graph, planner, router, scheduler,
43    };
44    // Re-export OrchestrationConfig to preserve the `crate::orchestration::OrchestrationConfig` path.
45    pub use crate::config::OrchestrationConfig;
46}
47
48pub mod hash;
49pub mod http;
50pub mod memory_tools;
51pub mod overflow_tools;
52pub mod runtime_layer;
53pub mod skill_loader;
54/// Re-export zeph-subagent crate as a module to preserve internal import paths.
55pub mod subagent {
56    pub use zeph_subagent::*;
57    // Re-export submodules so `crate::subagent::def::*` paths continue to work.
58    pub use zeph_subagent::{
59        command, def, error, filter, grants, hooks, manager, memory, resolve, state, transcript,
60    };
61}
62pub use zeph_common::text;
63
64#[cfg(test)]
65pub mod testing;
66
67pub use agent::Agent;
68pub use agent::error::AgentError;
69pub use agent::session_config::{AgentSessionConfig, CONTEXT_BUDGET_RESERVE_RATIO};
70#[cfg(feature = "policy-enforcer")]
71pub use agent::state::AdversarialPolicyInfo;
72pub use agent::state::ProviderConfigSnapshot;
73pub use channel::{
74    Attachment, AttachmentKind, Channel, ChannelError, ChannelMessage, LoopbackChannel,
75    LoopbackEvent, LoopbackHandle, StopHint, ToolOutputData, ToolOutputEvent, ToolStartData,
76    ToolStartEvent,
77};
78pub use config::{Config, ConfigError};
79pub use hash::content_hash;
80pub use skill_loader::SkillLoaderExecutor;
81pub use zeph_sanitizer::exfiltration::{
82    ExfiltrationEvent, ExfiltrationGuard, ExfiltrationGuardConfig, extract_flagged_urls,
83};
84pub use zeph_sanitizer::{
85    ContentIsolationConfig, ContentSanitizer, ContentSource, ContentSourceKind, InjectionFlag,
86    QuarantineConfig, SanitizedContent, TrustLevel,
87};
88pub use zeph_tools::executor::DiffData;
89
90// Re-export vault module to preserve internal import paths (e.g., `crate::vault::VaultProvider`).
91pub mod vault {
92    pub use zeph_vault::{
93        AgeVaultError, AgeVaultProvider, ArcAgeVaultProvider, EnvVaultProvider, Secret, VaultError,
94        VaultProvider, default_vault_dir,
95    };
96
97    #[cfg(any(test, feature = "mock"))]
98    pub use zeph_vault::MockVaultProvider;
99}