feat: /api/channels endpoint, /api namespace, Scalar at root (v0.1.0) #2

Merged
kamilkrzywda merged 1 commits from feat/api-channels into main 2026-09-23 21:05:22 +02:00
Owner

Closes #1

  • New GET /api/channels — device channels collected from the initial-sync FromRadio stream (case "channel"), upserted by index, reset on reconnect; psk/keys redacted. Returns [] until synced.
  • Global prefix: existing endpoints moved to /api/status, /api/send.
  • Scalar API reference at / (official @scalar/nestjs-api-reference handler), OpenAPI JSON at /docs-json via @nestjs/swagger.
  • v0.1.0, CHANGELOG.md added; README/AGENTS/ORCHESTRATOR path references synced.

Verified: npm run build ✓, vitest 11/11 ✓ (new mesh.service.spec covers framed FromRadio → channels pipeline + redaction + reset-on-reconnect), docker compose build ✓, live smoke via bot.dev.kkhost.pl: /api/status 200 JSON, /api/channels 200 [], / serves Scalar HTML, old unprefixed paths 404.

Closes #1 - New `GET /api/channels` — device channels collected from the initial-sync FromRadio stream (case "channel"), upserted by index, reset on reconnect; psk/keys redacted. Returns `[]` until synced. - Global prefix: existing endpoints moved to `/api/status`, `/api/send`. - Scalar API reference at `/` (official @scalar/nestjs-api-reference handler), OpenAPI JSON at `/docs-json` via @nestjs/swagger. - v0.1.0, CHANGELOG.md added; README/AGENTS/ORCHESTRATOR path references synced. Verified: npm run build ✓, vitest 11/11 ✓ (new mesh.service.spec covers framed FromRadio → channels pipeline + redaction + reset-on-reconnect), docker compose build ✓, live smoke via bot.dev.kkhost.pl: /api/status 200 JSON, /api/channels 200 [], / serves Scalar HTML, old unprefixed paths 404.
kamilkrzywda added 1 commit 2026-09-23 21:05:08 +02:00
- New GET /api/channels: device Meshtastic channels from FromRadio.channel
  frames during initial sync; psk/keys redacted; map reset on reconnect.
- app.setGlobalPrefix('api'): /status -> /api/status, /send -> /api/send.
- Scalar API docs at / (OpenAPI JSON at /docs-json) via @nestjs/swagger +
  @scalar/nestjs-api-reference; light swagger decorators on endpoints/body.
- MESH_RECONNECT_MS env knob (default 5000 ms).
- v0.1.0: CHANGELOG entry, README/AGENTS/ORCHESTRATOR docs sync.
kamilkrzywda merged commit 75a10c195f into main 2026-09-23 21:05:22 +02:00
kamilkrzywda deleted branch feat/api-channels 2026-09-23 21:05:22 +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#2