What is the capability registry?
The capability registry is the catalog Traverse uses to discover, version, and select WASM capabilities at runtime. Every capability you register gets stored alongside its contract metadata so the runtime can make informed decisions before calling anything.
What it stores
Each entry in the registry holds the capability name, version, the compiled WASM binary, and the full contract definition. The contract includes input schema, output schema, preconditions, postconditions, and placement constraints. Without all of this, the runtime cannot validate a call before it happens.
How the runtime uses it
When a caller requests a capability, the runtime enters the discovering phase. It queries the registry for matching entries. Then it moves to evaluating_constraints to check which candidates satisfy the current environment. Finally it moves to selecting to pick the best match and then executing.
This means the registry is not just a lookup table. It is the gating mechanism for every execution. If no registered capability satisfies the constraints, the runtime fails fast rather than calling the wrong thing.
Versioning
Multiple versions of the same capability can coexist in a registry. A caller can pin to a specific version or let the runtime select the latest that satisfies its constraints. This makes it safe to roll out new behavior gradually. Old consumers keep resolving to the version they are pinned to.
The traverse-registry crate
The registry logic lives in the traverse-registry crate. You interact with it through the CLI or programmatically through the runtime API. The CLI command traverse capability register compiles your contract and binary and adds the entry.
- Capabilities are discovered by name and version constraint
- The registry validates the contract schema before accepting a registration
- You can list registered capabilities with
traverse registry list - Removing a version does not affect consumers pinned to other versions
Think of the registry as the source of truth for what capabilities exist and what they promise. The runtime enforces those promises at call time.