inspector/clients/cli/__tests__/helpers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 7da20dcfd0 fix(cli): apply a server's persisted mcp.json metadata
The web client and the TUI both read `savedSettings.metadata` and pass it
as `InspectorClientOptions.defaultMetadata`. The CLI never did, and
`InspectorClient` only reads the option rather than falling back to
`serverSettings.metadata` — so a per-server `metadata` entry was silently
inert for `--cli` runs.

Pass it beside the existing `roots:`, guarded on a non-empty map the same
way web and the TUI guard theirs, so `{}` still means "no defaults".
Precedence is unchanged: call-time keys override defaults in `mergeMeta`,
so `--metadata` stays per-invocation and wins on a key collision.

Covered by three catalog-driven tests asserting against the test server's
recorded wire requests. `createTestConfig` is retyped `StoredMCPServer` —
the accurate on-disk shape — since a fixture that cannot express the
per-server keys cannot cover the settings that reach the client.

Closes #2093

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177mPHAdECD18nLLCTwR5rh
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-24 19:32:23 -04:00
..
assertions.test.ts feat: port CLI, TUI, and launcher from v1.5 into v2 (#1452) 2026-06-14 20:27:49 -04:00
assertions.ts cli: Wave 3 — programmatic review path (rollup of #1573–#1575) (#1655) 2026-07-11 22:14:23 -04:00
cli-runner.ts feat(cli): exit-code map + structured JSON error envelopes (closes #1564) 2026-07-01 18:08:56 -04:00
fixtures.ts fix(cli): apply a server's persisted mcp.json metadata 2026-08-24 19:32:23 -04:00
mock-open-url.ts CLI: catalog listing, auth flags, and OAuth browser UX (#1782) 2026-07-26 16:55:25 -04:00
oauth-test-fakes.ts feat: allow complex JSON values in request _meta 2026-08-23 12:23:40 -04:00