@cychien/ezdesign 0.10.0 → 0.11.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
@@ -164,6 +164,9 @@ hard part of a review and back again. Switching agents starts a new conversation
164
164
  | `codex` | Codex |
165
165
  | `gemini` | Gemini CLI |
166
166
 
167
+ Without `--agent`, ezdesign connects the agent the project had, else the one you used last, else
168
+ the first of these it finds installed. One you disconnect in the shell stays off for that project.
169
+
167
170
  ezdesign talks to agents over the [Agent Client Protocol](https://agentclientprotocol.com). Any
168
171
  other value is run as an ACP server command, so a custom agent works too:
169
172
  `--agent 'my-acp-agent --flag'`.
@@ -224,7 +227,7 @@ using whatever version npx cached. Update the skill with `npx skills update ezde
224
227
  ## CLI
225
228
 
226
229
  ```
227
- ezdesign [<url>] --agent <name> open or resume this project's review
230
+ ezdesign [<url>] [--agent <name>] open or resume this project's review
228
231
  ezdesign status show running sessions
229
232
  ezdesign stop stop the background daemon
230
233
  ezdesign extension install set up the Chrome extension
package/dist/cli.mjs CHANGED
@@ -9347,6 +9347,9 @@ var Updater = class {
9347
9347
  function agentInstalled(profile, env = process.env) {
9348
9348
  return findExecutable(profile.binary, env.PATH) !== null;
9349
9349
  }
9350
+ function defaultAgent() {
9351
+ return proposingAgent([rememberedLastAgent()], (p) => agentInstalled(p));
9352
+ }
9350
9353
  var distDir = dirname9(fileURLToPath(import.meta.url));
9351
9354
  var SKILL_DIR = skillDir(distDir);
9352
9355
  var SELF_CLI = selfNodeCommandLine([...process.execArgv, process.argv[1] ?? ""].filter(Boolean));
@@ -9870,12 +9873,13 @@ var SessionRuntime = class {
9870
9873
  }
9871
9874
  this.lastDevServerPhase = phase;
9872
9875
  }
9873
- /** Opening the project: the agent it was on, else the user's last, unless they disconnected it here. */
9876
+ /** Opening the project: the agent it was on, else `fallback`, unless they disconnected it here. */
9874
9877
  ensureAgent(fallback, by) {
9875
9878
  const live3 = !!this.acp && this.acp.snapshot().state !== "exited";
9876
9879
  const { agent, agentDeclined } = this.store.session;
9877
9880
  if (live3 || agentDeclined || this.pollWaiters.size > 0) return;
9878
- this.connectAgent(agent ?? this.store.currentChat.agent ?? fallback, by);
9881
+ const command = agent ?? this.store.currentChat.agent ?? fallback;
9882
+ if (command) this.connectAgent(command, by);
9879
9883
  }
9880
9884
  /** A shell's pick. The chat carries on when this agent can resume it; otherwise,
9881
9885
  * as with a switch, a new chat begins. */
@@ -11248,7 +11252,7 @@ async function daemonMain(version, opts = {}) {
11248
11252
  book,
11249
11253
  version,
11250
11254
  account: () => account.snapshot(),
11251
- defaultAgent: () => rememberedLastAgent() ?? AGENT_PROFILES[0].command,
11255
+ defaultAgent,
11252
11256
  projectRoot,
11253
11257
  restored: () => restored
11254
11258
  });
@@ -11331,7 +11335,7 @@ async function daemonMain(version, opts = {}) {
11331
11335
  );
11332
11336
  });
