Parent
Chat Interface — Design Spec (docs/superpowers/specs/2026-06-19-chat-interface-design.md)
What to build
Make the Hermes target work correctly for admin use: stream responses via
Hermes's Runs API, surface tool-progress, and resolve human-in-the-loop
approvals. This is a core reliability requirement (not deferred).
lib/chat/hermes-runs.ts — client for the Hermes Runs API: createRun,
streamEvents(runId) (async iterator yielding normalized events),
resolveApproval(runId, decision). Map Hermes event types
(e.g. hermes.tool.progress, pending-approval) onto the hub's SSE protocol.
Verify the exact POST /v1/runs request body against the running Hermes
instance during implementation — the docs describe the lifecycle but not the
full request schema (use GET /v1/capabilities or a trial curl).
/api/chat — when target.provider === 'hermes', use the Runs path instead of
chat-completions: create a run with the assembled messages, stream events,
forward tool-progress and approval-requested to the client, and on
approval-requested pause for the client's decision then call
resolveApproval.
- SSE events emitted:
tool-progress, approval-requested, approval-resolved.
- UI: collapsible tool-progress ("tool activity") blocks; an explicit
"Admin mode (Hermes)" indicator whenever the Hermes toolset is live;
inline Approve/Deny on approval-requested. Approval timeout → mark the turn
awaiting-approval (resumable).
- Config:
HERMES_API_BASE (default http://localhost:8642/v1), HERMES_API_KEY.
Acceptance criteria
Blocked by
References
Parent
Chat Interface — Design Spec (docs/superpowers/specs/2026-06-19-chat-interface-design.md)
What to build
Make the Hermes target work correctly for admin use: stream responses via
Hermes's Runs API, surface tool-progress, and resolve human-in-the-loop
approvals. This is a core reliability requirement (not deferred).
lib/chat/hermes-runs.ts— client for the Hermes Runs API:createRun,streamEvents(runId)(async iterator yielding normalized events),resolveApproval(runId, decision). Map Hermes event types(e.g.
hermes.tool.progress, pending-approval) onto the hub's SSE protocol.Verify the exact
POST /v1/runsrequest body against the running Hermesinstance during implementation — the docs describe the lifecycle but not the
full request schema (use
GET /v1/capabilitiesor a trialcurl)./api/chat— whentarget.provider === 'hermes', use the Runs path instead ofchat-completions: create a run with the assembled messages, stream events,
forward
tool-progressandapproval-requestedto the client, and onapproval-requested pause for the client's decision then call
resolveApproval.tool-progress,approval-requested,approval-resolved."Admin mode (Hermes)" indicator whenever the Hermes toolset is live;
inline Approve/Deny on
approval-requested. Approval timeout → mark the turnawaiting-approval(resumable).HERMES_API_BASE(defaulthttp://localhost:8642/v1),HERMES_API_KEY.Acceptance criteria
hermes-runs.tsimplementscreateRun/streamEvents/resolveApproval; thePOST /v1/runsbody is verified against the live instancetarget=hermesstreams the assistant response via Runs eventshermes.tool.progressevents render as collapsible tool-activity blocksapproval-requested→ inline Approve/Deny; resolving callsPOST /v1/runs/{id}/approvaltarget=hermesawaiting-approvaland resumableHERMES_API_KEYstays server-side; hub is the only caller of Hermestool-progressevent and anapproval-requested → resolvedsequence (mocked)Blocked by
References
hermes-runs.ts,route.ts), §SSE Event Protocol, §Security