Expand description
Keel core API contract (contracts-v1).
The single source of truth for the envelope types is
contracts/core_api.rs; the crate compiles the vendored crate-local copy
(contract/core_api.rs) so cargo package produces a self-contained
crate, and build.rs asserts on every workspace build that the copy is
byte-identical to the frozen contract file, so they can never drift. The
policy module is the shared typed model of
contracts/policy.schema.json, used by both the stub and the real core so
their configuration semantics cannot diverge.
Modules§
- policy
- Typed policy model:
keel.toml(in its JSON form) deserialized straight into structs. Validation is the type system —NonZero*integers make zero counts unrepresentable, newtypes parse duration/rate/schedule literals in theirDeserializeimpls, and retry conditions are a closed enum. A document that deserializes is a valid policy; anything else isKEEL-E001with a precise field path (viaserde_path_to_error).
Structs§
- Keel
Error - Configuration/internal error (e.g. from
configure). - Outcome
- The result of
execute: what happened after the full layer chain ran. - Outcome
Error - Terminal error surfaced in an Outcome.
- Request
- One intercepted call, as submitted by a front end to
execute.
Enums§
- Attempt
Result - Result of ONE attempt, produced by the effect callback.
- Breaker
State - Circuit breaker state as observed after the call.
- Error
Class - Typed error classes adapters produce. The core never sees language exceptions — adapters classify into these before crossing the boundary.
- Error
Code - Stable error taxonomy. String forms (“KEEL-E001”) appear in envelopes,
logs, and
keel explain; numeric values are frozen in core-ffi.h.
Constants§
Traits§
- Keel
Core - The logical core surface. The real core implements this behind the C ABI in core-ffi.h; keel-core-stub implements it in-memory. Python/Node stubs mirror the same four operations on native values.