fix: v3.6.2 bug fixes, shell completions, and test coverage backfill#49
Merged
Conversation
added 30 commits
May 16, 2026 23:22
- plan suggest: exit(2) on missing --device (was exit(1) — usage error, not runtime)
- plan suggest: accept --devices as alias for --device (agent-friendly plural form)
- doctor: clarify MCP tool count as default profile (13/24) to explain discrepancy with mcp tools
- quota: show reset cadence ("resets daily at midnight local time") in plain text output
- bash completion: add --format value completion (table/json/jsonl/tsv/yaml/id/markdown) and --table-style values; fix zsh to include missing markdown format
- meta list: default now hides 'hidden' devices; --all shows everything, --hidden-only shows only hidden - devices status: add --strict flag to exit 1 when any batch device fetch fails - quota: show computed next-midnight reset time in plain text output - bash completion: add --backoff (linear/exponential) and --cache (off/auto/5m/1h) value completions
… listPlanRecords paths
added 14 commits
May 17, 2026 11:22
…devDependencies Move all bundled runtime deps (ajv, ajv-formats, chalk, cli-table3, commander, croner, js-yaml, uuid, yaml, zod) and @modelcontextprotocol/sdk from dependencies to devDependencies. Remove @modelcontextprotocol/sdk from esbuild external list so it is inlined at build time. Fix ajv-formats import from require() to static import so esbuild can inline it instead of leaving a runtime require() call. Result: user-side node_modules shrinks from ~43 MB / 160 packages to ~23 MB / 84 packages (-47%). dist/index.js grows by ~300 KB (2.3 → 2.6 MB). Add tests/bundle-self-contained.test.ts to guard against future regressions.
…hook port race - device-meta: include hidden devices in JSON mode by default (only filter in human table mode); human mode behavior unchanged - devices: replace process.exit(1) with process.exitCode in --strict batch path to allow cleanup to complete; warn when --strict is passed outside batch mode - doctor: clarify mcp check message to say 'mcp serve --tools all' instead of generic '--tools all' - webhook-listener: read server.address() inside the 'listening' callback to avoid an async-gap race on Windows IOCP; drain oversized request body with req.resume() instead of req.destroy() so 413 response can flush before teardown
…den hint, sinks coverage - completion: move --format/--table-style/--backoff/--cache $prev checks before the $count-le-2 guard; trailing-space leaves $count=2 so the guard fired first, swallowing enum completions entirely - plan: scan process.argv in order to collect --device/--devices values instead of [...opts.device, ...opts.devices], which reorders mixed flags (A C B instead of A B C) - device-meta list: before printing "No local metadata entries", check whether the file contains hidden records and suggest --all/--hidden-only if so - vitest.config: replace src/sinks/** glob with individual live-adapter paths so unit-testable dispatcher.ts and format.ts are no longer excluded from coverage
- plan suggest: extend process.argv scan to handle --device=VALUE and --devices=VALUE (equals-sign syntax) so mixed input preserves order - devices meta list: warn to stderr when --all is combined with --json since JSON mode always exports all records regardless of the flag
…mmand groups - webhook-listener: destroy socket on res finish after sending 413 so a client streaming indefinitely cannot hold the connection open - completion: add policy/rules/auth/status-sync/daemon subcommand completions across bash, zsh, fish, and PowerShell; also add nested auth keychain subcommand completions (describe/get/set/delete/migrate)
…-space - zsh: add auth/keychain branch in the rest state so _describe fires auth_keychain_sub instead of falling back to file completion - PowerShell: add $prev -eq 'keychain' early-return before the $count guard, matching the --format pattern, so Tab after a trailing space emits authKeychainSub instead of authSub
- zsh completion: add policy_sub/rules_sub/auth_sub/auth_keychain_sub/status_sync_sub/daemon_sub to local -a - devices: document --strict single-device asymmetry (no exitCode semantics in batch-less path) - plan suggest: extend argv-scan comment to explain why command.parseOptions() is not sufficient - device-meta: clarify --all is human-mode only (JSON always exports all records) - bundle-self-contained test: skip dist import check gracefully when dist/index.js is absent - PowerShell completion: comment explaining mutual exclusivity of the two auth keychain paths - README: replace hardcoded test count with approximate value
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
--strictexit-code, doctor message, and webhook port race condition--device=ordering and device-meta--all --jsonwarningauth,policy,rules,status-sync,daemoncommand groupsreststate) and PowerShell (trailing-space$prevguard)@modelcontextprotocol/sdkand move non-external deps to devDependenciessrc/commands) enforced in CITest plan
npm test— all 2574+ tests passswitchbot completion zsh—switchbot auth keychain <Tab>offersdescribe get set delete migrateswitchbot completion powershell—switchbot auth keychain <Tab>(trailing space) offers leaf verbs, notkeychainagainswitchbot completion bash/fish— unaffected, existing behaviour preserved