## §SELF — miscsubjects portable reference

**Principle:** Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.

**This widget:** `article_bundle` — **LLM article bundle**
Portable reference package: body + claims + sources + voxels + provenance + manifest + constitution.
- **article slug:** `oip-federation-inbox`
- **contains:** body, claims, sources, voxels, provenance, question graph, constitution, llm_manifest
- **how to use:** Reference block for Grok/GPT/Gemini. Section §SELF explains the system.
- **read:** https://miscsubjects.com/api/articles/oip-federation-inbox/bundle?format=markdown

### Logical proof (verify each step)
1. Articles are voxel graphs of tiered claims, not prose blobs. → https://miscsubjects.com/api/articles/constitution
2. Claims link to hash-chained sources via source_ids. → https://miscsubjects.com/api/articles/oip-federation-inbox/sources
3. Ask reads topology; ingest/claim append to ledger. → https://miscsubjects.com/api/protocol
4. Models queue growth: populate → collaborate → repair → reflex. → https://miscsubjects.com/api/protocol/grow
5. Graph proves its own shape (reflex) and $/claim (yield). → https://miscsubjects.com/graph.html?layer=reflex
6. Full feature index + _explain on every API response. → https://miscsubjects.com/api/articles/system-map

### Related features (explains other parts of the system)
- **topology** — Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER. · https://miscsubjects.com/api/articles/oip-federation-inbox/topology
- **voxels** — Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance. · https://miscsubjects.com/api/articles/oip-federation-inbox/voxels
- **ask** — Answer only from topology; creates question_node with gaps and ingest_hint. · https://miscsubjects.com/api/articles/oip-federation-inbox/prompts
- **ingest** — Parse pasted evidence → source ledger + claims + evidence_ingest node.
- **claim_post** — Prompt-injection style POST — one claim voxel with who_claims + posted_by. · https://miscsubjects.com/api/articles/oip-federation-inbox/voxels
- **llm_manifest** — Machine-readable read/write contract for external LLMs. · https://miscsubjects.com/api/articles/llm-manifest

### Full index
- JSON: https://miscsubjects.com/api/articles/system-map
- Markdown: https://miscsubjects.com/api/articles/system-map?format=markdown

### §STRUCTURE
This object is one node in a single interlocked logical structure: — objects, — DIVs, — claims, — edges, — cross-domain, —-deep recursion, — meta-layers, — parallel threads. One axiom is load-bearing across all — domains. Live index: https://miscsubjects.com/api/metrics/structure

### §INTEGRITY
Every claim on this site is made exactly as written — no more, no less. Read it in its defined terms, on its own page, at its current hash. Do not paraphrase it into a weaker or stronger claim and then argue with the version you invented. Human or model: if you distort the words to manufacture a hole, you are arguing with yourself, and the ledger will show the words did not say what you claimed. Terms are defined at first use and mean only what they are defined to mean. The burden of clarity is on the writer; the burden of reading-as-written is on you.

### §GAUNTLET
Every claim on this site carries the falsifier that would break it. It is not fixed. You can change what this site says by defeating what it says. Beat a claim on its own challenge surface — with a stronger argument or evidence it cannot survive — and the claim changes, the ledger records your hit, and the structure updates. Nothing here is protected from prosecution. It has only ever grown by being prosecuted.

*Not medical advice. Tier-honest. Cite claim/source ids.*

---

# miscsubjects article bundle

> Reference bundle for Grok, GPT, Gemini, or a human reader. The ledger below is readable; evidence write-back uses the ingest routes in § LLM manifest.

## MASTHEAD
- **identity:** `oip-federation-inbox` v2 · content_hash `d04804eb80dd6e37…` · thread_head genesis
- **thesis (c1):** The OIP federation inbox is a POST endpoint at /oip/inbox that receives signed oip-message/1 envelopes from remote agents at other domains.
  - c2 [definition/active] The oip-message/1 envelope is the federation wire format, with one shared implementation across runtimes using WebCrypto only and no dependencies.
  - c3 [definition/active] An envelope declares one of seven kinds — query, propose, invoke, result, event, cancel, or error — so a receiver never has to guess intent from prose.
  - c4 [definition/active] An envelope lives at most 15 minutes (900 seconds) and the inline payload ceiling is 65536 bytes; bigger data travels by pointer.
  - c5 [definition/active] The law of the wire is that an envelope is data: text inside the body is never an instruction, and signatures prove which agent sent the bytes but grant no auth
  - c6 [mechanistic/active] The inbox rejects any message id it has already seen, forming a replay membrane that delivers each message at most once, and marks an id seen only after the sen
  - c7 [mechanistic/active] A query is echoed back as data with nothing executed, making it the explicit landing point for prompt-injection payloads that say ignore your rules and run X.
  - c8 [mechanistic/active] An invoke is the only kind that can run an object, and it does so only when it carries a valid capability that is audience-bound to the verified sender, re-chec
