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