agent-yes 1.201.0 → 1.203.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.
Files changed (38) hide show
  1. package/default.config.yaml +8 -8
  2. package/dist/SUPPORTED_CLIS-C2KLyNR9.js +9 -0
  3. package/dist/{SUPPORTED_CLIS-CnGjmp53.js → SUPPORTED_CLIS-CME2rXAO.js} +2 -2
  4. package/dist/{agentShare-lDreSLQE.js → agentShare-LmDLDvCN.js} +2 -2
  5. package/dist/cli.js +4 -4
  6. package/dist/index.js +2 -2
  7. package/dist/{notifyDaemon-C4VzLmmO.js → notifyDaemon-CW7E0ON1.js} +2 -2
  8. package/dist/{rustBinary-CVZsX0za.js → rustBinary-5fGeqzPe.js} +2 -2
  9. package/dist/{schedule-hdbXBwpG.js → schedule-bPb_0xnY.js} +4 -4
  10. package/dist/{serve-DEEesVYn.js → serve-B9RuI_Hb.js} +12 -12
  11. package/dist/{setup-DZbnDas9.js → setup-CnzMLgtM.js} +2 -2
  12. package/dist/{subcommands-IwpLJA-n.js → subcommands-cqz_xIKK.js} +1 -1
  13. package/dist/{subcommands-De-OHc0k.js → subcommands-t8QPivG7.js} +53 -11
  14. package/dist/{ts-ZOEYyQAX.js → ts-DVxj4HLs.js} +2 -2
  15. package/dist/{versionChecker-CBtAasFe.js → versionChecker-mq5B0hM3.js} +2 -2
  16. package/dist/{ws-DLiI3C6R.js → ws-BSyEbL--.js} +2 -2
  17. package/lab/ui/console-logic.js +43 -4
  18. package/lab/ui/index.html +65 -21
  19. package/lab/ui/qrcode.js +548 -565
  20. package/lab/ui/room-client.js +70 -91
  21. package/lab/ui/sw.js +17 -7
  22. package/package.json +7 -7
  23. package/scripts/build-rgui.ts +3 -1
  24. package/ts/agentShare.spec.ts +5 -3
  25. package/ts/badges.spec.ts +84 -1
  26. package/ts/badges.ts +69 -5
  27. package/ts/notifyDaemon.spec.ts +2 -8
  28. package/ts/notifyDaemon.ts +32 -33
  29. package/ts/notifyInbox.spec.ts +2 -1
  30. package/ts/notifyRouter.spec.ts +7 -11
  31. package/ts/notifyStore.spec.ts +4 -1
  32. package/ts/notifyStore.ts +18 -14
  33. package/ts/serve.spec.ts +4 -6
  34. package/ts/serve.ts +69 -17
  35. package/ts/subcommands.ts +46 -18
  36. package/ts/ws.spec.ts +31 -7
  37. package/ts/ws.ts +15 -4
  38. package/dist/SUPPORTED_CLIS-BbWt8-ON.js +0 -9
package/lab/ui/index.html CHANGED
@@ -1835,7 +1835,11 @@
1835
1835
  <button id="portsbtn" class="viewbtn" title="manage exposed localhost ports">
1836
1836
  ⇄ ports
1837
1837
  </button>
1838
- <button id="rguibtn" class="viewbtn" title="open the agent graph view (/r/) for this fleet">
1838
+ <button
1839
+ id="rguibtn"
1840
+ class="viewbtn"
1841
+ title="open the agent graph view (/r/) for this fleet"
1842
+ >
1839
1843
  ⌗ graph
1840
1844
  </button>
1841
1845
  <button id="newbtn" class="newbtn" title="spawn a new agent on this fleet">
