3.3.2: fix capabilities coverage for mcp tools / mcp list-tools#39
Merged
chenliuyun merged 1 commit intomainfrom Apr 26, 2026
Merged
3.3.2: fix capabilities coverage for mcp tools / mcp list-tools#39chenliuyun merged 1 commit intomainfrom
chenliuyun merged 1 commit intomainfrom
Conversation
Add missing COMMAND_META entries for `mcp tools` and `mcp list-tools` that were added to mcp.ts in 3.3.0 but never registered in the metadata map. 3.3.1 published with the gap, so invoking `switchbot capabilities` threw `capabilities metadata coverage error: missing:mcp list-tools, missing:mcp tools` on installed tarballs. Add `capabilities-program-coverage.test.ts` — registers every register*Command from src/index.ts and parses `capabilities --compact` end-to-end so validateCommandMetaCoverage walks the full tree. The existing capabilities-meta unit test only registered capabilities itself and missed the gap.
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.
Summary
mcp toolsandmcp list-toolssubcommands inmcp.tsbut never registered them inCOMMAND_META. 3.3.1 published with the gap. Invokingswitchbot capabilitiesthrew on installed tarballs:capabilities-metaunit test only registered thecapabilitiescommand in isolation, sovalidateCommandMetaCoveragenever walked the full command tree. The newcapabilities-program-coverage.test.tsmirrorssrc/index.ts— registers everyregister*Commandand parsescapabilities --compactend-to-end. Verified it fails with the exact same error message if the twoCOMMAND_METAentries are removed.Why 3.3.2
3.3.1 is already published to npm
latestand is broken for the single command that agents are most likely to call first (capabilities). This is a pure patch: two new map entries, one new test, version bump, changelog entry.Test plan
npm test— 2048/2048 passing locallymissing:mcp list-tools, missing:mcp toolsand passes on the fixed branchsmoke:pack-install) clean (switchbot --version -> 3.3.2)v3.3.2tag + GitHub Release +npm publish