Expand description
ergo_adapter
Purpose:
- Define the kernel-owned adapter surface for manifests, event binding, composition checks, capture helpers, and runtime-facing event types.
Owns:
- Adapter validation/composition authorities and the typed errors they emit.
- The canonical event payload/context realization boundary used by replay and host adapter-bound execution.
Does not own:
- Host orchestration, replay descriptors, or product-facing error shaping.
- Runtime primitive semantics owned by
ergo_runtime.
Connects to:
ergo_supervisorcapture/replay and fixture helpers.ergo_host, which consumes adapter manifests, binder compilation, and composition validation without redefining adapter meaning.
Safety notes:
ExternalEventPayloadErroris the typed authority for payload/context realization failures that higher layers should carry instead of flattening.
Re-exports§
pub use composition::validate_action_adapter_composition;pub use composition::validate_capture_format;pub use composition::validate_source_adapter_composition;pub use composition::CompositionError;pub use errors::InvalidAdapter;pub use event_binding::bind_semantic_event_with_binder;pub use event_binding::compile_event_binder;pub use event_binding::EventBinder;pub use event_binding::EventBindingError;pub use manifest::AcceptsSpec;pub use manifest::AdapterManifest;pub use manifest::CaptureSpec;pub use manifest::ContextKeySpec;pub use manifest::EffectSpec;pub use manifest::EventKindSpec;pub use provenance::fingerprint as adapter_fingerprint;pub use provides::AdapterProvides;pub use provides::ContextKeyProvision;pub use registry::register;pub use validate::validate_adapter;
Modules§
- capture
- capture
- composition
- composition.rs — Adapter-to-runtime composition and binding
- errors
- errors.rs — Adapter error types
- event_
binding - event_binding.rs — External event validation and binding
- fixture
- fixture
- manifest
- manifest.rs — Adapter manifest types
- provenance
- provides
- registry
- validate
- validate.rs — Adapter manifest structural validation
Structs§
- Context
Requirement - EventId
- Event
Payload - Event
Time - Opaque absolute time used for deterministic scheduling.
- Execution
Context - ExecutionContext is intentionally opaque to non-adapter callers. Its internals are owned by the runtime and are not constructible outside this crate to satisfy CXT-1.
- External
Event - Fault
Runtime Handle - GraphId
- Reporting
Runtime Handle - ReportingRuntimeHandle holds the same execution dependencies as
RuntimeHandle, but exposes the low-level reporting seam used by the host buffering wrapper. - Runtime
Handle - RuntimeHandle holds the execution dependencies needed to invoke the runtime. It is constructed with an expanded graph, primitive catalog, registries, and adapter provides.
- Source
Requires