agent_orchestrator/lib.rs
1//! Public API surface for the agent orchestrator core crate.
2//!
3//! This crate exposes orchestration models, configuration loading, scheduling,
4//! persistence helpers, and service-facing data transfer types used by the CLI
5//! and daemon crates.
6//!
7//! # Examples
8//!
9//! ```rust
10//! use agent_orchestrator::config::WorkflowLoopGuardConfig;
11//!
12//! let guard = WorkflowLoopGuardConfig::default();
13//! assert!(guard.stop_when_no_unresolved);
14//! ```
15#![cfg_attr(
16 not(any(test, feature = "test-harness")),
17 deny(clippy::panic, clippy::unwrap_used, clippy::expect_used)
18)]
19#![deny(missing_docs)]
20#![deny(clippy::undocumented_unsafe_blocks)]
21
22pub mod agent_lifecycle;
23/// Anomaly classification types for scheduler traces and runtime diagnostics.
24pub mod anomaly;
25/// Async SQLite access helpers backed by `tokio_rusqlite`.
26pub mod async_database;
27/// K8s-style declarative resource types shared by the CLI surface.
28pub use orchestrator_config::cli_types;
29pub mod collab;
30/// Extension trait adding CRD-projected accessors to `OrchestratorConfig`.
31pub mod config_ext;
32pub use orchestrator_config::config;
33/// Configuration loading, overlaying, and validation helpers.
34pub mod config_load;
35/// Custom resource definitions and resource store projections.
36pub mod crd;
37/// SQLite schema bootstrap and connection setup helpers.
38pub mod db;
39/// Database maintenance utilities: VACUUM and size reporting.
40pub mod db_maintenance;
41/// Serialized database write coordination for async callers.
42pub mod db_write;
43/// Data transfer objects returned by public task and event APIs.
44pub mod dto;
45pub mod dynamic_orchestration;
46/// Environment resolution utilities for command execution.
47pub use orchestrator_config::env_resolve;
48/// Canonical error categories and error classification helpers.
49pub mod error;
50/// TTL-based event cleanup, archival, and statistics.
51pub mod event_cleanup;
52/// Event sink types and event-query helpers.
53pub mod events;
54/// Backfill helpers for reconstructing missing event streams.
55pub mod events_backfill;
56/// Health check models and endpoint support code.
57pub mod health;
58/// JSON extraction helpers used by dynamic orchestration and templating.
59pub mod json_extract;
60/// TTL-based log file cleanup for terminated tasks.
61pub mod log_cleanup;
62pub mod metrics;
63/// Legacy migration entry points preserved for compatibility.
64pub mod migration;
65/// Logging and metrics bootstrap helpers for runtime observability.
66pub mod observability;
67/// Output capture utilities for spawned commands.
68pub mod output_capture;
69/// Structured output validation and diagnostics.
70pub mod output_validation;
71/// Persistence repositories and migration models.
72pub mod persistence;
73/// Prehook execution models and support helpers.
74pub mod prehook;
75/// QA document parsing and validation utilities.
76pub mod qa_utils;
77/// Declarative resource CRUD support and manifest rendering.
78pub mod resource;
79/// Command runner abstractions, policies, and spawn helpers.
80pub mod runner;
81/// Daemon lifecycle state and runtime snapshots.
82pub mod runtime;
83/// Sandbox network allowlist parsing and validation.
84pub mod sandbox_network;
85// NOTE: scheduler module moved to orchestrator-scheduler crate.
86/// High-level scheduler service orchestration entry points.
87pub mod scheduler_service;
88/// Secret key audit reports and validation routines.
89pub mod secret_key_audit;
90/// Secret key rotation lifecycle primitives.
91pub mod secret_key_lifecycle;
92/// Secret-store encryption and decryption helpers.
93pub mod secret_store_crypto;
94/// Secure file and directory creation helpers.
95pub mod secure_files;
96/// Agent selection algorithms and resolution helpers.
97pub mod selection;
98/// Self-referential workspace safety policies.
99pub mod self_referential_policy;
100/// Service-layer handlers used by the daemon.
101pub mod service;
102/// Session persistence models and repository helpers.
103pub mod session_store;
104/// Shared daemon state and state transition helpers.
105pub mod state;
106pub mod store;
107/// Auto-cleanup of terminated tasks and associated data.
108pub mod task_cleanup;
109/// High-level task mutation operations.
110pub mod task_ops;
111/// Task repository interfaces and SQLite implementations.
112pub mod task_repository;
113/// Ticket discovery, preview, and creation helpers.
114pub mod ticket;
115/// Trigger engine: cron scheduler and event-driven task creation.
116pub mod trigger_engine;
117
118/// Test utilities and fixtures for building isolated orchestrator state.
119#[cfg(any(test, feature = "test-harness"))]
120pub mod test_utils;
121
122/// Re-export of the public workflow loop guard configuration type.
123pub use config::WorkflowLoopGuardConfig;