chore(cli-registry): clean up dead code and stale claims left after #380 - #429
Open
opticon454 wants to merge 1 commit into
Open
opticon454 wants to merge 1 commit into
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
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 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