feat(webui): event inspector -- see captured payloads in the dashboard
Adds GET /api/captures (token-gated, matching the memory/skills enabled-false-not-an-error convention when Server.Captures is nil) and a new dashboard page at /captures listing recent inbound captures, newest first, with per-row expand to explore the redacted payload and headers pretty-printed. Live updates reuse the existing operator-activity event pipeline (Server.emit -> Events.Publish -> the /events SSE stream every other page already subscribes to) rather than polling or inventing new push plumbing: handleCapture now emits a Kind "capture" event with the same field shape the list endpoint returns, so a captured event appears in the inspector without a manual refresh. Frontend follows the tasks/task-row.js precedent: row rendering is split into ui/src/captures/capture-row.js so it can be unit tested without the page's fetch/SSE wiring. "Unbound" is shown for every row today since no binding data model exists yet (t2db.4) -- the column is wired now so that bead only needs to change what it renders, not add it.
This commit is contained in:
1 parent
101c133239
commit
37714928fc
13 files changed
+551
-12
No files matched your search
@@ -107,6 +107,7 @@ export const api = {
|
||||
return res.json();
|
||||
},
|
||||
logs: (params) => req("/api/logs" + qs(params)),
|
||||
captures: (limit) => req("/api/captures" + qs({ limit })),
|
||||
memory: () => req("/api/memory"),
|
||||
chatSessions: () => req("/api/chat/sessions"),
|
||||
chatMessages: (id) => req(`/api/chat/sessions/${encodeURIComponent(id)}/messages`),
|
||||
|
||||
Reference in new issue
Block a user