fabro/lib/packages/fabro-api-client/src/api
Bryan Helmkamp 86b1fbef7f
feat(api): bind sessions to runs (#336)
## Summary

Ask Fabro sessions are now run-bound instead of standalone. Sessions are
created under their owning run, then accessed by flat session ID routes,
with durable state projected from the run event stream rather than a
separate session store.

## Changes

- Move session creation/listing to `POST/GET /api/v1/runs/{id}/sessions`
while keeping flat session reads, turns, interrupts, and event streams
under `/api/v1/sessions/{id}/...`.
- Add typed `run.session.*` events, ULID-backed session/turn IDs,
read-only default permissions, and a rebuildable SlateDB `session_id ->
run_id` index.
- Remove the old file-backed session store and wire the server, runtime,
Rust client, generated API crates, and TypeScript client around run
event projections.
- Replace the old top-level CLI session command with `fabro run ask` for
chatting with a run.
- Regenerate the TypeScript API client; this also catches up existing
generated models for Pair/run event detail schemas already present in
the OpenAPI spec.

## Validation

- `cargo build -p fabro-api -p fabro-client -p fabro-server -p
fabro-cli`
- `cargo nextest run -p fabro-server --features test-support -E
'test(run_bound_session_is_created_as_run_event_and_resolves_by_flat_id)
| test(sessions_are_listed_only_under_their_owning_run)'`
- `cargo nextest run -p fabro-store
projection_rebuilds_runtime_context_from_run_events`
- `cargo +nightly-2026-04-14 clippy -p fabro-api -p fabro-client -p
fabro-store -p fabro-server -p fabro-cli --all-targets -- -D warnings`
- `cargo +nightly-2026-04-14 fmt --check --all`
- `cd lib/packages/fabro-api-client && bun run typecheck && cd
../../../apps/fabro-web && bun run typecheck`
- `git diff --check`

---

[![Compound
Engineering](https://img.shields.io/badge/Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
Generated with GPT-5 via [Codex](https://openai.com/codex)
2026-05-21 10:53:41 -04:00
..
auth-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
billing-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
completions-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
discovery-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
human-in-the-loop-api.ts feat(api): bind sessions to runs (#336) 2026-05-21 10:53:41 -04:00
insights-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
install-api.ts feat(install): make LLM setup optional in web installer and CLI (#265) 2026-05-14 22:34:39 -04:00
integrations-api.ts fix(api): correct GitHub webhook OpenAPI contract 2026-04-20 07:13:49 -04:00
models-api.ts feat(server): add GET /api/v1/providers and /settings/models page (#321) 2026-05-20 09:05:00 -04:00
repos-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
run-internals-api.ts feat(api): bind sessions to runs (#336) 2026-05-21 10:53:41 -04:00
run-outputs-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
runs-api.ts feat(runs): add parent run links (#271) 2026-05-16 13:57:33 -04:00
secrets-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
sessions-api.ts feat(api): bind sessions to runs (#336) 2026-05-21 10:53:41 -04:00
settings-api.ts refactor settings API entrypoints 2026-04-22 18:58:47 -04:00
system-api.ts Add system resources settings page (#328) 2026-05-20 17:22:53 -04:00
workflows-api.ts feat(web): migrate to generated API client 2026-05-08 07:44:33 -07:00