Library opacity¶
The kernel runs every reusable capability block the same way, whichever libraries it uses. It knows a block by its sealed interface, its capsule and its resolved closure, and it knows the libraries only as the digests of the bytes the closure selected. Everything library-specific happens inside the block's cell.
flowchart TB
subgraph K["What the kernel works from"]
direction LR
I["Compiled interface<br/>and its hash"]
C["Capsule digest and<br/>executable<br/>surface index"]
R["Closure digests:<br/>foundation, provider,<br/>bindings"]
I ~~~ C ~~~ R
end
subgraph L["Inside the block's cell"]
direction LR
A["Generated<br/>dispatch module"]
U["Your code"]
D["Libraries and<br/>their live objects"]
A --> U --> D
end
C -->|"call by export ordinal,<br/>typed values"| A
What this gives you¶
Any library runs with no platform change. A call reaches a block by its interface and export ordinal, carrying typed values. The kernel's verbs are the same for a block built on pandas, on an agent framework or on the standard library alone, so adopting a new library is a change to one block.
A library version is a recorded fact. Each library a block imports is a binding in its closure, and the binding names the exact bytes:
{
"requirement_id": "pandas",
"requirement_kind": "python_distribution",
"requirement_specs": ["pandas>=2.2,<3"],
"selected_version": "2.2.3",
"source": "closure_local",
"selected_component_digest": "sha256:7c1e...",
"selected_provenance_digest": "sha256:40b9..."
}
The closure digest covers every binding, and the run's evidence records the closure that executed. Which library version ran is answered from the evidence. See Resolved dependency binding.
Upgrading a library is a new closure. A new version resolves to a new binding, a new closure digest and new cells. Cells already running keep the closure they started with. See Closure reconciliation and upgrade.
Where library behaviour lives¶
Behaviour particular to one library, such as how its objects convert to the block's declared values or how its native stream is consumed, belongs to code in the block's capsule. See Sealed adapters and library-specific semantics.