Skip to content

3.3.2: fix capabilities coverage for mcp tools / mcp list-tools#39

Merged
chenliuyun merged 1 commit intomainfrom
fix/3.3.2-mcp-capabilities-coverage
Apr 26, 2026
Merged

3.3.2: fix capabilities coverage for mcp tools / mcp list-tools#39
chenliuyun merged 1 commit intomainfrom
fix/3.3.2-mcp-capabilities-coverage

Conversation

@chenliuyun
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes broken 3.3.1 tarball. 3.3.0 added mcp tools and mcp list-tools subcommands in mcp.ts but never registered them in COMMAND_META. 3.3.1 published with the gap. Invoking switchbot capabilities threw on installed tarballs:
    Error: capabilities metadata coverage error: missing:mcp list-tools, missing:mcp tools
    
  • Adds the regression guard that was missing. The existing capabilities-meta unit test only registered the capabilities command in isolation, so validateCommandMetaCoverage never walked the full command tree. The new capabilities-program-coverage.test.ts mirrors src/index.ts — registers every register*Command and parses capabilities --compact end-to-end. Verified it fails with the exact same error message if the two COMMAND_META entries are removed.

Why 3.3.2

3.3.1 is already published to npm latest and 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 locally
  • New test fails on the unfixed branch with missing:mcp list-tools, missing:mcp tools and passes on the fixed branch
  • Pre-push smoke (smoke:pack-install) clean (switchbot --version -> 3.3.2)
  • Post-merge: cut v3.3.2 tag + GitHub Release + npm publish

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.
@chenliuyun chenliuyun merged commit b30cdcf into main Apr 26, 2026
11 checks passed
@chenliuyun chenliuyun deleted the fix/3.3.2-mcp-capabilities-coverage branch April 27, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant