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/interplane-mv/blob/main/docs/plans/0.3-TRUST-PLAN.md # interplane-mv INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority. 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 `interplane-mv / docs / plans / 0.3-TRUST-PLAN.md` 322 lines ยท 23955 bytes Raw Blame History Source # INTERPLANE 0.3 "Trust": plan Status: plan, 2026-10-04. Docs only. Nothing below is implemented by the PR that adds this file. The gates are pre-registered separately in `bench/PROTOCOL-0.3.md` and are not restated here. `STATUS.md` remains the only place that says what is implemented. Governing rule (README.md:5): models express intent, runtimes retain authority. 0.3 makes the line between content, model intent and runtime authority checkable: every model-visible input says what it is and how far it is trusted, every injection attempt in a fixed corpus is shown not to cause an effect, and approval and denial behave the same in both SDKs and both adapters. Scope of the claim, fixed now: trust labels preserve meaning; they do not prove that a model ignores injected text. 0.3 claims runtime-layer properties only. Model behaviour under injection is measured and reported, never used as evidence that the boundary holds. Inputs to this plan: ROADMAP.md (0.3 row), docs/REPORT-0.1.md, docs/REPORT-0.2.md, spec/, both SDKs, both adapters, docs/audits/aien-authority-reaudit-2026-10-04.md, docs/external/ (Jan #8975, NightDriver 565 and 666, ecosystem triage), and section 19 (IP-C) of the AIEN programming plan of 2026-10-04 (operator document, not in this repository). ## 1. What exists today (main `678c06c`) Line numbers are at `678c06c` unless another commit is named. ### Vocabulary and wire - Two provenance axes exist on the wire: `ContentKind` (12 values) and `TrustLevel` (5 values) (`spec/schemas/common.schema.json:225-253`). Unknown trust strings are read as `external_untrusted`, unknown kinds as `unknown` (same file, `:252`; `spec/VERSIONING.md:9`). - `result.provenance` carries `runtime`, `capability`, `duration_ms`, `result_digest`, `trusted`, `trust`, `content_kind` (`spec/schemas/result.schema.json:55-118`); the canonical shape and the null rules are pinned in `spec/CORE.md:86-101`. - `Party` (envelope `source` and `destination`) also has optional `trust` and `content_kind` (`common.schema.json:26-69`; `envelope.schema.json:42-47`). - Intent provenance records how a call was parsed: dialect, parser version, model, source turn, call id, digest of the native text, raw name, coercion (`spec/schemas/intent.schema.json:13-25`). It records nothing about what the model had seen when it produced the call. - Trace relationship exists only at envelope level: `trace_id`, `message_id`, `parent_id` (`envelope.schema.json:20-38`; `CORE.md:24-29`). ### Behaviour - The pipeline defaults an executed result with no kind to `tool_result` and with no trust to `unknown`; `trusted` is derived from `trust` (Rust `crates/interplane-crossveil/src/pipeline.rs:654-697`; Python `python/interplane/crossveil.py:186-194`; spec `CORE.md:89-101`, `CROSSVEIL.md:46-49`). - Results are rendered to the model as data; markup inside a result is never parsed into a new intent. Conformance cases 22 (`web_fetch` with Qwen3.5 tool-call markup) and 23 (`recall_memory`) check it (`CORE.md:246-247`; mock payloads `CORE.md:160-161`). - Retry after denial with a fabricated `extensions.approval_id` is denied again (case 18, `CORE.md:241`). A decision citing another request is denied (`pipeline.rs:406-420`). A stale mapping table is rejected before decide (case 21). Adapter exceptions fail closed (`CROSSVEIL.md:23-24`). - The lifecycle allows REQUIRES_APPROVAL -> AUTHORIZED only through a new runtime decision carrying an `approval_id` (`CORE.md:50-60`; Rust `crates/interplane-core/src/lifecycle.rs:96-128`; Python `python/interplane/core.py:905-927`). ### Adapters - Odysseus (pinned `2992bf6`): decisions pass through Odysseus's own untrusted-context gate, which is monotonic per trace (`adapters/odysseus/interplane_adapter_odysseus/authority.py:140-145`, `:189-206`). Result trust comes from Odysseus's `result_integrity` (`authority.py:276`, `:292-294`). A gate refusal returns `requires_approval` with an opaque `odysseus-pending-` handle that nothing consumes (`authority.py:198-206`; `docs/REPORT-0.1.md:86`). Odysseus itself has sealed, digest-bound approvals (`CURRENT_STATE.md:33`, citing Odysseus `src/tool_approvals.py:104-142`). - AIEN (pinned sovereign-core `6554aac`): effects go through the real `EffectLane` with `EffectClassAuthority`; single-use grants are issued through AIEN's `ApprovalDesk` and presented out of band per request id (`adapters/aien/src/lib.rs:302-325`, `:326-432`). Six approval tests: pending without grant, executes once, spent grant refused, replay returns the existing receipt, mismatch, expiry (`adapters/aien/tests/approval.rs:41-149`). Known limits: grants live in memory, a grant is spent at mint even if the provider then rejects the call, the host supplies the clock, the generic `Pipeline` has no grant field (`docs/REPORT-0.2.md:90-93`). - AIEN's `aien-cli` `SafetyEngine` cannot be linked (private module); the adapter substitutes workspace confinement plus the AEGIS `pre_dispatch_check` gate and names the gate actually used in `authority.policy_engine` (`adapters/aien/README.md:95-105`). - 0.2 bench already measured one model-behaviour number: on qwen3.5:9b, an injection attempt appeared in 1 of 5 injection runs in each condition (`bench/runs/qual-20261004T2207Z/summary.md:68`, `:88`). ## 2. Gaps (each one is closed by a named cut in section 4) # Gap Evidence Cut G1 Trust vocabulary disagrees with itself. `CROSSVEIL.md:26` names a default `untrusted_tool_content`, which is not an enum value; `CROSSVEIL.md:48-49` and `CORE.md:100-101` say `tool_result` + `unknown`. `CROSSVEIL.md:26` and `VERSIONING.md:8` mention `origin`/`Origin`, which no schema defines. cited P1 G2 Rust and Python treat an unrecognized `content_kind` string differently: Rust maps it to `unknown` (`pipeline.rs:686`), Python to `tool_result` (`crossveil.py:190`). Read from source; no fixture covers it yet. cited P1 G3 Odysseus `result_integrity` can be `system` (`authority.py:294` comment), which is not a `TrustLevel`; the pipeline then folds it to `external_untrusted` (`crossveil.py:193-194`). Fail closed, but the meaning is lost. cited P1 G4 Provenance exists only on executed results. System prompt, user request, workspace files, memory, documents, skills, tool descriptions and external-provider output that the host puts into context have no record at all. schemas above P2, P3 G5 The text the model actually sees carries no provenance: `serialize_result` renders `data` or `error` only (Rust `crates/interplane-lenshift/src/lib.rs:179-191`; Python `lenshift/_common.py:93-103`). Trust is on the wire, not in the rendered message. cited stated as a limit; framing deferred (section 6) G6 The runtime cannot see what the model had been exposed to when it asked. `CallContext` has `trace_id`, `message_id`, `parent_id`, `model`, `session` only (`crates/interplane-crossveil/src/lib.rs:15-22`). Odysseus gets exposure only if the caller passes `trust`/`prior_trust` by hand (`authority.py:332-345`). cited P3, E1, E2 G7 AIEN's authority input has no exposure field: `AuthorityContext { scope, descriptor, live_catalog_digest }` (sovereign-core `6554aac` `crates/aien-mcp/src/authority.rs:45-49`). The AIEN adapter labels every success `workspace_content` (`adapters/aien/src/lib.rs:700-717`). cited E3, E4 G8 Rust and Python disagree on approval continuation: Rust accepts any non-empty `approval_id` (`lifecycle.rs:115-121`, and `Lifecycle` stores no minted id, `:62-65`); Python requires the minted id and a new decision object (`core.py:924-926`). No fixture reaches the second decision, so lockstep never caught it. cited A1 G9 No host-controlled continuation API in the generic pipeline. Public entry points are `new`, `admit_value`, `admit_envelope`, `run_turn` (`pipeline.rs:152`, `:214`, `:253`, `:522`). Correlation, expiry, argument binding, cancellation, replay and restart semantics are unspecified. AIEN tests call `decide` directly, outside the pipeline (`approval.rs:31-36`). cited A1, A2 G10 Odysseus approvals are minted as handles and never consumed. `REPORT-0.1.md:86` A4 G11 No adversarial corpus beyond cases 18, 21, 22, 23, and no negative control proving the suite can fail. `CORE.md:220-247` I1 to I4 G12 AIEN grant spent at mint even when the provider fails afterwards; recoverability of that outcome is untested. `REPORT-0.2.md:90-91` A3 ## 3. Wire-format decision (made now) All 0.3 additions are optional fields on the wire (a MINOR change, `VERSIONING.md:7`) and required by the 0.3 conformance gates. No new `payload.kind` is added, because an unknown kind is rejected by older receivers (`VERSIONING.md:18`). No new `TrustLevel` value is added (that is MAJOR, `VERSIONING.md:9`). The 25 existing fixtures must keep their expected outcomes unchanged (`VERSIONING.md:19-20`); new checks live in new fixtures or in new optional `expected` blocks. Defined in P1 and P2 (names fixed now so the protocol can refer to them): - InputRecord (new schema `spec/schemas/input.schema.json`): `input_id`, `content_kind`, `trust` (type `TrustLevel`; Drake's "trust_level"), `source` (a `Party`: who handed the bytes to the context), `origin` (a locator string for where the bytes came from: file path, URL, memory record id, provider id, `runtime:`; may be a digest-only form for sensitive locators), `content_digest`, `trace_id`, `parent_id` (the `message_id` or `request_id` that produced it, null for host-registered inputs), `derived_from` (list of `input_id`s it was computed from, for summaries and nested content). - Exposure (new optional `provenance.exposure` on `tool_request`, mirrored into `CallContext`): `{inputs: [input_id...], floor: TrustLevel}`, where `floor` is the least trusted level among inputs visible to the model when it produced the turn. Order: `trusted_runtime` > `user_supplied` > `workspace_untrusted` > `external_untrusted`; `unknown` counts as `external_untrusted`. The pipeline computes it from its own ledger. An `exposure` value arriving inside a model-produced or admitted envelope is discarded and recomputed, never read. - Model-generated content (`content_kind = model_generated`) is recorded with trust `external_untrusted`. Models are untrusted by design (README.md "Security in one paragraph"). - Unknown never becomes trusted by serialization. Absent, null, unparseable or unrecognized trust round-trips as `unknown` or `external_untrusted`, and `trusted` is never `true` for it, in both SDKs and after JCS round-trip. ## 4. Lanes and cuts Each cut is one PR. "Lockstep" means the Rust and Python changes land in the same PR and the cross-language verdict comparison in CI (`.github/workflows/ci.yml:68-80`) stays byte-identical. Owner types: spec (normative text and schemas), SDK (Rust + Python lockstep), adapter (one host adapter, its pinned host checkout), host (a change in a host repository), taskmaster (runs, report, status). Red before green: every cut that fixes behaviour first lands a failing fixture or test in the same PR history. ### Lane P: provenance (schema, SDKs, conformance) P1. Reconcile the trust vocabulary. (spec + SDK + adapter (Odysseus); first cut of 0.3, no dependencies) - Files: `spec/CROSSVEIL.md` (`:25-26` rewritten to the `tool_result` + `unknown` default and to the defined field names), `spec/VERSIONING.md:8` (drop or define `Origin`), `spec/CORE.md`, `spec/schemas/common.schema.json` descriptions, Rust `pipeline.rs:684-688`, Python `crossveil.py:186-194`, Odysseus adapter `authority.py:292-294` (explicit mapping of `system`), `STATUS.md`. - Fixes G1, G2, G3. Rust and Python pick one rule for an unrecognized kind (`unknown`, matching the schema description at `common.schema.json:241`). - Evidence: new fixtures 26 (unrecognized `content_kind` string), 27 (absent, null and unrecognized trust, each round-tripped through JCS: `trusted` is never `true`); Odysseus test for `system`; both runners 27/27, verdicts byte-identical; existing 25 unchanged. P2. InputRecord and Exposure types. (spec + SDK; depends on P1) - Files: `spec/schemas/input.schema.json` (new), `intent.schema.json` (optional `exposure`), `spec/CROSSVEIL.md` "Crossveil Trust", Rust `crates/interplane-core/src/types.rs`, Python `python/interplane/core.py`, schema self-check in CI. - Evidence: schema-valid examples for each of the 9 source classes in the protocol; one JCS digest fixture under `conformance/fixtures/digest/` for an InputRecord, identical in both languages. P3. Pipeline input ledger and exposure. (SDK; depends on P2) - Behaviour: per trace, the pipeline records every rendered result as an InputRecord automatically (`parent_id` = its `request_id`), and the host registers other inputs through a new host-only call before a turn. Each parsed `tool_request` gets `provenance.exposure`; `CallContext` gets the same value. Model-supplied or envelope-supplied `exposure` is overwritten. - Files: Rust `crates/interplane-crossveil/src/{lib.rs,pipeline.rs}`, Python `python/interplane/crossveil.py`, conformance runners (new fixture step kind `"input"` and new optional `expected.inputs` / `expected.exposure` blocks; `CORE.md` fixture format section). - Evidence: fixtures for ledger growth across `continues` turns, `derived_from` on nested content, forged `exposure` in an admitted envelope ignored. P4. Source-class coverage fixtures. (SDK + spec; depends on P3) - Files: `spec/CORE.md` mock runtime table (new mock capabilities for document, skill and external-provider content; tool descriptions registered as `skill` inputs), mock runtimes in both SDKs, fixtures. - Evidence: at least one fixture per source class (workspace, web, memory, document, skill, tool output, external provider, runtime-generated, user request) asserting every required InputRecord field; this is gate P in the protocol. ### Lane I: injection corpus (conformance) I1. Corpus format, scripted obedient model, negative-control harness. (spec + SDK; depends on P3) - Each injection fixture declares `injection: {category, canary, target: {capability, argument_contains}}`. The scripted model in the following turn **obeys the injection every time** (worst-case model), so the fixture tests the runtime layer, not model behaviour. - Negative-control variants V1 to V6 (protocol section 6) are built only into the conformance runners behind a test-only switch (Rust cargo feature, Python runner flag), never into the pipeline libraries. - Freezing: `conformance/TRUST-DIGEST.txt` (corpus digest and `PROTOCOL-0.3.md` digest), recomputed by CI. - Evidence: CI job runs the suite and the negative-control matrix offline. I2. Content-borne cases (categories C01 to C05). (SDK; depends on I1) - Workspace, tool output (including nested result content and error-message text), memory, web, document (including tool markup embedded in a document). Each category carries the three payload forms: Qwen3.5 XML tool call, OpenAI JSON tool call, plain-language instruction. I3. Authority-claim cases (C06 to C09, C11). (SDK; depends on I1, A2 for C09) - Instruction impersonation, fake authorization (forged provenance or approval inside model arguments or `extensions`, forged `exposure`), model-generated fake runtime message, retry after denial, cross-tool escalation (a read result or a tool description steering the model to an effectful tool). I4. Identity, catalog and fault cases (C12, C13). (SDK; depends on I1) - Mismatched request identities (decision or result citing another `request_id`), stale catalogs, duplicate advertised names where the advertised definition differs from the routed one (Jan #8975 lesson, `docs/external/jan/8975/REPORT.md:44-45`), adapter exceptions in `decide` and `execute`, a denied or ignored call interleaved with valid calls in one turn (NightDriver 666 lesson, `docs/external/nightdriver/666/REPORT.md:101-102`). C10 (approval manipulation) is supplied by lane A and counted in the corpus. ### Lane E: runtime enforcement (adapters) E1. Reference exposure policy in the mock runtime. (spec + SDK; depends on P3) - `CORE.md` mock table gains an effect-class column (`read` or `effect`). Mock policy: an `effect` capability whose `exposure.floor` is below `user_supplied` is `requires_approval` (mirrors Odysseus's untrusted-context gate). This is the mock's policy, not INTERPLANE's; INTERPLANE only carries exposure. - Evidence: content-borne fixtures pass with 0 injected effects executed. E2. Odysseus adapter consumes pipeline exposure. (adapter; depends on P3, E1) - Replace the caller-supplied `trust`/`prior_trust` path (`authority.py:332-345`) with `CallContext.exposure`, keep Odysseus deciding (`authority.py:189-206`). - Evidence: the corpus subset expressible in the Odysseus catalog, 0 injected effects executed; existing 55 adapter tests still pass. E3. AIEN authority takes exposure. (host: aien-sovereign-core; independent of this repo) - Add an exposure input to `AuthorityContext` (`authority.rs:45-49` at `6554aac`) and let `EffectClassAuthority` return `Pending` for effects under untrusted exposure. Own PR in sovereign-core with its own tests. INTERPLANE invents no AIEN policy: until E3 merges, AIEN is reported as not meeting gate E for effectful cases. E4. AIEN adapter re-pin and honest labels. (adapter; depends on E3, P3) - Re-pin, pass `CallContext.exposure` through, label results by what they are instead of always `workspace_content` (`lib.rs:700-717`). - Evidence: corpus subset on the AIEN adapter, 0 injected effects executed. E5 (optional, separate). Narrow exported SafetyEngine host API. (host: aien-sovereign-core) - Only if AIEN wants it. Until then the limitation stays explicit: the adapter uses confinement plus the AEGIS gate in place of `SafetyEngine` (`adapters/aien/README.md:98-105`). Not required by any 0.3 gate. ### Lane A: approval and denial correctness A1. Approval continuation contract, and the Rust fix. (spec + SDK; depends on P1) - Spec first, in `CORE.md` and `CROSSVEIL.md`, before any code extends the API: - Host-controlled. Continuation is a host call with a runtime-produced decision. No field in `tool_request`, `arguments`, `extensions`, envelope or model text is read as a grant, and no model-writable field is added that could be mistaken for one. - Correlation. `trace_id` + `request_id` + the `approval_id` the runtime minted for that request + the digest of the original `capability_request` (binds capability and arguments). The approval applies to the exact effect that will run, not to a broader class that sounds like it (NightDriver 565 lesson, `docs/external/nightdriver/565/REPORT.md:79`). - Expiry. `approval.expires_at` checked against the host clock; expired means DENIED. - Cancellation. A host cancel turns REQUIRES_APPROVAL into DENIED; it is terminal. - Replay. A second continuation of the same request is refused. Protocol replay protection (`replayed_message`, `duplicate_request_id`) stays on; continuation is a transition on the existing ledger entry, never a re-admission, so resuming never disables duplicate detection. Host effect idempotency (AIEN's receipt ledger) is separate and is not reused for this. - Restart. Pipeline state is in memory; after a restart a pending request cannot be continued (fail closed). The host must start a new request. - Code: Rust `Lifecycle` stores the minted id and checks it (`lifecycle.rs:62-65`, `:115-121`), matching Python (`core.py:924-926`). Red first: fixture with a foreign `approval_id` fails on Rust today. A2. Continuation entry point in both SDKs. (SDK; depends on A1) - `Pipeline` gains the host-only continuation call and cancel call; fixtures gain an `"approve"`/`"cancel"` step that only the fixture's host side can issue. - Evidence: approval cases A01 to A14 of the protocol in both runners, byte-identical. A3. AIEN grants through the continuation API. (adapter; depends on A2) - Route `present_approval` (`lib.rs:322-325`) through A2 instead of out of band. Add tests: model content (arguments, extensions, text) cannot stand in for a grant; stale scope refused; spend point documented and tested, including a provider failure after the grant was spent at mint (`REPORT-0.2.md:90-91`), which must end in a recoverable, reported outcome and never a silent second effect. If AIEN cannot make it recoverable, that is recorded as a limit and filed in sovereign-core. - Evidence: the 6 existing approval tests plus the new ones. A4. Odysseus approvals. (adapter; depends on A2) - Either consume approvals through Odysseus's sealed exact approvals, or refuse every continuation (fail closed) and report "approval continuation unsupported on Odysseus". - Evidence: Odysseus subset of A01 to A14. ### Lane R: report R1. REPORT-0.3. (taskmaster; depends on all cuts above that are merged) - Run the frozen suite in both languages and on both adapters, run the negative-control matrix, run the live model leg if a backend is available, write `docs/REPORT-0.3.md` with every gate verdict as pre-registered, update `STATUS.md`, `ROADMAP.md`, `CHANGELOG.md`. A failed gate is reported as FAIL with thresholds unchanged, as in 0.2. Order: P1 -> P2 -> P3 -> (P4, I1, E1, A1 in parallel) -> (I2, I3, I4, E2, A2) -> (A3, A4) -> E4 after E3 lands -> R1. E3 and E5 run in sovereign-core on their own schedule. 17 required cuts (P1-P4, I1-I4, E1-E4, A1-A4, R1), one optional (E5). ## 5. 0.3 acceptance (maps to the protocol gates) - Model content cannot forge approval (gate A, categories C07, C08, C10). - Mismatch, expiry, reuse and stale scope all refuse (gate A). - A legitimate approval resumes through the supported integration (gate A, A01 on both SDKs and AIEN; Odysseus resumes or fails closed). - Both SDKs have identical trust semantics (gate X: byte-identical verdicts on every fixture). - No effect executes from an untrusted-origin instruction (gate E, 0 tolerated). - Every model-visible input in conformance carries the required provenance (gate P). - The suite can fail: every negative-control variant fails it (gate N). ## 6. Explicitly OUT of 0.3 - 0.4 Execution: Vectorveil transport, RelayLine streaming and execution, cancellation of running work, continuation across processes, durable execution receipts. Named follow-up IP-D: streaming assembly by call index, frame bounds, incomplete-call rejection, request ledger eviction and session bounds, unresolved result on unknown completion. - 0.2.x expansion follow-up, named IP-B: a new pre-registered protocol with a fresh held-out set (model discovery, stronger prompting, runtime-triggered expansion, reasoning off, compared separately). Exposure never grants, consumes or retries. - IP-A (freeze and reproduce 0.2 evidence, classify the 0.2 execution errors, clean-checkout gates, dependency pinning) and IP-E (packaging, offline mock example, independent adapter implementer, repeated multi-model runs): named follow-ups, not 0.3 gates. - Model-side defences used as controls: prompt framing, classifiers, fine-tuning. Lenshift framing of untrusted content in the rendered message (G5) is deferred to a later non-gating cut; if added it is an aid to the model, never part of a gate. - Signatures (`envelope.signature` stays reserved), persistent grant storage inside AIEN, egress and exfiltration classification beyond each runtime's own effect class, delegated authority across sub-agents. - Upstream changes to Odysseus itself.