Skip to main content

Module kernel_runtime

Module kernel_runtime 

Source
Expand description

hq-core kernel runtime: the full former-harness runtime (run dispatch, managed worktrees, scheduling and continuations, delivery bundles, observation feed, operator and read host) hosted in-process.

The runtime’s node adapter dials core’s own operator control socket, so every run dispatch, spawn and observation read goes core -> drain -> C2 -> node. Nothing dials a separate C2 control endpoint.

The runtime owns the kernel databases (single writer); the hub forwards operator requests to it via RemoteKernel. Its operator/read host binds loopback only.

Catalogs: launch-plan overrides and delivery bundles are read as *.json files from <data dir>/kernel/launch-plans/ and <data dir>/kernel/delivery-bundles/. With none, the runtime derives default launch plans from the live node inventory.

Structs§

KernelRuntimeConfig
Settings resolved from the environment (token var removed from the process env).
RemoteKernel
Hub-side handle: forwards typed operator requests to the runtime host.

Constants§

DEFAULT_KERNEL_BIND
KERNEL_BIND_ENV
Loopback address of the runtime’s operator/read host.
KERNEL_OPERATOR_TOKEN_ENV
Operator credential the hub presents to the runtime host.
KERNEL_RUNTIME_ENV
Set to 1 to run the kernel runtime (needs the core mesh).

Functions§

load_catalogs
Launch-plan overrides and delivery bundles from <data dir>/kernel/.
run
Run the kernel runtime until shutdown, restarting it with backoff if it stops.