Skip to content

Commit 9f64a52

Browse files
committed
docs(cpex): add intro + links to the crate root, document full API on docs.rs
- lib.rs: lead the crate docs with what CPEX is (policy enforcement runtime for AI agents, the reference-monitor model) instead of opening on 'host facade', and link the guide site and repo. Move the facade explanation under a 'This crate' heading. - Cargo.toml: add [package.metadata.docs.rs] all-features = true. The default build is engine-only, so docs.rs was omitting the builtins re-exports / install_builtins and the cpex-builtins intra-doc link did not resolve. Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
1 parent 7dc02b6 commit 9f64a52

2 files changed

Lines changed: 29 additions & 7 deletions

File tree

crates/cpex/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ keywords.workspace = true
3030
categories.workspace = true
3131
rust-version.workspace = true
3232

33+
# Build docs.rs with every extension enabled. The default build is engine-only
34+
# (`default = []`), which omits cpex-builtins entirely — so without this the
35+
# builtins re-exports and `install_builtins` are absent and the intra-doc link
36+
# to `cpex-builtins` does not resolve on docs.rs.
37+
[package.metadata.docs.rs]
38+
all-features = true
39+
3340
[features]
3441
# Engine only by default: no builtin plugins are compiled in. Opt into the
3542
# bundled extensions with `builtins` (the common in-process set), `full`

crates/cpex/src/lib.rs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,30 @@
33
// SPDX-License-Identifier: Apache-2.0
44
// Authors: Fred Araujo
55

6-
//! CPEX host facade.
6+
//! **CPEX is a policy enforcement runtime for AI agents.**
77
//!
8-
//! A single dependency that re-exports the CPEX host runtime, so hosts
9-
//! depend on this crate instead of pinning `apl-cmf`, `apl-cpex`, and
10-
//! `cpex-core` one by one.
8+
//! It is a deterministic reference monitor between an agent and every
9+
//! capability it invokes: tools, prompts, resources, inference providers, and
10+
//! A2A methods. Each operation runs through a policy-defined pipeline that can
11+
//! resolve identity, make an authorization decision (delegated to an engine
12+
//! like Cedar or CEL), exchange and reduce credentials before a downstream
13+
//! call, redact inputs and outputs, track information flow across calls, and
14+
//! audit. You write that policy declaratively in APL (Authorization Policy
15+
//! Language); CPEX evaluates and enforces it at the boundary, against state
16+
//! the model cannot observe or forge.
1117
//!
12-
//! By default this is the **engine only** — no builtin plugins are compiled
13-
//! in. The bundled extension set lives in [`cpex-builtins`](cpex_builtins)
14-
//! and is pulled in only when a builtins feature is enabled.
18+
//! - Guide and concepts: <https://contextforge-org.github.io/cpex/>
19+
//! - Source and issues: <https://github.com/contextforge-org/cpex>
20+
//!
21+
//! # This crate
22+
//!
23+
//! `cpex` is the **host facade**: one dependency that re-exports the CPEX
24+
//! runtime (`cpex-core`, `apl-core`, `apl-cmf`, `apl-cpex`), so a host depends
25+
//! on this crate instead of pinning each of them separately.
26+
//!
27+
//! By default it is the **engine only**: no builtin plugins are compiled in.
28+
//! The bundled extension set lives in [`cpex-builtins`](cpex_builtins) and is
29+
//! pulled in only when a builtins feature is enabled.
1530
//!
1631
//! # Usage
1732
//!

0 commit comments

Comments
 (0)