Skip to content

feat(ai-autopilot): pluggable runner seam (interface + FakeRunner)#103

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/ai-autopilot-runner
Jul 2, 2026
Merged

feat(ai-autopilot): pluggable runner seam (interface + FakeRunner)#103
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/ai-autopilot-runner

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Part of #99 (interface-first slice). Second child of epic #97.

What

Adds the execution seam autopilot builds apps in. A Runner boots an isolated workspace — a virtual filesystem + a shell + an optional preview URL — and is shaped after Flue's sandbox contract (per the #101 teardown), so real sandboxes drop in behind one interface: WebContainer, Docker, or a Flue sandbox.

  • Runner / RunnerSession / RunnerFs interfaces. preview is optional — its presence is the capability signal (a one-shot CI sandbox may only exec).
  • FakeRunner — in-memory filesystem, programmable exec, recorded calls, optional preview. The runner analog of ai-sdk's AiFake, so autopilot is driveable and testable with zero sandbox infra.
  • runnerTools(session) — the bridge to the agent layer: exposes a booted session as read_file / write_file / list_files / exec / preview tools. write / exec toggles give a read-only surface; a prefix avoids name collisions.

Why one interface (resolves #99's open question)

The #101 Flue teardown showed Flue spans in-memory → local → edge → container under a single sandbox param, so one Runner interface is right. This PR is that interface + fake; the real adapters (FlueRunner first, then WebContainer only if needed) land separately.

Test

13 new tests (fs round-trips, exec recording + programmable results, preview capability detection, dispose, and the tool bridge). Full suite 47/47 green. Typecheck + build clean.

Scope

Interface + FakeRunner + tool bindings only. No real sandbox impls, no infra. Surfaces (#100) build on this.

Add the execution seam autopilot builds apps in. A Runner boots an isolated
workspace (virtual filesystem + shell + optional preview URL), shaped after
Flue's sandbox contract (per the #101 teardown) so real sandboxes drop in
behind one interface: WebContainer, Docker, or a Flue sandbox.

- Runner / RunnerSession / RunnerFs interfaces; preview is optional (presence
  is the capability signal)
- FakeRunner: in-memory fs, programmable exec, recorded calls, optional preview
  (the runner analog of ai-sdk's AiFake)
- runnerTools(session): expose a session to an agent as read_file/write_file/
  list_files/exec/preview tools, with write/exec toggles + name prefix

Interface-first slice; FlueRunner/WebContainer/Docker adapters land separately.
Child #99 of epic #97.
@suleimansh suleimansh added enhancement New feature or request priority: high Should be addressed soon labels Jul 2, 2026
@suleimansh suleimansh self-assigned this Jul 2, 2026
@suleimansh suleimansh merged commit b0c0647 into main Jul 2, 2026
2 checks passed
@suleimansh suleimansh deleted the suleimansh/feat/ai-autopilot-runner branch July 2, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: high Should be addressed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ai-autopilot: pluggable execution runner (WebContainer + Docker)

1 participant