1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Location: ./crates/cpex-core/src/lib.rs
// Copyright 2025
// SPDX-License-Identifier: Apache-2.0
// Authors: Teryl Taylor
//
// CPEX Core library root.
//
// Pure Rust plugin runtime with no FFI, WASM, or PyO3 dependencies.
// Provides the PluginManager, 5-phase executor, hook registry,
// unified config parser, and all core types.
//
// # Modules
//
// - [`plugin`] — Plugin trait, PluginRef, PluginMetadata, PluginConfig
// - [`hooks`] — HookType (open string registry), payload/result traits
// - [`executor`] — 5-phase execution engine (sequential → transform → audit → concurrent → fire_and_forget)
// - [`manager`] — PluginManager lifecycle and hook dispatch
// - [`registry`] — PluginInstanceRegistry and HookRegistry
// - [`config`] — Unified YAML configuration parsing
// - [`factory`] — Plugin factory registry for config-driven instantiation
// - [`context`] — PluginContext (local_state + global_state)
// - [`cmf`] — ContextForge Message Format (Message, ContentPart, enums)
// - [`identity`] — IdentityResolve hook family (subject / client /
// workload resolution from raw credentials)
// - [`delegation`] — TokenDelegate hook family (outbound credential
// minting for downstream calls)
// - [`elicitation`] — Elicitation hook family (human-in-the-loop:
// approval, confirmation, step-up, …)
// - [`error`] — Error types, violations, and result types