inspector/clients/tui/package.json
cliffhall 7815548300 refactor(version): single-source the version from the root package.json
The Inspector ships as one package with one version, but four client
package.jsons each carried their own `version` and were read at runtime
(cli.ts, tui App.tsx), and core hardcoded a third, stale value (0.20.0) that
the TUI and web actually reported to servers. Consolidate onto the root
package.json as the single source of truth.

- Add core/node/version.ts: shared, Node-only readInspectorVersion() that walks
  up to the root package.json (always shipped in the tarball). 100% covered by a
  new integration test.
- CLI and TUI read the version via the shared reader instead of their own
  manifest; TUI now also passes a real clientIdentity (was falling through to
  the stale core default).
- Drop the `version` field from all four client package.jsons; the root keeps
  the only version. TUI header name/description become local display constants.
- core default client identity: replace the stale 0.20.0 hardcode with a neutral
  0.0.0 placeholder (real clients pass clientIdentity; web will source its
  version from GET /api/config, see #1639).
- Stop shipping clients/cli/package.json and clients/tui/package.json (no longer
  read at runtime) — supersedes the earlier "ship them" fix; update pack:verify
  and the root README packaging invariants accordingly.
- Add core/node/** to the web coverage include so the new module is gated.
- Add the shared-code architecture diagram to the root README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
2026-07-10 17:31:21 -04:00

63 lines
1.7 KiB
JSON

{
"name": "@modelcontextprotocol/inspector-tui",
"private": true,
"description": "Terminal User Interface (TUI) for the Model Context Protocol inspector",
"license": "MIT",
"type": "module",
"main": "build/index.js",
"exports": {
".": "./build/index.js"
},
"bin": {
"mcp-inspector-tui": "./build/index.js"
},
"files": [
"build",
"README.md"
],
"scripts": {
"dev": "vite-node --config vitest.config.ts dev.ts",
"build": "tsup",
"validate": "npm run format:check && npm run lint && npm run build && npm run test",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"lint": "eslint .",
"format": "prettier --write src __tests__ index.ts tui.tsx dev.ts",
"format:check": "prettier --check src __tests__ index.ts tui.tsx dev.ts"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0",
"@napi-rs/keyring": "^1.3.0",
"ajv": "^8.17.1",
"atomically": "^2.1.1",
"commander": "^13.1.0",
"ink": "^6.0.0",
"ink-form": "^2.0.1",
"ink-scroll-view": "^0.3.6",
"open": "^10.2.0",
"pino": "^9.14.0",
"react": "^19.2.4",
"zod": "^4.3.6"
},
"overrides": {
"ink-select-input": "^6.2.0"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@types/node": "^24.12.4",
"@types/react": "^19.2.14",
"@vitest/coverage-v8": "^4.1.0",
"eslint": "^9.39.4",
"eslint-plugin-react-hooks": "^7.0.1",
"globals": "^17.4.0",
"ink-testing-library": "^4.0.0",
"prettier": "^3.8.1",
"tsup": "^8.5.0",
"tsx": "^4.21.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.56.1",
"vite": "^8.0.16",
"vite-node": "^6.0.0",
"vitest": "^4.1.0"
}
}