fix(cli): use MCP logging levels - #1800
Conversation
|
Closing: v1 is deprecated. Thank you for this contribution, and apologies for the long wait for a response. v1 will receive security fixes only. We reviewed every open v1 PR for security impact before closing — see the backlog triage in #1819 — and a small number were retained for a final If the underlying problem still exists in v2, we'd genuinely like to know. Please open an issue describing it against v2. Note that we accept external contributions as issues rather than pull requests — maintainers handle design and implementation through a prompt-driven workflow. See Thanks again for taking the time to contribute to the Inspector. |
Summary
Align the CLI's
--log-levelvalidation with the MCP logging specification. The accepted values now come from the SDK'sLoggingLevelSchema, so the CLI no longer rejects valid RFC 5424 levels or forwards the non-spectraceandwarnaliases.Type of Change
Changes Made
Client.setLoggingLevelwithout an unsafe cast.trace/warnat the CLI validation boundary.Related Issues
Fixes #1734
Testing
Test Results and/or Instructions
npm run buildnpm run build-cliMCP spec logging levelsand both non-spec aliases)git diff --checkpassed for both changed filesThe broad CLI suite produced 60 passes and 28 Windows-only failures after successful HTTP responses because Node 24 aborted during transport teardown with
UV_HANDLE_CLOSING. The affected focused tests do not use that teardown path and pass consistently.Checklist
Breaking Changes
None.
Additional Context
Documentation is unchanged because the help text does not enumerate logging levels; its validation error now renders the SDK-derived list automatically. The change is limited to two CLI files.