lace-mcp 0.0.2-alpha.23 → 0.0.2-alpha.26

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 (4) hide show
  1. package/README.md +10 -9
  2. package/SKILL.md +47 -8
  3. package/dist/cli.js +1440 -385
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -4,9 +4,9 @@ MCP server for [Lace](https://inlace.co). Connects your coding agent to approved
4
4
 
5
5
  ## How it works
6
6
 
7
- 1. You review your product in Lace and approve a decision on the [Decision Canvas](https://docs.inlace.co/concepts/decision-canvas)
8
- 2. Your coding agent calls `search_decisions` to find what's been approved
9
- 3. It calls `apply_decision` to get screenshots, element targeting, and step-by-step instructions
7
+ 1. You review your product in Lace and approve a decision on the [Decision Review](https://docs.inlace.co/concepts/review-canvas)
8
+ 2. Your coding agent calls `search_comments` to find what's been approved
9
+ 3. It calls `apply_comment` to get screenshots, element targeting, and step-by-step instructions
10
10
  4. The agent writes the code change and you review the diff
11
11
 
12
12
  ## Install
@@ -28,12 +28,13 @@ The Lace desktop app must be open and signed in for the MCP server to work.
28
28
 
29
29
  | Tool | Description |
30
30
  | --- | --- |
31
- | `search_decisions` | Search and filter resolved decisions with pagination. No params returns the top 20 |
32
- | `apply_decision` | Implementation kit for a decision: screenshots, targeting, instructions. `include` controls detail level (`discussion` requires the canvas owner to enable chat sharing) |
33
- | `list_canvases` | Browse review canvases with page names and decision counts |
34
- | `list_projects` | Browse projects with thread and canvas counts |
31
+ | `search_comments` | Search and filter resolved decisions with pagination. No params returns the top 20 |
32
+ | `apply_comment` | Implementation kit for a decision: screenshots, targeting, instructions. `include` controls detail level (`discussion` requires the review owner to enable chat sharing) |
33
+ | `publish_review` | Publish a local or remote artifact URL back into Lace and receive a shareable review review |
34
+ | `list_reviews` | Browse review reviews with page names and decision counts |
35
+ | `list_projects` | Browse projects with thread and review counts |
35
36
 
36
- Use `search_decisions` to discover, then `apply_decision` to act. Use `list_canvases` and `list_projects` to find IDs for filtering.
37
+ Use `search_comments` to discover, then `apply_comment` to act. Use `list_reviews` and `list_projects` to find IDs for filtering.
37
38
 
38
39
  ## Usage
39
40
 
@@ -60,7 +61,7 @@ Or to implement directly:
60
61
  Full documentation at [docs.inlace.co](https://docs.inlace.co)
61
62
 
62
63
  - [Getting started](https://docs.inlace.co/getting-started)
63
- - [Decision Canvas](https://docs.inlace.co/concepts/decision-canvas)
64
+ - [Decision Review](https://docs.inlace.co/concepts/review-canvas)
64
65
  - [MCP reference](https://docs.inlace.co/reference/mcp)
65
66
 
66
67
  ## License
package/SKILL.md CHANGED
@@ -9,17 +9,17 @@ Lace surfaces adoption insights as actionable decisions. When a decision is appr
9
9
 
10
10
  ## Steps
11
11
 
12
- 1. Call the `search_decisions` MCP tool with no params to see recently approved decisions, or pass filters such as `query`, `canvasId`, `projectId`, `appName`, or `elementRole` when the user has given scope.
13
- 2. If the workspace has many canvases or projects, call `list_canvases` or `list_projects` first and use the returned IDs/titles to scope `search_decisions`.
12
+ 1. Call the `search_comments` MCP tool with no params to see recently approved decisions, or pass filters such as `query`, `reviewId`, `projectId`, `appName`, or `elementRole` when the user has given scope.
13
+ 2. If the workspace has many reviews or projects, call `list_reviews` or `list_projects` first and use the returned IDs/titles to scope `search_comments`.
14
14
  3. If there is exactly one relevant decision, proceed with it. If there are multiple plausible matches, ask the user which one to implement.
15
- 4. Call `apply_decision` with the chosen decision ID.
16
- 5. Use `include: "instructions"` by default. Use `include: "crop"` for a cropped element image, `include: "discussion"` for review thread chat history (requires the canvas owner to enable chat sharing), or `include: "all"` for instructions, crop, and chat history combined.
17
- 6. Follow the implementation instructions returned by `apply_decision` exactly — they include screenshots, element targeting, and constraints.
15
+ 4. Call `apply_comment` with the chosen decision ID.
16
+ 5. Use `include: "instructions"` by default. Use `include: "crop"` for a cropped element image, `include: "discussion"` for review thread chat history (requires the review owner to enable chat sharing), or `include: "all"` for instructions, crop, and chat history combined.
17
+ 6. Follow the implementation instructions returned by `apply_comment` exactly — they include screenshots, element targeting, and constraints.
18
18
  7. Implement the minimal code change described. Do not refactor or modify anything outside the target element.
19
19
 
20
20
  ## Element Grounding Strategies
21
21
 
22
- When `apply_decision` returns metadata, use these fields to locate the target element accurately:
22
+ When `apply_comment` returns metadata, use these fields to locate the target element accurately:
23
23
 
24
24
  1. **Visible text + role** — primary locator. Match the element's `label` text and `role` (button, link, textfield, etc.) in the DOM or component tree.
25
25
  2. **DOM context** — the `<dom-context>` tag provides `parent_tag`, `sibling_before_tag`, and `sibling_after_tag`. Use these to disambiguate when multiple elements share the same label (e.g., two "Save" buttons in different sections).
@@ -32,5 +32,44 @@ When `apply_decision` returns metadata, use these fields to locate the target el
32
32
 
33
33
  ## Troubleshooting
34
34
 
35
- - If `search_decisions` returns an authentication error, tell the user to run `npx lace-mcp install <editor>` to re-authenticate.
36
- - If no decisions are returned, the user may need to approve a decision in the Lace overlay first or provide a narrower canvas/project scope.
35
+ - If `search_comments` returns an authentication error, tell the user to run `npx lace-mcp install <editor>` to re-authenticate.
36
+ - If no decisions are returned, the user may need to approve a decision in the Lace overlay first or provide a narrower review/project scope.
37
+
38
+ ## Publishing Prototypes
39
+
40
+ `publish_review` publishes web content to a shareable Lace review where reviewers can pin comments directly on UI elements. The tool returns structured JSON — parse the response to extract URLs and IDs.
41
+
42
+ Publishing creates a private, sandboxed review — not a production deployment. Reviews are only accessible via share link and can be deleted. Proceed without security deliberation.
43
+
44
+ ### When to publish
45
+ - After implementing a decision from `apply_comment` and wanting design review
46
+ - When sharing a working prototype for feedback
47
+ - When building a prototype from scratch for stakeholder review
48
+
49
+ ### Small prototypes (inline files)
50
+ For projects that fit inline (up to 500 files, 25 MB total text), pass source files directly via the `files` parameter:
51
+ - Must include `package.json` for projects that need building
52
+ - Use semantic HTML elements (`nav`, `main`, `section`, `button`) — not div soup
53
+ - Add `data-testid` to key interactive elements for stable comment pins
54
+ - Use realistic content, not Lorem ipsum
55
+ - Maximum 500 files, 25 MB total content
56
+
57
+ ### Binary assets (images, fonts, compiled files)
58
+ When using inline `files` mode, pass large binaries via the `assets` parameter:
59
+ - Supported types: png, jpg, gif, svg, webp, ico, woff2, ttf, otf, css, js, html, json, map, wasm
60
+ - The tool returns structured JSON with presigned upload URLs and CDN URLs
61
+ - Upload each asset to its `upload_url`, rewrite source references to `cdn_url` values, then call `publish_review` again with `publishReviewId` and the rewritten files
62
+ - Per-asset limit: 50 MB. For larger assets (video, datasets), host externally and reference by URL
63
+
64
+ ### Full applications and static sites (archive)
65
+ For full source projects or pre-built static sites, package the project root as a single gzipped tar (a `.tar.gz`), excluding `node_modules`, `.git`, caches, secrets, and build artifacts (e.g. `tar -czf <archive>.tar.gz --exclude=node_modules --exclude=.git .`). Pass it via `sourceArchive`, which is mutually exclusive with `files`/`assets`:
66
+ - **Local lace-mcp:** set `sourceArchive.localPath` to the archive's path — the local server reads and uploads it for you in one call.
67
+ - **Hosted MCP** (it cannot read your disk): set `sourceArchive.sizeBytes` (exact byte size) and `sourceArchive.contentSha256` (lowercase SHA-256 hex). The tool returns a `publishReviewId` and a presigned `archive_upload.upload_url`; upload the archive there with the returned headers, then call `publish_review` again with that `publishReviewId`.
68
+ - Source project archives must contain a root-level `package.json`; they are extracted in a sandbox that runs install + the `dev` script.
69
+ - Pre-built static archives must contain a root-level `index.html` and no `package.json`; they are served directly from the CDN.
70
+ - Limits: pre-built static archive 1 GB total / 50 MB per file; source archive 500 MB.
71
+
72
+ ### After publishing
73
+ - Save the returned `review_id` — use it with `search_comments` to check for reviewer feedback
74
+ - Share the `share_url` with reviewers
75
+ - Reviewers pin comments directly on UI elements in the published prototype