@primeuicom/mcp 0.1.20 → 0.1.21

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.
package/README.md CHANGED
@@ -56,13 +56,13 @@ Available tools:
56
56
 
57
57
  | Tool | What it does | Input |
58
58
  | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
59
- | `get_project_info` | Returns project metadata and page list, including export readiness and source paths. | none |
60
- | `inspect_page` | Returns details for one page by slug, raw active-variant components (or `null`), and a formatted component report table for local comparison. | `pageSlug` |
61
- | `list_exports` | Lists existing exports with ID, status, and creation time. | none |
62
- | `create_export` | Starts a new export and returns strict API manifest payload (`pages[].manifest.files` + `export.components`), then saves sidecar manifest `.primeui/temp/exports/<exportId>.manifest.json`. | none |
63
- | `download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/` and validates existing local sidecar manifest for this export ID. | `id` (export ID) |
64
- | `copy_page` | Safely copies one page from downloaded export into user project using only `pages[].manifest.files` (new files only, conflicts as diff, add-only missing deps). | `originPageSlug`, `actualPageSlug?` |
65
- | `clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout. | none |
59
+ | `get_project_info` | Returns project metadata and page list, including export readiness and source paths. | `projectRoot?` |
60
+ | `inspect_page` | Returns details for one page by slug, raw active-variant components (or `null`), and a formatted component report table for local comparison. | `pageSlug`, `projectRoot?` |
61
+ | `list_exports` | Lists existing exports with ID, status, and creation time. | `projectRoot?` |
62
+ | `create_export` | Starts a new export and returns strict API manifest payload (`pages[].manifest.files` + `export.components`), then saves sidecar manifest `.primeui/temp/exports/<exportId>.manifest.json`. | `projectRoot?` |
63
+ | `download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/` and validates existing local sidecar manifest for this export ID. | `id` (export ID), `projectRoot?` |
64
+ | `copy_page` | Safely copies one page from downloaded export into user project using only `pages[].manifest.files` (new files only, conflicts as diff, add-only missing deps). | `originPageSlug`, `actualPageSlug?`, `projectRoot?` |
65
+ | `clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout. | `projectRoot?` |
66
66
 
67
67
  ## Getting started
68
68
 
@@ -191,9 +191,14 @@ Use the same JSON server configuration shown in Getting started:
191
191
 
192
192
  - PrimeUI MCP uses bearer authentication with `PRIMEUI_API_KEY`.
193
193
  - If `PRIMEUI_API_KEY` env is missing, PrimeUI MCP reads `.primeui/project.json` (`apiKey`).
194
- - Config lookup:
195
- - if `PRIMEUI_PROJECT_ROOT` is set, MCP reads `${PRIMEUI_PROJECT_ROOT}/.primeui/project.json`;
196
- - otherwise MCP searches `.primeui/project.json` upward from current working directory.
194
+ - Server startup does not require `.primeui/project.json`; project config is resolved lazily per tool call.
195
+ - Config lookup order on each tool call:
196
+ - `projectRoot` tool input (if provided),
197
+ - sticky in-process root resolved by prior successful tool call,
198
+ - `PRIMEUI_PROJECT_ROOT` env,
199
+ - upward search for `.primeui/project.json` from current working directory.
200
+ - If config cannot be resolved, the tool returns a transparent error with actionable hint to pass `projectRoot`.
201
+ - `clear_temp` and `copy_page` always validate project config before running any mutation.
197
202
  - Missing or invalid `targetProjectPath` is treated as a configuration error.
198
203
  - Downloaded archives are validated as ZIP payloads before extraction.
199
204
  - `create_export` is the source of truth for local sidecar manifest creation in `.primeui/temp/exports/<exportId>.manifest.json`.