@cychien/ezdesign 0.8.1 → 0.9.1
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 +166 -37
- package/dist/announcements/template-ERNKAKI5.svg +33 -0
- package/dist/cli.mjs +7603 -3157
- package/dist/constants.d.ts +36 -8
- package/dist/events-worker.js +77 -0
- package/dist/extension/g/0.9.1-16d05e759b/dialog.css +1 -0
- package/dist/extension/g/0.9.1-16d05e759b/dialog.html +13 -0
- package/dist/extension/g/0.9.1-16d05e759b/dialog.js +1 -0
- package/dist/extension/g/0.9.1-16d05e759b/icon-128.png +0 -0
- package/dist/extension/g/0.9.1-16d05e759b/icon-16.png +0 -0
- package/dist/extension/g/0.9.1-16d05e759b/icon-32.png +0 -0
- package/dist/extension/g/0.9.1-16d05e759b/icon-48.png +0 -0
- package/dist/extension/g/0.9.1-16d05e759b/media.html +9 -0
- package/dist/extension/g/0.9.1-16d05e759b/media.js +1 -0
- package/dist/extension/g/0.9.1-16d05e759b/page.js +39 -0
- package/dist/extension/g/0.9.1-16d05e759b/setup.css +1 -0
- package/dist/extension/g/0.9.1-16d05e759b/setup.html +17 -0
- package/dist/extension/g/0.9.1-16d05e759b/setup.js +1 -0
- package/dist/extension/g/0.9.1-16d05e759b/worker.js +57 -0
- package/dist/extension/manifest.json +57 -0
- package/dist/native-host.mjs +20594 -0
- package/dist/overlay.css +0 -43
- package/dist/overlay.js +284 -89
- package/dist/shell.css +1599 -21
- package/dist/shell.js +4374 -734
- package/dist/vite.mjs +5 -0
- package/package.json +8 -5
- package/skills/ezdesign/SKILL.md +24 -67
- package/skills/ezdesign/reference/start.md +3 -1
package/dist/vite.mjs
CHANGED
|
@@ -10,11 +10,16 @@ var APP_NAME = "ezdesign";
|
|
|
10
10
|
var ENV_PREFIX = APP_NAME.toUpperCase();
|
|
11
11
|
var DATA_DIR = process.env[`${ENV_PREFIX}_DATA_DIR`] ?? join(homedir(), `.${APP_NAME}`);
|
|
12
12
|
var SESSIONS_DIR = join(DATA_DIR, "sessions");
|
|
13
|
+
var LEGACY_SESSIONS_DIR = join(DATA_DIR, "sessions-legacy");
|
|
13
14
|
var REGISTRY_FILE = join(DATA_DIR, "daemon.json");
|
|
14
15
|
var DAEMON_LOG = join(DATA_DIR, "daemon.log");
|
|
15
16
|
var VERSIONS_DIR = join(DATA_DIR, "versions");
|
|
16
17
|
var UPDATE_CHECK_FILE = join(DATA_DIR, "update-check.json");
|
|
18
|
+
var LIBRARY_HOME_ENV = `${ENV_PREFIX}_LIBRARY_HOME`;
|
|
17
19
|
var NO_UPDATE_CHECK_ENV = `${ENV_PREFIX}_NO_UPDATE_CHECK`;
|
|
20
|
+
var DESIGN_HARNESS_ENV = `${ENV_PREFIX}_DESIGN_HARNESS`;
|
|
21
|
+
var API_URL_ENV = `${ENV_PREFIX}_API_URL`;
|
|
22
|
+
var NO_IDLE_STOP_ENV = `${ENV_PREFIX}_NO_IDLE_STOP`;
|
|
18
23
|
var CONTROL_PORT_ENV = `${ENV_PREFIX}_CONTROL_PORT`;
|
|
19
24
|
var MAX_ATTACHMENT_BYTES = 8 * 1024 * 1024;
|
|
20
25
|
var ATTACHMENT_GRACE_MS = 24 * 60 * 6e4;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cychien/ezdesign",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Annotate your live dev app in the browser; feedback flows to your local coding agent, which edits the source. Review, iterate, repeat.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Justin Chien",
|
|
@@ -32,9 +32,10 @@
|
|
|
32
32
|
"dev": "node scripts/dev.mjs",
|
|
33
33
|
"dev:agent": "node scripts/dev-agent.mjs",
|
|
34
34
|
"dev:cli": "node scripts/dev-cli.mjs",
|
|
35
|
+
"brand": "node scripts/brand-wordmark.mjs && node --import tsx scripts/brand-assets.mjs",
|
|
35
36
|
"check": "npm run build && npm run typecheck && npm test",
|
|
36
|
-
"typecheck": "tsc --noEmit && tsc -p fixtures/playground --noEmit",
|
|
37
|
-
"test": "node
|
|
37
|
+
"typecheck": "tsc --noEmit && tsc -p src/extension --noEmit && tsc -p fixtures/playground --noEmit",
|
|
38
|
+
"test": "node scripts/test.mjs",
|
|
38
39
|
"version": "node scripts/sync-skill-version.mjs && git add skills/ezdesign/SKILL.md",
|
|
39
40
|
"prepublishOnly": "npm run check"
|
|
40
41
|
},
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"access": "public"
|
|
43
44
|
},
|
|
44
45
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
46
|
+
"node": ">=22.13"
|
|
46
47
|
},
|
|
47
48
|
"keywords": [
|
|
48
49
|
"agent",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"@agentclientprotocol/sdk": "^1.4.0",
|
|
59
60
|
"@babel/parser": "^7.26.0",
|
|
60
|
-
"@hugeicons/core-free-icons": "^4.
|
|
61
|
+
"@hugeicons/core-free-icons": "^4.3.5",
|
|
61
62
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
62
63
|
"express": "^5.1.0",
|
|
63
64
|
"http-proxy-middleware": "^3.0.3",
|
|
@@ -66,12 +67,14 @@
|
|
|
66
67
|
"zod": "^4.5.4"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
70
|
+
"@fontsource/geist-sans": "5.3.0",
|
|
69
71
|
"@types/express": "^5.0.0",
|
|
70
72
|
"@types/node": "^22.10.0",
|
|
71
73
|
"@types/react": "^19.2.18",
|
|
72
74
|
"@types/react-dom": "^19.2.5",
|
|
73
75
|
"@vitejs/plugin-react": "^4.7.0",
|
|
74
76
|
"esbuild": "^0.25.0",
|
|
77
|
+
"opentype.js": "1.3.4",
|
|
75
78
|
"react": "^19.2.8",
|
|
76
79
|
"react-dom": "^19.2.8",
|
|
77
80
|
"tsx": "^4.23.11",
|
package/skills/ezdesign/SKILL.md
CHANGED
|
@@ -1,78 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ezdesign
|
|
3
|
-
description:
|
|
3
|
+
description: Open an ezdesign review session on a running web page. The user annotates the page in the browser, and each batch reaches the coding agent with exact source locations. Use when the user invokes /ezdesign, or asks to review, annotate or give visual feedback on a running page, or to explore designs on a canvas.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.9.1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# ezdesign
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
the browser tool is whatever the agent has, and the two files at the project root are the
|
|
13
|
-
configuration. When an ezdesign review session *is* open, its daemon points each turn at the step's
|
|
14
|
-
file directly and this file is not on the path.
|
|
15
|
-
|
|
16
|
-
## The harness
|
|
17
|
-
|
|
18
|
-
| Step | File | Runs when | Produces |
|
|
19
|
-
| --- | --- | --- | --- |
|
|
20
|
-
| 1 product | [reference/product.md](reference/product.md) | no `PRODUCT.md` | `PRODUCT.md` |
|
|
21
|
-
| 2 stack | [reference/stack.md](reference/stack.md) | `.ezdesign/config.json` is missing, stale, or names no browser tool | `.ezdesign/config.json`: the stack, the design system and component library in use, the browser tool |
|
|
22
|
-
| 3 design | [reference/design.md](reference/design.md) | no `DESIGN.md` | `DESIGN.md`: the visual language in broad strokes, a direction rather than a spec, no components |
|
|
23
|
-
| 4 components | [reference/components.md](reference/components.md) | `.ezdesign/config.json` records no `components.primitives` | `DESIGN.md`'s language made concrete in the design system, and the component set written in the project's own library |
|
|
24
|
-
| 5 make | [reference/make.md](reference/make.md) | a request to change or build UI, or an explore round asking for variants | the change, or the variants |
|
|
25
|
-
|
|
26
|
-
Steps 1 to 4 configure the project; 5 is the work, and it ends by having an independent reviewer
|
|
27
|
-
judge what it made ([reference/critique.md](reference/critique.md)) and letting `PRODUCT.md`,
|
|
28
|
-
`DESIGN.md` and this user's taste, `.ezdesign/taste.md` - which the work is built to and judged by -
|
|
29
|
-
learn from the request. Each
|
|
30
|
-
step reads what the ones before it produced, and a step never rewrites another step's file. A step
|
|
31
|
-
whose file is not there yet says so in one line and is skipped.
|
|
32
|
-
|
|
33
|
-
## When the harness applies
|
|
34
|
-
|
|
35
|
-
Only in a turn that explicitly turns it on, never by default. Inside an ezdesign review session,
|
|
36
|
-
that is a prompt saying `增強設計 (the design harness) is on for this turn.` Outside a session, it
|
|
37
|
-
is a request in which the user asks for 增強設計 or the design harness by name.
|
|
38
|
-
|
|
39
|
-
Any other turn is handled as if this skill had never been read, even later in a conversation where
|
|
40
|
-
the harness was on: no harness steps, no designing by `PRODUCT.md` or `DESIGN.md`, no review by
|
|
41
|
-
its rules, and no edits to `PRODUCT.md`, `DESIGN.md` or `.ezdesign/config.json` unless the request
|
|
42
|
-
asks for one.
|
|
43
|
-
|
|
44
|
-
When it applies, talk to the user in the language they write in and in their words - 增強設計,
|
|
45
|
-
設計規範, 靈感 - never the harness's own: harness, step or file names, precedent, inspire, or the
|
|
46
|
-
review and its scores, which are the agent's business and not theirs.
|
|
47
|
-
|
|
48
|
-
- **Both files exist: in the harness.** Read `PRODUCT.md` and `DESIGN.md` before any visual change.
|
|
49
|
-
Keep to `PRODUCT.md`; take `DESIGN.md` as a direction to start from, not a rule to obey. An
|
|
50
|
-
ordinary change edits code only; the two
|
|
51
|
-
files change only as step 5 says. Run step 5 for the request. When `.ezdesign/config.json` is
|
|
52
|
-
missing or stale, run step 2 first; when it records no `components.primitives`, run step 4
|
|
53
|
-
first.
|
|
54
|
-
- **Either is missing: ask before anything else**, because the harness cannot run without it. Ask
|
|
55
|
-
the user, word for word, naming only the file that is missing when one exists:
|
|
56
|
-
|
|
57
|
-
> 啟用增強設計:增強設計會建立 PRODUCT.md 與 DESIGN.md,是否繼續?
|
|
58
|
-
|
|
59
|
-
with two options in this order: 「繼續」 and 「取消」. Use your question tool if you have
|
|
60
|
-
one; otherwise ask in your reply and end the turn.
|
|
61
|
-
- **Yes:** walk steps 1 to 4 in order, starting at the first one whose output is missing, then
|
|
62
|
-
do the work through step 5.
|
|
63
|
-
- **No:** the harness cannot be used. Do the work as you would without this skill.
|
|
64
|
-
|
|
65
|
-
## Opening an ezdesign review
|
|
66
|
-
|
|
67
|
-
When the user wants to annotate a running page in the browser and have the feedback come back as
|
|
68
|
-
exact source locations, open a review session: [reference/start.md](reference/start.md). This is
|
|
69
|
-
the one part of the skill that needs ezdesign installed.
|
|
10
|
+
Open a review: [reference/start.md](reference/start.md). A bare `/ezdesign`, with nothing after
|
|
11
|
+
it, is that request: open a review on the project's running dev server.
|
|
70
12
|
|
|
71
13
|
## Inside a review session
|
|
72
14
|
|
|
73
15
|
The daemon has done the routing: its prompt says whether the turn is a feedback batch or an
|
|
74
|
-
explore round, and
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
16
|
+
explore round, and what to do with it. Do not route again. A batch carries the page's `url`, the
|
|
17
|
+
annotated `items` with their `anchor` (source `file:line`, selector, viewport), `references`, and
|
|
18
|
+
`attachments`. An explore adds one element's capture - its markup, computed styles, slot and the
|
|
19
|
+
page's tokens - and takes each variant back through a tool, editing no file.
|
|
20
|
+
|
|
21
|
+
## Canvases
|
|
22
|
+
|
|
23
|
+
An ACP review session also gives you the `ezdesign-canvas` tools. Each turn's prompt says which tab
|
|
24
|
+
the user sent the batch from and which canvases exist.
|
|
25
|
+
|
|
26
|
+
- When the user wants to explore directions, compare options or see a design before it is built,
|
|
27
|
+
put each one in a frame on a canvas: one `add_frame` per design, as soon as each is ready, on the
|
|
28
|
+
canvas the turn's prompt names. Call `create_canvas` only when no canvas is open or the user asks
|
|
29
|
+
for a new one. Leave `position` out; frames are placed for you.
|
|
30
|
+
- A frame is a complete HTML document with its own `<head>` and styles, at a real viewport width
|
|
31
|
+
(390 phone, 768 tablet, 1280 desktop). Nothing is shared between frames.
|
|
32
|
+
- An item whose `anchor.frame` is set was made inside a frame: `anchor.source` is a line of that
|
|
33
|
+
frame's file under `.ezdesign/canvases/`. Change a frame with `update_frame` (pass the
|
|
34
|
+
`expectedHash` you last read) or by editing its file.
|
|
35
|
+
- Never edit `canvas.json` or `layout.json` by hand. Where a frame sits and its size are the user's.
|
|
@@ -28,7 +28,9 @@ the user did not provide an ACP command, ask them which ACP agent to use.
|
|
|
28
28
|
|
|
29
29
|
## Workflow
|
|
30
30
|
|
|
31
|
-
1. Make sure the dev server is running. Never start a second instance when one is already up.
|
|
31
|
+
1. Make sure the dev server is running. Never start a second instance when one is already up. If
|
|
32
|
+
the user only wants to explore designs on a canvas, there may be no dev server: run the command
|
|
33
|
+
below without the url and the review opens on the project's canvases.
|
|
32
34
|
2. From the project root, run:
|
|
33
35
|
|
|
34
36
|
```sh
|