feat(ai-autopilot): pluggable runner seam (interface + FakeRunner)#103
Merged
Conversation
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.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #99 (interface-first slice). Second child of epic #97.
What
Adds the execution seam autopilot builds apps in. A
Runnerboots an isolated workspace — a virtual filesystem + a shell + an optional preview URL — and is shaped after Flue'ssandboxcontract (per the #101 teardown), so real sandboxes drop in behind one interface: WebContainer, Docker, or a Flue sandbox.Runner/RunnerSession/RunnerFsinterfaces.previewis optional — its presence is the capability signal (a one-shot CI sandbox may onlyexec).FakeRunner— in-memory filesystem, programmableexec, recorded calls, optional preview. The runner analog ofai-sdk'sAiFake, so autopilot is driveable and testable with zero sandbox infra.runnerTools(session)— the bridge to the agent layer: exposes a booted session asread_file/write_file/list_files/exec/previewtools.write/exectoggles give a read-only surface; aprefixavoids 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
sandboxparam, so oneRunnerinterface is right. This PR is that interface + fake; the real adapters (FlueRunnerfirst, 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.