11333
11337
  control.post("/control/sessions", async (req, res) => {
11334
- const { url, reopen, project, agent, devServer } = req.body ?? {};
11338
+ const { url, reopen, project, agent, connectAgent, devServer } = req.body ?? {};
11335
11339
  if (typeof project !== "string" || !project) {
11336
11340
  return res.status(400).json({ error: "missing project" });
11337
11341
  }
@@ -11363,6 +11367,8 @@ async function daemonMain(version, opts = {}) {
11363
11367
  return res.status(409).json({ error: "that agent cannot be started right now" });
11364
11368
  }
11365
11369
  runtime.broadcast();
11370
+ } else if (connectAgent === true) {
11371
+ runtime.ensureAgent(defaultAgent(), "cli");
11366
11372
  }
11367
11373
  res.json({
11368
11374
  port: runtime.port,
@@ -11641,15 +11647,18 @@ var EXTENSION_HELP = ` ${APP_NAME} extension install [--user-data-dir <dir>] |
11641
11647
  var HELP = `${APP_NAME} - annotate your live dev app, feedback flows to your local agent
11642
11648
 
11643
11649
  Usage:
11644
- ${APP_NAME} [<url>] [--reopen] [--agent <name|command>]
11650
+ ${APP_NAME} [<url>] [--reopen] [--agent <name|command> | --no-agent]
11645
11651
  open (or resume) this project's review session. With <url>, that dev
11646
11652
  server is on its App tab (a dev server that moved ports keeps the
11647
11653
  conversation); without one, its App tab offers to start the project's
11648
11654
  dev server, or the shell opens on its canvases when there is none.
11649
- --agent (SPIKE) drives the agent over ACP: the session spawns it, feedback
11650
- goes straight to it, and its stream, questions and permission prompts all
11651
- surface in the review shell - no terminal needed. Profiles: claude, gemini,
11652
- codex; anything else is run as an ACP agent command line.
11655
+ The session drives its agent over ACP: it spawns it, feedback goes
11656
+ straight to it, and its stream, questions and permission prompts all
11657
+ surface in the review shell - no terminal needed. Without --agent it
11658
+ connects the agent this project had, else your last one, else the first
11659
+ installed of claude, codex and gemini; one you disconnected in the shell
11660
+ stays off. --agent picks one: claude, codex, gemini, or any ACP agent
11661
+ command line. --no-agent connects none, for an agent working it with poll.
11653
11662
  ${APP_NAME} poll [<url>] [--agent-reply <msg>]
11654
11663
  block until the user sends feedback; prints JSON, then exits
11655
11664
  ${APP_NAME} progress [<url>] <msg>
@@ -11794,7 +11803,7 @@ async function cmdOpen(rawUrl, flags, agentArg) {
11794
11803
  ...target ? { url: target.href } : {},
11795
11804
  reopen: flags.has("--reopen"),
11796
11805
  project,
11797
- ...agentArg ? { agent: agentCommand(agentArg) } : {}
11806
+ ...agentArg ? { agent: agentCommand(agentArg) } : { connectAgent: !flags.has("--no-agent") }
11798
11807
  })
11799
11808
  });
11800
11809
  const body = await res.json();
@@ -11805,8 +11814,10 @@ async function cmdOpen(rawUrl, flags, agentArg) {
11805
11814
  console.log(`shell: ${body.shellUrl}${body.shellOpen ? " (already open in your browser)" : ""}`);
11806
11815
  if (body.agent) {
11807
11816
  console.log(`agent: ${body.agent} (ACP) - review runs in the shell`);
11808
- } else {
11817
+ } else if (flags.has("--no-agent")) {
11809
11818
  console.log(`next: run \`${APP_NAME} poll\` in this project and wait for feedback`);
11819
+ } else {
11820
+ console.log(`next: pick an agent in the shell, or run again with --agent claude|codex|gemini`);
11810
11821
  }
11811
11822
  }
11812
11823
  function reexecAs(cliEntry2) {
@@ -12090,6 +12101,7 @@ async function main() {
12090
12101
  const agentIdx = argv.indexOf("--agent");
12091
12102
  const agentArg = agentIdx >= 0 ? argv[agentIdx + 1] : void 0;
12092
12103
  if (agentIdx >= 0 && !agentArg) fail("missing value for --agent", "e.g. --agent claude");
12104
+ if (agentArg && flags.has("--no-agent")) fail("--agent and --no-agent cannot be used together");
12093
12105
  return cmdOpen(first === void 0 || first.startsWith("--") ? void 0 : first, flags, agentArg);
12094
12106
  }
12095
12107
  }
@@ -2,14 +2,14 @@
2
2
  "manifest_version": 3,
3
3
  "name": "ezdesign capture",
4
4
  "description": "把網頁上的圖片、影片和截圖存進 ezdesign 的設計收藏",
