Skip to main content

Module kernel

Module kernel 

Source
Expand description

The kernel: one agent’s capability table, promise graph, lanes, channels and dispatch loop.

The kernel is a deterministic state machine. Nothing here does I/O, timing or threading: providers are ordinary objects, the clock is a counter, and the dispatch loop is driven by Agent::run. That makes capability semantics, attenuation and pipelining observable and reproducible in tests — and it means a transport is a thin adapter over the same machine (ADR-0002 in this crate).

§Dispatch and round-trips

A batch is every queued job for one provider, ordered so that a job whose promise dependencies are produced in the same batch runs after its producer. One batch is one provider round-trip. A client that waits for each result and then issues the next call produces one batch per call; a client that passes promises as arguments produces one batch for the whole chain. That difference is what the pipelining tests measure.

Structs§

Agent
One agent: an owner of lanes, channels, capabilities and promises.
Kernel
PromiseHandle
A handle to a pending or settled result.

Enums§

Event
Observable kernel events. Tests and operators assert on these.

Traits§

Provider
A provider of capabilities: a module, a tool, a peer.

Functions§

promise_state
Promise state accessor for tests and diagnostics.
tool_policy_for
Tool policy helper re-exported for callers building attenuated tools.

Type Aliases§

KernelCell
Shared kernel cell.