leglas-mcp 0.4.1 → 0.5.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.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  </p>
16
16
 
17
17
  <p align="center">
18
- <img src="https://raw.githubusercontent.com/FredAmartey/leglas/pr-assets/rail-single.jpg" width="900" alt="The Leglas interface: a rail of three design directions on the left, and the selected one running as the real app filling the rest of the window" />
18
+ <img src="https://raw.githubusercontent.com/FredAmartey/leglas/main/.github/assets/screenshots/rail-single.jpg" width="900" alt="The Leglas interface: a rail of three design directions on the left, and the selected one running as the real app filling the rest of the window" />
19
19
  </p>
20
20
 
21
21
  <p align="center"><i>Every direction in the rail, the selected one running as your actual app. Arrow keys flip between them.</i></p>
@@ -46,7 +46,7 @@ and sessions that clean up after themselves.
46
46
  ## What you can do with Leglas
47
47
 
48
48
  <p align="center">
49
- <img src="https://raw.githubusercontent.com/FredAmartey/leglas/pr-assets/compare-artboards.jpg" width="900" alt="The Leglas interface: a rail of three design directions on the left, and two of them running side by side as the real app, each labelled with its name." />
49
+ <img src="https://raw.githubusercontent.com/FredAmartey/leglas/main/.github/assets/screenshots/compare-artboards.jpg" width="900" alt="The Leglas interface: a rail of three design directions on the left, and two of them running side by side as the real app, each labelled with its name." />
50
50
  </p>
51
51
 
52
52
  <p align="center"><i>Two directions for the same page, running side by side as the actual app.</i></p>
@@ -177,13 +177,26 @@ directly above the field. Your agent drains the queue with `npx leglas requests
177
177
  it with `--clear`. Leglas runs no model of its own; your agent already
178
178
  knows your conventions and your taste.
179
179
 
180
+ Most of what you would type into that field is the part describing where
181
+ the problem is, so you can point at it instead. Press `A` and the preview
182
+ becomes a picker: hovering outlines the element under the pointer,
183
+ clicking drops a numbered pin that takes a note, and dragging marks an
184
+ area and names every element inside it. The page still scrolls, so the
185
+ thing three screens down is as easy to mark as the headline. Annotations
186
+ are a request on their own, so the field can stay empty; leave three and
187
+ send once. Each one carries the element's own words, its tag and classes,
188
+ a path and the box it filled, and the request tells your agent which of
189
+ those to trust first, because the design moves under them by design. One
190
+ whose element has since gone turns amber rather than pointing confidently
191
+ at the wrong thing.
192
+
180
193
  The line under the field is the whole status: whether anything is
181
194
  listening, what you have queued, and when it has been picked up.
182
195
 
183
196
  <p align="center">
184
- <img src="https://raw.githubusercontent.com/FredAmartey/leglas/pr-assets/field-idle.png" width="290" alt="The change field reading: Enter queues it for npx leglas requests" />
185
- <img src="https://raw.githubusercontent.com/FredAmartey/leglas/pr-assets/field-queued.png" width="290" alt="The change field reading: one change queued for your agent" />
186
- <img src="https://raw.githubusercontent.com/FredAmartey/leglas/pr-assets/field-pickedup.png" width="290" alt="The change field reading: Your agent is on it" />
197
+ <img src="https://raw.githubusercontent.com/FredAmartey/leglas/main/.github/assets/screenshots/field-idle.png" width="290" alt="The change field reading: Enter queues it for npx leglas requests" />
198
+ <img src="https://raw.githubusercontent.com/FredAmartey/leglas/main/.github/assets/screenshots/field-queued.png" width="290" alt="The change field reading: one change queued for your agent" />
199
+ <img src="https://raw.githubusercontent.com/FredAmartey/leglas/main/.github/assets/screenshots/field-pickedup.png" width="290" alt="The change field reading: Your agent is on it" />
187
200
  </p>
188
201
 
189
202
  <p align="center"><i>Nothing waiting, then a request queued, then an agent that has taken it.</i></p>
@@ -308,8 +321,9 @@ drawn at and the scale it is shown at. If you want the narrow rendering,
308
321
  that is what the tools popover's "Scale each side to fit" switch is for.
309
322
 
310
323
  Arrows move between directions, `1` to `9` jump straight to one, `R` asks
311
- for a change to the one you are on, `Cmd K` (`Ctrl K` elsewhere) searches
312
- and `B` collapses the rail. Press `?` for the whole keymap.
324
+ for a change to the one you are on, `A` annotates the design itself,
325
+ `Cmd K` (`Ctrl K` elsewhere) searches and `B` collapses the rail. Press `?`
326
+ for the whole keymap.
313
327
 
314
328
  A small tools widget floats over the stage and can be dragged to any
315
329
  corner, because a floating control has a habit of sitting exactly where
@@ -346,6 +360,7 @@ leglas keep <title> Keep a winner and end the exploration
346
360
  --count <n> (explore) How many directions, default 3
347
361
  --based-on <title> (explore) Variants of an existing direction instead of new ones
348
362
  --based-on <title> (add) The direction this preview is a variant of; groups the family
363
+ --asked-for <text> (add) The change that was asked for, in the words that were typed
349
364
  --change <path> (classify) A file the direction creates or wires up
350
365
  --rewrite <path> (classify) An existing file whose behaviour must change
351
366
  --note <text> (add) Second line under the title
package/dist/tools.js CHANGED
@@ -90,8 +90,11 @@ export function registerLeglasTools(server, options) {
90
90
  .describe("Project-relative HTML file for Leglas to serve itself; no dev server needed."),
91
91
  basedOn: z.string().optional()
92
92
  .describe("Title of the direction this is a variant of; the rail groups the family."),
93
+ askedFor: z.string().optional()
94
+ .describe("The change this direction was asked for, in the words that were typed. " +
95
+ "Pass it verbatim when building a variant someone requested; the rail shows it."),
93
96
  },
94
- }, async ({ title, url, note, tags, branch, file, basedOn }) => inProject(project, (cwd, deps) => runAdd({ preview: { title, url, note, tags, branch, file, basedOn }, json: true, cwd }, deps)));
97
+ }, async ({ title, url, note, tags, branch, file, basedOn, askedFor }) => inProject(project, (cwd, deps) => runAdd({ preview: { title, url, note, tags, branch, file, basedOn, askedFor }, json: true, cwd }, deps)));
95
98
  server.registerTool("list", {
96
99
  title: "List previews",
97
100
  description: "Every preview, shared and local, with its URL and backing branch if any.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leglas-mcp",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Stdio MCP server exposing Leglas to agent hosts that cannot run a shell.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@modelcontextprotocol/sdk": "^1.30.0",
17
17
  "zod": "^3.25.76",
18
- "leglas": "^0.4.1"
18
+ "leglas": "^0.5.0"
19
19
  },
20
20
  "license": "MIT",
21
21
  "repository": {