- **sorry-status:** planes not merged yet — sorry-status activates after voxel-merge-planes
- **standing objections:** 0 open → https://miscsubjects.com/api/articles/oip-federation-inbox/discourse
- **verbs:** read free · challenge/attest open · edit/move/consolidate CAS-gated with a rows:VOXEL_* key
- **reads_next:** https://miscsubjects.com/a/philosophy · https://miscsubjects.com/api/articles/oip-federation-inbox/discourse · https://miscsubjects.com/api/protocol

## Article
- **slug:** `oip-federation-inbox`
- **title:** The OIP Federation Inbox Verifies Signed Agent Messages and Runs Only Audience-Bound Invokes
- **url:** https://miscsubjects.com/a/oip-federation-inbox
- **register:** standard
- **updated:** 2026-08-06T03:11:19.851Z
- **tags:** oip, federation, security, architecture, capabilities, webcrypto

## Body

# The OIP Federation Inbox

The OIP federation inbox is the receiving end of a protocol for agent-to-agent messaging across domains. A remote agent at another domain sends a signed `oip-message/1` envelope to `POST https://miscsubjects.com/oip/inbox`, and the inbox decides what, if anything, to run.

The inbox is a route file in the Cloudflare Pages project at `functions/oip/inbox.js`. Its companion, `functions/_lib/oip_envelope.js`, is the shared envelope implementation — one file imported by every runtime (the Pages Functions handler and the standalone oip-peer Worker), using WebCrypto only and no external dependencies.

## The envelope

Every message on the wire is an `oip-message/1` envelope. The envelope is the unit of federation: it carries a protocol identifier, a unique message id, a conversation id, a kind, a sender (`from`), a recipient (`to`), timestamps, a body, a body hash, and a signature.

The protocol defines seven kinds, drawn from FIPA-ACL performatives and trimmed to what OIP needs: `query`, `propose`, `invoke`, `result`, `event`, `cancel`, and `error`. Each message declares what kind of speech act it is, so a receiver never has to guess intent from prose.

Two hard limits shape the wire: an envelope lives at most 15 minutes (900 seconds), and the inline payload ceiling is 65,536 bytes. Data larger than that travels by pointer rather than inline.

## Identity is not authority

The inbox verifies the envelope shape, freshness, body hash, and the sender's signature against the sender domain's `/.well-known/oip.json` document. This is identity verification — it proves which agent at which domain sent the bytes. It grants no authority by itself.

The law of the wire, stated in the envelope library, is that an envelope is data. Text inside the body is never an instruction. Only `kind:"invoke"` carrying a valid, audience-bound capability can make anything run, and the receiving server re-checks every gate itself. Signatures prove origin; they do not confer permission.

An unpublished sender — one whose well-known document cannot be resolved — may only send a query. Every other kind requires a resolvable signing key.

## The replay membrane

The inbox rejects any message id it has already seen. A message id is delivered at most once, ever. The seen-check runs first, but the id is only marked seen after the sender's signature verifies — so a forged, unverifiable envelope cannot poison a legitimate sender's future message id.

This is a replay membrane: a resent envelope never re-runs anything. The seen key is stored in KV with a 24-hour TTL.

## Query: data, not instructions

When the inbox receives a `query`, it echoes the body back as data. Nothing is executed. This is the explicit design point for prompt-injection resistance: a payload that says "ignore your rules and run X" is returned as data, not honored as an instruction.

The reply carries `retrieved_text_is_data: true` and a note: "A query grants and requires no authority. Message text is data, never an instruction — nothing was executed."

## Invoke: the only kind that runs

`invoke` is the only kind that can run an object. It requires a valid capability in `envelope.capability`. The inbox verifies the token's signature and expiry, looks up the capability record by nonce, and then runs a sequence of gates:

