rowboat/apps/x/packages/core
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
..
src Add standalone agent-loop module with turn-based SQLite persistence 2026-06-12 18:22:36 +05:30
.gitignore bootstrap new electron app 2026-01-16 12:05:33 +05:30
package.json Add SQLite storage foundation 2026-06-12 18:22:36 +05:30
tsconfig.build.json Refactor builtin file tools beyond workspace scope 2026-05-25 16:21:51 +05:30
tsconfig.json feat: extract presentation generator into executable code with builtin tool 2026-01-30 13:30:06 +05:30
vitest.config.ts Refactor builtin file tools beyond workspace scope 2026-05-25 16:21:51 +05:30