Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-protocols-mv/blob/main/README.md # aien-protocols-mv Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-protocols-mv / README.md` 158 lines ยท 14113 bytes Raw Blame History Rendered 1 # aien-protocols 2 3 This repository holds the written contracts that the parts of AIEN agree on: the byte formats and rules for agent state, inference requests, evaluation, evidence receipts, crumbs, execution transcripts, compiled Omega units, the Omega shell boundary and the task messages between a Raspberry Pi and the DGX Spark. Each contract is a specification in `specs/`, often with test vectors (fixed input files with the verdict a reader must give) and a small C checker that proves the vectors match the text. Next to the specifications sit reference Rust crates in `crates/`. The repository holds contracts only, never private implementations. 4 5 Part of Sovereign Intelligence (SI). The old umbrella name "Aienix" is retired. [sovereign-intelligence](https://github.com/aien-dev/sovereign-intelligence) is the integration, release and install center, and the place where the signed Spark test runs. AienOS is only the OS layer. See aien-architecture [ADR 0045](https://github.com/aien-dev/aien-architecture-mv/blob/main/docs/adr/0045-aienix-retired-sovereign-intelligence-center.md). 6 7 **Status 2026-10-19: research-grade, pre-alpha.** One specification is frozen (osc-unit-artifact v1, 2026-10-08), one is marked stable (crumb-visible), the rest are drafts. No protocol here is claimed as qualified on hardware. The status of the whole system is owned by [aien-architecture-mv](https://github.com/aien-dev/aien-architecture-mv), in [CURRENT_EXECUTION_PLAN.md](https://github.com/aien-dev/aien-architecture-mv/blob/main/CURRENT_EXECUTION_PLAN.md). 8 9 ## Specifications 10 11 The status column quotes the `Status` line at the top of each specification on `main`. 12 13 | Specification | What it defines | Status | Checked in this repo by | 14 |---|---|---|---| 15 | [agent-state](specs/agent-state/SPEC.md) | Portable agent state snapshot | Draft | nothing yet | 16 | [inference](specs/inference/SPEC.md) | Inference requests and responses | Draft | nothing yet | 17 | [evaluation](specs/evaluation/SPEC.md) | Evaluator interface and verdict identity domains | Draft | Rust tests in `aien-evaluation-protocol` | 18 | [evidence](specs/evidence/ADAPTIVE_EVIDENCE_INTERFACE.md) | Adaptive Evidence Interface (AEI1) requirements | Draft for freeze, 2026-10-11 | Rust tests in `aien-evaluation-protocol` (the AEI1 receipt) | 19 | [evidence-receipt](specs/evidence-receipt/SUBSET.md) | The parts of the evidence receipt that VC1 binds to | Partial extraction, 2026-10-02; full extraction is owed | nothing yet | 20 | [verified-crumb](specs/verified-crumb/SPEC.md) | Verified Crumb V1 (VC1) byte encoding and resolve rule | Draft v0, 2026-10-02 | `tools/check-golden.sh` (C checker, 17 golden vectors) | 21 | [crumb-visible](specs/crumb-visible/CRUMB_READER_CONTRACT.md) | Reader contract for the CRB1 visible crumb record | Stable | vector generator only (`tools/make-vectors.sh`) | 22 | [execution-transcript](specs/execution-transcript/TRN1_TRANSCRIPT_SPEC.md) | TRN1 execution transcript, contract 0.2.0 | Draft v0, 2026-10-01; not yet produced by any runtime | `tools/check-corpus.sh` (C verifier, see [tools/README.md](specs/execution-transcript/tools/README.md)) | 23 | [osc-unit-artifact](specs/osc-unit-artifact/OSC_UNIT_ARTIFACT.md) | Signed container for a compiled Omega unit | v1 FROZEN, 2026-10-08 | `tools/check-vectors.sh` (see [vectors/README.md](specs/osc-unit-artifact/vectors/README.md)) | 24 | [osh-platform](specs/osh-platform/OSH_PLATFORM_ABI.md) | Boundary between the Omega shell core and its platform | v1 DRAFT, not frozen | vector generator only (see [vectors/README.md](specs/osh-platform/vectors/README.md)) | 25 | [pi-spark-task](specs/pi-spark-task/SPEC.md) | PST1, the task message between a Pi and the Spark | Draft v0.1, 2026-10-16; not yet produced or read by any runtime | `tools/check-vectors.sh` (C checker, 23 header vectors) and the Rust crate `aien-pi-spark-task` | 26 | [latent-payload](specs/latent-payload/SPEC.md) | Opt-in bounded LTP0 tensor CONTENT profile of draft MJB1, no new task/receipt/capability protocol | Draft v0; runtime integration NOT_RUN | Seeded handwritten Omega validator, fixed synthetic vectors and native mutation controls, run by `sh specs/latent-payload/run-native.sh OMEGA_SRC` (omega-mv at the `sources.json` revision); see `results.json` | 27 | [microjob](specs/microjob/SPEC.md) | MJB1 typed bounded microjob DAG (token profiles 64/16 to 512/128 or zero-neural, resource caps, required verifier, retry and cancel) and the MJR1 receipt | Draft v0.1, 2026-10-24; not yet produced or read by any runtime | `tools/check-vectors.sh` (C checker, 104 document vectors, 58 mutants) and the Rust crate `aien-microjob` (vectors plus receipt-ledger tests) | 28 | [discovery-capsule](specs/discovery-capsule/SPEC.md) | DCP1 family: Discovery Capsule, owner consent, signed retraction, retraction ack and experience lineage | Draft v0.1, 2026-10-24; not yet produced or read by any runtime | `tools/check-vectors.sh` (C checker, 96 record vectors, 62 mutants) and the Rust crate `aien-discovery-capsule` (vectors plus two-owner lifecycle tests) | 29 30 The vector counts come from [CHANGELOG.md](CHANGELOG.md). Where a contract has an implementation, it lives with its owner, not here. On 2026-10-19 the `main` branches showed these: omega keeps pinned copies of the VC1 golden vectors and the CRB1 vectors (`tests/vcstore/golden/PIN`, `tests/crumbline/crb1/PIN`) and runs the 20 OSH vectors in `tests/osh/`; aienos has an OSC unit admission check in C (`native/kernel/artifact/osc_unit.c`) with a copy of the osc-unit-artifact vectors. This repository does not run those tests. 31 32 ## Reference crates 33 34 All twelve crates are Apache-2.0 (from `cargo metadata`). They follow aien-architecture [ADR 0024](https://github.com/aien-dev/aien-architecture-mv/blob/main/docs/adr/0024-rust-scaffolding-omega-destination.md): Rust is scaffolding and Omega is the destination, so the specifications are the lasting part. 35 36 The purpose column is shortened from the `description` field in each crate's `Cargo.toml`. 37 38 | Crate | Purpose | 39 |---|---| 40 | `aien-protocol-types` | Identifiers, primitives and digests shared by the other crates | 41 | `aien-agent-state-abi` | Agent state snapshot, transition events and lineage checks | 42 | `aien-inference-protocol` | Inference contract, including leased KV cache pinning and copy-on-write context branches | 43 | `aien-inference-client` | Client for the inference protocol | 44 | `aien-action-protocol` | Actions, capability grants and confinement authorization | 45 | `aien-event-protocol` | Event envelopes and streaming telemetry | 46 | `aien-evaluation-protocol` | Evaluator interface, verifier attestations, evaluation receipts and the AEI1 receipt | 47 | `aien-provenance` | Digests, Merkle trees and signature checks | 48 | `aien-probe` | Probe evaluation engine (see [its README](crates/aien-probe/README.md)) | 49 | `aien-pi-spark-task` | Reader and writer for the PST1 header; its test reads every PST1 vector | 50 | `aien-microjob` | MJB1 microjob DAG reader, writer and checker, and the MJR1 receipt ledger; its test reads every MJB1 vector | 51 | `aien-discovery-capsule` | DCP1 family reader, P-256 signature checks and recipient rules (retraction chain, use checks, execution admission, lineage); its test reads every DCP1 vector | 52 53 Who uses which crate is recorded in [CONSUMERS.md](CONSUMERS.md). 54 55 ### Source grant signature transcript (draft for next minor release) 56 57 `SourceGrant::compute_unsigned_digest` hashes the following bytes in order with 58 SHA-256: ASCII `AIEN_SOURCE_GRANT_V2` plus a zero byte; 16 raw grant UUID bytes; 59 the UTF-8 `source_uri` with its byte length as u64 little-endian; the UTF-8 60 `license_spdx` with the same length prefix; permission bits as u32 61 little-endian; the UTF-8 `issuer` with the same length prefix; one byte `0` 62 for no expiration, or `1` followed by `expires_at_epoch_sec` as u64 63 little-endian. There is no normalization or padding. The P-256 signature 64 continues to cover the 32-byte SHA-256 result, not the JSON representation. 65 Legacy concatenated-field signatures are never tried by the verifier. 66 Drake approved this breaking digest cutover on 2026-10-26. Adoption requires 67 reissuing every previously signed grant; coordinated consumers and unchanged 68 historical evidence are recorded in `CONSUMERS.md` and `CHANGELOG.md`. 69 70 ## Layout 71 72 ```text 73 specs/ Specifications (Community Specification License 1.0), one directory each, 74 with tools/ (generators and C checkers) and vectors/ where they exist 75 crates/ Reference Rust crates (Apache-2.0) 76 tests/gates/ Gate manifests and run.sh, the entry point the Spark judge runs 77 .aien/ Spark judge settings: always-run gates and the bundle public key 78 docs/ PIPELINE.md, how a pull request is tested and merged 79 ``` 80 81 Governance and policy files: [GOVERNANCE.md](GOVERNANCE.md), [SCOPE.md](SCOPE.md), [VERSIONING.md](VERSIONING.md), [CHANGELOG.md](CHANGELOG.md), [CONSUMERS.md](CONSUMERS.md), [ANTI_ENCLOSURE.md](ANTI_ENCLOSURE.md), [NOTICES.md](NOTICES.md), [TRADEMARKS.md](TRADEMARKS.md). 82 83 ## Rule of direction 84 85 Protocols point inward to nothing. Implementations point downward to protocols. They never point sideways at each other: any deployment needing two implementations in one process is composed from above. 86 87 ## How this fits with the other repositories 88 89 - [omega-mv](https://github.com/aien-dev/omega-mv) and [aienos-mv](https://github.com/aien-dev/aienux) implement some of the contracts in C (see Specifications above). 90 - [aien-sovereign-core-mv](https://github.com/aien-dev/aien-sovereign-core-mv), the Rust host runtime, uses some of the reference crates ([CONSUMERS.md](CONSUMERS.md)). It also holds the Spark test judge (`tools/aien-test`). 91 - [aien-architecture-mv](https://github.com/aien-dev/aien-architecture-mv) owns the plan, the ADRs and the status of the whole system. 92 - [aien-receipts](https://github.com/aien-dev/aien-receipts) stores the signed test results for this repository. 93 94 ## Standing rules 95 96 Language rule: Rust is scaffolding, Omega is the destination, and C or assembly stay only where hardware, boot, ABI or measurement justifies them (ADR 0024, which supersedes the old "C is the target, no new Rust" rule). No Python, no CUDA toolkit, no systemd, no outside dependencies in the trusted base. 97 98 ## Build and test 99 100 The reference crates need a Rust toolchain. These are the commands the gates run: 101 102 ```bash 103 cargo fmt --all -- --check 104 cargo check --workspace --all-targets 105 cargo clippy --workspace --all-targets -- -D warnings 106 cargo test --workspace 107 ``` 108 109 The spec checkers need only bash, coreutils and a C99 compiler: 110 111 ```bash 112 bash specs/verified-crumb/tools/check-golden.sh 113 bash specs/osc-unit-artifact/tools/check-vectors.sh 114 bash specs/execution-transcript/tools/check-corpus.sh 115 bash specs/pi-spark-task/tools/check-vectors.sh 116 bash specs/microjob/tools/check-vectors.sh 117 bash specs/discovery-capsule/tools/check-vectors.sh 118 ``` 119 120 `tests/gates/run.sh ` runs one gate step by name. The steps are `fmt`, `check`, `clippy`, `test`, `zero-disk-secrets`, `anti-slop` and `c-vectors`. The `c-vectors` step runs every `specs/*/tools/check-*.sh` (the checkers above) and passes only when all of them pass. The `anti-slop` step fails on any em dash or en dash in `crates/`, `docs/`, `README.md` and `ANTI_ENCLOSURE.md`. 121 122 On 2026-10-19 all of the commands above passed on the Spark on `main` at ``fb5fca9``, and `crumb verify .` printed `OK: 41 crumbs current`. 123 124 ## Testing and evidence 125 126 The DGX Spark is the only test judge for pull requests (aien-architecture [ADR 0033](https://github.com/aien-dev/aien-architecture-mv/blob/main/docs/adr/0033-aien-verification-pipeline.md); the Spark judge started on 2026-10-16, PR #25). On 2026-10-18 the hosted test workflow `ci.yml` was deleted (PR #42). The one workflow left, `.github/workflows/aien-verification.yml`, does not build or test the code: it checks the result the Spark signed. On 2026-10-19 [docs/PIPELINE.md](docs/PIPELINE.md) was updated to match (PR #45), and the `.crumb` files stopped storing generated data; the crumb tool computes it on demand (PR #44). 127 128 - The Spark runs the gates in `tests/gates/` that a change touches, plus the gates listed in `.aien/always` (`PROTO-ZERO-DISK-SECRETS`, `PROTO-ANTI-SLOP`), and posts the commit status "AIEN Verification (Spark)". 129 - The signed results are published in [aien-receipts/aien-protocols](https://github.com/aien-dev/aien-receipts/tree/main/aien-protocols), one directory per commit. 130 - [docs/PIPELINE.md](docs/PIPELINE.md) explains the flow and the merge rules. 131 132 ## Open work 133 134 These issues and pull requests were open on 2026-10-19: 135 136 - Issue #27 tracks the whole Pi and Spark protocol lane. Its next parts are session rules (issue #32, pull request #38) and tool-call tasks (issue #33, pull request #41). 137 - Issue #43: freeze the OSH stream and task ABI vectors. 138 139 ## Contributing 140 141 Open a pull request against `main` with the commands you ran and their output. Specification changes follow [GOVERNANCE.md](GOVERNANCE.md) and [VERSIONING.md](VERSIONING.md). A pull request merges only after the Spark judge passes it and a maintainer adds the `ready-to-merge` label. Contact: aien@aienos.com. 142 143 ## Licensing 144 145 Specifications: [Community Specification License 1.0](LICENSE-SPEC). Code and crates: [Apache License 2.0](LICENSE-CODE) (Apache-2.0). Anti-enclosure commitments: [ANTI_ENCLOSURE.md](ANTI_ENCLOSURE.md). 146 147 ## Human-Directed Agentic Engineering 148 149 Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, 150 architecture, constraints, acceptance criteria, and stopping points; agents implement, 151 execute checks, diagnose failures, and revise within those boundaries. Human review 152 retains responsibility for claims, acceptance, and release decisions. This describes 153 the development method, not a change to runtime autonomy or historical evidence. 154 155 For the documented method and a systems-software case study, see Gregory M. Kurtzer 156 (2026), *Ginux: Building an Independent Kernel That Runs Linux Userspace through 157 Human-Directed Agentic Engineering*, technical report, v1, Zenodo, 158 .