{"_id":"@0xhoneyjar/quests-discord-renderer","_rev":"5-6561361496c01d98a39e48b2b71d0954","name":"@0xhoneyjar/quests-discord-renderer","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@0xhoneyjar/quests-discord-renderer","version":"0.1.0","keywords":["freeside","quests","discord","interaction-response"],"license":"MIT","_id":"@0xhoneyjar/quests-discord-renderer@0.1.0","maintainers":[{"name":"janitooor","email":"jani@0xhoneyjar.xyz"},{"name":"zerkereth","email":"zerkereth@gmail.com"},{"name":"zksoju","email":"underrated@gmail.com"}],"homepage":"https://github.com/0xHoneyJar/freeside-quests/tree/master/packages/discord-renderer#readme","bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"dist":{"shasum":"83df1e57db5730a73827b89f33f1009a0cebf475","tarball":"https://registry.npmjs.org/@0xhoneyjar/quests-discord-renderer/-/quests-discord-renderer-0.1.0.tgz","fileCount":62,"integrity":"sha512-kkO4THsmOhyds5JVNUQZqgg2vCt4E9bXfkEO8CbjBSPbvq8H1+TPhEhU3OxxHmKrXE+f+j/WZtSq9c/wPK/cVQ==","signatures":[{"sig":"MEUCIQCB0QyHlp8YJg1tLlRfQoyJxnEUzBfi079DGq5pcALMNQIgMw4y/UUmKCvCIa/AggKtQpHtuQkHFGcXBN0aPkyDw1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154846},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3bb5274f0c104e88ac10184238496204bcf34a9f","private":false,"scripts":{"test":"vitest run","build":"tsc -b","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"zksoju","email":"underrated@gmail.com"},"deprecated":"broken: workspace:* dep specifier published verbatim. Use 0.1.1+.","repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/discord-renderer"},"_npmVersion":"10.9.0","description":"Discord-component descriptor emitter for quest interactions. Emits APIInteractionResponse descriptors — does NOT dispatch (the bot owns dispatch). Cross-bot installable per [[freeside-modules-as-installables]]. Per Cycle Q SDD §5 + PRD D1.","directories":{},"_nodeVersion":"23.3.0","dependencies":{"@0xhoneyjar/quests-engine":"workspace:*","@0xhoneyjar/quests-protocol":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"^3.10.0","vitest":"^2.1.0","typescript":"^5.7.0","discord-api-types":"^0.37.100"},"peerDependencies":{"effect":"^3.10.0","discord-api-types":"^0.37.0"},"_npmOperationalInternal":{"tmp":"tmp/quests-discord-renderer_0.1.0_1777921723297_0.48222811056545845","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0xhoneyjar/quests-discord-renderer","version":"0.1.1","keywords":["freeside","quests","discord","interaction-response"],"license":"MIT","_id":"@0xhoneyjar/quests-discord-renderer@0.1.1","maintainers":[{"name":"janitooor","email":"jani@0xhoneyjar.xyz"},{"name":"zerkereth","email":"zerkereth@gmail.com"},{"name":"zksoju","email":"underrated@gmail.com"}],"homepage":"https://github.com/0xHoneyJar/freeside-quests/tree/master/packages/discord-renderer#readme","bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"dist":{"shasum":"2c488ac1b62159f5ce403cfa03160d8710269ad0","tarball":"https://registry.npmjs.org/@0xhoneyjar/quests-discord-renderer/-/quests-discord-renderer-0.1.1.tgz","fileCount":14,"integrity":"sha512-Iz/TFK4qrAQoHEe5YQ4FQYiuXMyGZwMIFT3xPENGJ0xxHOLk8SZ+SoDXhIQY4Y0OTyulfU4UQKOCvXfnh2IXJQ==","signatures":[{"sig":"MEYCIQD/oAAreZt0rTp4NfjEb1LOI1RO0xNaf4xCnJLwd6xxwgIhAPtGWjkL6ZtxMTkQRlrhl1swQpCBTk3523owNkoOEUsZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55748},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3bb5274f0c104e88ac10184238496204bcf34a9f","private":false,"scripts":{"test":"vitest run","build":"tsc -b","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"zksoju","email":"underrated@gmail.com"},"repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/discord-renderer"},"_npmVersion":"10.9.0","description":"Discord-component descriptor emitter for quest interactions. Emits APIInteractionResponse descriptors — does NOT dispatch (the bot owns dispatch). Cross-bot installable per [[freeside-modules-as-installables]]. Per Cycle Q SDD §5 + PRD D1.","directories":{},"_nodeVersion":"23.3.0","dependencies":{"@0xhoneyjar/quests-engine":"^0.1.1","@0xhoneyjar/quests-protocol":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"^3.10.0","vitest":"^2.1.0","typescript":"^5.7.0","discord-api-types":"^0.37.100"},"peerDependencies":{"effect":"^3.10.0","discord-api-types":"^0.37.0"},"_npmOperationalInternal":{"tmp":"tmp/quests-discord-renderer_0.1.1_1777922082213_0.5107015529281402","host":"s3://npm-registry-packages-npm-production"},"deprecated":"broken: dist/ missing from tarball. Use 0.1.2+."},"0.1.2":{"name":"@0xhoneyjar/quests-discord-renderer","version":"0.1.2","keywords":["freeside","quests","discord","interaction-response"],"license":"MIT","_id":"@0xhoneyjar/quests-discord-renderer@0.1.2","maintainers":[{"name":"janitooor","email":"jani@0xhoneyjar.xyz"},{"name":"zerkereth","email":"zerkereth@gmail.com"},{"name":"zksoju","email":"underrated@gmail.com"}],"homepage":"https://github.com/0xHoneyJar/freeside-quests/tree/master/packages/discord-renderer#readme","bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"dist":{"shasum":"ea409ac6cbcb2937b5c811cadcd7138bd3af392a","tarball":"https://registry.npmjs.org/@0xhoneyjar/quests-discord-renderer/-/quests-discord-renderer-0.1.2.tgz","fileCount":62,"integrity":"sha512-1X8XALTMs825xEzdE5e6fpj0vjILzn/r4w1PA8OcGk8ihCKFszXa0DikmZ2N+bE5SicX0ie5J20MxBeNmVN9yA==","signatures":[{"sig":"MEUCIFon7FMDUDfm3T4BOTDXu/RxTc51VT1+fjsWdM46AFKDAiEAiB/YUwuWlq0RR3kgHVjCe2uzIUyyBhss6oFMMhxljXI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":154836},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"39d7809c0cbb7a60ec96cbd8c5aa091f6e1adf38","private":false,"scripts":{"test":"vitest run","build":"tsc -b","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"zksoju","email":"underrated@gmail.com"},"repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/discord-renderer"},"_npmVersion":"10.9.0","description":"Discord-component descriptor emitter for quest interactions. Emits APIInteractionResponse descriptors — does NOT dispatch (the bot owns dispatch). Cross-bot installable per [[freeside-modules-as-installables]]. Per Cycle Q SDD §5 + PRD D1.","directories":{},"_nodeVersion":"23.3.0","dependencies":{"@0xhoneyjar/quests-engine":"^0.1.2","@0xhoneyjar/quests-protocol":"^0.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"^3.10.0","vitest":"^2.1.0","typescript":"^5.7.0","discord-api-types":"^0.37.100"},"peerDependencies":{"effect":"^3.10.0","discord-api-types":"^0.37.0"},"_npmOperationalInternal":{"tmp":"tmp/quests-discord-renderer_0.1.2_1777922227409_0.09822725729681192","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-05-04T19:08:43.239Z","modified":"2026-05-04T19:17:19.556Z","0.1.0":"2026-05-04T19:08:43.448Z","0.1.1":"2026-05-04T19:14:42.374Z","0.1.2":"2026-05-04T19:17:07.552Z"},"bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"license":"MIT","homepage":"https://github.com/0xHoneyJar/freeside-quests/tree/master/packages/discord-renderer#readme","keywords":["freeside","quests","discord","interaction-response"],"repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/discord-renderer"},"description":"Discord-component descriptor emitter for quest interactions. Emits APIInteractionResponse descriptors — does NOT dispatch (the bot owns dispatch). Cross-bot installable per [[freeside-modules-as-installables]]. Per Cycle Q SDD §5 + PRD D1.","maintainers":[{"name":"janitooor","email":"jani@0xhoneyjar.xyz"},{"name":"zerkereth","email":"zerkereth@gmail.com"},{"name":"zksoju","email":"underrated@gmail.com"}],"readme":"# `@0xhoneyjar/quests-discord-renderer` — Discord interaction descriptor emitter\n\nDiscord-component descriptor emitter for quest interactions. Cross-bot installable per `[[freeside-modules-as-installables]]`.\n\n> **Cycle Q P1 SCAFFOLD (2026-05-04)** — skeleton ships 5 dispatch function signatures returning placeholder descriptors. Implementation lands in Sprint 3 (P3 BOT WIRING).\n\n## Architectural Lock A1: descriptor emitter, NOT dispatcher\n\nThis package emits `APIInteractionResponse` descriptors. It does NOT call the Discord API. It does NOT depend on `discord.js`.\n\n| Layer | Owns | Lives in |\n|---|---|---|\n| **Descriptor emit** | Build `APIInteractionResponse` shapes | THIS package |\n| **Discord dispatch** | Send descriptors to Discord HTTP/Gateway | The consumer bot (`freeside-characters/apps/bot`) |\n\n**Why the split**: Cross-bot installability. Any bot (Discord-attached, future Slack, future Matrix) can compose this package by adopting the descriptor shape. Locking us to `discord.js` would lose that.\n\n**Allowed dependency**: `discord-api-types` (types ONLY, no runtime).\n**Forbidden dependency**: `discord.js` (or any runtime Discord client). The component-isolation guard test enforces this.\n\n## Public surface\n\n### Sprint 1 (current · scaffold)\n\n`dispatchQuestInteraction` ships a no-requirement Effect that routes by `InteractionType` and returns a placeholder ephemeral descriptor. No layer-providing is needed yet — the dispatch has `never` requirements.\n\n```typescript\nimport { Effect } from \"effect\";\nimport { dispatchQuestInteraction } from \"@0xhoneyjar/quests-discord-renderer\";\n\n// Sprint 1: signature is Effect.Effect<APIInteractionResponse, never, never>\nconst response = await Effect.runPromise(\n  dispatchQuestInteraction({\n    interaction,\n    config: engineConfigForCurrentWorld(), // EngineConfigStub for Sprint 1\n  }),\n);\n```\n\n### Sprint 3 (forward-pointing · post-QuestStatePort)\n\nOnce Sprint 2 lands `QuestStatePort` and Sprint 3 wires it in, the dispatch signature widens to require the port — at which point the consumer provides a layer:\n\n```typescript\nimport { Effect, Layer } from \"effect\";\nimport { dispatchQuestInteraction } from \"@0xhoneyjar/quests-discord-renderer\";\nimport {\n  QuestStatePortPostgresLayer,\n  AuthCheckPortAnonLayer,\n  BadgeIssuancePortNullLayer,\n} from \"@0xhoneyjar/quests-engine\"; // Sprint 2+\n\n// Sprint 3: signature becomes Effect.Effect<APIInteractionResponse, never, QuestStatePort>\nconst response = await dispatchQuestInteraction({\n  interaction,\n  config: engineConfigForCurrentWorld(),\n}).pipe(\n  Effect.provide(\n    Layer.mergeAll(\n      QuestStatePortPostgresLayer({ pool_config: pgConfig, world_slug }),\n      AuthCheckPortAnonLayer,\n      BadgeIssuancePortNullLayer,\n    ),\n  ),\n  Effect.runPromise,\n);\n```\n\nSprint 1 ships placeholder descriptors that route correctly but return a stub response. Sprint 3 lands the full CMP-boundary transforms + dispatch routing.\n\n## CMP-boundary discipline\n\nPer `[[chat-medium-presentation-boundary]]` §2 drift signature:\n\n- ❌ NEVER let raw `quest_uuid`, `npc_id`, `wallet`, `trace_id`, or `submission_id` escape into Discord output\n- ✅ ALWAYS apply `cmp-boundary/transforms.ts` before serialization\n- ✅ Test guarded by `__tests__/cmp-boundary.test.ts` regression suite (Sprint 3)\n\nThe 7 transforms are documented in SDD §5.3.\n\n## Mention + thread surface (D7-default)\n\nPer `[[explicit-invocation-anti-spam]]`:\n- `@<character> <message>` triggers `thread-spawner`\n- All quest interactions scoped to that thread\n- Character NEVER posts unsolicited\n\n## Doctrine references\n\n- `[[chat-medium-presentation-boundary]]` — CMP transforms applied at serialization boundary\n- `[[freeside-modules-as-installables]]` — sealed schemas + typed ports + cross-bot installable\n- `[[explicit-invocation-anti-spam]]` — mention+thread default\n- Cycle Q SDD §5 — full descriptor emitter spec\n- Cycle Q PRD D1 — discord-renderer location (NEW sub-package vs. inline-in-bot)\n","readmeFilename":"README.md"}