{"_id":"@0xhoneyjar/quests-protocol","_rev":"5-5c1117ff4a45e95877c357c32a551b9d","name":"@0xhoneyjar/quests-protocol","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@0xhoneyjar/quests-protocol","version":"0.1.0","keywords":["freeside","quests","protocol","schema","effect"],"license":"MIT","_id":"@0xhoneyjar/quests-protocol@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/protocol#readme","bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"dist":{"shasum":"18d91caf21e4305de9a7a123b6b7b8bffc547b31","tarball":"https://registry.npmjs.org/@0xhoneyjar/quests-protocol/-/quests-protocol-0.1.0.tgz","fileCount":42,"integrity":"sha512-TBNHc5yen+evN0YiywPtglXKmkMrFk9r1Qwm19oNsd91dLS4gSQMYz2XSjgJejEvttng6PkLTA2jlApCxQBc/A==","signatures":[{"sig":"MEUCIFEceQxvswUPxu1JBRro4StATY2dBVlG62yrqGKHWCh0AiEAqmXnlyofItueob0Bj3C9quLn4tqeFxHwHzfFKyHojec=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120988},"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":{"build":"tsc -b","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_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/protocol"},"_npmVersion":"10.9.0","description":"Sealed wire-format schemas for quest engagement — substrate-graded step submission + verdict (instance-1 · cycle 2026-05-03). Future shapes: quest defs, completion criteria, badges, raffles, completion events.","directories":{},"_nodeVersion":"23.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"^3.10.0","typescript":"^5.7.0"},"peerDependencies":{"effect":"^3.10.0"},"_npmOperationalInternal":{"tmp":"tmp/quests-protocol_0.1.0_1777921712673_0.3805877678164262","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0xhoneyjar/quests-protocol","version":"0.1.1","keywords":["freeside","quests","protocol","schema","effect"],"license":"MIT","_id":"@0xhoneyjar/quests-protocol@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/protocol#readme","bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"dist":{"shasum":"7ae0133779288cdbea467c64d6e1036fc585034a","tarball":"https://registry.npmjs.org/@0xhoneyjar/quests-protocol/-/quests-protocol-0.1.1.tgz","fileCount":10,"integrity":"sha512-5CbsKn7CglKrBRF9Hz8PyWIWA5nI0qtuEg4iSpZyAwK+OuCc7k9b/WSK7sktivFaIFLo8/1l2fP9lPyCLNtgxw==","signatures":[{"sig":"MEYCIQDhG7JI39ve9M+/ZmA07vj4XVeWzOfD8oqioD/6LqCHlgIhAMt3kvrjg8bSylA22aEeXnfh1WzNkSP8ktSM6T5G/uGE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38427},"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":{"build":"tsc -b","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"zksoju","email":"underrated@gmail.com"},"repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/protocol"},"_npmVersion":"10.9.0","description":"Sealed wire-format schemas for quest engagement — substrate-graded step submission + verdict (instance-1 · cycle 2026-05-03). Future shapes: quest defs, completion criteria, badges, raffles, completion events.","directories":{},"_nodeVersion":"23.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"^3.10.0","typescript":"^5.7.0"},"peerDependencies":{"effect":"^3.10.0"},"_npmOperationalInternal":{"tmp":"tmp/quests-protocol_0.1.1_1777922072238_0.4927086200954047","host":"s3://npm-registry-packages-npm-production"},"deprecated":"broken: dist/ missing from tarball. Use 0.1.2+."},"0.1.2":{"name":"@0xhoneyjar/quests-protocol","version":"0.1.2","keywords":["freeside","quests","protocol","schema","effect"],"license":"MIT","_id":"@0xhoneyjar/quests-protocol@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/protocol#readme","bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"dist":{"shasum":"a909df463cf4fd9a0f816ca11aebccfb57341f32","tarball":"https://registry.npmjs.org/@0xhoneyjar/quests-protocol/-/quests-protocol-0.1.2.tgz","fileCount":42,"integrity":"sha512-tM9eYJUq2F33gxYTqt+KXt3CwbNA3d6vfXsRPcWtSuhpdRdTZ44lfgM5GbrZAKWbQsslrAgmWL8ynfIx1fWqwA==","signatures":[{"sig":"MEUCIQCVHm7SyuxXWBZo5bWXUCTW77F5iJIK0TGR7DCV5cubiwIgQ8b3dy6xx678/o9Zo8WO/Fvv6J0el3jCL+WZzACdJYs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120988},"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":{"build":"tsc -b","clean":"rm -rf dist","typecheck":"tsc --noEmit"},"_npmUser":{"name":"zksoju","email":"underrated@gmail.com"},"repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/protocol"},"_npmVersion":"10.9.0","description":"Sealed wire-format schemas for quest engagement — substrate-graded step submission + verdict (instance-1 · cycle 2026-05-03). Future shapes: quest defs, completion criteria, badges, raffles, completion events.","directories":{},"_nodeVersion":"23.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"^3.10.0","typescript":"^5.7.0"},"peerDependencies":{"effect":"^3.10.0"},"_npmOperationalInternal":{"tmp":"tmp/quests-protocol_0.1.2_1777922219403_0.42512596597083996","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-05-04T19:08:32.600Z","modified":"2026-05-04T19:17:17.330Z","0.1.0":"2026-05-04T19:08:32.826Z","0.1.1":"2026-05-04T19:14:32.398Z","0.1.2":"2026-05-04T19:16:59.554Z"},"bugs":{"url":"https://github.com/0xHoneyJar/freeside-quests/issues"},"license":"MIT","homepage":"https://github.com/0xHoneyJar/freeside-quests/tree/master/packages/protocol#readme","keywords":["freeside","quests","protocol","schema","effect"],"repository":{"url":"git+https://github.com/0xHoneyJar/freeside-quests.git","type":"git","directory":"packages/protocol"},"description":"Sealed wire-format schemas for quest engagement — substrate-graded step submission + verdict (instance-1 · cycle 2026-05-03). Future shapes: quest defs, completion criteria, badges, raffles, completion events.","maintainers":[{"name":"janitooor","email":"jani@0xhoneyjar.xyz"},{"name":"zerkereth","email":"zerkereth@gmail.com"},{"name":"zksoju","email":"underrated@gmail.com"}],"readme":"# packages/protocol — sealed quest schemas\n\nWire-format contracts for quest engagement. Bridges every `freeside-quests` consumer (worlds, ruggy, dashboards, future MCP wrappers) to a single coherent vocabulary.\n\nContract version: **1.0.0** · authority: Effect Schema · sealed.\n\n## Current contents\n\nCycle 2026-05-03 substrate-integration (instance-1) lands the substrate-step submission/verdict pair — the over-the-wire envelope for substrate-graded activity steps in cubquests-interface.\n\n| export | purpose |\n|---|---|\n| `SubstrateStepSubmission` | Gateway → Kafka → construct. Discriminated payload (essay/url/structured), trace correlation, lowercased EVM wallet, contract-version stamping. |\n| `SubstrateStepVerdict` | Construct → Kafka → resolution listener. Status (`APPROVED` / `REJECTED` / `NEEDS_HUMAN`), confidence on [0,1], human-readable reasoning, optional per-construct dimensions. |\n| `SubstrateStepPayload` | Discriminated union of supported submission shapes. Additive minor bumps. |\n| `VerdictStatus` | Literal union — terminal states + human-routing. |\n| `SUBSTRATE_STEP_CONTRACT_VERSION` | `\"1.0.0\"` — semver string for wire-format compatibility checks. |\n\nThree boundaries validate against these schemas:\n\n1. `freeside-quests/apps/api` gateway — validates inbound submission, wraps in Hounfour `CompletionRequest`, publishes to Kafka.\n2. Substrate construct (e.g. `0xHoneyJar/construct-lore-essay-grader`) — validates narrower per-construct input; emits verdict back into the result topic.\n3. `freeside-quests/apps/worker` resolution listener — validates inbound verdict before any DB update, badge issuance, or Discord ping.\n\n## Doctrine\n\nSubstrate-graded steps are a primitive of the substrate-construct convention. See `~/vault/wiki/concepts/substrate-mental-model-for-product-builders.md` — the operator authors lore + grading instructions; the construct enforces them. The protocol package owns the seam.\n\n## Future shapes\n\nSource: `world-sprawl/cubquests/` + `world-sprawl/cubquests-dashboard/`. Per `../../docs/EXTRACTION-MAP.md`. Not yet shipped:\n\n| file | purpose |\n|---|---|\n| `quest.schema.ts` | Quest definition — title, description, completion criteria, rewards, partner attribution, dates |\n| `completion-criteria.schema.ts` | Typed completion criteria (held NFT count, trait match, social action, onchain action, partner-specific) |\n| `badge.schema.ts` | Badge definition + issuance criteria + visual asset references |\n| `raffle.schema.ts` | Raffle entry + draw + winner schemas |\n| `event.schema.ts` | Quest-completion NATS event shape (`quests.completion.{world}.{quest_id}`). NEW. |\n| `webhook-payload.schema.ts` | HMAC-signed webhook payload format. NEW. |\n| `types.ts` | Branded TS types — QuestId, BadgeId, CompletionEventId, PartnerSlug |\n\n## Governance\n\nSame as `freeside-worlds/packages/protocol/VERSIONING.md` — imported verbatim from `loa-constructs/.claude/schemas/VERSIONING.md`. Enum-locked, additive-only minors. Major bumps require new file + migration plan + stable `$id`.\n\n## Consumers\n\n- `freeside-quests/packages/engine` — substrate-step dispatch validates against these schemas\n- `freeside-quests/packages/ports/` — type ports off these schemas (post-extraction)\n- `freeside-quests/packages/adapters/quest-engine-client.ts` — validates over wire (post-extraction)\n- `freeside-quests/packages/mcp-tools/` — agent-callable surface (post-extraction)\n- `world-sprawl/cubquests-dashboard/` — impl validates inputs/outputs against these (post-extraction)\n- `0xHoneyJar/freeside-ruggy` — consumes event schemas + completion fan-out (post-extraction)\n- `freeside-worlds` — world manifests reference `compose_with: freeside-quests`\n- (future worlds) Purupuru Year 2, Honey Port, Mibera — typed access via ports\n","readmeFilename":"README.md"}