5
- "version": "0.10.0",
5
+ "version": "0.11.0",
6
6
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlzPjnyRVvSB2AjSq+2QWTRzxUAqXp52c1XP3C9YSNVNzzOIpt6gnnoaOikfn0wcNWQCV7Llp9giVbhRrQRwTiWj24U3cAM0NNGLZoBByBQtB45T9mM7NNdUpNT6ITtpELVCylsUF5LcEzbB/DjUDVmXAiN3cncH5ZFP2XPb+c8Nr89UmDFyjAfONfkNzY7dYkzIb32w+GNX8P2UhsT73+g3jtT7YJvV0SziLzn+xSl1KEBTPcIZcsZDc4tIdIvzsb2K8GSrvTNY2ACRu77gtiSCMjfAgk83OxSrS6QZfp3Q3jse7E6CPvqM2C1FPS7HkcRTejBORO1tewvU9VJbUiQIDAQAB",
7
7
  "minimum_chrome_version": "116",
8
8
  "icons": {
9
- "16": "g/0.10.0-75c3fbebc3/icon-16.png",
10
- "32": "g/0.10.0-75c3fbebc3/icon-32.png",
11
- "48": "g/0.10.0-75c3fbebc3/icon-48.png",
12
- "128": "g/0.10.0-75c3fbebc3/icon-128.png"
9
+ "16": "g/0.11.0-75c3fbebc3/icon-16.png",
10
+ "32": "g/0.11.0-75c3fbebc3/icon-32.png",
11
+ "48": "g/0.11.0-75c3fbebc3/icon-48.png",
12
+ "128": "g/0.11.0-75c3fbebc3/icon-128.png"
13
13
  },
14
14
  "permissions": [
15
15
  "activeTab",
@@ -20,13 +20,13 @@
20
20
  "storage"
21
21
  ],
22
22
  "background": {
23
- "service_worker": "g/0.10.0-75c3fbebc3/worker.js"
23
+ "service_worker": "g/0.11.0-75c3fbebc3/worker.js"
24
24
  },
25
25
  "action": {
26
26
  "default_title": "截取區域存至 ezdesign",
27
27
  "default_icon": {
28
- "16": "g/0.10.0-75c3fbebc3/icon-16.png",
29
- "32": "g/0.10.0-75c3fbebc3/icon-32.png"
28
+ "16": "g/0.11.0-75c3fbebc3/icon-16.png",
29
+ "32": "g/0.11.0-75c3fbebc3/icon-32.png"
30
30
  }
31
31
  },
32
32
  "optional_permissions": [
@@ -46,9 +46,9 @@
46
46
  "web_accessible_resources": [
47
47
  {
48
48
  "resources": [
49
- "g/0.10.0-75c3fbebc3/dialog.html",
50
- "g/0.10.0-75c3fbebc3/dialog.js",
51
- "g/0.10.0-75c3fbebc3/dialog.css"
49
+ "g/0.11.0-75c3fbebc3/dialog.html",
50
+ "g/0.11.0-75c3fbebc3/dialog.js",
51
+ "g/0.11.0-75c3fbebc3/dialog.css"
52
52
  ],
53
53
  "matches": [
54
54
  "<all_urls>"
@@ -56,5 +56,5 @@
56
56
  "use_dynamic_url": true
57
57
  }
58
58
  ],
59
- "version_name": "0.10.0"
59
+ "version_name": "0.11.0"
60
60
  }
@@ -54190,7 +54190,7 @@ async function downloadStream(request, openStage) {
54190
54190
  }
54191
54191
 
54192
54192
  // src/native-host/main.ts
54193
- var HOST_VERSION = true ? "0.10.0" : "dev";
54193
+ var HOST_VERSION = true ? "0.11.0" : "dev";
54194
54194
  async function run(stdout2) {
54195
54195
  const caller = checkCaller(process.argv);
54196
54196
  if (!caller.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cychien/ezdesign",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
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",
@@ -2,7 +2,7 @@
2
2
  name: ezdesign
3
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.10.0
5
+ version: 0.11.0
6
6
  ---
7
7
 
8
8
  # ezdesign