Extending
Seven trait seams make the runtime swappable — Journal, ContentStore, CapabilityBroker, InferenceBackend, ResourceManager, SecretStore, WorkerRegistry.
The runtime is built against trait seams — interfaces at every boundary that matters. Implement a trait and swap an implementation without touching the rest of the system.
The seven seams
| Trait | Responsibility |
|---|---|
Journal | The append-only source of truth — where typed events are recorded. |
ContentStore | Storage for content-addressed motes. |
CapabilityBroker | The single door to world effects (fs / net / shell), where policy is enforced. |
InferenceBackend | Model execution — e.g. the llama.cpp backend for local inference. |
ResourceManager | Resource accounting and allocation. |
SecretStore | Secret resolution for capabilities that need credentials. |
WorkerRegistry | Tracks workers in the optional distributed layer. |
Why seams matter
- Testability — substitute an in-memory
Journalor a fakeCapabilityBrokerin tests. - Portability — back the
ContentStorewith local disk now, object storage later. - No rewrite to scale — the same seams power single-system and the coordinator/worker layer.
Implement against the interface
Code in the runtime depends on the trait, never the concrete type. As long as your implementation upholds the contract, the guarantees (exactly-once, recovery, policy gating) hold.