Commit graph

1851 commits

Author SHA1 Message Date
Bryan Helmkamp
b39738af7f
refactor(mcp): clarify Fabro server settings type 2026-05-11 12:16:51 -04:00
Bryan Helmkamp
6a11cdd7fc
refactor(mcp): call manifest builder directly 2026-05-11 12:10:20 -04:00
Bryan Helmkamp
19f7479490
refactor(mcp): reuse manifest args emptiness check 2026-05-11 12:09:48 -04:00
Bryan Helmkamp
3a7219c865
refactor(cli): remove manifest builder re-export 2026-05-11 12:08:51 -04:00
Bryan Helmkamp
e0be041c1e
Merge remote-tracking branch 'origin/main' into add-fabro-mcp-server 2026-05-11 11:22:30 -04:00
Bryan Helmkamp
afa982176f
Fix MCP run search submitted ordering 2026-05-11 11:22:14 -04:00
Bryan Helmkamp
17a870b4d1
fix(mcp): harden events and proxy handling 2026-05-11 10:56:56 -04:00
Bryan Helmkamp
feec197dec
fix(mcp): honor auth env and stdio fixture 2026-05-11 10:41:19 -04:00
Bryan Helmkamp
947001d719
fix(mcp): reuse CLI auth and run overrides 2026-05-11 10:24:32 -04:00
Bryan Helmkamp
81365a1cbf
fix(mcp): validate run event parameters 2026-05-11 10:05:11 -04:00
Bryan Helmkamp
ac32ca2fde
fix(mcp): page run events in requested order 2026-05-11 09:51:18 -04:00
Bryan Helmkamp
75af34140c
fix(mcp): tighten run tool contract 2026-05-11 09:36:08 -04:00
Bryan Helmkamp
9fc0ec3061
fix(cli): align MCP run tools with CLI behavior 2026-05-11 09:17:12 -04:00
Bryan Helmkamp
40a057f10c
test(cli): cover fabro mcp server contract 2026-05-11 08:41:16 -04:00
Bryan Helmkamp
9ea00185dc
fix(server): avoid cancelling terminal runs during delete
Skip cancellation signaling when the durable run projection is already terminal so deletion cannot append cancelled failure events after a successful run.
2026-05-11 08:34:27 -04:00
Bryan Helmkamp
c144f3ca2c
feat(cli): add mcp run control tools 2026-05-11 08:23:48 -04:00
Bryan Helmkamp
e6b891147c
feat(cli): add mcp run create and search tools 2026-05-11 08:15:52 -04:00
Bryan Helmkamp
f425e51acb
feat(cli): start fabro mcp stdio server 2026-05-11 08:03:55 -04:00
Bryan Helmkamp
c19acaccd3
feat(cli): configure fabro mcp clients 2026-05-11 07:55:53 -04:00
Bryan Helmkamp
88fc2392f5
feat(cli): add mcp command surface 2026-05-11 07:52:28 -04:00
Bryan Helmkamp
00205a53d9
test(cli): align run summary fixtures
Use the canonical run summary test helper for remote run mocks so CLI integration fixtures match the shared Run wire shape.
2026-05-10 23:38:55 -04:00
Bryan Helmkamp
b5101bbde3
refactor(types): remove legacy run summary shape
Use the canonical nested Run DTO directly and reject the old flat run summary JSON shape. Update store, server, CLI, and fixtures to read and produce canonical fields.
2026-05-10 23:29:41 -04:00
Bryan Helmkamp
4fa4716015
refactor(core): simplify reviewed run cleanup
Reuse shared frontend formatting and SSE dedupe helpers, tighten typed sandbox handling, remove obsolete run DTOs, and collapse auth-session revoke into a single store operation.
2026-05-10 22:53:20 -04:00
Bryan Helmkamp
cccb557281
feat(api): unify public run shape
Return canonical Run payloads across run list, board, create, and lifecycle endpoints. Move archive state out of RunStatus and into lifecycle metadata, split sandbox runtime from planned sandbox data, and separate static pull request records from live pull request details.

Regenerate the TypeScript API client and migrate web, CLI, server, store, workflow, and API tests to the new contract.
2026-05-10 20:48:55 -04:00
Bryan Helmkamp
d2623662e0
feat(web): build unified auth sessions page
Render /profile/sessions from the new GET /api/v1/auth/sessions API.
The page shows the current browser session and active CLI sessions in one
list, with revoke buttons gated by the backend-supplied revocable field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 14:30:00 -04:00
Bryan Helmkamp
5da2f3d455
test(cli): align sandbox event fixtures
Update seeded sandbox.initialized events to use the canonical sandbox id field expected by run event validation.
2026-05-10 14:23:44 -04:00
Bryan Helmkamp
b6d4d240ae
feat(auth): add unified session API
Expose browser and CLI auth sessions through a normalized API, and allow revoking active CLI refresh-token chains while keeping browser sessions non-revocable for v1.
2026-05-10 14:16:23 -04:00
Bryan Helmkamp
da368366f0
fix(store): hydrate projection cache before appending later events 2026-05-10 13:38:06 -04:00
Bryan Helmkamp
5209d05623
refactor(sandbox): unify run sandbox identity
Replace the separate sandbox record shape with a typed RunSandbox model shared by projections, API responses, and generated clients. The public contract now uses SandboxProvider plus a non-null id and working_directory, and removes sandbox identifier/name leakage.
2026-05-10 13:16:57 -04:00
Bryan Helmkamp
47f581cc1d
fix(server): improve sandbox service discovery
Fall back to procfs when ss is unavailable, report the discovery source in API metadata, and surface the sandbox install tip in the services UI. Previewable services are ordered first for clearer service selection.
2026-05-10 12:40:38 -04:00
Bryan Helmkamp
9c08653228
feat(server): list sandbox services 2026-05-10 11:24:39 -04:00
Bryan Helmkamp
e86b11f395
fix(server): point sandbox VNC preview at noVNC viewer page
Daytona's signed preview URL targets the noVNC service root, which
serves a directory listing of the noVNC distribution rather than the
actual viewer. The result was that selecting VNC mode in the run
sandbox tab loaded an iframe of `vnc.html`, `vnc_auto.html`, … as
links instead of the desktop.

