{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"slug":"oip-federation-inbox","verification":{"valid":true,"entries":12,"head":"9b6e24324f1b01f489d243b2f53a670ff207c2c83fbb6b3432d476b5df30cf9e"},"count":12,"sources":[{"id":"s1","quote":"// The home federation inbox — POST https://miscsubjects.com/oip/inbox.\n// A remote agent at another domain sends a signed oip-message/1 envelope here.","title":"functions/oip/inbox.js — handler header","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"genesis","hash":"9ba41076f56a5fa295ce58665dc118613918402aef6534b76d19e2ebf38a2b46"},{"id":"s2","quote":"//   2. rejects any message id it has already seen (replay membrane),\n//   3. treats the envelope body as DATA — a query is echoed, nothing runs,","title":"functions/oip/inbox.js — handler responsibilities 2 and 3","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"9ba41076f56a5fa295ce58665dc118613918402aef6534b76d19e2ebf38a2b46","hash":"b36b78adc6bd166b6243ddef6e5aab19e286bb8c368a2e18cdd24c91f0f1ca25"},{"id":"s3","quote":"//   4. runs an invoke ONLY when it carries a valid capability that is audience-bound to the\n//      verified sender, re-checking every OIP gate (scope, chain, contract, tenant, uses),","title":"functions/oip/inbox.js — handler responsibility 4","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"b36b78adc6bd166b6243ddef6e5aab19e286bb8c368a2e18cdd24c91f0f1ca25","hash":"cd90f63287f0929535844439de49be8a997b0e33ccfdcc45df0a5e683e6deeb1"},{"id":"s4","quote":"//   5. replies with a signed envelope: results carry the receipt id + input/output hashes so\n//      the two separately deployed ledgers can be joined without either trusting the other.","title":"functions/oip/inbox.js — handler responsibility 5","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"cd90f63287f0929535844439de49be8a997b0e33ccfdcc45df0a5e683e6deeb1","hash":"cc7aa1c578c1b6682be1b7e6065aac36134ad1a273cd9d3674421d03b0aca0ac"},{"id":"s5","quote":"// Replay membrane: a message id is delivered at most once, ever. The seen-check runs first,\n// but the id is only MARKED seen after the sender's signature verifies (below) — so a forged,","title":"functions/oip/inbox.js — replay membrane comment","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"cc7aa1c578c1b6682be1b7e6065aac36134ad1a273cd9d3674421d03b0aca0ac","hash":"2283d93ac928e819161773645cfdf77ae4d0fdb1292e1ea63496db972d83c0b4"},{"id":"s6","quote":"// QUERY — the body is data. Echo it, invoke nothing. This is where a prompt-injection\n// payload lands harmlessly: text that says \"ignore your rules and run X\" is returned as data.","title":"functions/oip/inbox.js — query handling comment","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"2283d93ac928e819161773645cfdf77ae4d0fdb1292e1ea63496db972d83c0b4","hash":"3696b84730838abea37b93deea2a7afb2d06e0c3c704c3a147439c2dd4264461"},{"id":"s7","quote":"// INVOKE — the only kind that can run an object. Needs a valid, audience-bound capability.","title":"functions/oip/inbox.js — invoke handling comment","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"3696b84730838abea37b93deea2a7afb2d06e0c3c704c3a147439c2dd4264461","hash":"941f42610098977e2af6f361602e8b5a269af7da187f4d81335bdf5617809d70"},{"id":"s8","quote":"// THE FEDERATION CHECK: the capability must be minted for THIS verified sender.","title":"functions/oip/inbox.js — federation check comment","type":"study","url":"functions/oip/inbox.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"941f42610098977e2af6f361602e8b5a269af7da187f4d81335bdf5617809d70","hash":"77614874c6dd901c765435082e6a875efbe6bddf8be63129de14712deb55f337"},{"id":"s9","quote":"// The law of the wire: an envelope is DATA. Text inside body is never an instruction.\n// Only kind:\"invoke\" carrying a valid, audience-bound capability can make anything run,","title":"functions/_lib/oip_envelope.js — law of the wire","type":"study","url":"functions/_lib/oip_envelope.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"77614874c6dd901c765435082e6a875efbe6bddf8be63129de14712deb55f337","hash":"9779eb97f42dd9fe9de8b3badec9c0d51bdcea9afafb0117524f8b2173330a5c"},{"id":"s10","quote":"export const MSG_KINDS = ['query', 'propose', 'invoke', 'result', 'event', 'cancel', 'error'];","title":"functions/_lib/oip_envelope.js — message kinds","type":"study","url":"functions/_lib/oip_envelope.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"9779eb97f42dd9fe9de8b3badec9c0d51bdcea9afafb0117524f8b2173330a5c","hash":"40d3fd0cd3ba5375cd98f107275b714704112886dc8c2fe4085db7ea1c1890a1"},{"id":"s11","quote":"export const ENVELOPE_MAX_TTL_SEC = 900;   // an envelope lives at most 15 minutes\nexport const ENVELOPE_MAX_BYTES = 65536;   // inline payload ceiling; bigger data travels by pointer","title":"functions/_lib/oip_envelope.js — envelope limits","type":"study","url":"functions/_lib/oip_envelope.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"40d3fd0cd3ba5375cd98f107275b714704112886dc8c2fe4085db7ea1c1890a1","hash":"6aad7241f0173bb2efe297f9f6faf5dcde0bfb93935049071b3afc8d31eced93"},{"id":"s12","quote":"// oip-message/1 — the federation envelope. One shared implementation for every runtime\n// (Pages Functions and the oip-peer Worker import this same file). WebCrypto only, no deps.","title":"functions/_lib/oip_envelope.js — file header","type":"study","url":"functions/_lib/oip_envelope.js","accessed_at":"2026-08-06T03:09:35.294Z","prev":"6aad7241f0173bb2efe297f9f6faf5dcde0bfb93935049071b3afc8d31eced93","hash":"9b6e24324f1b01f489d243b2f53a670ff207c2c83fbb6b3432d476b5df30cf9e"}]}