roberto 34a771bee3 Implement agent run logging in local SQLite
Protocol:
- RunContextSchema added to api-types — attached to WsToolCall frames
  originating from batch runs; type/runId/agentId identify the run
- WsRunCompleteSchema added — server sends this when a batch run ends

Database:
- agent_runs table: one row per run (id, agentId, status, startedAt, completedAt)
- agent_run_actions table: one row per mutating tool call
  (verb: created/updated/deleted, entityType, entityId, entityTitle)

Logging logic (backend-client.ts):
- On tool_call with runContext: ensure agentRuns row exists, insert
  agentRunActions for insert/update/delete actions
- On run_complete: update agentRuns status and completedAt

Scheduler passes agentId in the trigger POST so the backend echoes it
back in run_context for correct attribution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 09:46:48 +01:00
2026-03-10 16:13:40 +01:00
2026-03-16 08:53:08 +01:00
2026-03-15 23:46:01 +01:00
Description
No description provided
7.6 MiB
Languages
TypeScript 97.9%
CSS 2%