#![deny(missing_docs)]
#![deny(rust_2018_idioms)]
#![deny(rustdoc::broken_intra_doc_links)]

//! # klieo-ops
//!
//! Operational layer above [`klieo_core`]. Ships supervisor, governor, gates,
//! escalation, worklog, and handoff primitives. Compliance evidence is a
//! byproduct: every primitive emits structured events into the existing
//! Merkle-chained [`klieo_core::EpisodicMemory`].
//!
//! ## Out of scope
//!
//! See `README.md` for the load-bearing out-of-scope list. Critically, the
//! framework does **not** assess agent decision quality, bias, or accuracy —
//! those are user-owned (EU AI Act Art 10, Art 15).

pub mod approver_registry;
pub mod audit;
pub mod clock;
pub mod emit;
pub mod error;
pub mod key_registry;
pub mod ops_event;
pub mod redactor;
pub mod run_context;
pub mod runtime;
pub mod signer;
pub mod source_identity_registry;
pub mod tenant;
pub mod types;

pub use approver_registry::{ApproverId, ApproverRegistry, StaticApproverRegistry};
pub use audit::OpsAuditSink;
#[cfg(feature = "hot-reload")]
pub use key_registry::HotReloadableEd25519Registry;
pub use key_registry::{
    load_ed25519_yaml, Ed25519KeyRegistry, KeyRegistryError, StaticEd25519KeyRegistry,
};
pub use signer::{SignedPayload, SignerError, SignerProvider, SoftwareSigner};
pub use source_identity_registry::{
    SourceIdentityRegistry, SourceIdentityRegistryError, StaticSourceIdentityRegistry,
};

#[cfg(feature = "supervisor")]
pub mod supervisor;

#[cfg(feature = "governor")]
pub mod governor;

#[cfg(feature = "gates")]
pub mod gates;

#[cfg(feature = "escalation")]
pub mod escalation;

#[cfg(feature = "worklog")]
pub mod worklog;

#[cfg(feature = "handoff")]
pub mod handoff;

#[cfg(feature = "crypter")]
pub mod crypter;
#[cfg(feature = "crypter")]
pub use crypter::{Crypter, CrypterError, KeyProvider, StaticKeyProvider, TenantKeyedCrypter};

#[cfg(feature = "test-utils")]
pub mod test_fixtures;

pub use emit::emit_ops_event;
pub use error::{BuildError, OpsError};
pub use ops_event::OpsEvent;
pub use run_context::{current_run_context, scope_run_context, spawn_with_run_context, RunContext};
pub use runtime::OpsRuntime;
pub use tenant::{spawn_with_context, TenantResolver};
pub use types::{
    AgentId, AgentMeta, BudgetScope, KillReason, KillTrigger, ProviderId, RuntimeState, TenantId,
};
