Repository navigation
Conversation
acamarata
force-pushed
the
fix/ship02-mcp-gaps
branch
2 times, most recently
from
October 29, 2026 22:16
5e3bb26 to
6aa6083
Compare
The MCP-only agent harness (P7-SHIP-02) stops at five cli gaps. This closes them. 1. nself mcp starts outside a project. It then lists nself_init and the read-only tools; once a project exists it lists every tool. 2. A first build can be bound by a plan id. A render that generates secrets gets an id its inputs reproduce: the content id of a second, read-only render with a fixed public seed, used only when both renders have the same plan. The plan declares the secrets-persist step, the apply writes fresh secrets, drift is still E450, and E451 remains for a render whose random values change the plan itself. The machine gate always returns a plan confirmation for a plan with secrets-persist, so an agent sees "build (plan, confirm)". 3. The tool list is live. After a successful call, mcpgen.Surface checks the project root and the installed plugin set; when they changed it rebuilds the machine registry and replaces the tools, which sends notifications/tools/list_changed (so the ci tools appear after add ci). 4. deploy promote declares two optional args, source and target, so the generated tool accepts ["qa", "prod"]. 5. nself mcp --timeout (default 5m) bounds each tool call (E423 after it). mcp now rejects positional args (cobra.NoArgs). Generated registry, inventory, OpenAPI, TS SDK types, MCP tool golden and wiki pages are regenerated; the hand docs (MCP-Server, Guide-Agents-MCP, Safe-On-Live, cmd-build, cmd-mcp) describe the new behaviour.
Main grew cmd/commands to its ratchet ceiling, so the no-project notice moves into mcpgen.Surface (printed through Warn) and the constructor comment is shortened. Behaviour is unchanged.
The server writes notifications from its own goroutine, so on a loaded Linux runner list_changed arrived after the 20 ping round trips the test allowed. With no request outstanding the next line can only be a notification, so the test reads the stream until it arrives, bounded by a 30 s deadline.
acamarata
force-pushed
the
fix/ship02-mcp-gaps
branch
from
October 29, 2026 22:55
6aa6083 to
81e7773
Compare
This branch has not been deployed
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.
Closes the five cli product gaps the P7-SHIP-02 MCP-only agent harness (#1029) stops at. Do not merge from here; the manager merges.
Changes
nself mcpwithout a project. The server starts anywhere. With no project it listsnself_initand the read-only tools; once a project exists it lists every tool.secrets-persist; the apply draws fresh secrets and writes exactly its own render; input drift is still E450. The machine gate always returns a plan confirmation for a plan that declaressecrets-persist, so the agent seesbuild(plan, then confirm).mcpgen.Surfacechecks the project root and the installed plugin set after every successful call. When they changed, it rebuilds the machine registry and callsSetTools, which sendsnotifications/tools/list_changed. Thecitools then appear afteradd ciin the same session.deploy promote <source> <target>.Usewaspromote [source target](one arg); it is now two optional args, so["qa","prod"]validates.nself mcp --timeout(default 5m, minimum 1s) bounds each tool call; a longer call answers E423.nself mcpnow rejects positional args (cobra.NoArgs). The generated registry, inventory, OpenAPI, TS SDK types, MCP tool golden and wiki pages are regenerated. The hand docs describe the new behaviour.Tests
internal/reconcile: the binding id is the same for every seed; a plan id binds a first build; the written secrets are not the binding render's; drift gives E450;sameShape.internal/invoke: a write plan withsecrets-persistreturns a kind plan confirmation;parsePlanreads the secrets fact.internal/mcpgen: the no-project filter.cmd/commands: an stdio session with no project, then init, then a plugin added during the session, withtools/list_changedeach time and none when nothing changed; the--timeoutE423 bound and flag validation;deploy promote qa prodargv; the fresh-projectbuild --plan-idround trip with E450 on drift.Local evidence (CI host mm4):
go testpassed for reconcile, invoke, mcpgen, errs and repoqa, and for the scopedcmd/commandsMCP/build/surface/registry/contract tests in both compat modes.make contract-checkandmake wiki-checkpassed.TestMCPIntegration_InitBuildVerify(V15) fails on mm4 with E128 from a stray~/.nself/plugins/cronin that host's real HOME. It fails the same way on unmodified origin/main there, so this change did not cause it.