Skip to main content
System model and derivation | SubstrateThe implemented subsystems, resource and event coverage, and the boundary between authored contracts and generated artifacts.Substrateexplanationsubstrateexplanationadopterdeveloperoperatorreference

What defines the system?

Substrate has an explicit wire contract and implemented resource lifecycles. It does not currently have one ESS system specification from which all its subsystems, commands, events and CLI are derived. Its definitions live in Rust types, versioned contract sources, route handlers and durable store transitions. Conformance checks connect those definitions; they do not replace them.

This page describes the Linux host implementation in release 0.7.3, which advertises the substrate-wire/0.16.0 development contract. See status for availability and the route reference for addresses.

Subsystems and ownership

Pan the full-size diagram: swipe or scroll, or focus the canvas and use the arrow keys.

DiagramA visual explanation of the surrounding documentation.

The SDK calls the daemon. The disposable MCP adapter translates tools and resources through that SDK. The daemon coordinates admission and lifecycle work; the host driver proves and applies confinement; SQLite retains the evidence needed after a disconnect or restart.

Source ownerDefinition it owns
substrate-wireTyped requests, resources, observations, events, refusal vocabulary and canonical request hashing
substrate-daemonTransport authentication, route dispatch, admission and lifecycle coordination
substrate-storeDurable reservations, subject-scoped resources, stored answers, event sequence and recovery views
substrate-hostLinux probes, workspace I/O, process confinement, quotas and measured outcomes
b10x-substrate-sdk / substrate-mcpClient handles and recovery; bounded MCP tools, resources and session translation
xtask / substrate-contract-checkBundle rendering, schema and compatibility checks, and contract conformance checks

These are source responsibilities, not separately deployed services. The implementation is in the public workspace crates.

Model coverage

In this handbook, a caller creates workspace W1, writes input.txt, and starts exec X1 with operation O1. These short labels are illustrative: resource IDs are opaque, and real operation IDs must satisfy the operation ID rules.

DomainExplicitly represented todayExample or boundary
Machine and capabilitiesDriver generation, probed facts, limits and capability snapshotX1 binds to the inspected snapshot; missing facts cannot authorize a capability
WorkspaceIdentity, source, state, labels, guarded bytes, optional storage bound and leaseW1 may start empty or from an authorized, configured Git source
ExecStart input, argv, environment, requested/applied confinement, limits, state, output and usageX1 hashes W1's input under the requested bounds
SessionRaw-pipe or PTY mode, resource state, lease, bounded attachment and hosted attachment authorityA protocol process uses the same execution boundary
Command and operationTyped mutation input, caller ID, request hash, reservation state and stored outcomeO1 identifies the start request; it is distinct from X1
EventsClosed transitions, resource identity, generation, sequence, actor, cause and observationAn exec observation can be correlated with its causing operation
RecoveryOperation lookup, retained event cursors and reconciliation snapshotsA caller recovers after losing a response or falling behind event retention
Authority and enforcementAuthenticated subject, delegated admission, grants, source authority, capsules, secret slots and egress aperturesThese constrain admission or execution; product identity and policy remain outside

There is one important limit to event coverage: sessions have typed resources, requests and lifecycles, but the public event vocabulary does not have a separate session.* branch. Session transitions publish an operation-ledger projection such as operation.terminal or operation.unknown. Inspect the session resource for its state. This behavior is explicit in the store's event projection and the wire event validator.

Workloads, images, volumes and endpoints are future resource families, not implemented route families in this host slice. Docker and Kubernetes drivers are also absent. A general architecture goal therefore does not imply complete served domain coverage.

What is derived, and what is authored?

Pan the full-size diagram: swipe or scroll, or focus the canvas and use the arrow keys.

DiagramA visual explanation of the surrounding documentation.

Bundle source is authored under xtask/bundle-source. The renderer produces deterministic bundle bytes and digest manifests, using the wire crate's controlled hashing and bounds bindings. The JSON schemas are not generated from Rust types. Released trees under contracts/substrate-wire remain immutable and must reproduce byte for byte with their own renderer.

The daemon's command-line parser is authored with clap in main.rs. HTTP handlers and store transitions are authored Rust too. Neither the CLI nor its release changes are generated from an ESS or Entity Runtime model. Contract checks prove specific relationships between declarations and behavior; they do not establish whole-system derivation.

Follow operations and observations to see how W1, O1 and X1 relate during a request, then run the command.