refactor(dev)!: delete the callerless runtime App preview path - #852
Conversation
Since the Runtime Playground and the Workbench runtime App bridge were deleted (#629, #845), nothing calls the runtime App lane. Remove it end to end: the dev server's /api/runtime/apps and /api/runtime/mcp/sessions routes, the runtime preview and binding services, the runtime client-surface proxy and its session bindings, DevServerSession.openRuntimeClientSurface, the runtime methods on the Workbench McpAppClient and McpRouteClient, the runtime-bound McpSessionController mode and App attachment, and the runtime.app.updated / runtime.hmr.client-* events with the Workbench's unread HMR client counts. Delete the Runtime Playground capture script and its README recipe.
…app-path # Conflicts: # docs/diagnostics.md
…t graph Move the MCP App sandbox and consent type declarations into a Node-free mcp-app-sandbox-types.ts leaf and point every importer at it. The deleted runtime preview service had been pulling @types/node into the browser-only web-host program, which hid that contracts/mcp-apps.ts reached the Node sandbox module. Also delete DevRuntimeController.emit, whose only callers were the removed client-surface proxy and preview service, and drop the deleted consent files from the topology test fixture.
🦋 Changeset detectedLatest commit: 7d24b8b The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🦋 Changeset detectedLatest commit: 1da7238 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5403a094f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "agent-bundle": minor | ||
| --- | ||
|
|
||
| Remove the Workbench runtime App preview path. The dev server no longer serves `/api/runtime/apps/**` or `/api/runtime/mcp/sessions/**`, `DevServerSession` (from `agent-bundle` and `agent-bundle/api`) drops `openRuntimeClientSurface`, and `DevRuntimeEventInput` no longer accepts `runtime.app.updated`, `runtime.hmr.client-connected`, or `runtime.hmr.client-disconnected`. The `AB8022` 410 and `AB8023` 413 runtime App responses are gone; both codes keep their other meanings. Runtime runs, status, surfaces, and MCP App previews for artifact sessions are unchanged. |
There was a problem hiding this comment.
Append the PR number to the changeset summary
This is the sole changeset for a breaking publishable-package change, but its summary ends with unchanged. rather than the required (#PR) suffix. As written, the generated release notes lose the required PR attribution; append the actual PR number.
AGENTS.md reference: AGENTS.md:L124-L125
Useful? React with 👍 / 👎.
* refactor(dev)!: delete the runtime provider MCP contract Nothing in the host consumes a provider's MCP registry, clientSurface(), or run results' app binding since the runtime App path was removed (#852). Delete them from agent-bundle: the RuntimeMcpRegistry implementation and createRuntimeMcpRegistry, DevRuntimeSession.mcpRegistry and clientSurface(), DevRuntimeInspectionEnvelope.app, the runtime.mcp.* events and their fields, and every DevRuntimeMcp*/RuntimeMcp* type. The Workbench runtime client now rejects an app field in run inspections. Rework examples/rsc-agent-runtime so its dev provider no longer hosts an in-process MCP registry or App client surface: activation commits only the generation store, generation metadata drops the registry descriptors and digests, and MCP tool runs no longer return an App binding. Hooks and MCP tools still share the durable kernel, which a new lifecycles e2e step checks end to end. * fix(example): recover from a failed prepared-runtime reconcile Return the runtime to active once a reconcile succeeds after a failed one, abort a prepared activation when the test seam throws, cover a provider-path latch on an active session, and describe what the dev session still serves. * docs(changeset): reference #855
Follow-up to #845. After #629 deleted the Runtime Playground and #845 deleted the Workbench runtime App bridge, nothing calls the runtime App path. This PR deletes it end to end. It is breaking, so the changeset is
agent-bundleminor.Reachability (confirmed zero before deleting)
McpPage(Advanced) andMcpAppPreview(App routes) mount artifact sessions only. Nothing constructs a runtime-boundMcpSessionControllerbinding or callsattachAppor anyMcpAppClientruntime method./api/runtime/apps/**was only the runtime branch ofMcpAppRoutes./api/runtime/mcp/sessions/**was onlyRuntimeMcpRoutes, registered inForegroundServer. Both had no client other than the code deleted here.DevServerSession.openRuntimeClientSurface(fromagent-bundleandagent-bundle/api) is the only public member removed.RuntimeMcpRoutes,RuntimeClientSurfaceProxy, andMcpAppRuntimePreviewServicewere exported only from the internaldev/index.ts, which is not a package entry point.Deleted
dev/mcp-app-runtime-preview-service.ts,dev/mcp-app-runtime-binding-service.ts,dev/runtime-mcp-routes.ts,dev/runtime-client-surface-proxy.ts, and their tests.mcp-app-routes.ts.RuntimeClientSurfaceBindings, andopenRuntimeClientSurfaceinworkbench-server.ts.RuntimeMcpRouteswiring andDevRuntimeController.emit(its only callers were deleted).DevRuntimeClientSurfaceProxyBinding.runtime.app.updatedandruntime.hmr.client-*event types.contracts/mcp-apps.ts.runtime.app.updatedsubscription onMcpAppClient.openRuntime/restartRuntime/closeRuntime/executeRuntimeonMcpRouteClient.attachAppinMcpSessionControllerand the session model.runtime-model.ts, which nothing read.scripts/capture-runtime-playground.mjs, which only drove the removed Playground.docs/diagnostics.mdrows for AB8010, AB8022 (410 case), AB8023 (runtime operation and 413 cases), AB8204 (MCP session revision), and the MCP App section header.docs/effect-conventions.md.examples/rsc-agent-runtime/README.md.No diagnostic code becomes wholly unreachable. Each affected code is still emitted by another route, so the rows are edited rather than retired.
Browser contract boundary fix
The deleted preview service had been pulling
@types/nodeinto the browser-onlytsconfig.web-host.jsonprogram. That hid the fact thatcontracts/mcp-apps.tsandmcp-app-bridge.tstype-imported from the Node modulemcp-app-sandbox.ts. This PR moves the sandbox and consent type declarations into a Node-freemcp-app-sandbox-types.tsleaf with a single definition and no re-export shim, points the five importers at it, and drops the unusedisMcpAppConsentCapabilityre-export.Kept on purpose
The runtime provider contract stays:
DevRuntimeSession.mcpRegistryandclientSurface(),createRuntimeMcpRegistryfromagent-bundle/api, run results'app.mcpBinding, and theDevRuntimeMcp*protocol types. Thersc-agent-runtimeexample implements and tests them directly. The host no longer consumes them, so they are the next candidate, but removing them changes the provider API and the example and needs its own PR.Local gate
All runs are on a branch merged with current
origin/main, including #832.pnpm build✅pnpm typecheck✅ (including the web-host and workbench projects)pnpm lint✅pnpm test:unit✅ (305 files; 4,315 passed)pnpm test:integration:run✅ (104 files; 1,164 passed, 4 skipped) on the tree merged through test: migrate recursive rmSync to removeTree(Sync) and gate rmSync, rmdir, and maxRetries: 0 #849. After merging chore(deps): Effect RC re-pin to 4.0.0-rc.117 #832, I re-ran the integration files that exercise the changed modules:dev-workbench,mcp-app-routes,mcp-app-real.e2e,mcp-page-app-browser,mcp-app-preview-browser,mcp-session-timeout.e2e,mcp-tasks.e2e,overview.e2e,discovery.e2e,lifecycles.e2e,rsc-runtime-topology-script, andruntime-routes✅ (43 tests).pnpm test:packed✅ (16 files; 46 passed, 1 skipped)pnpm docs:site:build✅ (language parity OK; 0 broken links)pnpm check:runtime-topology✅docs/diagnostics.md):pnpm build,pnpm typecheck,pnpm lint,pnpm test:unit(305 files; 4,318 passed), andpnpm docs:site:build✅ on head 7d24b8b, which was current withorigin/main.Review
change-risk-reviewer(Claude Opus 5.5) found no blockers. It confirmed that the artifact MCP App and session paths, the runtime runs, status, and surfaces routes, and the Workbench runtime backend are unchanged, and that the changeset and docs match the source.DevRuntimeController.emithad no callers left and is now deleted.docs/assets/rsc-runtime-workbench/fidelity-ledger.mdstill describes the old capture tool. It and its screenshots are a historical evidence record, so I left them.