Fix it server-side by parsing the signed URL, replacing the path with
`/vnc.html`, and appending `autoconnect=true&resize=scale` so the
iframe immediately connects and scales to fit. Existing query params
on the signed URL (e.g. proxy tokens) are preserved. The intentional
url::Url use is wrapped with #[expect(disallowed_types)] since this is
internal URL manipulation, not a logging/error boundary; the
parse-failure error message omits the URL to avoid leaking creds in
client-facing API responses.

Verified live against a Daytona run on the daytona-medium snapshot:
the response now ends with /vnc.html?autoconnect=true&resize=scale
and the iframe loads the actual noVNC viewer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 10:13:26 -04:00
Bryan Helmkamp
ac90bb199c
feat(server): add Daytona VNC preview endpoint
Adds the sandbox VNC API contract, Daytona Computer Use startup flow, signed noVNC preview response, and generated TypeScript client support.
2026-05-10 00:06:43 -04:00
Bryan Helmkamp
36c5a86005
refactor(runs): simplify run projection shape
Make run.created the projection anchor and require canonical run spec/status fields in API and clients.

Collapse diff/checkpoint/conclusion payloads around RunDiff and update server, CLI, workflow, store, and generated clients.
2026-05-09 23:31:43 -04:00
Bryan Helmkamp
7ee1ef59f9
chore(sandbox): tighten details module imports for nightly clippy 2026-05-09 21:51:48 -04:00
Bryan Helmkamp
85ca7d5310
feat(server): wire GET /api/v1/runs/{id}/sandbox handler
Returns sandbox_details for the run-owned sandbox. Maps internal errors
into the HTTP shape required by the OpenAPI contract: 404 when the run
or sandbox record is missing, 501 when the provider has no details
implementation, 409 when an existing provider's inspection fails.
2026-05-09 21:44:07 -04:00
Bryan Helmkamp
02d494c268
feat(sandbox,server,web): add sandbox_details inspection and unify SandboxResources
Adds fabro_sandbox::sandbox_details, a control-plane inspection function
that maps Local, Docker, and Daytona providers into a shared
SandboxDetails record (state, image, resources, labels, timestamps).

To avoid type sprawl, the demo board's SandboxResources is unified with
the new control-plane shape (cpu_cores: f64, memory_bytes: u64,
disk_bytes: u64). The runs board chip in apps/fabro-web converts
memory_bytes back to GB for display.
2026-05-09 21:40:19 -04:00
Bryan Helmkamp
aa7e4dd882
feat(types,api): add SandboxDetails control-plane model and OpenAPI schema
Introduces a provider-neutral SandboxDetails record (state, image,
resources, labels, timestamps) plus a normalized SandboxState enum and
the GET /api/v1/runs/{id}/sandbox operation. The fabro-api crate reuses
the fabro-types definitions through with_replacement, and a new
parity round-trip test asserts type identity and JSON shape.
2026-05-09 21:28:03 -04:00
Bryan Helmkamp
f538ece6c0
fix(cli): repair verification failures
Update the sandbox SSH snapshot to match the current access-command error and bring system repair imports in line with clippy's absolute path lint.
2026-05-09 18:07:24 -04:00
Bryan Helmkamp
8cdc4a6f28
fix(runs): repair deletion of unreadable runs
Allow forced run deletion to purge durable metadata even when projection replay fails, and add a repair command path for deleting unreadable runs in batch.
2026-05-09 17:45:55 -04:00
Bryan Helmkamp
61ab94195e
feat(sandbox): copy Docker exec access command 2026-05-09 17:05:46 -04:00
Bryan Helmkamp
fe77c2a688
fix(sandbox): hide Daytona terminal control frames 2026-05-09 16:18:58 -04:00
Bryan Helmkamp
66b11480d6
fix(sandbox): use Daytona toolbox proxy for terminals 2026-05-09 16:15:38 -04:00
Bryan Helmkamp
4ef239de79
fix(run-files): remove needless borrow 2026-05-09 16:06:31 -04:00
Bryan Helmkamp
db3f348fab
feat(runs): add sandbox terminal
Expose a run-scoped websocket terminal for Docker and Daytona sandboxes, and add the web terminal route so sandbox-backed runs can be inspected interactively from the run detail page.
2026-05-09 16:06:04 -04:00
Bryan Helmkamp
237318f13f
Merge remote-tracking branch 'origin/main' 2026-05-09 15:40:18 -04:00
Bryan Helmkamp
65c8a12cce
Merge remote-tracking branch 'origin/main' 2026-05-09 15:39:44 -04:00
Bryan Helmkamp
929ece9f6d
test(run-files): cover commits route envelope 2026-05-09 15:34:36 -04:00
Bryan Helmkamp
ac07df6a66
refactor(billing): call token aggregation directly 2026-05-09 15:32:55 -04:00
Bryan Helmkamp
67decad7b5
feat(billing): project live stage token usage
Store live per-stage token counts on StageProjection, carry typed billing model identity through agent.message events, and derive billing rollups from the projection so in-flight stages can report usage before terminal events arrive.
2026-05-09 15:25:51 -04:00