feat(install): recommend cli surface + update --surface mcp↔cli migration#389
Merged
HumanBean17 merged 2 commits intoJul 6, 2026
Merged
Conversation
…ration
Two setup-wizard fixes following the jrag CLI ship:
1. `update` can now switch surfaces. New `update --surface {mcp,cli}` flag;
on a TTY with no flag it prompts (cursor on the current surface). A switch
migrates each affected host — tears down the old surface's artifacts
(`_remove_mcp_entry` pops only our server, preserving siblings; skill/agent
files removed), deploys the new surface's, and rewrites the install marker
so it persists. Fails fast (exit 1) if the target binary is missing; dry-run
safe. Non-interactive `update` without `--surface` refreshes each host on
its own recorded surface and migrates nothing (a mixed-surface marker is
left untouched, not normalized to the first host's surface).
2. Install recommends `cli`. `select_surface` now lists `cli (Recommended)`
first and defaults to `cli` everywhere (interactive cursor + non-interactive
default). Fixed `prompt()` so `questionary.select(default=...)` positions the
cursor: it validates `default` only against `Choice.value`, so dict choices
are normalized to `Choice` before the call.
Note: non-interactive `install`/`update` without `--surface` now yields `cli`
(previously `mcp`) — a breaking change for CI that relied on the implicit MCP
default.
Co-Authored-By: Claude <noreply@anthropic.com>
…lt flip The two JAVA_CODEBASE_RAG_RUN_HEAVY-gated integration tests invoke `install --non-interactive` via subprocess (no --surface) and assert the MCP artifacts (.mcp.json, explore-codebase skill, explorer-rag-enhanced agent). They broke when the non-interactive default flipped to cli — but they were skipped locally (no heavy env var) so the miss only surfaced in CI. Add `--surface mcp` to preserve their intent (testing the MCP install path). Co-Authored-By: Claude <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.
Two setup-wizard fixes building on the recently-shipped
jragCLI.1.
updatecan now switch surfaces (mcp ↔ cli)update --surface {mcp,cli}flag. On a TTY with no flag it prompts (cursor on the current surface, so Enter keeps it); non-interactiveupdatewithout--surfacerefreshes each host on its own recorded surface and migrates nothing._remove_mcp_entrypops only thejava-codebase-ragserver, preserving siblings; old skill/agent files removed), deploys the new surface's, and rewrites the.java-codebase-rag.hostsmarker so it persists.2. Install recommends the
clisurfaceselect_surfacelistscli (Recommended)first and defaults toclieverywhere (interactive cursor + non-interactive default).prompt()soquestionary.select(default=...)actually positions the cursor: questionary validatesdefaultonly againstChoice.value, so dict choices are now normalized toChoicebefore the call.Non-interactive
install/updatewithout--surfacenow yieldscli(previouslymcp). CI that relied on the implicit MCP default must add--surface mcp.Review-driven correction
Code review caught that the non-TTY no-flag
updatepath returned the first host's surface as the global target, so a mixed-surface marker would get normalized. Fixed: that path now refreshes each host on its own surface and migrates nothing. Covered bytest_update_no_flag_non_tty_mixed_marker_does_not_migrateandtest_update_surface_normalizes_mixed_marker.Verification
tests/test_installer_surface.py— 31 passed (incl. new migration/mixed-surface/user-scope/prompt-spy cases)tests/test_installer.py— 85 passed;tests/test_java_codebase_rag_cli.pyupdate-flag tests pass» cli (Recommended)first → Enter pickscli; update renderscli (Recommended)first with cursor on the current surface → Enter keeps ittest_cli_lifecycle_stdout_invariant_erase_quiet—.venv/binnot on PATH in the sandbox subprocess; passes with the venv on PATH, unrelated to this change)🤖 Generated with Claude Code