feat(mcp-server)!: remove the repl tool and the repl-engine package - #515
Merged
Merged
Conversation
The MCP server's model-facing surface is now the workflow tool plus the capability-gated workflow_monitor view. The interactive per-project QuickJS REPL, its broker and its snapshot store are removed, and @automatalabs/repl-engine, which only mcp-server imported, is deleted from the workspace. mcp-server: drop the repl tool registration, its exports, the REPL options on CreateWorkflowServerOptions, the eval-break members of WorkflowServerControl (the stdio entry's shutdown hook becomes a generic optional dispose), the worker-thread relay stdio transport (the entry now serves over the SDK StdioServerTransport) and the shim's out-of-band eval-break. The daemon loses the client-presence ledger and drain with everything that fed it: activeReplDrainCount, disposeReplStates, ProjectContext.repl, DaemonInfo.replBreakUrl, the SessionRegistry presence hooks and evictDrainable's keep veto. replClientId had one non-REPL job, scoping workflow_monitor notification claims per legacy client, and stays as clientId. The AGENTPRISM_REPL_EVAL_TIMEOUT_MS and AGENTPRISM_REPL_DRAIN_BOUND_MS knobs are gone. workflows: the bundled MCP server no longer serves repl and the package no longer depends on repl-engine. acp-agents, pi-acp, codex-acp: comments and README passages that credited awaitCurrentTurn, the _session/loaded_turn extension and the turn-text passthroughs to the REPL broker now describe the host re-attach surface. Those SDK and wire surfaces are deliberately unchanged. Tests: the seven REPL-only mcp-server test files and the REPL cases in shared files are deleted. Two shim recovery tests borrowed a never-ending repl eval as their accepted-but-unanswered request; they now use a live config probe frozen mid-flight. The live invalid-mode check moves to the workflow tool, which refuses at preparation. The idle-accounting and session-registry tests keep their coverage without drains or vetoes, and the documented package count moves from ten to nine. Docs: README, AGENTS.md, CONTRIBUTING.md, docs/api.md and the package READMEs drop the REPL; the two REPL roadmap documents move to docs/archive/roadmap.
Resolve the modify/delete conflicts on packages/repl-engine: the Version Packages release bumped a package this branch deletes.
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
Removes the interactive
replMCP tool and everything that existed only to serve it. The MCP server's model-facing surface is now theworkflowtool plus the capability-gatedworkflow_monitorview (and the app-onlyworkflow-events/workflow-runs/workflow-notificationstools).packages/repl-engineis deleted (≈18k lines of source, ≈13k of tests). Onlymcp-serverimported it;workflowsdeclared it solely because its bundled MCP entry externalizes@automatalabs/*.quickjs-wasidrops out of the lockfile. The workspace is nine packages.mcp-server: the six REPL-only modules (repl-tool,repl-project,repl-presence,repl-stdio-transport,repl-stdio-relay-worker,wasm-ambient.d.ts) are deleted, and the REPL is cut out of the shared files.Scope decision
Kept by decision: the
acp-agents/pi-acp/codex-acpSDK and wire surfaces whose only in-repo consumer was the REPL broker —InteractiveSession.awaitCurrentTurn()and the loaded-turn errors, the_session/loaded_turnextension, the turn-text passthroughs,onHandoff,InteractiveSession.steer,runner.defaultBackendId(). They are unchanged and remain supported; only comments and README passages that credited them to "the REPL broker" were reworded to describe the host re-attach surface.Contract changes (
@automatalabs/mcp-server, major)replis no longer registered;SERVER_INSTRUCTIONSdescribesworkflowonly.replToolInputShape,replToolOutputShape,ReplToolOptions,createReplProjectState,ensureReplWorkspace,disposeReplProjectState,resetReplProjectState,renameAsideNeverOverwriting,ReplProjectState,ReplPresenceLedger.CreateWorkflowServerOptions: dropsreplRunner,replPresence,replEvalBreakChannel,replDrainBoundMs,disconnectReplClientOnClose.replClientId→clientId: it had one non-REPL job — scopingworkflow_monitornotification claims per legacy-era MCP client — so that capability is kept under an honest name (the daemon still passes each session's id).WorkflowServerControl: dropsreplBreakUrl()(was required),replDefaultProjectDir(),disposeReplEvalBreakChannel(). The stdio entry had been using the last of those as its general shutdown hook (event-subscription detach + permission-broker dispose); that is now a generic optionaldispose().StdioServerTransport. The worker-thread relay transport existed only to break a synchronous eval out of band; it and the shim'stools/callinterception are gone.CreateDaemonOptions.replRunner/replDrainBoundMs/sessionTtlMs/evalBreakChannel,DaemonHandle.activeReplDrainCount(),WorkflowProjectRegistry.disposeReplStates(),ProjectContext.repl,DaemonInfo.replBreakUrl, theSessionRegistrypresence hooks andevictDrainable'skeepveto (their sole consumer was the ledger). Idleness is sessions, runs and in-flight requests.AGENTPRISM_REPL_EVAL_TIMEOUT_MS,AGENTPRISM_REPL_DRAIN_BOUND_MS.repl/stores on disk are left untouched and no longer read. No compatibility layer.@automatalabs/workflowsis also a major: its bundledmcpsubcommand no longer servesrepland therepl-enginedependency is dropped. The programmatic SDK is unchanged.Tests (deletions and rewrites named, per AGENTS.md)
mcp-servertest files; thehttp-daemonpresence-drain test; the live "REPL queue smoke"; the daemon-lifecycle "drain in flight" test.repleval as their accepted-but-unanswered request. They now start a liveworkflowconfig probe and freeze the daemon mid-probe (SIGSTOP) before killing it. (A request that never reached the daemon is a different case — the legacy path deliberately replays it — which is why a plainly frozen daemon was not a valid substitute.)repleval to theworkflowtool, which is stricter: it refuses at preparation, creating no run."repl"; the documented package count moves from ten to nine.Docs
README, AGENTS.md, CONTRIBUTING.md,
docs/api.md(three REPL sections removed) and themcp-server/workflowsREADMEs drop the REPL.docs/roadmap/repl-orchestrator.mdandrepl-eval-redesign.mdmove todocs/archive/roadmap/(design records of a removed feature); the one live cross-reference is updated.docs/authoring/and the generated skills bundle had no REPL content and are unchanged.Verification
pnpm build,pnpm typecheck, all nine package suites (2,246 tests, 0 failures),check-acp-deps,check-workflows-bundle-deps, attribution gate, changeset status, and the pre-push live (Claude / OpenCode / pi) + UI gates pass. Onepnpm testrun trippedworkflow-engine's timing-bound journal test (3.5s against its bound) while the machine load average was ~26; it passes in 0.6s alone and on re-run, and this branch does not touchworkflow-engine.Follow-up outside this repo
@automatalabs/repl-engine@0.4.39stays on npm. It should be marked deprecated there (npm deprecate), which needs publish rights and is not something CI does.