Studio Web: run the agent in a hosted SecEx sandbox (opt-in runtime)#3890
Draft
lezama wants to merge 21 commits into
Draft
Studio Web: run the agent in a hosted SecEx sandbox (opt-in runtime)#3890lezama wants to merge 21 commits into
lezama wants to merge 21 commits into
Conversation
…time Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…runtime Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…debug logging Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…x session Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…enders Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… the getSession race Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… in Node) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…preview widget Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… error frame Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nges show Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
||
| const raw = Buffer.from( base64, 'base64' ); | ||
| const buffer = isDb ? repointDbBuffer( raw, brokerUrl ) : raw; | ||
| await fs.mkdir( path.dirname( dest ), { recursive: true } ); |
| const raw = Buffer.from( base64, 'base64' ); | ||
| const buffer = isDb ? repointDbBuffer( raw, brokerUrl ) : raw; | ||
| await fs.mkdir( path.dirname( dest ), { recursive: true } ); | ||
| await fs.writeFile( dest, buffer ); |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…paused Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… snapshot lag Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…es mid-session Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t lost to the run lock Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ssion (UI jump-back) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…not any path in the transcript Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The URL newChat-param trigger didn't fire the provider effect from outside the ChatsProvider; create the session via the connector and navigate to it instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Related issues
Continues the Studio Web effort that landed the web-server + web connector (#3816) and the
AgentRuntimeseam.How AI was used in this PR
The runtime, the SSE reader, the pause/answer/resume handling, and this description were drafted with Claude Code, then reviewed; the change typechecks and builds locally.
Proposed Changes
Studio Web can now run the agent in a hosted SecEx sandbox instead of a local child process, so the browser build of Studio works without anything running on the user's machine. Each user gets one sandbox — the cloud analog of "your laptop", with the same
~/Studio/sites and~/.claudesessions inside it, like the desktop app.It plugs into the existing
AgentRuntimeseam: a new runtime drives the wpcomstudio-codeendpoint (POST /wpcom/v2/studio-code/run), which runsstudio code --jsonin the sandbox and streams its events back over SSE. The web-server relays those through the same callbacks the local runtime already uses, so the run-manager and the browser UI are untouched.Interactive questions and multi-turn work like the desktop. There's no live process in the sandbox to answer over IPC, so the runtime mirrors the proven headless pattern: when a turn pauses on a question the agent process stays "connected" instead of exiting, and answering re-drives the endpoint with the user's choice as the next message on the same sandbox session (resolved from
turn.completed.sessionId). To the web-server and the UI it looks like an ordinary live run that asks and gets answered.It's opt-in and zero-risk by default: the local child-process backend stays the default, and the SecEx runtime is only installed when
STUDIO_WEB_BACKEND=secexis set.Testing Instructions
Without the env var,
web-serverbehaves exactly as before (local agent).Pre-merge Checklist
npm run typecheckandnpm run cli:buildpass.)