Skip to content

feat(multica): expose Multica issue execution/agent/swarm telemetry in Office view - #80

Closed
joshaumuthumani wants to merge 6 commits into
xaspx:mainfrom
joshaumuthumani:feat/JOSH-42-multica-issue-telemetry
Closed

joshaumuthumani wants to merge 6 commits into
xaspx:mainfrom
joshaumuthumani:feat/JOSH-42-multica-issue-telemetry

Conversation

@joshaumuthumani

Copy link
Copy Markdown

Summary

First slice of the Multica-to-Hermes execution-observability bridge (JOSH-42). Multica remains canonical for issue ownership/status/comments/swarm structure; this is a read-only telemetry mirror exposed in the Hermes Office view.

Adds a new 🔗 Multica Issues tab alongside the existing Kanban board, showing per-issue: execution state (unassigned → assigned_idle → queued → running/stale → waiting_review/blocked → succeeded/failed/cancelled → unknown), active run id/status, resolved executing agent + bound runtime, last activity/heartbeat, swarm/child-count indicator, and a deep link back to the canonical Multica issue.

Commits

  • fix(server): resolve Hermes home from HERMES_HOME env instead of a hardcoded ~/.hermes (pre-existing Docker-breaking bug, found while wiring this up; split out since it's unrelated to the feature)
  • feat(multica): CLI adapter (lib/multica-cli.js), pure normalization/state-machine bridge (lib/multica-bridge.js), and telemetry snapshot orchestration (lib/multica-telemetry.js)
  • feat(server): GET /api/office/multica-issues endpoint (auth-gated, 5s cache, fails visibly on error)
  • feat(office): new Multica Issues tab in the Office view
  • test(multica): 29 new unit tests for the bridge
  • docs(multica): integration contract + known limitations (docs/MULTICA_BRIDGE.md)

Test evidence

npm test        → 42/42 pass (29 new + 13 pre-existing)
node --check     → clean on all changed/new .js files

npx vite build was not run — it fails in this environment on a pre-existing, unrelated cause (rolldown-binding.darwin-universal.node missing). Confirmed via git stash that this failure exists on main before any of these changes too.

Known limitations (full detail in docs/MULTICA_BRIDGE.md)

  • Issue listing is single-page (--limit 100); no pagination loop yet.
  • Stale detection uses issue-level last_activity_at as a heartbeat proxy — Multica exposes no lower-level per-run heartbeat over the CLI.
  • Polling-based (5s UI / 5s API cache), not push.
  • No Playwright E2E for the new tab yet (needs a running server + auth secrets); live CLI-level verification against the real workspace was used as the closest available proof during development.

Boundaries respected

No secrets introduced or exposed. No direct state.db access — goes through the authenticated multica CLI's JSON contract only. Multica ownership semantics untouched.

Fixes Multica: #JOSH-42

…~/.hermes

discoverGatewayPorts(), getDefaultModel(), and the /api/setup/check
config check all hardcoded path.join(os.homedir(), '.hermes'), which
breaks under Docker or any environment where $HOME does not point at
the real Hermes state root. Route them through the already-defined
HERMES_HOME constant (env override, falls back to the same default).

Pre-existing bug surfaced while wiring up the Multica telemetry bridge;
split out as its own fix since it is unrelated to that feature.
Adds the core of the Multica-to-Hermes execution-observability bridge
(JOSH-42). Multica remains canonical for issue ownership, status,
comments, and swarm structure; this is a read-only telemetry mirror.

- lib/multica-cli.js: thin adapter, the only module that shells out to
  the `multica` CLI. Always requests `--output json`; never scrapes
  human-formatted table output.
- lib/multica-bridge.js: pure normalization layer — run selection,
  queued/stale detection (heartbeat-age based), swarm aggregation, and
  the full execution-state matrix (unassigned -> assigned_idle ->
  queued -> running/stale -> waiting_review/blocked ->
  succeeded/failed/cancelled -> unknown).
- lib/multica-telemetry.js: orchestrates the CLI adapter + bridge into
  a single snapshot. Per-issue telemetry failures are flagged
  (telemetryError, forced to the `unknown` state) rather than dropped
  or shown as healthy.
Wires the Multica telemetry bridge (lib/multica-telemetry.js) into the
HTTP layer for JOSH-42. Auth-gated via requireAuth, 5s in-memory cache
to avoid hammering the `multica` CLI on frequent UI polls (bypassable
with ?refresh=1).

Failures surface visibly: any error is returned as
{ ok: false, error, issues: [], warnings: [...] } rather than falling
back to a response that looks healthy.
Adds a "🔗 Multica Issues" toggle alongside the existing Kanban view
on the Office page (JOSH-42). The new tab polls
GET /api/office/multica-issues every 5s and renders a table with:
execution-state badges, run id/status, resolved executing agent and
bound runtime name, last-activity/heartbeat, swarm/child-count badge
for parent issues, and a deep link back to the canonical Multica
issue.

- src/js/multica-issues-panel.js: panel init/destroy + poll lifecycle,
  matching the existing Kanban panel's lifecycle pattern.
- src/js/pages/office.js: view switcher wiring (kanban <-> multica),
  hides the per-board controls while the Multica tab is active.
- src/css/office.css: state badges and table styling for the new tab.
29 new unit tests covering lib/multica-bridge.js: run normalization,
active/terminal run selection, queued/stale detection (heartbeat-age
threshold), swarm aggregation, execution-state classification across
the full state matrix, deep-link construction, agent/runtime name
resolution, and active/recent-issue history-window filtering.

npm test: 42/42 passing (29 new + 13 pre-existing).
Adds docs/MULTICA_BRIDGE.md: the integration contract and data model
for the Multica-to-Hermes execution-observability bridge (JOSH-42),
the execution-state model, and known limitations (single-page issue
listing, issue-level last_activity_at used as a heartbeat proxy in
lieu of a lower-level per-run heartbeat, 5s polling cache instead of
push).
@joshaumuthumani

Copy link
Copy Markdown
Author

Closing — opened in error against the wrong, unrelated public repository. Not a real target for this work; confirmed by workspace owner.

@joshaumuthumani
joshaumuthumani deleted the feat/JOSH-42-multica-issue-telemetry branch August 31, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant