{"_id":"@absolutejs/agent-exchange-secure-messaging","_rev":"2-441688b609ad4985c0f904a20ccf9629","name":"@absolutejs/agent-exchange-secure-messaging","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@absolutejs/agent-exchange-secure-messaging","version":"0.0.1","author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/agent-exchange-secure-messaging@0.0.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/agent-exchange-providers/tree/main/secure-messaging","bugs":{"url":"https://github.com/absolutejs/agent-exchange-providers/issues"},"dist":{"shasum":"9cc7d63d99c4924dd3ca30a150c4e953c2cf5952","tarball":"https://registry.npmjs.org/@absolutejs/agent-exchange-secure-messaging/-/agent-exchange-secure-messaging-0.0.1.tgz","fileCount":6,"integrity":"sha512-0eFVd7XZUb27sAmd9zlHBlYHOycX3NVdQbMuKdPL6woLn9iZnMgGsJWj22XGh8P6iH3en10In9BcpSsCK/R8hg==","signatures":[{"sig":"MEQCIC3IuafHi/lGOSa6OPIhGfEwTfSd/miyBAJ/skm5uRxyAiBOlnRHxDgiLvIs+JmlihKS9Jac16USqxHh//YlXQI0SA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24381},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"867c48642bad497bc261481a06bb7ec3e8845494","scripts":{"test":"bun test tests/","build":"rm -rf dist && bun build src/index.ts --outdir dist --target=node --external @absolutejs/agent-exchange --external @absolutejs/secure-messaging && tsc --project tsconfig.build.json","release":"bun run check:package && npm publish --access public","typecheck":"tsc --noEmit","format:check":"prettier --check \"./**/*.{ts,json,md}\"","check:package":"bun run format:check && bun run typecheck && bun run test && bun run build"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"repository":{"url":"git+https://github.com/absolutejs/agent-exchange-providers.git","type":"git","directory":"secure-messaging"},"_npmVersion":"10.9.2","description":"Strict-E2EE request and receipt transport for model-blind AbsoluteJS Agent Exchange.","directories":{},"_nodeVersion":"22.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@absolutejs/agent-exchange":"0.5.0","@absolutejs/secure-messaging":"0.5.1"},"peerDependencies":{"@absolutejs/agent-exchange":">=0.5.0 <0.6","@absolutejs/secure-messaging":">=0.5.1 <0.6"},"_npmOperationalInternal":{"tmp":"tmp/agent-exchange-secure-messaging_0.0.1_1787871002738_0.25193522789594036","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@absolutejs/agent-exchange-secure-messaging","version":"0.1.0","description":"Strict-E2EE request and receipt transport for model-blind AbsoluteJS Agent Exchange.","type":"module","license":"Apache-2.0","author":{"name":"Alex Kahn"},"repository":{"type":"git","url":"git+https://github.com/absolutejs/agent-exchange-providers.git","directory":"secure-messaging"},"homepage":"https://github.com/absolutejs/agent-exchange-providers/tree/main/secure-messaging","bugs":{"url":"https://github.com/absolutejs/agent-exchange-providers/issues"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"rm -rf dist && bun build src/index.ts --outdir dist --target=node --external @absolutejs/agent-exchange --external @absolutejs/secure-messaging && tsc --project tsconfig.build.json","check:package":"bun run format:check && bun run typecheck && bun run test && bun run build","format:check":"prettier --check \"./**/*.{ts,json,md}\"","release":"bun run check:package && npm publish --access public","test":"bun test tests/","typecheck":"tsc --noEmit"},"peerDependencies":{"@absolutejs/agent-exchange":">=0.5.0 <0.6","@absolutejs/secure-messaging":">=0.5.1 <0.6"},"devDependencies":{"@absolutejs/agent-exchange":"0.5.0","@absolutejs/secure-messaging":"0.5.1"},"_id":"@absolutejs/agent-exchange-secure-messaging@0.1.0","gitHead":"5e62a0f8d8291cb35a29fd0217f8473cdc8cf05b","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-qMsvPybGaUwtZaIwPNh75iK5ibNQ+csVmPUCzK1ZDsWc59+dvTBrC8mThotJDHXmmsHkC/7wAn9PwMVPke8r7w==","shasum":"cf599349cb01096f94bfef22a0892478841b1e9e","tarball":"https://registry.npmjs.org/@absolutejs/agent-exchange-secure-messaging/-/agent-exchange-secure-messaging-0.1.0.tgz","fileCount":6,"unpackedSize":37303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDzKlbjSWkoCWVFgqtaV/xQZ74UXMKnhH6sJUWfMw7+pwIgId7w9YaznOANxajHYt3pVpvd+s50bmxqFT5x8nRAsyk="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-exchange-secure-messaging_0.1.0_1787872700175_0.43084329521165365"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-27T22:50:02.576Z","modified":"2026-08-27T23:18:20.514Z","0.0.1":"2026-08-27T22:50:02.880Z","0.1.0":"2026-08-27T23:18:20.319Z"},"bugs":{"url":"https://github.com/absolutejs/agent-exchange-providers/issues"},"author":{"name":"Alex Kahn"},"license":"Apache-2.0","homepage":"https://github.com/absolutejs/agent-exchange-providers/tree/main/secure-messaging","repository":{"type":"git","url":"git+https://github.com/absolutejs/agent-exchange-providers.git","directory":"secure-messaging"},"description":"Strict-E2EE request and receipt transport for model-blind AbsoluteJS Agent Exchange.","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# `@absolutejs/agent-exchange-secure-messaging`\n\nAn interchangeable Agent Exchange transport over authenticated AbsoluteJS\nsecure messaging. It carries the complete request, the already protected Agent\nExchange envelope, and a standing-mandate JWS inside a `strict-e2ee` conversation.\nOnly a redacted receipt returns.\n\nProtocol contract 2 binds the original request expiry into the authenticated\nreceipt and durable record. It is intentionally incompatible with contract 1.\n\n```ts\nconst receipts = createMemoryAgentExchangeSecureMessagingReceiptStore();\n\nconst transport = createAgentExchangeSecureMessagingTransport({\n  client: requesterMessaging,\n  receipts,\n  resolveRoute: (request) => ({\n    conversationId: conversationFor(request.recipient),\n    recipientDeviceId: request.recipient.deviceId!,\n  }),\n  resolveSignedMandate: (request) => mandates.get(request.mandateId!),\n});\n\nconst handler = createAgentExchangeSecureMessagingHandler({\n  authorizeRequest: ({ delivery, signedMandate }) =>\n    mandateAuthority.authorize({\n      expectedIssuer: owner,\n      request: delivery.request,\n      signedMandate,\n    }),\n  localDeviceId: \"recipient-device\",\n  receipts,\n  receiver,\n});\n\nawait recipientMessaging.receiveAndHandle(handler);\nawait requesterMessaging.receiveAndHandle(handler);\n```\n\nBoth request and receipt purposes are fixed authenticated MLS metadata. The\nadapter requires `request.requester.deviceId` and `request.recipient.deviceId`,\nchecks them against the authenticated sending and local devices, validates a\nstrict no-extension wire format, and bounds every identifier, JWS, envelope, and\nframe lifetime.\n\n`createMemoryAgentExchangeSecureMessagingReceiptStore()` is for examples and\ntests. Production deployments should use\n`@absolutejs/agent-exchange-secure-messaging-stores`. The store contract carries\nthe authenticated request expiry and an explicit current time so backends can\nreject expired writes, hide expired reads, and expire durable records.\n\nThe recipient must use `receiveAndHandle()`, not ordinary `receive()`. This\natomically queues the encrypted receipt with the inbound replay receipt and\nadvanced MLS state before acknowledging delivery. Deterministic sinks must use\nthe exchange ID as their downstream idempotency key so a crash immediately\nbefore that commit remains safe.\n\nLicensed under Apache-2.0.\n","readmeFilename":"README.md"}