Skip to main content

Module kernel

Module kernel 

Source
Expand description

Stable host/kernel ABI.

The public protocol, runtime dispatcher, and contract tests live in focused submodules so the wire contract can evolve independently from step execution.

Structs§

BudgetGrant
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.
KernelAction
KernelDiagnostics
Read-only runtime resource projection. Hosts use this for admission and monitoring; mutating kernel state still requires a versioned input transaction.
KernelFault
KernelInput
KernelPreparedStep
Host-visible description of a staged transition. The candidate runtime state remains opaque inside KernelRuntime; hosts persist input plus step before using the one-shot token to publish it.
KernelReliabilityConfig
Host-selectable reliability policy. These values bound retained replay state and retry ladders; omitted fields keep the kernel defaults.
KernelRuntime
Pure kernel runtime wrapper. SDKs should migrate toward feeding KernelInput values here instead of directly driving LoopStateMachine.
KernelSnapshot
Portable runtime checkpoint. State is rebuilt from accepted public ABI transactions rather than serializing private scheduler structs, so internal refactors do not change this schema.
KernelSnapshotPolicy
JSON-portable scheduler policy. The 64-bit axes use decimal strings so JavaScript hosts do not lose precision while parsing and re-encoding a checkpoint.
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.
SignalPolicyConfig
Versioned, atomically validated signal-routing policy.
WorkflowSpawnFailure

Enums§

CancellationReason
ConstraintSpec
Parameter constraint for the governance ABI. Maps to crate::governance::constraint::ConstraintRule (structural rules only; pattern/predicate matching stays in the SDK execution layer).
KernelEffect
KernelFaultCode
KernelInputEvent
KernelLifecycle
KernelObservation
KernelPreparationStatus
Outcome of staging one kernel input before the host’s durable commit boundary.
KernelPressureAction
PolicyAction
Serializable permission action for the governance ABI. Mirrors crate::governance::permission::PermissionAction without coupling the wire format to the internal type.

Constants§

KERNEL_ABI_VERSION
KERNEL_SNAPSHOT_VERSION
SIGNAL_POLICY_VERSION