PlatformDecision Contract
Kernel
Crate Map
Which rung owns which crate, for all 163 members of the Chio workspace.
Platform documentation is a ladder: Kernel, Node, Cluster, Swarm, Federation & Compliance, Formal Assurance. Every page files at exactly one rung. This page answers the question an author hits first: the code lives in crates/<group>/<crate>, so which rung documents it?
Two things carry no rung information. The URL prefix carries none: /docs/guard-platform/ pages sit under a section named Kernel, and one prefix can hold pages that file at different rungs. The source directory carries none either, which is what the trap table below is for. File by the filing test, not by the path.
The six rungs
Each rung has one subject and one test. When two tests fire, the subject files at the lowest rung where it is fully determined.
| Rung | Subject | Filing test |
|---|---|---|
| Kernel | One mediated call. Capability, request, guards, and clock in; Allow or Deny plus the signature that attests it out. | Does this change if you run two of them? If no, it is Kernel. |
| Node | One OS process hosting one kernel, plus everything the kernel writes down as excluded. | Can one process answer this by reading its own disk? |
| Cluster | Many nodes under one authority keypair, one admin service token, one trust domain. | Does answering it require another node's disk under the same key? |
| Swarm | Authority that descends, or is jointly held, across parties the operator does not run. | Is the actor's authority derived from another party's rather than issued to it, or does the action require signatures from parties under different keys? Either clause fires. |
| Federation | The standing relationship between two authorities, and the external regimes it is mapped to. | Does it require a party whose keys you do not control, or an external framework you must map to? |
| Formal Assurance | What is proved about the kernel, and what is assumed instead. | Is the subject a theorem, a harness, an assumption, or a verification gate? |
The Rung column in the tables below uses these six names. Federation is the short form of the section name, Federation & Compliance. Rows that name an area instead (Learn, Economy, Build, Reference, Products) are off the ladder: that area owns the crate, and Platform does not document it.
Guards file at Kernel even when they read node state
Guard trait is Kernel content even when its verdict depends on state a node holds. The guard is Kernel, the store it reads is Node, and the two pages open by naming each other. That settles rate limit, session, memory, and approval. The standing exception runs the other way: emission semantics, meaning the tracing macros, the guard join key, and guard metric names, are documented at Node. There is no Kernel observability page by design.Where the directory lies
Placements a reader would get wrong from the path alone. Check this table before filing anything under these directories.
| Path | Files at | Why |
|---|---|---|
crates/kernel/chio-runtime-core, crates/kernel/chio-runtime | Cluster | Runtime admission checks a named localKernelId against an authority-signed verifier trust bundle, a revocation checkpoint, and signed peer weights. No process answers "am I admitted" from its own disk. |
crates/kernel/chio-swarm-authority | Swarm | Delegation witness chains, budget fan-out pools, continuation tokens, revocation epochs, join and terminal graph receipts. Authority descends to actors the operator does not run. |
crates/trust/chio-federation | Swarm and Federation | This one crate splits by module. See the module table. |
crates/economy | Economy, with exceptions | Off the ladder. 1 of its 16 crates file elsewhere: chio-anchor at Cluster. |
crates/tooling | Build, with exceptions | Off the ladder. 3 of its 8 crates file at Kernel instead: chio-conformance, chio-verdict-matrix-driver-lambda, chio-spec-validate, which Kernel > Testing Guards & Policies claims as authoring-side gates. |
Provider adapters under crates/protocol | Build > Integrations | The eight provider-native tool-use adapters and chio-provider-adapter-core file with the integrations that call them, not on the ladder. The edges and proxies in the same directory are Node. |
crates/platform/chio-manifest | Kernel | The signed tool-server manifest is a Kernel contract. Its node-side verification is a boot step: an edge validates every manifest at construction, before the process serves traffic, and that step is named at Node. |
The build graph is not the ladder either
chio-kernel (Kernel) depends on chio-federation (Swarm and Federation) for co-signing and peer trust exchange, and on five crates/economy crates. Running the other way, chio-store-sqlite (Node) depends on chio-kernel, because the kernel defines the store traits and the node crate implements them. Rung answers who documents the subject, not who compiles against whom.The workspace, directory by directory
The workspace manifest lists 163 members. The tables below iterate that list, so the rows are the workspace’s own membership rather than a copy of it; 142 of them sit under crates/ and are grouped here by the directory they live in. The rest are below, under Members outside crates/. 136 members carry an ARCHITECTURE.md beside their manifest, which is the first thing to read when a one-line purpose is not enough.
crates/core
| Crate | Rung | What it owns |
|---|---|---|
chio-core | Kernel | One import surface over chio-core-types plus the economy and trust domain crates. Adds three contracts of its own: the extension and official-stack model, the identity-network model, and the portable-standards catalog. No I/O and no runtime state. |
chio-core-types | Kernel | The canonical protocol types and the crypto that signs them: capabilities, receipts, sessions, messages, manifests, canonical JSON, Ed25519 signing backends (the pq feature adds ML-DSA-65 and hybrid), and hashing plus Merkle. no_std plus alloc by source, so it cross-compiles to wasm32-unknown-unknown and other embedded targets. |
chio-errors | Kernel | Typed error codes and diagnostics. The published catalog is Reference, Schemas and Errors. |
chio-adversarial-suite | Formal Assurance | The curated adversarial trust-boundary corpus and its case schema. |
chio-arena | Formal Assurance | Deterministic arena scenario runner and replay-bundle writer. |
chio-bounded | Node | Bounded in-memory collections for serving processes: a ring, a capacity-and-TTL map, and a live size gauge. One process’s memory ceiling. |
chio-supervisor | Node | Task supervision and monotonic health flags for serving processes: restart with capped backoff, never self-heal, fail closed. |
crates/kernel
| Crate | Rung | What it owns |
|---|---|---|
chio-kernel | Kernel | The full kernel. Its subject is the decision and the signed receipt. Its rusqlite-backed receipt, revocation, budget, and lineage stores, its transports, and its lifecycle are Node subjects even though the code sits here. |
chio-kernel-browser | Kernel | Browser bindings over the portable core through wasm-bindgen: evaluate, sign_receipt, and verify_capability with a browser clock and a WebCrypto RNG. |
chio-kernel-core | Kernel | The pure-compute verdict path. See Kernel variants. |
chio-kernel-mobile | Kernel | UniFFI wrapper over the portable core for iOS and Android. |
chio-runtime-harness | Formal Assurance | Live runtime loopback harness for proof regeneration. |
chio-swarm-authority | Swarm | Task graphs, delegation witness chains, budget fan-out and fan-in pools, continuation tokens, route plans, revocation epochs, join and terminal graph receipts. Directory is not rung. |
chio-runtime-core | Cluster | Live runtime admission: admission profiles and bundles, signed verifier trust bundles, trust-floor state, orchestration plans, run leases, and the scheduler tick. Directory is not rung. |
chio-runtime-proof-parity | Formal Assurance | Evidence manifest, proof-parity, and proof-regeneration report schemas. A verification gate. |
chio-runtime | Cluster | Facade over chio-runtime-core plus its JSON and SQLite stores. Exposes only the admission, trust-floor, orchestration, operations, and proof-regeneration APIs. |
crates/guards
| Crate | Rung | What it owns |
|---|---|---|
chio-data-guards | Kernel | Guards that inspect data-store semantics: SqlQueryGuard, VectorDbGuard, WarehouseCostGuard, and QueryResultGuard. |
chio-data-guards-redactors-default | Kernel | The default redactor behind the chio:guards/redact@0.1.0 world: secrets, basic PII, and bearer-token stripping, applied before any frame is buffered. A tenant may swap in a signed override module. |
chio-external-guards | Kernel | HTTP-backed external guard adapters. The guard corollary applies: the adapter is a guard, so it is Kernel content. Its timeout budget, breaker state, and endpoint egress checks, which deny loopback and link-local hosts, are Node. |
chio-guard-registry | Node | OCI distribution for .arcguard WASM components: pull, publish, cache, and offline bundling. One process answers this from its own cache. Signature verification delegates to chio-attest-verify. |
chio-guards | Kernel | The main guard catalog and the pipeline types: the sync pipeline, the advisory pipeline, post-invocation hooks, and the external adapter infrastructure. |
chio-policy | Kernel | The HushSpec policy format: schema types, evaluation, merge and inheritance rules, and compile_policy, which turns a document into a configured pipeline pair. |
chio-wasm-guards | Kernel | Host runtime for operator-authored WASM guards. Raw core modules and the chio:guard@0.2.0 Component Model world, backed by wasmtime with fuel metering. Module distribution and rollout are Node. |
crates/sdk
| Crate | Rung | What it owns |
|---|---|---|
chio-guard-sdk | Kernel | Guest-side SDK for authoring WASM guards in Rust against the chio:guard@0.2.0 world. |
chio-guard-sdk-macros | Kernel | The #[chio_guard] attribute macro. Wraps a plain evaluate function in the raw core-module ABI and re-exports chio_alloc, chio_free, and chio_deny_reason. |
chio-binding-helpers | Reference | Bindings-friendly invariant helpers shared by the multi-language SDKs. Reference, SDK. |
chio-bindings-ffi | Reference | The C ABI over those invariant helpers. |
chio-cpp-kernel-ffi | Reference | The C ABI for the C++ offline kernel SDK. |
chio-eval-receipt | Reference | Reference verifier for chio.eval-report.bundle.v1 receipt bundles. |
crates/observability
Every crate here files at Node. Emission semantics are documented at Node by design, including the tracing macros, the guard join key, and the guard metric names.
| Crate | Rung | What it owns |
|---|---|---|
chio-lineage | Node | The lineage and provenance DAG over one node’s receipts. |
chio-log-redact | Node | The tracing redaction layer and macro for operator-facing telemetry. |
chio-metrics-spec | Node | The workspace-wide metric registry. Metric names are settled here. |
chio-otel-receipt-exporter | Node | OpenTelemetry trace ingress and receipt-store sink. |
chio-siem | Node | SIEM export for the receipt audit pipeline. It polls one node’s receipt database on a cursor. |
crates/platform
| Crate | Rung | What it owns |
|---|---|---|
chio-agent-web-interop | Economy | The Agent Web interop verifier for a proof bundle’s interop section. |
chio-commerce-order | Economy | The commerce order passport verifier. |
chio-config | Node | The chio.yaml loader, with environment interpolation, strict deny_unknown_fields deserialization, and post-load validation. |
chio-control-plane | Cluster | The trust-control service, its client, issuance and registry operations, cluster health projection, bounded federation policy, and SCIM lifecycle. |
chio-enterprise-export | Economy | The enterprise export verifier for a proof bundle’s export section. |
chio-finding-market-port | Economy | Store-neutral ports and identity types for the hosted cognition market. Edge and application code depend on these rather than on a database, and an adapter that cannot answer fails closed. |
chio-finding-market-migrations | Economy | The embedded SQLx migration ledger for the hosted cognition market. It depends on sqlx-core directly so migration support cannot pull SQLx’s SQLite driver into the workspace’s rusqlite graph. |
chio-finding-market-store-postgres | Economy | Tenant-isolated PostgreSQL durability for the hosted market. Every tenant-scoped operation sets chio.tenant_id transaction-locally, and row-level security is enabled and forced, so a missing tenant context returns no rows and admits no writes. |
chio-finding-hosted-edge | Economy | The hosted market’s authentication and edge security boundary. It authenticates one explicitly selected credential mode before a request body reaches a market handler. |
chio-finding-worker | Economy | Firecracker-isolated execution for hosted market jobs: digest-pinned guest assets staged into a unique jail, started only through the jailer, exchanging bounded canonical JSON frames over vsock. |
chio-manifest | Kernel | The signed tool-server manifest: declared tools, their schemas, and their required permissions, signed with the server’s Ed25519 key. Verification at process start is a Node boot step. |
chio-risk-comptroller | Economy | Risk comptroller report validation for a proof bundle. |
chio-sqlite-file-identity | Node | The audited boundary that binds a rusqlite connection to the exact main-database file SQLite borrowed, over the workspace’s pinned bundled build. |
chio-store-sqlite | Node | The persistence layer: receipt store and query path, budget, approval, lineage, revocation, execution-nonce, encrypted-blob, IOU, and dead-letter stores. It implements traits defined by chio-kernel. |
chio-transaction-passport | Economy | Transaction Passport verifier primitives. The assembled bundle is Products, Proof Room. |
chio-trust-market-context | Economy | The trust-market context verifier for a proof bundle. |
chio-workflow | Swarm | Skill and workflow authority: multi-step skill composition, manifests, and workflow receipts. |
chio-workflow-preflight | Swarm | The read-only preflight that bounds child scope before a plan runs. |
chio-http-core | Node | Protocol-agnostic HTTP security types for the kernel. |
chio-http-session | Node | The per-session journal: request history, cumulative data flow, and tool-invocation sequence. The guards that read it are Kernel. |
crates/protocol
| Crate | Rung | What it owns |
|---|---|---|
chio-a2a-adapter | Node | The thin A2A-to-Chio adapter for agent-card discovery and SendMessage mediation. |
chio-a2a-edge | Node | The A2A edge, which exposes Chio tools as blocking A2A skills. A process that hosts a kernel, which is what makes it a node. |
chio-acp-edge | Node | The ACP edge, which exposes Chio tools as ACP capabilities with a bridge-fidelity assessment. |
chio-acp-proxy | Node | The ACP security proxy that enforces capability-based access control on ACP agent sessions. |
chio-ag-ui-proxy | Node | The AG-UI proxy: capability-validated interception of agent-to-UI event streams. |
chio-anthropic-tools-adapter | Build > Integrations | Mediates Anthropic Messages tool-use traffic, pinned to one API version. Build, Govern Any Provider. |
chio-bedrock-converse-adapter | Build > Integrations | Mediates Amazon Bedrock Converse traffic over SigV4-signed calls, pinned to one workspace AWS SDK. |
chio-cohere-tools-adapter | Build > Integrations | Mediates Cohere chat tool-use traffic, pinned to one API version. |
chio-cross-protocol | Node | Shared cross-protocol bridge contracts and the orchestrator runtime. |
chio-edge-metrics | Node | The shared receipt-write metrics sink for the edge crates. |
chio-egress-contract | Node | The typed HTTP egress contract for substrate adapters. |
chio-envoy-ext-authz | Node | The Envoy ext_authz gRPC adapter that bridges external authorization checks to the kernel. |
chio-gemini-tools-adapter | Build > Integrations | Mediates Google Gemini generateContent tool-use traffic, pinned to one API version. |
chio-groq-tools-adapter | Build > Integrations | Mediates Groq’s OpenAI-compatible chat completions tool-use traffic, pinned to one API version. |
chio-mcp-adapter | Node | The MCP wire adapter that wraps MCP servers as Chio tool servers. |
chio-mcp-edge | Node | The MCP edge runtime and its shared transport contracts. |
chio-mcp-remote | Node | The remote hosted MCP runtime surface. |
chio-mistral-tools-adapter | Build > Integrations | Mediates Mistral chat-completions tool-use traffic, lifts tool_calls into the kernel fabric, and gates streamed responses. |
chio-ollama-tools-adapter | Build > Integrations | Mediates Ollama chat tool-use traffic, pinned to one API version. |
chio-openai-adapter | Build > Integrations | Intercepts OpenAI Chat Completions and Responses tool calls and mediates them through the kernel for capability validation and signed receipts. |
chio-openapi | Build | OpenAPI 3.x parser that generates a Chio ToolManifest. Build, Bridge OpenAPI to MCP. |
chio-openapi-mcp-bridge | Node | Presents governed HTTP APIs as MCP tool surfaces and routes every invocation through the kernel. |
chio-provider-adapter-core | Build > Integrations | The primitives every provider-native adapter shares. |
chio-provider-conformance | Build | The replay harness for the provider adapters and their conformance fixtures. |
chio-tool-call-fabric | Node | The provider-agnostic dispatch fabric. Tool dispatch is on the kernel’s exclusion list, so it is Node. |
chio-tower | Node | Tower middleware for capability validation and receipt signing. |
chio-hosted-mcp | Node | The hosted MCP runtime surface. |
chio-http-serve | Node | Graceful shutdown, connection drain, and server hygiene shared by every Chio HTTP service. |
crates/trust
| Crate | Rung | What it owns |
|---|---|---|
chio-finding-challenge | Economy | The pure finding-challenge evaluator: a signed challenge plus the exact evidence its class selects in, one typed verdict the caller signs out. It fetches nothing, invokes nothing, reads no clock, touches no storage, and signs nothing. |
chio-finding-verifier | Economy | The offline finding evidence verifier, which turns a raw finding plus a resolved evidence bundle and pinned trust roots into a structured facet report. |
chio-replay-corpus | Formal Assurance | Replay corpus helpers for TEE captures: canonical invocation dedupe and default re-redaction. |
chio-attest-buyer | Products | The buyer attestation verification boundary. Products, Proof Room. |
chio-attest-verify | Node | The single source of truth for Sigstore verification across the workspace. Guard and image supply chain. |
chio-custody-hw | Node | Hardware custody: hybrid-backend-signed capabilities, a replay-resistant nonce store, and the revocation cascade, including the passkey path and its store. Key generation and rotation lifecycle are Cluster. |
chio-signing-remote | Node | Fail-closed remote signing backends for hosted deployments. Both pin an explicit public key and key version, and a transport response is accepted only after local strict verification over the exact input bytes. |
chio-weights | Learn | The model-card surface: signed weights cards, the cosign bundle helper, kernel binding refusal, and chio bind --card. Learn, Model Cards. |
chio-tee | Node | The TEE shadow runner that captures one kernel’s decisions and emits signed, redacted replay frames. Hardware backends and assurance tiers are Cluster. |
chio-tee-frame | Node | That frame wire format. |
chio-credentials | Economy | Portable reputation credentials and Agent Passport verification. |
chio-did | Economy | Self-certifying did:chio documents and their resolution. |
chio-disclosure-lineage | Swarm | The lineage verifier reports for what was disclosed to whom. |
chio-federation | Swarm and Federation | Splits by module. See the module table. |
chio-federation-transport-iroh | Federation | The Iroh transport adapter that carries them, gating admission at accept time against an issuer-signed endpoint directory. It sits strictly under chio-federation and replaces no trust logic. |
chio-governance | Swarm | Governance charters and case evaluation. The escalation ladder is Swarm; charter authoring is Economy, Listing Disputes. |
chio-attest-buyer-core | Products | The offline proof-package verifier underneath it. |
chio-federation-authority | Federation | Runtime issuance of federation authority artifacts. |
chio-attest-loopback | Products | The deterministic loopback proof package and its runtime harness. |
chio-pheromone | Swarm | The local pheromone substrate and its observation-cost evidence types. |
chio-pheromone-relay | Swarm | The relay service and its durable state. Filed at Swarm under an explicit exception: its operational facts are process-local, but its subject is cross-party coordination. |
chio-pheromone-runtime | Swarm | The local receiver runtime and its durable store. |
chio-revocation-oracle | Federation | Signed sparse-Merkle epoch roots, freshness windows, and passport-bridge revocation lookups. A node’s local revocation store is Node; the oracle answers across authorities. |
chio-reputation | Economy | Deterministic local reputation scoring for agents. |
chio-selective-disclosure | Swarm | BBS selective-disclosure projections and proof packages over receipts. |
crates/economy
| Crate | Rung | What it owns |
|---|---|---|
chio-anchor | Cluster | Checkpoint anchoring and multi-lane proof normalization: EVM root-registry publication, checkpoint-to-Bitcoin super-root aggregation with OTS linkage, Solana memo records, and fail-closed bundle verification. Gated behind the web3 feature. |
chio-appraisal | Economy | Runtime attestation appraisal artifacts and their evaluation. Economy, The Economic Stack. |
chio-autonomy | Economy | Bounded autonomy pricing, execution, and rollback contracts. |
chio-credit | Economy | Credit, capital, and bonded execution contracts. |
chio-fincred | Economy | Wire-neutral financial credential contract types. |
chio-finding | Economy | The signed cognition-market finding artifact and every supporting market artifact family, with fail-closed pure validation and inline signing. No storage, no I/O, no kernel wiring. |
chio-fiscal | Economy | Governed fiscal charter and schedule contracts. |
chio-link | Economy | The oracle runtime for cross-currency budget enforcement. |
chio-listing | Economy | Generic listing and trust-activation contracts. |
chio-market | Economy | Liability-market provider, quote, and claims contracts. |
chio-open-market | Economy | Open-market economics and penalty contracts. |
chio-settle | Economy | The settlement runtime for web3 escrow and bond execution. |
chio-underwriting | Economy | Underwriting decision, simulation, and appeal artifacts. |
chio-web3 | Economy | Web3 settlement, anchoring, and contract-surface artifacts. |
chio-web3-bindings | Economy | Alloy bindings and packaged artifacts for the official web3 contract family. |
chio-metering | Economy | Receipt metering and economics: cost attribution, budget enforcement, and billing export. |
crates/tooling
| Crate | Rung | What it owns |
|---|---|---|
chio-lsp | Build | The language server: chio.yaml, manifest, and guard DSL diagnostics, completion, hover, and go-to-definition. |
chio-conformance | Kernel | Cross-language conformance scenarios, the native and cross-peer harnesses, and the compatibility report. The other authoring-side gate. |
chio-verdict-matrix-driver-lambda | Kernel | The Lambda deployment-shape driver for the verdict matrix. It loads the same scenario corpus and emits one verdict, reason-code, and scope-set tuple per scenario. |
chio-release-evidence | Build | The signed, exact-candidate release qualification manifest. |
chio-spec-codegen | Build | Schema-to-Rust codegen for the wire types, on a typify backend. |
chio-spec-validate | Kernel | The JSON Schema validator that gates untrusted documents against the committed spec/schemas/ set. An authoring-side gate, claimed by Kernel, Testing Guards and Policies. |
chio-trace-validate | Build | Offline validation of signed observation traces. |
chio-test-support | Build | Shared test-only assertion helpers for the workspace. |
crates/products
| Crate | Rung | What it owns |
|---|---|---|
chio-api-protect | Build | Zero-code reverse proxy that protects HTTP APIs with signed receipts. Build, Protect an API. |
chio-cli | Reference | The binary. Its command surface is Reference, CLI. What it starts is a node, and it stays a shell over chio-hosted-mcp and chio-control-plane. |
chio-finding-market-migrator | Economy | The dedicated schema migrator for the hosted cognition market. |
chio-finding-market-canary | Economy | The exact-job provisioner and verifier for hosted market qualification. |
chio-finding-market-server | Economy | The authenticated PostgreSQL cognition-market HTTP server. |
chio-finding-worker-daemon | Economy | The hosted market’s Firecracker worker daemon. |
chio-mercury | Products | The MERCURY product CLI. |
chio-mercury-core | Products | Typed MERCURY evidence contracts layered on receipt truth. |
chio-proof-room | Products | The Proof Room quickstart server. |
chio-wall | Products | The Chio-Wall companion-product CLI. |
chio-wall-core | Products | Typed Chio-Wall control-path contracts layered on guard and receipt truth. |
Members outside crates/
21 workspace members live outside crates/. None of them files on the ladder, and no manifest under crates/ names any of them as a dependency: they are the examples a reader runs, the harnesses that gate a release, the benches that measure one, and the distribution packages for the places Chio is listed. They are here because a member the map omits is a member a reader concludes does not exist.
| Member | Path | Files at | What it is |
|---|---|---|---|
chio-bedrock-control-plane | integrations/aws-bedrock/control-plane | Build > Integrations | AWS Marketplace entitlement and metering contract helpers for the Bedrock listing. Deterministic and testable without AWS credentials. |
chio-mcp-adapter-integration | integrations/mcp-adapter | Build > Integrations | The distribution package for the registry-listed MCP server: Streamable HTTP, OAuth 2.1 with PKCE, protected-resource metadata, and receipt emission over the chio-mcp-edge transport contract. |
bilateral-invocation | examples/bilateral-invocation | Build | A bilateral co-signed invocation demo with a partial local verifier over the resulting DSSE signature-slice envelope. |
chio-three-vendor-example | examples/chio-3vendor | Build | A deterministic three-vendor buyer and auditor proof package. |
cross-provider-policy | examples/cross-provider-policy | Build | A dry-run policy demo proving cross-provider verdict equality. |
chio-example-enriched-inspector | examples/guards/enriched-inspector | Build | An example guard that reads the enriched action_type and extracted_path fields and calls the chio::log and chio::get_config host functions. |
chio-example-tool-gate | examples/guards/tool-gate | Build | An example guard that inspects the request tool name through the guard SDK and allows every tool except those on a deny list. |
hello-a2a | examples/hello-a2a | Build | An A2A edge wiring the adapter with receipt-bearing task results. |
hello-acp | examples/hello-acp | Build | An ACP edge wiring the adapter with capability-gated prompts. |
hello-mcp | examples/hello-mcp | Build | An MCP edge wiring the adapter with receipt-bearing tool calls. |
hello-tool | examples/hello-tool | Build | A tool server exposing one greet tool. |
otel-genai | examples/otel-genai | Build | An OpenTelemetry GenAI demo for receipt and span lookup. |
chio-formal-diff-tests | formal/diff-tests | Formal Assurance | Differential testing: random inputs run against the reference spec and the production implementation, and the two answers compared. |
chio-e2e | tests/e2e | Build | End-to-end integration tests for the runtime stack. |
chio-replay-gate | tests/replay | Formal Assurance | The deterministic-replay corpus driver and golden infrastructure for the kernel. |
chio-chaos | bench/chio-chaos | Build | The fault-injection chaos harness for the receipt store: a scenario vocabulary, a typed failure surface, and a deterministic seeded RNG. |
chio-loadgen | bench/chio-loadgen | Build | The real-stack load generator. It boots a live kernel wired to a real SQLite receipt store and a configurable-latency fixture. |
healthcare-pilot-capacity | bench/healthcare-pilot-capacity | Build | The sustained-load capacity harness for the healthcare design-partner pilot, deterministic in the pull-request gates. |
ttfrh-bench | bench/ttfrh | Build | The TTFRH bench harness, reporting p50 and p99 over a deterministic in-process simulation layer. |
xtask | xtask | Build | The workspace task runner, with a clap-derived argument tree behind cargo xtask. |
zed-chio | integrations/editors/zed-chio | Build > Integrations | The Zed editor extension. It spawns chio-lsp through Zed’s LSP adapter API. |
Two of them are worth knowing by name even if you never build them. chio-formal-diff-tests and chio-replay-gate file at Formal Assurance rather than Build, because their subject is a verification gate over the kernel rather than a convenience for someone building on it.
Kernel variants
Four crates provide kernel implementations for environments with different runtime capabilities. All four file at Kernel.
| Crate | Purpose |
|---|---|
chio-kernel-core | Pure-compute portable kernel. #![no_std] with extern crate alloc;. Runs on wasm32-unknown-unknown and wasm32-wasip1. Owns the sync Guard trait, GuardContext, PortableToolCallRequest, Verdict, and the core evaluate() function. Never produces PendingApproval. |
chio-kernel | Full kernel for the desktop sidecar. Adds tokio tasks, the rusqlite-backed receipt, revocation, budget, and lineage stores, Merkle checkpointing, the DPoP nonce cache, async session ops, HTTP and stdio transports, and the approval shell. Re-exports the core types and bridges them to its own ToolCallRequest with DPoP, governed-intent, and approval-token fields. This is the only kernel that emits Verdict::PendingApproval. |
chio-kernel-browser | Browser bindings over the portable core. Wires js_sys::Date::now() into the Clock trait and window.crypto.getRandomValues into Rng. JSON in, JSON out across the wasm-bindgen boundary. |
chio-kernel-mobile | UniFFI wrapper over the portable core for iOS (Swift) and Android (Kotlin). JSON input and output. Its UDL file is src/chio_kernel_mobile.udl. |
Portable and desktop kernel roles
The Kernel-to-Node boundary
The boundary is not a judgement call. The portable core states what it will not do, and that list is the Kernel-to-Node seam verbatim. crates/kernel/chio-kernel-core/src/evaluate.rs fences these into the full kernel:
//! What it does NOT do (fenced into `chio-kernel` proper):
//!
//! - Revocation membership lookup (stateful `RevocationStore`).
//! - Budget mutation (stateful `BudgetStore`).
//! - Delegation-chain ancestor inspection against the receipt store.
//! - DPoP proof verification with nonce replay (LRU-backed).
//! - Governed-transaction policy evaluation (pulls in chio-governance).
//! - Payment authorisation (async adapter trait).
//! - Tool dispatch to wrapped servers (async transport).
//! - Receipt persistence / Merkle checkpointing (SQL / IO).Any crate that implements one of those lines is Node content, wherever it sits in the tree. That is why chio-store-sqlite, chio-http-session, and chio-tool-call-fabric file at Node while the traits they satisfy file at Kernel. The same module header also names the verified-core boundary: revocation lookups, budget mutation, DPoP, and tool dispatch sit outside the present proof claim, which is what Formal Assurance documents as assumptions.
chio-federation, module by module
One crate, two rungs. The split is by module, and it is the seam where a reasonable reader is most likely to predict the wrong section.
| Module | Rung | Why |
|---|---|---|
frost | Swarm | Threshold signing over a roster: the action needs signatures from parties under different keys. |
bilateral, bilateral_dsse, bilateral_verifier | Swarm | Co-signing one action, the DSSE envelope that carries it, and the verifier that checks both. Joint authorization of a single governed action. |
pheromone_gossip | Swarm | Coordination signal exchange between actors the operator does not run. |
trust_establishment | Federation | The handshake that creates the standing relationship between two authorities. |
treaty | Federation | The terms that relationship runs under. |
open_admission | Federation | How a new authority joins. |
quorum | Federation | How many authorities must agree, and the anti-eclipse posture. |
The rule underneath: a per-action signature files at Swarm, a standing relationship between authorities files at Federation. The remaining modules take the same test. activation, artifacts, qualification, reputation, and revocation_gossip file by whether their subject is one action or a standing relationship; error, metrics, and validation are crate plumbing and carry no rung of their own.
Trust boundaries
spec/security/chio-threat-model.v1.json states the boundary this workspace is organized around in one line: its focus is the agent-kernel-tool trust boundary, over the surfaces native_chio, hosted_mcp, trust_control, and kernel_to_tool. Three readings of that line hold across every crate above.
- The kernel is trusted. Guards run inside the kernel process and the kernel signs receipts, so an adversarial agent cannot change a verdict or a receipt without breaking a signature. Native guards are ordinary Rust in that process. An operator-authored WASM guard is untrusted code running in the same process under wasmtime, and what confines it is an audited assumption rather than a proof:
ASSUME-WASM-ENGINEassumes wasmtime enforces its documented return, trap, fuel-metering, memory-limiter, and in-process sandbox semantics for untrusted guest code. - The agent is untrusted. Every input the agent provides is treated as adversarial. The capability token authorizes a scope, not a specific request shape, and scope match runs before guards do.
- The tool server is confined, not cooperating. The threat model lists
tool_execution_confinementamong the assets it protects, andASSUME-SUBPROCESS-ISOLATIONassumes tool-server subprocess isolation and OS process boundaries for effects outside the pure decision core. A tool server is bound to a signed manifest and expected to implement what it advertises; it is not trusted to enforce policy, and it is not modeled as a well-behaved party. Policy enforcement is the kernel’s job, and what happens past the process boundary is an assumption the deployment carries, not a guarantee the kernel makes.
Reading the source
The paths that come up most often when tracing a behavior back to code.
crates/kernel/chio-kernel-core/src/lib.rs # Verdict enum
crates/kernel/chio-kernel-core/src/guard.rs # portable Guard trait, GuardContext
crates/kernel/chio-kernel-core/src/evaluate.rs # core evaluate() + the exclusion list
crates/kernel/chio-kernel/src/runtime.rs # ToolCallRequest, Verdict
crates/kernel/chio-kernel/src/kernel/mod.rs # KernelError, full-kernel Guard + GuardDecision
crates/kernel/chio-runtime-core/src/admission.rs # runtime admission evaluation
crates/kernel/chio-swarm-authority/src/verifier.rs # swarm receipts, tokens, budget pools
crates/guards/chio-guards/src/pipeline.rs # GuardPipeline + default_pipeline
crates/guards/chio-guards/src/advisory.rs # AdvisoryPipeline + PromotionPolicy
crates/guards/chio-guards/src/post_invocation.rs # SanitizerHook
crates/guards/chio-guards/src/external/mod.rs # AsyncGuardAdapter, ExternalGuard
crates/guards/chio-policy/src/compiler.rs # HushSpec-to-pipeline compiler
crates/trust/chio-federation/src/frost/ # threshold roster, rotation, verification
crates/platform/chio-store-sqlite/src/lib.rs # the node's persistence layerWhere to go next
- Overview · what the Kernel section covers, and in what order
- The Guard Trait · the contract every guard implements
- Capabilities · the token the kernel verifies before anything else runs
- Testing Guards & Policies · the authoring-side gates named above