feat(gateway): MosaicPlugin lifecycle + ReloadService + hot reload (P8-013) #182

Merged
jason.woltje merged 1 commits from feat/p8-013-hot-reload into main 2026-03-16 03:00:56 +00:00
Owner

Summary

  • Adds MosaicPlugin interface with isMosaicPlugin type guard in apps/gateway/src/reload/
  • Adds ReloadService that orchestrates plugin unload/reload, rebuilds command manifest, handles SIGHUP
  • Adds POST /api/admin/reload REST endpoint (admin-guarded) via ReloadController
  • Adds /reload admin command to CommandRegistryService and CommandExecutorService
  • Adds broadcastReload() to ChatGateway to emit system:reload to all connected Socket.IO clients
  • Wires ReloadModule into AppModule; uses forwardRef() to resolve circular deps
  • 5 new unit tests; all 65 gateway tests pass

Test plan

  • pnpm typecheck — passes
  • pnpm lint — passes
  • pnpm format:check — passes
  • pnpm test — 65 tests pass (8 test files)
  • CI pipeline green

Closes #166

## Summary - Adds `MosaicPlugin` interface with `isMosaicPlugin` type guard in `apps/gateway/src/reload/` - Adds `ReloadService` that orchestrates plugin unload/reload, rebuilds command manifest, handles SIGHUP - Adds `POST /api/admin/reload` REST endpoint (admin-guarded) via `ReloadController` - Adds `/reload` admin command to `CommandRegistryService` and `CommandExecutorService` - Adds `broadcastReload()` to `ChatGateway` to emit `system:reload` to all connected Socket.IO clients - Wires `ReloadModule` into `AppModule`; uses `forwardRef()` to resolve circular deps - 5 new unit tests; all 65 gateway tests pass ## Test plan - [x] `pnpm typecheck` — passes - [x] `pnpm lint` — passes - [x] `pnpm format:check` — passes - [x] `pnpm test` — 65 tests pass (8 test files) - [ ] CI pipeline green Closes #166
jason.woltje added 1 commit 2026-03-16 02:52:00 +00:00
feat(gateway): MosaicPlugin lifecycle + ReloadService + hot reload (P8-013)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
bfbe9fff97
Implements gateway hot reload via MosaicPlugin interface, ReloadService orchestration,
/reload admin command, POST /api/admin/reload REST endpoint, SIGHUP handler, and
system:reload broadcast to all connected TUI clients via ChatGateway.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje force-pushed feat/p8-013-hot-reload from bfbe9fff97 to 3fcc03379a 2026-03-16 02:57:52 +00:00 Compare
jason.woltje merged commit 24f5c0699a into main 2026-03-16 03:00:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#182