@@ -2071,7 +2075,11 @@
2071
2075
  WebRTC tunnel (Service Worker proxies /w/p/<src>/<port>/*, no relay). -->
2072
2076
  <div class="preview-overlay" id="previewOverlay" hidden>
2073
2077
  <div class="preview-bar">
2074
- <span class="preview-badge" title="served over a direct P2P WebRTC tunnel — traffic does not go through agent-yes.com">⚡ P2P · no relay</span>
2078
+ <span
2079
+ class="preview-badge"
2080
+ title="served over a direct P2P WebRTC tunnel — traffic does not go through agent-yes.com"
2081
+ >⚡ P2P · no relay</span
2082
+ >
2075
2083
  <span class="preview-title" id="previewTitle"></span>
2076
2084
  <button id="previewReload" type="button" title="reload">↻</button>
2077
2085
  <button id="previewPop" type="button" title="open in a new tab">↗</button>
@@ -2086,7 +2094,7 @@
2086
2094
  <div class="omnibox">
2087
2095
  <input
2088
2096
  id="omni-input"
2089
- placeholder="Search agents by title, then output… · &quot;/&quot; commands · /ws workspaces"
2097
+ placeholder='Search agents by title, then output… · "/" commands · /ws workspaces'
2090
2098
  spellcheck="false"
2091
2099
  autocapitalize="off"
2092
2100
  autocomplete="off"
@@ -2317,7 +2325,12 @@
2317
2325
  },
2318
2326
  // Open a WS to the previewed port over the tunnel (Vite HMR etc.).
2319
2327
  previewWs(port, path, protocols, handlers) {
2320
- return chRoom.room.openWs(peerId, "/__codehost/port/" + port + path, protocols, handlers);
2328
+ return chRoom.room.openWs(
2329
+ peerId,
2330
+ "/__codehost/port/" + port + path,
2331
+ protocols,
2332
+ handlers,
2333
+ );
2321
2334
  },
2322
2335
  async fetchJSON(path) {
2323
2336
  let res;
@@ -2597,13 +2610,21 @@
2597
2610
  .then(async (res) => {
2598
2611
  const headers = {};
2599
2612
  res.headers.forEach((v, k) => (headers[k] = v));
2600
- port.postMessage({ type: "head", status: res.status, statusText: res.statusText, headers });
2613
+ port.postMessage({
2614
+ type: "head",
2615
+ status: res.status,
2616
+ statusText: res.statusText,
2617
+ headers,
2618
+ });
2601
2619
  if (res.body) {
2602
2620
  const reader = res.body.getReader();
2603
2621
  for (;;) {
2604
2622
  const { done, value } = await reader.read();
2605
2623
  if (done) break;
2606
- const buf = value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength);
2624
+ const buf = value.buffer.slice(
2625
+ value.byteOffset,
2626
+ value.byteOffset + value.byteLength,
2627
+ );
2607
2628
  port.postMessage({ type: "body", chunk: buf }, [buf]);
2608
2629
  }
2609
2630
  }
@@ -2638,7 +2659,11 @@
2638
2659
  this._queue = [];
2639
2660
  const tx = sources.get(src)?.tx;
2640
2661
  const u = new URL(this.url, location.href);
2641
- const protoList = protocols ? (Array.isArray(protocols) ? protocols : [protocols]) : undefined;
2662
+ const protoList = protocols
2663
+ ? Array.isArray(protocols)
2664
+ ? protocols
2665
+ : [protocols]
2666
+ : undefined;
2642
2667
  if (!tx || !tx.previewWs) return void this._fail();
2643
2668
  tx.previewWs(port, u.pathname + u.search, protoList, {
2644
2669
  onOpenAck: (ok, proto) => {
@@ -2658,7 +2683,8 @@
2658
2683
  })
2659
2684
  .then((h) => {
2660
2685
  this._handle = h;
2661
- if (this.readyState === 3 && this._closeReq) h.close(this._closeReq.code, this._closeReq.reason);
2686
+ if (this.readyState === 3 && this._closeReq)
2687
+ h.close(this._closeReq.code, this._closeReq.reason);
2662
2688
  })
2663
2689
  .catch(() => this._fail());
2664
2690
  }
@@ -2671,8 +2697,10 @@
2671
2697
  const h = this._handle;
2672
2698
  if (!h) return;
2673
2699
  if (typeof data === "string") h.sendText(data);
2674
- else if (data instanceof Blob) data.arrayBuffer().then((b) => h.sendBin(new Uint8Array(b)));
2675
- else if (ArrayBuffer.isView(data)) h.sendBin(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));
2700
+ else if (data instanceof Blob)
2701
+ data.arrayBuffer().then((b) => h.sendBin(new Uint8Array(b)));
2702
+ else if (ArrayBuffer.isView(data))
2703
+ h.sendBin(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));
2676
2704
  else h.sendBin(new Uint8Array(data));
2677
2705
  }
2678
2706
  send(data) {
@@ -3772,7 +3800,8 @@
3772
3800
  } catch {}
3773
3801
  if (!info || !info.claim) {
3774
3802
  $("exposeEmpty").hidden = false;
3775
- $("exposeEmpty").textContent = "Couldn't expose port " + port + " (is `ay serve` reachable?).";
3803
+ $("exposeEmpty").textContent =
3804
+ "Couldn't expose port " + port + " (is `ay serve` reachable?).";
3776
3805
  return null;
3777
3806
  }
3778
3807
  return info;
@@ -3798,7 +3827,8 @@
3798
3827
  // the Service Worker proxies over the machine's WebRTC tunnel (no relay).
3799
3828
  function openPreview(src, port) {
3800
3829
  // Scope-relative so it works at both /w/ (agent-yes.com) and / (ay serve).
3801
- const url = new URL("p/" + encodeURIComponent(src) + "/" + port + "/", location.href).pathname;
3830
+ const url = new URL("p/" + encodeURIComponent(src) + "/" + port + "/", location.href)
3831
+ .pathname;
3802
3832
  const frame = $("previewFrame");
3803
3833
  if (!frame) return window.open(url, "_blank");
3804
3834
  $("previewTitle").textContent = "localhost:" + port;
@@ -3849,7 +3879,8 @@
3849
3879
  return;
3850
3880
  }
3851
3881
  if (Array.isArray(arr))
3852
- for (const ex of arr) rows.push({ ...ex, _srcName: s.name || s.id, _src: s.id, _tx: tx });
3882
+ for (const ex of arr)
3883
+ rows.push({ ...ex, _srcName: s.name || s.id, _src: s.id, _tx: tx });
3853
3884
  }),
3854
3885
  );
3855
3886
  list.textContent = "";
@@ -5335,10 +5366,10 @@
5335
5366
  $("rguibtn").addEventListener("click", () => {
5336
5367
  const [selRoom, selPid] = sel ? sel.split("#") : [null, null];
5337
5368
  let room = selRoom && selRoom !== LOCAL && loadRooms()[selRoom] ? selRoom : null;
5338
- if (!room)
5339
- room = [...sources.values()].find((s) => s.kind === "rtc" && s.live)?.id ?? null;
5340
- const frag =
5341
- room ? "#" + encodeURIComponent(room) + (room === selRoom && selPid ? ":" + selPid : "") : "";
5369
+ if (!room) room = [...sources.values()].find((s) => s.kind === "rtc" && s.live)?.id ?? null;
5370
+ const frag = room
5371
+ ? "#" + encodeURIComponent(room) + (room === selRoom && selPid ? ":" + selPid : "")
5372
+ : "";
5342
5373
  location.href = "/r/" + frag;
5343
5374
  });
5344
5375
  // Cycle the sort order: state → created → identity → state.
@@ -5776,7 +5807,7 @@
5776
5807
  <span class="dot idle"></span>
5777
5808
  <div class="omni-main">
5778
5809
  <div class="omni-title">${title}</div>
5779
- <div class="omni-sub">sets the left panel filter &nbsp;·&nbsp; space = AND, tags like repo:/wt:/cli:/host:</div>
5810
+ <div class="omni-sub">sets the left panel filter &nbsp;·&nbsp; space = AND, tags like repo:/wt:/cli:/host:/user: — bare text also matches host & user</div>
5780
5811
  </div></div>`;
5781
5812
  }
5782
5813
  if (r.kind === "wshint") {
@@ -5799,7 +5830,9 @@
5799
5830
  <span class="dot ${live ? "active" : "exited"}"></span>
5800
5831
  <div class="omni-main">
5801
5832
  <div class="omni-title">▤ ${esc(wsSpecOf(r.ws))}${
5802
- live ? ` <span style="opacity:.7">· ${live} agent${live > 1 ? "s" : ""}</span>` : ""
5833
+ live
5834
+ ? ` <span style="opacity:.7">· ${live} agent${live > 1 ? "s" : ""}</span>`
5835
+ : ""
5803
5836
  }${multi ? ` <span style="opacity:.55">@ ${esc(r.host)}</span>` : ""}</div>
5804
5837
  <div class="omni-sub">${esc(r.ws.path)}${st ? " &nbsp;·&nbsp; <b>" + esc(st) + "</b>" : ""} &nbsp;·&nbsp; ⏎ spawn agent here</div>
5805
5838
  </div></div>`;
@@ -6569,14 +6602,25 @@
6569
6602
  // picker (options from /api/spawn-config `clis`), preselected from the
6570
6603
  // chain: selected agent's cli → last used cli → explicit user pick.
6571
6604
  const LAST_CLI_KEY = "ay.lastSpawnCli";
6572
- const CLI_FALLBACK = ["claude", "codex", "gemini", "copilot", "cursor-agent", "goose", "aider"];
6605
+ const CLI_FALLBACK = [
6606
+ "claude",
6607
+ "codex",
6608
+ "gemini",
6609
+ "copilot",
6610
+ "cursor-agent",
6611
+ "goose",
6612
+ "aider",
6613
+ ];
6573
6614
  function cliOptions(clis, preferred) {
6574
6615
  const list = clis && clis.length ? clis : CLI_FALLBACK;
6575
6616
  const has = preferred && list.includes(preferred);
6576
6617
  return (
6577
6618
  `<option value=""${has ? "" : " selected"} disabled>choose a CLI…</option>` +
6578
6619
  list
6579
- .map((c) => `<option value="${esc(c)}"${c === preferred && has ? " selected" : ""}>${esc(c)}</option>`)
6620
+ .map(
6621
+ (c) =>
6622
+ `<option value="${esc(c)}"${c === preferred && has ? " selected" : ""}>${esc(c)}</option>`,
6623
+ )
6580
6624
  .join("")
6581
6625
  );
6582
6626
  }