v0.18.0: channel-2 auto-responder with extensible #command boilerplate #38

Merged
kamilkrzywda merged 1 commits from feat/channel2-autoresponder into main 2026-09-25 19:14:15 +02:00
Owner

New src/commands module: event-driven listener on COMMAND_CHANNEL (env, default 2 "testowy") that dispatches exact #command matches through a single-registration-point registry. First command: #ping → replies #pong! (DM back to sender when present, else broadcast, always on the command channel).

  • MeshService gains optional commands wiring via attachCommands() (CommandModule factory injects MeshService one-way — no forwardRef; verified empirically that NestJS 12's injector leaves forwardRef cycles null)
  • Reply routing v1: directed to sender / broadcast fallback, rides COMMAND_CHANNEL via sendText 4th arg
  • Env: COMMAND_CHANNEL (default 2); docs updated (AGENTS/MESHTASTIC/README), CHANGELOG v0.18.0, package.json → 0.18.0 (lockfile untouched)
  • Tests 106 → 121 (+15): routing, channel/case/whitespace gates, env override, void handler, extensibility, failure swallowing, e2e over fake bridge, DI cycle assertions; build + oxlint clean
New `src/commands` module: event-driven listener on COMMAND_CHANNEL (env, default 2 "testowy") that dispatches exact `#command` matches through a single-registration-point registry. First command: `#ping` → replies `#pong!` (DM back to sender when present, else broadcast, always on the command channel). - MeshService gains optional commands wiring via `attachCommands()` (CommandModule factory injects MeshService one-way — no forwardRef; verified empirically that NestJS 12's injector leaves forwardRef cycles null) - Reply routing v1: directed to sender / broadcast fallback, rides COMMAND_CHANNEL via sendText 4th arg - Env: COMMAND_CHANNEL (default 2); docs updated (AGENTS/MESHTASTIC/README), CHANGELOG v0.18.0, package.json → 0.18.0 (lockfile untouched) - Tests 106 → 121 (+15): routing, channel/case/whitespace gates, env override, void handler, extensibility, failure swallowing, e2e over fake bridge, DI cycle assertions; build + oxlint clean
kamilkrzywda added 1 commit 2026-09-25 19:14:09 +02:00
Add channel-2 #command auto-responder (v0.18.0)
CI / build + unit (pull_request) Successful in 41s
931b42bb1e
Event-driven CommandService dispatches exact case-sensitive #command
matches on COMMAND_CHANNEL (default 2) through a single-registration-point
registry; first command #ping -> #pong!. Replies ride COMMAND_CHANNEL:
directed DM back to the sender when present, else broadcast. Failing
handler/send only logs a warn.

DI: CommandModule's factory injects MeshService and attaches itself via
MeshService.attachCommands() — a constructor-level cycle leaves one side
null in NestJS 12's injector (verified), so no forwardRef is used.

Tests 106 -> 121; docs synced (AGENTS.md, MESHTASTIC.md, README).
kamilkrzywda merged commit d375f2a943 into main 2026-09-25 19:14:15 +02:00
kamilkrzywda deleted branch feat/channel2-autoresponder 2026-09-25 19:14:15 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/MeshBot#38