interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / AGENTS.md

97 lines · 7749 bytes Raw Blame History Rendered
1# INTERPLANE (open interoperability protocol between AI models and agent runtimes)
2
3> INTERPLANE defines the boundary between a model and the runtime that acts for it: model output is parsed into tool requests, the runtime decides each request with its own policy, and INTERPLANE carries the request and the decision across the boundary and refuses to upgrade a decision. This repository holds the normative protocol text and JSON Schemas, the Rust reference implementation, the conformance fixtures with their recorded verdicts, the AIEN reference adapter, and the benchmark and qualification records behind every published result.
4
5Shared rules: read https://www.aienos.com/agents/RULES.md first. This file adds what is specific to this repository; where the two differ, this file wins here.
6
7## Scope
8
9- Applies to the whole repository.
10- `spec/` and `spec/schemas/*.schema.json`: the normative protocol. `rust/`: the Cargo workspace with `interplane-core`, `-lenshift`, `-crossaxis`, `-crossveil`, `-conformance` and `-probe`.
11- `conformance/` and `dialects/`: canonical fixtures and the recorded verdicts in `conformance/expected/`.
12- `adapters/aien/`: the AIEN reference adapter. It depends on AIEN host projects and is AGPL-3.0-or-later with its own `LICENSE`; everything else is Apache-2.0. `adapters/odysseus/` keeps catalog records only.
13- `provenance/`: the companion manifest verifier, a separate Cargo project outside Core (ADR 0004).
14- `forge/`: INTERPLANE Forge, seeded Omega (`forge.om`, built with the omega-mv f4df8239 omc, sha256 `3ad9f10f…3194`); spec `docs/FORGE.md`, host programs in `forge/DEPENDENCIES.md`. Its logic stays in `.om`; a host program it needs is recorded there with version and Omega replacement. Test: `OMC=<pinned omc> sh forge/tests/run.sh` (exit 0 only with every case passing and every mutant caught). Not mapped in `.aien/` yet (operator).
15- `bench/` and `qualification/`: pre-registered protocols, recorded runs and real-model captures. These are records; do not rewrite them.
16- `STATUS.md` is the only place that says what is implemented, tested, conformant or qualified.
17
18## Installation
19
20```bash
21git clone https://github.com/aien-dev/interplane-mv.git
22cd interplane-mv/rust
23cargo build
24```
25
26`rust-toolchain.toml` pins Rust 1.99.0 with `clippy` and `rustfmt`; `rustup` installs it on first use. The gate script also uses `jq`. There is no Python and no package manager besides Cargo.
27
28The AIEN adapter needs sibling checkouts of aegis-runtime and aien-protocols at the commits in `adapters/aien/PINS`. `adapters/aien/setup-siblings.sh [parent-dir]` clones them into `<parent>/interplane-audit/`, where `adapters/aien/Cargo.toml` expects them.
29
30## Configuration
31
32- `rust-toolchain.toml`: the exact toolchain for `rust/` and `adapters/aien/`.
33- `adapters/aien/PINS`: the sibling repositories and commits the adapter builds against; `setup-siblings.sh` checks that the `Cargo.toml` revs agree with it.
34- `interplane-probe` reads its endpoint credential from `INTERPLANE_PROBE_API_KEY`. It is sent only in a request header and never stored or printed.
35- `.aien/always` lists the gates that run on every change; `.aien/unmapped-ok` lists the paths that need only those.
36- `CARGO_TARGET_DIR` is honoured by `tests/gates/run.sh`.
37
38## Usage
39
40From `rust/`:
41
42```bash
43cargo test --all
44cargo run -q -p interplane-conformance --bin interplane-conformance -- ../conformance/fixtures --out /tmp/verdicts.json
45cmp /tmp/verdicts.json ../conformance/expected/verdicts.json
46cargo run -q -p interplane-conformance --bin interplane-corpus -- validate
47
48# Offline examples; each checks its own story and exits 1 on any difference
49cargo run -q -p interplane-crossveil --example offline
50cargo run -q -p interplane-crossveil --example todo_adapter
51```
52
53The `cmp` line prints nothing when the verdicts match the recorded reference byte for byte.
54
55Every Spark gate is `tests/gates/run.sh <step>`, run from the repository root:
56
57| Step | What it checks |
58|---|---|
59| `no-python` | no Python file is tracked (always runs) |
60| `schemas-and-fixtures` | schema self-check, then every fixture against the schemas |
61| `rust` | fmt, clippy `-D warnings`, all tests, both examples, the 106 verdicts equal the recorded file |
62| `package` | every crate packages and builds from its `.crate` file (offline, from the local registry cache) |
63| `negative-controls` | trust corpus digests, broken variants are detected, matrix equals the recorded one |
64| `provenance` | the provenance verifier's fmt, clippy, tests and its six fixture verdicts |
65| `adapter-aien` | the AIEN adapter and its T4 subset; needs `../aegis-runtime` and `../aien-protocols` beside the checkout |
66
67`interplane-probe` (`cargo run -q -p interplane-probe -- --endpoint <url> --model <id> --out probe-report.json`) qualifies a live OpenAI-compatible model endpoint. It needs a running model server; the `qualification` workflow runs it on a self-hosted runner by manual dispatch only.
68
69## Conventions
70
71- Small conventional commits (`feat(core): ...`, `test(conformance): ...`), one conceptual layer per pull request (`CONTRIBUTING.md`).
72- Schemas and fixtures are normative. A change that alters an expected fixture outcome is a protocol change: it needs a `CHANGELOG.md` entry and, during 0.x, a MINOR bump.
73- The Rust conformance verdicts and the negative-control matrix must equal `conformance/expected/` byte for byte. A change that alters them updates those files in the same pull request.
74- Every protocol object needs positive, negative, round-trip, version, unknown-field and malformed-input tests. Every dialect needs real fixtures; model-dependent tests are integration tests, off by default.
75- No Python anywhere; the `INTERPLANE-NO-PYTHON` gate fails if a Python file or a Python shebang is tracked.
76- No execution authority in Core, no host-project dependency in Core, no serving-engine dependency anywhere. Pipeline libraries never mention the negative controls.
77- Update `STATUS.md` in the same pull request as the code it describes, and never claim more elsewhere than `STATUS.md` does.
78- Pre-registered protocols in `bench/` are fixed before their runs; report a failed gate as failed.
79
80## Safety and approvals
81
82- The model side is untrusted. Lenshift never executes, CrossAxis never grants, a valid envelope is never an authorization, and a signature proves origin, never authority. Do not weaken any of these.
83- Fail closed on unknown decisions, versions and dialects, on oversized or malformed arguments, duplicate request ids and replayed messages. Never log secrets and never persist raw model output by default (`SECURITY.md`).
84- Report vulnerabilities privately through GitHub Security Advisories, not in a public issue.
85- The DGX Spark is the test judge (`docs/PIPELINE.md`); pull request checks on GitHub are advisory. A change to `.aien/`, `tests/gates/` or `.github/workflows/` is `BLOCKED_OPERATOR` and runs only when the operator starts it; ask before touching those paths.
86- Do not run `interplane-probe` or the `qualification` workflow against an endpoint you were not given, and never commit an API key.
87- Work on a branch and merge through a pull request; `docs/PIPELINE.md` explains the `ready-to-merge` label.
88
89## Further reading
90
91- `README.md`: overview, layout and the build and test steps.
92- `CONTRIBUTING.md` and `SECURITY.md`: contribution and reporting rules; this file does not override them.
93- `STATUS.md`, `ROADMAP.md`, `CHANGELOG.md`: what is done, what is planned, what changed.
94- `docs/WRITING-AN-ADAPTER.md`: how to connect a runtime.
95- `docs/PIPELINE.md`: how the Spark gates test and merge a pull request.
96- `docs/adr/`: decisions 0001 to 0004.
97- https://interplane.io: the public site, built from aien-dev/interplane.io.