Files
archie/internal/infrastructure/edastore
sam d4df04f549 feat(edastore): project tool_call events into the tool_calls collection
The tool_calls collection existed in the event-capture schema but nothing
wrote it. Give it its write path:

- edastore gains InsertToolCall and the minimal TaskToolCalls read, writing
  only the existing collection. No new index: the collection is an
  append-only transcript and the SQLite predecessor had no unique index.
- internal/app/archied composes toolCallProjectingTaskStore, a decorator on
  the task store that persists the event first, then -- only for tool_call
  events -- writes one row. A projection failure is counted and logged but
  never returned from InsertEvent: event persistence is load-bearing,
  tool_calls is observability.
- stateStoreDeps wires the decorator around deps.Tasks when both stores are
  open, and passes Tasks through untouched otherwise.

The event adapts to the existing schema, not the other way round: the tool
name comes from data, a succeeded call's detail is the row's result, a
failed call's detail its error; args and duration_ms stay reserved for a
producer that reports them.
2026-09-23 03:26:14 +10:00
..