Repository navigation
feat(core): hosted workspace execution with modal driver - #40784
Closed
kitlangton wants to merge 52 commits into
Closed
kitlangton wants to merge 52 commits into
kitlangton wants to merge 52 commits into
Conversation
# ------------------------ >8 ------------------------ # Do not modify or remove the line above. # Everything below it will be ignored. # # Conflicts: # packages/core/test/session-create.test.ts
Contributor
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
1 task done
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.
What
Hosted Workspace execution for V2. A Workspace is a durable execution environment (a machine with a root, not a repository), a sandbox is one kind of Workspace, and a Session whose Location names a
workspaceIDruns through the existing runner graph. The same tools and permissions execute locally or through a provider; plugins are hosting-blind.Ships with a live Modal driver and an LLM-in-the-loop e2e: a scripted model drives the real runner,
apply_patchandshellexecute inside Modal, and files read back through the hosted filesystem.Design:
specs/v2/workspaces.md.How
Workspacepersists{ id, provider, binding, root }; metadata reads never contact a provider.WorkspaceDriverprovidescreate/connect/destroy; bindings are opaque to core and decoded by the selected driver.WorkspaceEnvironmentis the provider primitive seam: files, process spawning, shell lowering, and workspace root.LocationServiceMapbinds the environment and swaps Location-scoped core services for hosted Locations. Driver connections live for the cached graph lifetime.LocationMutationowns path resolution and external-directory boundaries; permissions follow the lexical path the model named, while canonical referents are used only for reads, writes, and locking.FileMutationowns text reads, typed file errors, mutation locking, UTF-8 BOM policy, formatting, writes, and removes. It carries both canonical identity and lexical entry paths so moving a symlink removes the link, not its referent.edit,write, andapply_patchconsume onlyLocationMutationandFileMutation; they contain no host/provider branching and cannot accessWorkspaceEnvironment.Shellbackends validate cwd where commands execute. The shell tool only resolves paths and permissions.WorkspaceEnvironment; the hosted-onlyPluginSupervisornode is gone.globandgrepuntil their search implementation executes through the environment.realpath -ecanonicalization, sandbox process streams, a git/bash/ripgrep image, reconnect, and synchronous termination.Scope
Deliberately deferred:
glob/grepworkspaces.*HTTP/SDK endpointsWorkspaceEnvironmentadapterTesting
bun run testinpackages/core— 1541 pass, 7 skip, 0 fail (1548 tests)bun run testinpackages/server— 19 pass, 0 fail, including live Modal graph/session coveragegit diff --checkcleanThe repository-wide Effect pattern scan still reports seven pre-existing findings outside this change.