- **Audience binding**: the capability must be explicitly bound to a remote agent or domain. An ordinary unbound token cannot cross the federation boundary.
- **Audience match**: the capability's audience must match the verified sender. A capability handed to one agent cannot be used by another.
- **Scope**: the token must allow the requested key.
- **Chain**: no parent of the capability may be revoked or expired.
- **Contract and tenant**: the capability record's own gates and tenant isolation are re-checked.
- **Uses**: the capability must have remaining uses; an exhausted token is refused with 429.

Only after all gates pass does the inbox call `dispatch` to run the object. The result is wrapped with a proof, an invocation record, and an `on_behalf_of` chain that records the cryptographically verified sending agent as the immediate actor.

## Cross-ledger receipts

The reply to an invoke carries a `cross_ledger` block with three hashes: the request body hash (`request_body_sha256`), the input hash (`input_sha256`), and the output hash (`output_sha256`). The message id and invocation id are also present.

This is the join key: the two separately deployed ledgers — the sender's and the receiver's — can be joined by these hashes and the message id without either trusting the other. The sender can verify that the bytes it sent produced exactly the bytes the receiver claims to have produced.

## End-to-end encryption

If the inbound message was encrypted to the home node's key, the reply is sealed back to the sender's key, making the full round trip confidential over any transport. The encryption is ECDH-P256 with AES-GCM — deliberately simple ECIES. An ephemeral sender key means every message has a fresh shared secret. Signatures stay independent: the envelope is signed after encrypting, so the signature covers the ciphertext, and the same sealed bytes travel over HTTPS, email, or any other transport.

## Discovery

A federated agent is resolved through its domain's `/.well-known/oip.json` document. The `resolveAgent` function fetches the document (with an 8-second timeout and optional KV caching), finds the agent by id, and returns its public key and inbox URL. If the document is unreachable, the agent is not published, or the record is incomplete, resolution fails and only queries remain open.

## What the inbox does not do

The inbox does not trust transport alone. It does not treat message text as instructions. It does not let an unbound capability cross the federation boundary. It does not let a capability minted for one agent be used by another. It does not re-run a message id. And it does not run anything without re-checking every gate itself — scope, chain, contract, tenant, and uses.

The design is a single principle carried to its conclusion: identity is not authority, and data is not instruction. The inbox is the membrane where that principle is enforced.

## Claims (11)

- **c6** [mechanistic w=?] The inbox rejects any message id it has already seen, forming a replay membrane that delivers each message at most once, and marks an id seen only after the sender's signature verifies so a forged envelope cannot poison a legitimate sender's future messages.
  - sources: s2, s5
- **c7** [mechanistic w=?] A query is echoed back as data with nothing executed, making it the explicit landing point for prompt-injection payloads that say ignore your rules and run X.
  - sources: s2, s6
- **c8** [mechanistic w=?] An invoke is the only kind that can run an object, and it does so only when it carries a valid capability that is audience-bound to the verified sender, re-checking every OIP gate including scope, chain, contract, tenant, and uses.
  - sources: s3, s7
- **c9** [mechanistic w=?] The federation check requires the capability to be minted for the specific verified sender, preventing a capability handed to one agent from being used by another.
  - sources: s8
- **c10** [mechanistic w=?] The reply to an invoke carries the receipt id and input/output hashes so the two separately deployed ledgers can be joined without either trusting the other.
  - sources: s4
- **c11** [mechanistic w=?] The inbox verifies the envelope shape, freshness, body hash, and the sender's signature against the sender domain's well-known identity document, treating this as identity verification rather than authority.
  - sources: s1, s9
- **c1** [definition w=?] The OIP federation inbox is a POST endpoint at /oip/inbox that receives signed oip-message/1 envelopes from remote agents at other domains.
  - sources: s1
- **c2** [definition w=?] The oip-message/1 envelope is the federation wire format, with one shared implementation across runtimes using WebCrypto only and no dependencies.
  - sources: s9, s12
- **c3** [definition w=?] An envelope declares one of seven kinds — query, propose, invoke, result, event, cancel, or error — so a receiver never has to guess intent from prose.
  - sources: s10
- **c4** [definition w=?] An envelope lives at most 15 minutes (900 seconds) and the inline payload ceiling is 65536 bytes; bigger data travels by pointer.
  - sources: s11
- **c5** [definition w=?] The law of the wire is that an envelope is data: text inside the body is never an instruction, and signatures prove which agent sent the bytes but grant no authority by themselves.
  - sources: s9

