chore(cli-registry): clean up dead code and stale claims left after #380 - #429
opticon454 wants to merge 1 commit into
Conversation
…rk0N#380 Addresses the "left as they are"/"worth knowing" items Ark0N named when merging Ark0N#380 (the CLI-catalogue-driven install.sh + Docker agent image PR), none of which were correctness-blocking but all of which were real: - Removed install.sh's dead _cli_index/check_cli/get_cli_path helpers: the catalogue-driven menu and hints stopped calling them and nothing else ever did. - The generator no longer emits CLI_KIND/CLI_NPM, two bash arrays install.sh never read (the .mjs/docker-hosts.ts producers already read the JSON catalogue's kind/npmPackage fields directly, so only the bash copies were dead). - detect_all_clis now skips a disabled entry's probe entirely instead of running it and filtering the result downstream. No stock entry ships disabled today, so this closes a latent inefficiency before it is a latent bug rather than fixing an observed one. - The install hint for a launcherProfile entry (DeepSeek today) now explains in one line why it's a docs link and not a command: its own docs page documents `npm install -g @deepseek-ai/dsh`, which installs the launcher only and can't drive a pane, the exact trap the menu already avoids by withholding the command. Driven by a new generated CLI_LAUNCHER_ONLY array (from discovery.launcherProfile), not an id check, so any future launcherProfile entry gets the same caveat free. - Corrected the non-interactive-default comment: on a wget-only host, Claude's curl one-liner is filtered out of the offered list first, so the default becomes whichever npm-based entry sorts earliest instead (Codex today), not always Claude. Behaviour is unchanged — it was already printed, never silent — only the comment overclaimed. Tests: extended test/install-sh-invariants.test.ts with a positive guard for the new array and the trimmed array list, a negative guard that CLI_KIND/CLI_NPM/the three dead helpers cannot come back, and two real-bash tests (driven the same way the existing skip-menu tests are) proving a disabled entry is genuinely never probed rather than merely filtered after the fact. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011WzDjJnbK7zug8iQWnCc9z
|
Thanks for going back and closing these out. Picking up loose ends that were explicitly left as "worth knowing rather than fixing" is the kind of follow-up that usually never happens, and all five items here are real. I checked the removals rather than taking them on faith. The new disabled-entry test is a genuine pin, and I verified that the way I wish more tests were verified: I extracted its bash driver and ran it against master's I also walked the non-interactive default before believing the corrected comment. On a wget-only host the per-entry curl filter drops Claude's one-liner from Everything is green: typecheck (including One line I want to change before this lands, and I will just do it at merge time rather than send you back for two words: The launcher-only caveat points at a page that cannot finish the job. The new line ends with "see the docs above", and "above" is which stays generic for any future Nits, all optional and none worth a round trip:
On the three Last thing, for when I assemble the release rather than for you: the changeset is five bullets of internal bash-array detail, and that text becomes user-facing CHANGELOG. I will trim it to the hint line plus a sentence of cleanup. No action needed on your side. Merging this with those two wording fixes applied. |
What this does
Follow-up to #380. When merging it you flagged several items as "left as they are" / "worth knowing rather than fixing" — none correctness-blocking, but all real. This cleans each one up:
install.sh:_cli_index/check_cli/get_cli_pathwere the generic lookup helpers behind the per-CLIcheck_<cli>/get_<cli>_pathpairs feat(cli-registry): drive install.sh and the Docker agent image from the CLI catalogue #380 removed; once the catalogue-driven menu and hints stopped calling them, nothing did.CLI_KIND/CLI_NPMdropped from the generated bash block. Nothing ininstall.shread either array — the.mjs/docker-hosts.tsproducers already read the JSON catalogue'skind/npmPackagefields directly, so only the bash copies were dead weight.detect_all_clisnow skips a disabled entry's probe entirely instead of running it and filtering the result downstream afterward. No stock entry ships disabled today, so this closes a latent inefficiency before it is a latent bug rather than reacting to an observed one.npm install -g @deepseek-ai/dsh, which installs the launcher only and can't drive a pane on its own — the exact trap the menu already avoids by withholding the command. The hint now adds one line saying so, driven by a new generatedCLI_LAUNCHER_ONLYarray (fromdiscovery.launcherProfile), not an id check — any future launcher-only entry gets the same caveat for free.Tests
test/install-sh-invariants.test.tsgained:CLI_LAUNCHER_ONLY)CLI_KIND/CLI_NPMcannot come backVerification:
tsc --noEmitclean,generate-cli-catalog --checkclean (JSON output byte-identical —kind/npmPackagestill flow through the JSON side, only the redundant bash arrays are gone), and the full CLI-catalogue test set (install-sh-invariants,install-sh-detection-parity,cli-catalog-sync,docker-agent-image-coverage,agent-image-build-args-parity,cli-registry-no-id-branching) passes clean on a Linux-shaped checkout. Three pre-existinginstall.shmenu tests fail locally on this Windows dev box (bash/MSYS trips the script's own "Windows is not supported directly" guard before the sourcing guard is reached) — reproduced identically against master before this change, so it's an existing Windows-only test-environment gap, not a regression.🤖 Generated with Claude Code
https://claude.ai/code/session_011WzDjJnbK7zug8iQWnCc9z