@godxjp/ui-mcp 27.8.0 → 27.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +23 -8
  2. package/dist/index.js +52 -52
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -64,18 +64,33 @@ npx @godxjp/ui-mcp
64
64
 
65
65
  Restart Claude Code. The 25 tools appear under `mcp__godx_ui__*`.
66
66
 
67
- **Which server answered.** Every tool answer opens with one line naming the server that produced
68
- it, read from this package's `package.json`:
67
+ **Which server answered, and which package it is looking at.** Every tool answer opens with one
68
+ line naming the server that produced it — read from this package's `package.json` — followed by the
69
+ installed `@godxjp/ui` it resolved and the source it came from:
69
70
 
70
71
  ```text
71
- @godxjp/ui-mcp 27.5.0 (catalog for @godxjp/ui 27.5.x)
72
+ @godxjp/ui-mcp 27.8.0 (catalog for @godxjp/ui 27.8.x) — installed @godxjp/ui 27.9.0 (read from node_modules at answer time)
72
73
  ```
73
74
 
74
- When the launcher passes `env.GODX_UI_VERSION` (the `.mcp.json` entry `sync-rules` writes does) and
75
- that installed `@godxjp/ui` is on a different **major**, a second line starts with
76
- `⚠️ MAJOR MISMATCH:` — the catalog may describe components that do not exist in the installed
77
- package. Compare the first line with `npm ls @godxjp/ui` before trusting a page; an answer with no
78
- such line comes from a release that predates it (gh#722) and is stale.
75
+ The installed version is read from the nearest `node_modules/@godxjp/ui/package.json` at or above
76
+ the server's working directory, **at answer time**, and falls back to the launcher's
77
+ `env.GODX_UI_VERSION` (`from GODX_UI_VERSION at launch — node_modules/@godxjp/ui not resolved`)
78
+ when no package is found. The suffix is dropped when neither source answers. That distinction is
79
+ the point of gh#729: the env is written when the server STARTS, so a process left running from an
80
+ older pin carries an older env and cannot notice the package on disk moved past it.
81
+
82
+ A second line appears when the two are out of step — one line, whichever direction applies:
83
+
84
+ - `⚠️ SERVER OLDER THAN INSTALLED PACKAGE:` — the installed package is newer than this catalog in
85
+ **any** semver component, so the catalog may be missing props and components that exist. Do not
86
+ read a missing prop here as "unavailable". Restart the session (run `npx @godxjp/ui sync-rules`
87
+ first if the project's `.mcp.json` still pins an older `@godxjp/ui-mcp`) — rewriting the pin
88
+ alone does not relaunch a server that is already running.
89
+ - `⚠️ MAJOR MISMATCH:` — the catalog is a major ahead of the installed package and may describe
90
+ components that do not exist in it. Align the pin, then restart.
91
+
92
+ Compare the first line with `npm ls @godxjp/ui` before trusting a page; an answer with no version
93
+ line at all comes from a release that predates it (gh#722) and is stale.
79
94
 
80
95
  **One registration, not two.** Register the server once, in the project's `.mcp.json`. A second
81
96
  registration in `~/.claude.json` (user scope, or local scope under `projects[<path>]`) answers beside