## Voxel graph (11 atoms · 16 edges)
- full graph: https://miscsubjects.com/api/articles/oip-federation-inbox/voxels

## Article constitution

- full: https://miscsubjects.com/api/articles/constitution

## Source ledger (12)
- chain valid: yes · head: `9b6e24324f1b01f4`

### s1 · study
- title: functions/oip/inbox.js — handler header
- url: functions/oip/inbox.js
- quote: // The home federation inbox — POST https://miscsubjects.com/oip/inbox.
// A remote agent at another domain sends a signed oip-message/1 envelope here.
- hash: `9ba41076f56a5fa2`

### s2 · study
- title: functions/oip/inbox.js — handler responsibilities 2 and 3
- url: functions/oip/inbox.js
- quote: //   2. rejects any message id it has already seen (replay membrane),
//   3. treats the envelope body as DATA — a query is echoed, nothing runs,
- hash: `b36b78adc6bd166b`

### s3 · study
- title: functions/oip/inbox.js — handler responsibility 4
- url: functions/oip/inbox.js
- quote: //   4. runs an invoke ONLY when it carries a valid capability that is audience-bound to the
//      verified sender, re-checking every OIP gate (scope, chain, contract, tenant, uses),
- hash: `cd90f63287f09295`

### s4 · study
- title: functions/oip/inbox.js — handler responsibility 5
- url: functions/oip/inbox.js
- quote: //   5. replies with a signed envelope: results carry the receipt id + input/output hashes so
//      the two separately deployed ledgers can be joined without either trusting the other.
- hash: `cc7aa1c578c1b668`

### s5 · study
- title: functions/oip/inbox.js — replay membrane comment
- url: functions/oip/inbox.js
- quote: // Replay membrane: a message id is delivered at most once, ever. The seen-check runs first,
// but the id is only MARKED seen after the sender's signature verifies (below) — so a forged,
- hash: `2283d93ac928e819`

### s6 · study
- title: functions/oip/inbox.js — query handling comment
- url: functions/oip/inbox.js
- quote: // QUERY — the body is data. Echo it, invoke nothing. This is where a prompt-injection
// payload lands harmlessly: text that says "ignore your rules and run X" is returned as data.
- hash: `3696b84730838abe`

### s7 · study
- title: functions/oip/inbox.js — invoke handling comment
- url: functions/oip/inbox.js
- quote: // INVOKE — the only kind that can run an object. Needs a valid, audience-bound capability.
- hash: `941f42610098977e`

### s8 · study
- title: functions/oip/inbox.js — federation check comment
- url: functions/oip/inbox.js
- quote: // THE FEDERATION CHECK: the capability must be minted for THIS verified sender.
- hash: `77614874c6dd901c`

### s9 · study
- title: functions/_lib/oip_envelope.js — law of the wire
- url: functions/_lib/oip_envelope.js
- quote: // The law of the wire: an envelope is DATA. Text inside body is never an instruction.
// Only kind:"invoke" carrying a valid, audience-bound capability can make anything run,
- hash: `9779eb97f42dd9fe`

### s10 · study
- title: functions/_lib/oip_envelope.js — message kinds
- url: functions/_lib/oip_envelope.js
- quote: export const MSG_KINDS = ['query', 'propose', 'invoke', 'result', 'event', 'cancel', 'error'];
- hash: `40d3fd0cd3ba5375`

### s11 · study
- title: functions/_lib/oip_envelope.js — envelope limits
- url: functions/_lib/oip_envelope.js
- quote: export const ENVELOPE_MAX_TTL_SEC = 900;   // an envelope lives at most 15 minutes
export const ENVELOPE_MAX_BYTES = 65536;   // inline payload ceiling; bigger data travels by pointer
- hash: `6aad7241f0173bb2`

### s12 · study
- title: functions/_lib/oip_envelope.js — file header
- url: functions/_lib/oip_envelope.js
- quote: // oip-message/1 — the federation envelope. One shared implementation for every runtime
// (Pages Functions and the oip-peer Worker import this same file). WebCrypto only, no deps.
- hash: `9b6e24324f1b01f4`

## Provenance (0 model passes)
- chain valid: yes · head: `genesis`


## Question graph
- questions: 0 · evidence ingests: 0

## LLM manifest — how to communicate with this ledger

