rowboat/apps/x/packages
Ramnique Singh e29701fb5d Add standalone agent-loop module with turn-based SQLite persistence
New @x/core module (src/agent-loop) — groundwork for replacing the JSONL
event runtime. Development-only; not wired into the app yet.

- Durable unit is a turn: append-only fact logs (messages, permission
  requests/decisions, started/dispatched tools) + set-once error/completedAt;
  status is derived from facts, never stored
- advance() reducer drives the loop purely from persisted state; crash
  recovery = resumeTurn() re-entering the reducer
- Permission gating as data: batched requests, user/classifier decisions
  with reasons, denials materialized as ToolMessages
- TurnHandle API per entry point: stream events or await the rest state
- Kysely migration (agent_loop_turns) + SqliteTurnStore with zod-parsed
  reads; InMemoryTurnStore for tests
- VercelModelAdapter over the existing createProvider()/streamText
- 33 vitest tests: reducer, permissions, classifier, crash recovery,
  abort, concurrency, SQLite round-trips

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:22:36 +05:30
..
core Add standalone agent-loop module with turn-based SQLite persistence 2026-06-12 18:22:36 +05:30
shared feat: add user-configurable notification settings (#601) 2026-06-11 19:43:26 +05:30