feat(multica): expose Multica issue execution/agent/swarm telemetry in Office view - #80
Closed
joshaumuthumani wants to merge 6 commits into
Closed
joshaumuthumani wants to merge 6 commits into
joshaumuthumani wants to merge 6 commits into
Conversation
…~/.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).
Author
|
Closing — opened in error against the wrong, unrelated public repository. Not a real target for this work; confirmed by workspace owner. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromHERMES_HOMEenv 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-issuesendpoint (auth-gated, 5s cache, fails visibly on error)feat(office): new Multica Issues tab in the Office viewtest(multica): 29 new unit tests for the bridgedocs(multica): integration contract + known limitations (docs/MULTICA_BRIDGE.md)Test evidence
npx vite buildwas not run — it fails in this environment on a pre-existing, unrelated cause (rolldown-binding.darwin-universal.nodemissing). Confirmed viagit stashthat this failure exists onmainbefore any of these changes too.Known limitations (full detail in
docs/MULTICA_BRIDGE.md)--limit 100); no pagination loop yet.last_activity_atas a heartbeat proxy — Multica exposes no lower-level per-run heartbeat over the CLI.Boundaries respected
No secrets introduced or exposed. No direct
state.dbaccess — goes through the authenticatedmulticaCLI's JSON contract only. Multica ownership semantics untouched.Fixes Multica: #JOSH-42