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

@rithien/comfy_adapter

v0.1.7

Published

Clusterio plugin: parses Comfy/factorio-polska scenario stdout tags ([DISCORD*], [ANTIGRIEF-LOG], [DATA-SET/GET]) and bridges to Discord + JSON datastore; global ban list (adapter_bans.json) enforced lazily on join

Readme

@rithien/comfy_adapter — clusterio plugin

Adapter między tag-stream stdout scenariusza factorio-polska (../scenario/) a clusterio bus + Discord (przez współistniejący ../discord-bridge/).

Stan

Faza 2.5 ukończona (statyczna walidacja)v0.1.0 zaimplementowane, nieopublikowane. Publish + runtime test na zdalnym clusterio → Faza 2.7.

Zakres

| Tag z scenariusza | Akcja w plugin'ie | | --- | --- | | [DISCORD]<msg> / [-RAW] / [-BOLD] | channel.send({content}) na kanał instancji (przez discord_bridge.getChannelForInstance) | | [DISCORD-ADMIN]<msg> / [-RAW] | jak wyżej, z prefiksem [ADMIN] (configurable) | | [DISCORD-EMBED]<msg> / [-RAW] | embed z description=msg | | [DISCORD-EMBED-PARSED]<json> | JSON.parse → embed z {title, description, color?, fields?} | | [DISCORD-ADMIN-EMBED]<msg> / [-RAW] | embed z description=admin_prefix+msg | | [ANTIGRIEF-LOG]{category, action} | embed z color-coded category (lub plain [ANTIGRIEF: cat] action jeśli antigrief_log_as_embed=false) | | [DATA-SET]{data_set, key, value?} | UPSERT do JSON storage (debounce fsync). value=nil → DELETE | | [DATA-GET]<token>{data_set, key} | Read JSON, RCON callback /cc Token.get(<token>)(d); Server.raise_data_set(d) (dual-path) | | [DATA-GET-AND-PRINT]<token>{...,to_print} | jak wyżej + to_print w callback data | | [DATA-GET-ALL]<token>{data_set} | Read whole dataset, RCON callback z entries table |

Pozostałe tagi ([BAN-SYNC], [PING], [START-SCENARIO]) — silent skip (bany robi clusterio natywnie, lifecycle nieużywany).

Architektura

  • info.js — manifest + schema 4 eventów instance→controller (ScenarioDiscordEvent, AntigriefLogEvent, DataSetEvent, DataGetRequest) + controller config fields.
  • instance.js — hook onOutput, regex tag-stream parser, mini-parser pseudo-Lua-JSON (parseComfyPayload), message queue dla disconnected controller.
  • controller.js — 4 handlery + Discord client sharing (delegacja do discord_bridge) + JSON storage manager (atomic write, debounce, load on init).
  • Storage: pojedynczy plik JSON (comfy_adapter_storage.json configurable), schema { "<dataset>": { "<key>": <value> } }.

Config (controller-side)

| Klucz | Default | Opis | |---|---|---| | comfy_adapter.storage_path | comfy_adapter_storage.json | Plik JSON datastore (relative do CWD kontrolera) | | comfy_adapter.write_debounce_ms | 1000 | Coalesce multiple [DATA-SET] writes | | comfy_adapter.antigrief_log_as_embed | true | Embed vs plain message dla anti-grief log | | comfy_adapter.admin_prefix | [ADMIN] | Prefix dla [DISCORD-ADMIN*] tagów |

Zależności runtime

  • @rithien/discord_bridge (Faza 1, ^0.3.1) — channel routing per instancja + shared Discord client. Bez niego: Discord eventy są no-op (log verbose), datastore nadal działa.
  • clusterio alpha 14+ — API hooks onOutput, controller.handle, controller.plugins.get, InstanceSendRconRequest.

Pełna spec

Szczegóły w ../PLAN.md sekcja "Faza 2.5". Architektoniczne decyzje w ../DECISIONS.md (search "Faza 2.5").