fabro/lib/crates
Bryan Helmkamp bf96baa9f0
feat(server): add run pairing API (#312)
## Summary

Adds the server-side run pairing surface for joining one active API-mode
agent session, sending pair messages, reading a compact transcript, and
ending pairing explicitly before workflow release continues.

This PR wires the feature end to end:

- adds OpenAPI paths and shared `fabro-types` DTOs for pair lifecycle,
messages, transcript entries, and run event details
- adds typed `RunEvent` variants for pair lifecycle and pair-scoped
user/system messages
- extends the workflow steering hub and agent session drain path with
typed pair control items, single-target validation, pair parking, and
pair end/resume behavior
- extends worker JSONL control and server transports for pair
start/message/end while preserving existing
steer/interrupt/answer/cancel behavior
- adds Axum handlers for `/api/v1/runs/{id}/pair`, pair messages, pair
transcript, and `/api/v1/runs/{id}/events/{seq}`
- adds `fabro-client` helpers for the new endpoints

## Notes

The subprocess path does not add a bidirectional worker ack channel in
this PR. Instead, the HTTP pair handlers only return lifecycle/message
success after the corresponding durable runtime event is observed, so
mpsc enqueue success alone is not treated as API success.

The plan checklist in
`docs/superpowers/plans/2026-05-18-server-side-run-pairing-api-events.md`
is included with that distinction left visible.

## Verification

- `cargo build -p fabro-api`
- `cargo check -p fabro-api -p fabro-client -p fabro-agent -p
fabro-workflow -p fabro-interview -p fabro-server`
- `cargo +nightly-2026-04-14 fmt --check --all`
- `cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D
warnings`
- `cargo nextest run -p fabro-api pair
run_event_round_trips_pair_lifecycle_events
run_event_round_trips_agent_pair_messages`
- `cargo nextest run -p fabro-workflow pair`
- `cargo nextest run -p fabro-interview pair`
- `cargo nextest run -p fabro-server pair
subprocess_answer_transport_pair_commands_enqueue_control_messages steer
interrupt`
2026-05-20 18:58:38 -04:00
..
build-support fix(build): refresh embedded git sha on branch commits 2026-05-09 14:10:04 -04:00
fabro-acp [codex] Add ACP steering support (#329) 2026-05-20 17:21:56 -04:00
fabro-agent feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-api feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-auth feat(workflow): enforce strict api/acp backends (#307) 2026-05-18 13:20:56 -04:00
fabro-checkpoint Make git metadata sandbox-native 2026-04-27 21:43:15 -07:00
fabro-cli feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-client feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-config refactor(auth): split credential sources and vault schemas (#306) 2026-05-18 11:07:42 -04:00
fabro-core feat(errors): add structured failure diagnostics (#277) 2026-05-16 13:25:07 -04:00
fabro-dev refactor(auth): split credential sources and vault schemas (#306) 2026-05-18 11:07:42 -04:00
fabro-devcontainer refactor(static): centralize env var names 2026-04-24 12:29:51 -04:00
fabro-dump feat(sandbox): prepare clone layout for multi-repo runs (#250) 2026-05-14 09:38:20 -04:00
fabro-github fix(github): refresh installation tokens during workflows 2026-05-06 07:15:18 -04:00
fabro-graphviz fix(graph): support dotted Fabro graph attributes (#324) 2026-05-20 09:31:08 -04:00
fabro-hooks refactor(hooks): centralize run location handling (#325) 2026-05-20 09:31:46 -04:00
fabro-http refactor(static): centralize env var names 2026-04-24 12:29:51 -04:00
fabro-install refactor(auth): split credential sources and vault schemas (#306) 2026-05-18 11:07:42 -04:00
fabro-interview feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-llm refactor(model): move provider facts into catalog (#298) 2026-05-17 20:59:08 -04:00
fabro-macros refactor(dev): simplify generated docs tooling 2026-04-24 18:41:00 -04:00
fabro-manifest fix(workflow): allow workflow-root template partials (#322) 2026-05-20 09:22:28 -04:00
fabro-mcp feat(cli): add Fabro MCP server (#236) 2026-05-11 18:20:50 -04:00
fabro-mcp-server [codex] Add ACP steering support (#329) 2026-05-20 17:21:56 -04:00
fabro-model feat(server): add GET /api/v1/providers and /settings/models page (#321) 2026-05-20 09:05:00 -04:00
fabro-oauth fix(error): preserve remaining error context 2026-05-02 10:51:15 -04:00
fabro-options-metadata refactor(dev): simplify generated docs tooling 2026-04-24 18:41:00 -04:00
fabro-proc refactor(static): centralize env var names 2026-04-24 12:29:51 -04:00
fabro-redact refactor(integrations): make chat integrations Slack-only 2026-05-09 11:43:16 -04:00
fabro-sandbox feat(sandbox): label Daytona sandboxes as managed (#326) 2026-05-20 17:22:12 -04:00
fabro-server feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-slack feat(slack): render plan summary + run link in interview messages (re #253, stacked on #252) (#254) 2026-05-13 07:41:54 -04:00
fabro-spa feat(dev): gitignore embedded spa assets 2026-04-26 21:31:11 -04:00
fabro-static refactor(llm): split provider identity from adapters (#280) 2026-05-16 13:13:41 -04:00
fabro-store feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-telemetry refactor(workflow): remove retro stage (#230) 2026-05-09 10:18:20 -04:00
fabro-template fix(workflow): allow workflow-root template partials (#322) 2026-05-20 09:22:28 -04:00
fabro-test feat(cli): add Fabro MCP server (#236) 2026-05-11 18:20:50 -04:00
fabro-tracker fix(github): refresh installation tokens during workflows 2026-05-06 07:15:18 -04:00
fabro-types feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00
fabro-util feat(errors): add structured failure diagnostics (#277) 2026-05-16 13:25:07 -04:00
fabro-validate fix(graph): support dotted Fabro graph attributes (#324) 2026-05-20 09:31:08 -04:00
fabro-vault refactor(auth): split credential sources and vault schemas (#306) 2026-05-18 11:07:42 -04:00
fabro-workflow feat(server): add run pairing API (#312) 2026-05-20 18:58:38 -04:00