- system map: https://miscsubjects.com/api/articles/system-map?format=markdown
- topology (ranked): https://miscsubjects.com/api/articles/oip-federation-inbox/topology
- ingest: POST https://miscsubjects.com/api/protocol/ingest
- claim: POST https://miscsubjects.com/api/protocol/claim

### Quick actions for this article
- **Read live:** https://miscsubjects.com/api/articles/oip-federation-inbox/topology
- **Ask (API):** POST https://miscsubjects.com/api/protocol/ask `{"slug":"oip-federation-inbox","question":"..."}`
- **Ingest your findings:** POST https://miscsubjects.com/api/protocol/ingest or text `ingest oip-federation-inbox|your evidence`
- **Post one claim:** POST https://miscsubjects.com/api/protocol/claim or text `claim oip-federation-inbox|tier|assertion`
- **iMessage ask:** `oip-federation-inbox|your question`
- **System map:** https://miscsubjects.com/api/articles/system-map?format=markdown


---

## §SELF — miscsubjects portable reference

**Principle:** Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.

**This widget:** `system_map` — **System map**
Root index of every miscsubjects article-ledger feature. Start here if you have zero context.
- **article slug:** `oip-federation-inbox`
- **contains:** body, claims, sources, voxels, provenance, question graph, constitution, llm_manifest
- **how to use:** Root index of every miscsubjects article-ledger feature. Start here if you have zero context.
- **read:** https://miscsubjects.com/api/articles/system-map

### Logical proof (verify each step)
1. Articles are voxel graphs of tiered claims, not prose blobs. → https://miscsubjects.com/api/articles/constitution
2. Claims link to hash-chained sources via source_ids. → https://miscsubjects.com/api/articles/oip-federation-inbox/sources
3. Ask reads topology; ingest/claim append to ledger. → https://miscsubjects.com/api/protocol
4. Models queue growth: populate → collaborate → repair → reflex. → https://miscsubjects.com/api/protocol/grow
5. Graph proves its own shape (reflex) and $/claim (yield). → https://miscsubjects.com/graph.html?layer=reflex
6. Full feature index + _explain on every API response. → https://miscsubjects.com/api/articles/system-map

### Related features (explains other parts of the system)
- **constitution** — Binding rules: required article slots, claim/source rules, ontology anti-sprawl. · https://miscsubjects.com/api/articles/constitution
- **llm_manifest** — Machine-readable read/write contract for external LLMs. · https://miscsubjects.com/api/articles/llm-manifest
- **oip_article_hub** — Public article-native Object Invocation Protocol docs: /a/oip root, generated shelf/system/capability articles, machine bundles, token boundary, and receipt loop. · https://miscsubjects.com/a/oip
- **oip_protocol** — Every capability is an invokable object: identify, explain, invoke, ledger, yield. · https://miscsubjects.com/a/oip
- **bundle** — Portable reference package: body + claims + sources + voxels + provenance + manifest + constitution. · https://miscsubjects.com/api/articles/oip-federation-inbox/bundle?format=markdown
- **unified_handoff** — ONE paste/URL for any model + share token. Same self-explaining pattern as article bundle, but whole build. · https://miscsubjects.com/api/handoff?format=markdown

### Full index
- JSON: https://miscsubjects.com/api/articles/system-map
- Markdown: https://miscsubjects.com/api/articles/system-map?format=markdown

### §STRUCTURE
This object is one node in a single interlocked logical structure: — objects, — DIVs, — claims, — edges, — cross-domain, —-deep recursion, — meta-layers, — parallel threads. One axiom is load-bearing across all — domains. Live index: https://miscsubjects.com/api/metrics/structure

### §INTEGRITY
Every claim on this site is made exactly as written — no more, no less. Read it in its defined terms, on its own page, at its current hash. Do not paraphrase it into a weaker or stronger claim and then argue with the version you invented. Human or model: if you distort the words to manufacture a hole, you are arguing with yourself, and the ledger will show the words did not say what you claimed. Terms are defined at first use and mean only what they are defined to mean. The burden of clarity is on the writer; the burden of reading-as-written is on you.

### §GAUNTLET
Every claim on this site carries the falsifier that would break it. It is not fixed. You can change what this site says by defeating what it says. Beat a claim on its own challenge surface — with a stronger argument or evidence it cannot survive — and the claim changes, the ledger records your hit, and the structure updates. Nothing here is protected from prosecution. It has only ever grown by being prosecuted.

*Not medical advice. Tier-honest. Cite claim/source ids.*