npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@0xhoneyjar/quests-discord-renderer

v0.1.2

Published

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.

Readme

@0xhoneyjar/quests-discord-renderer — Discord interaction descriptor emitter

Discord-component descriptor emitter for quest interactions. Cross-bot installable per [[freeside-modules-as-installables]].

Cycle Q P1 SCAFFOLD (2026-05-04) — skeleton ships 5 dispatch function signatures returning placeholder descriptors. Implementation lands in Sprint 3 (P3 BOT WIRING).

Architectural Lock A1: descriptor emitter, NOT dispatcher

This package emits APIInteractionResponse descriptors. It does NOT call the Discord API. It does NOT depend on discord.js.

| Layer | Owns | Lives in | |---|---|---| | Descriptor emit | Build APIInteractionResponse shapes | THIS package | | Discord dispatch | Send descriptors to Discord HTTP/Gateway | The consumer bot (freeside-characters/apps/bot) |

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.

Allowed dependency: discord-api-types (types ONLY, no runtime). Forbidden dependency: discord.js (or any runtime Discord client). The component-isolation guard test enforces this.

Public surface

Sprint 1 (current · scaffold)

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.

import { Effect } from "effect";
import { dispatchQuestInteraction } from "@0xhoneyjar/quests-discord-renderer";

// Sprint 1: signature is Effect.Effect<APIInteractionResponse, never, never>
const response = await Effect.runPromise(
  dispatchQuestInteraction({
    interaction,
    config: engineConfigForCurrentWorld(), // EngineConfigStub for Sprint 1
  }),
);

Sprint 3 (forward-pointing · post-QuestStatePort)

Once 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:

import { Effect, Layer } from "effect";
import { dispatchQuestInteraction } from "@0xhoneyjar/quests-discord-renderer";
import {
  QuestStatePortPostgresLayer,
  AuthCheckPortAnonLayer,
  BadgeIssuancePortNullLayer,
} from "@0xhoneyjar/quests-engine"; // Sprint 2+

// Sprint 3: signature becomes Effect.Effect<APIInteractionResponse, never, QuestStatePort>
const response = await dispatchQuestInteraction({
  interaction,
  config: engineConfigForCurrentWorld(),
}).pipe(
  Effect.provide(
    Layer.mergeAll(
      QuestStatePortPostgresLayer({ pool_config: pgConfig, world_slug }),
      AuthCheckPortAnonLayer,
      BadgeIssuancePortNullLayer,
    ),
  ),
  Effect.runPromise,
);

Sprint 1 ships placeholder descriptors that route correctly but return a stub response. Sprint 3 lands the full CMP-boundary transforms + dispatch routing.

CMP-boundary discipline

Per [[chat-medium-presentation-boundary]] §2 drift signature:

  • ❌ NEVER let raw quest_uuid, npc_id, wallet, trace_id, or submission_id escape into Discord output
  • ✅ ALWAYS apply cmp-boundary/transforms.ts before serialization
  • ✅ Test guarded by __tests__/cmp-boundary.test.ts regression suite (Sprint 3)

The 7 transforms are documented in SDD §5.3.

Mention + thread surface (D7-default)

Per [[explicit-invocation-anti-spam]]:

  • @<character> <message> triggers thread-spawner
  • All quest interactions scoped to that thread
  • Character NEVER posts unsolicited

Doctrine references

  • [[chat-medium-presentation-boundary]] — CMP transforms applied at serialization boundary
  • [[freeside-modules-as-installables]] — sealed schemas + typed ports + cross-bot installable
  • [[explicit-invocation-anti-spam]] — mention+thread default
  • Cycle Q SDD §5 — full descriptor emitter spec
  • Cycle Q PRD D1 — discord-renderer location (NEW sub-package vs. inline-in-bot)