rowboat/apps/x/packages/shared
Ramnique Singh ccf38c6a0f feat(x/core): session layer with write-through index (stage 3)
SessionsImpl per session-design.md, constructor-injected and tested
entirely against a mocked ITurnRuntime:

- sendMessage: per-session lock, typed TurnNotSettledError while the
  latest turn is non-terminal (terminal statuses including failed/
  cancelled allow continuation), context as { previousTurnId } ref,
  turn-file-first write ordering (a failed session append leaves a
  benign orphan turn and no advance), denormalized agent/model on
  turn_appended, default title from the first message.
- Dedicated respondToAskHuman endpoint (async_tool_result wrapper);
  respondToPermission / deliverAsyncToolResult pass turn-runtime
  rejections through. stopTurn aborts a live advance or cancels an
  at-rest turn; resumeTurn re-enters idle turns (never at startup).
- In-memory index: startup scan (session files + each latest turn for
  status; corrupt files yield errored entries without aborting),
  write-through updates, deletion guard against late-settle
  resurrection. Bus events (turn-event / index-changed) defined in
  @x/shared as the renderer IPC contract.
- FSSessionRepo: date-partitioned append-only JSONL + list/delete;
  deleteSession removes the session file only.
- runHeadlessTurn: standalone turns (sessionId null, auto permission,
  no human) for background/knowledge/scheduled callers.

29 new tests covering the session-design §13 matrix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 14:20:44 +05:30
..
src feat(x/core): session layer with write-through index (stage 3) 2026-07-02 14:20:44 +05:30
.gitignore bootstrap new electron app 2026-01-16 12:05:33 +05:30
package.json feat(x/shared): turn + session event schemas and pure reducers (stage 1) 2026-07-02 14:20:44 +05:30
tsconfig.build.json feat(x/shared): turn + session event schemas and pure reducers (stage 1) 2026-07-02 14:20:44 +05:30
tsconfig.json bootstrap new electron app 2026-01-16 12:05:33 +05:30
vitest.config.ts feat(x/shared): turn + session event schemas and pure reducers (stage 1) 2026-07-02 14:20:44 +05:30