Skip to main content

Module kernel

Module kernel 

Source
Expand description

Stable host/kernel ABI types.

This module is the narrow contract SDKs should bind to over time. It wraps the existing loop state machine without changing behavior, giving FFI layers a versioned input/action/observation vocabulary before the larger runner refactor lands.

Structs§

GovernanceConfig
K2: the governance sub-bundle of RunConfig — the same five fields as the LoadGovernancePolicy event, grouped so a run’s whole governance posture travels as one value.
KernelInput
KernelRuntime
Pure kernel runtime wrapper. SDKs should migrate toward feeding KernelInput values here instead of directly driving LoopStateMachine.
KernelStep
PolicyRule
One permission rule for the governance ABI: glob tool_pattern → action.
RateLimitSpec
Per-tool rate limit for the governance ABI. Maps to crate::governance::rate_limit::RateLimit.
RunConfig
K2: a bundle of run-setup configuration carried by the KernelInputEvent::ConfigureRun event. Each field maps 1:1 to a granular Set* / Load* event; None/absent leaves that aspect untouched. This is the host-side analogue of the SDK’s applyKernelPolicies — one event for the whole setup.

Enums§

ConstraintSpec
Parameter constraint for the governance ABI. Maps to crate::governance::constraint::ConstraintRule (structural rules only; pattern/predicate matching stays in the SDK via VetoCheck).
KernelAction
KernelInputEvent
KernelObservation
KernelPressureAction
PolicyAction
Serializable permission action for the governance ABI. Mirrors crate::governance::permission::PermissionAction without coupling the wire format to the internal type.
TransactionObservation
Transaction-boundary observations emitted by the kernel.

Constants§

KERNEL_ABI_VERSION