agent-yes 1.302.1 → 1.302.2

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 (103) hide show
  1. package/README.md +24 -0
  2. package/dist/{JsonlStore-BqF7AQ6E.js → JsonlStore-BpYZZTap.js} +1 -1
  3. package/dist/SUPPORTED_CLIS-C5Uhdl61.js +12 -0
  4. package/dist/{SUPPORTED_CLIS-CNBBncE3.js → SUPPORTED_CLIS-FBshN0v2.js} +2 -2
  5. package/dist/{agent-yes.config-C77SodMP.js → agent-yes.config-CRfpdp3A.js} +2 -2
  6. package/dist/{agentShare-Cl810NKM.js → agentShare-CNgCQMY9.js} +12 -12
  7. package/dist/agentYesHome-CYNNNP71.js +3 -0
  8. package/dist/{agentYesHome-BNtn19J4.js → agentYesHome-JmJC28YX.js} +1 -1
  9. package/dist/{askCli-DFsWcgpF.js → askCli-J9hHcgJz.js} +6 -6
  10. package/dist/{browser-XQnbPssj.js → browser-BW90gl2w.js} +5 -5
  11. package/dist/{browser-wkzxw6lx.js → browser-BmxN1Ur9.js} +1 -1
  12. package/dist/callback-CbZ-H_Pn.js +15 -0
  13. package/dist/{callback-zMFnYwsJ.js → callback-ayc9yXqJ.js} +6 -6
  14. package/dist/{callbackCore-LDxJc8LY.js → callbackCore-BVEHd6Yt.js} +1 -1
  15. package/dist/{callbackCore-Bl2gGcxg.js → callbackCore-DXVwvq0X.js} +1 -1
  16. package/dist/{channels-rhxQArqN.js → channels-BLdkzCbv.js} +6 -6
  17. package/dist/{channels-C3w3eAES.js → channels-jIa5fNjY.js} +2 -2
  18. package/dist/channels.js +5 -5
  19. package/dist/cli.js +12 -12
  20. package/dist/{cmdDsh-BySPA9hP.js → cmdDsh-CymghOa0.js} +1 -1
  21. package/dist/{cmdPs-D2EqOHbX.js → cmdPs-CDj-l5Pk.js} +12 -12
  22. package/dist/{configShared-DKTgiz7K.js → configShared-De4bR5hH.js} +1 -1
  23. package/dist/{cwdConflictWarn-sQUONAye.js → cwdConflictWarn-DXh7qJz6.js} +2 -2
  24. package/dist/{cwdPassthroughHint-CDEGVteh.js → cwdPassthroughHint-DADidTOP.js} +1 -1
  25. package/dist/{e2e-z1xpwSAg.js → e2e-BdLf8DvY.js} +1 -1
  26. package/dist/{expose-BlddYYx9.js → expose-ZFn10b_l.js} +1 -1
  27. package/dist/{forkNested-xtEeYpBQ.js → forkNested-DD_4xEL8.js} +3 -3
  28. package/dist/{globalPidIndex-DC93JhHQ.js → globalPidIndex-BftWlg2V.js} +1 -1
  29. package/dist/{globalPidIndex-CRH9L9tn.js → globalPidIndex-CRB5KtyL.js} +1 -1
  30. package/dist/{hist-DZxq7NMA.js → hist-Dy-JVuUY.js} +1 -1
  31. package/dist/{html2canvas-pro.esm-DbGFekkq.js → html2canvas-pro.esm-Dp-JZojz.js} +1 -1
  32. package/dist/{identity-CKRuYUFi.js → identity-Bk-aG_xl.js} +1 -1
  33. package/dist/{identity-DFr3dfTO.js → identity-DA7YI9km.js} +1 -1
  34. package/dist/index.js +8 -8
  35. package/dist/{initMsg-axyQAPLK.js → initMsg-BGBIVi_Q.js} +1 -1
  36. package/dist/{initMsg-DoltWTZj.js → initMsg-NleE4YLm.js} +1 -1
  37. package/dist/{messageLog-Brx3w6zT.js → messageLog-Dq_ka-Bt.js} +1 -1
  38. package/dist/{needsInput-BHopZGM8.js → needsInput-D__56HYf.js} +1 -1
  39. package/dist/{nodeRuntime-CipjIwfO.js → nodeRuntime-oANVaOqi.js} +2 -2
  40. package/dist/{notifyDaemon-Cb_fbw4f.js → notifyDaemon-DZbd5fTj.js} +11 -11
  41. package/dist/{notifyStore-CdsB3crt.js → notifyStore-D9cNjXFG.js} +1 -1
  42. package/dist/{notifyStore-2SWKGwZI.js → notifyStore-DI4iKFut.js} +2 -2
  43. package/dist/{openBrowser-THOzOGNm.js → openBrowser-B6ZyKxfP.js} +1 -1
  44. package/dist/{parentLink-CfbxykCv.js → parentLink-CB8Nc-dr.js} +2 -2
  45. package/dist/{parentLink-BILJ32nA.js → parentLink-qUr7dRdh.js} +2 -2
  46. package/dist/{parentPingLoop-CxGlfXtx.js → parentPingLoop-Bim6u0OH.js} +7 -7
  47. package/dist/peer-3F7owPWt.js +4 -0
  48. package/dist/{peer-BZyUyCt3.js → peer-L-prov9t.js} +3 -3
  49. package/dist/{pidStore-DXWqzTSz.js → pidStore-433kvh9D.js} +4 -4
  50. package/dist/pidStore-BRlKRHXY.js +6 -0
  51. package/dist/{procStats-CyD8h5nx.js → procStats-xvUthnOx.js} +1 -1
  52. package/dist/{reaper-UimuuTfO.js → reaper-C2cuougX.js} +2 -2
  53. package/dist/{reaper-BDMiMfwK.js → reaper-DsZhX5FH.js} +1 -1
  54. package/dist/{remotes-CQTEY8Gt.js → remotes-ByjpYjQ9.js} +3 -3
  55. package/dist/{remotes-B4CNXwDS.js → remotes-D10E_xUn.js} +3 -3
  56. package/dist/{runningLock-BOIPD_Vs.js → runningLock-DMznYh45.js} +1 -1
  57. package/dist/{rustBinary-TAG9KjfA.js → rustBinary-Btf18sk5.js} +2 -2
  58. package/dist/{rustBinary-CdKZfsFO.js → rustBinary-DklBSefL.js} +2 -2
  59. package/dist/{schedule-CXv0m_lY.js → schedule-DzqTosvJ.js} +12 -12
  60. package/dist/{serve-D1mS0HGo.js → serve-DdHbUWtG.js} +48 -48
  61. package/dist/{serveRust-BAawe83i.js → serveRust-BEzTqFRy.js} +1 -1
  62. package/dist/{setup-BjCpfCKB.js → setup-CzKkVYp8.js} +4 -4
  63. package/dist/{share-nmgSIjYP.js → share-530eCWft.js} +2 -2
  64. package/dist/{share-CLataFnI.js → share-Jl8Eia9b.js} +2 -2
  65. package/dist/{shareCmd-DgpP8FKm.js → shareCmd-DinezAHY.js} +26 -8
  66. package/dist/spawnGate-CsQ4_N5h.js +5 -0
  67. package/dist/{spawnGate-YpHopveO.js → spawnGate-SX13EqI3.js} +3 -3
  68. package/dist/{store-CnxYGoia.js → store-xmBpqPUq.js} +1 -1
  69. package/dist/{subcommands-Dk6tKM6B.js → subcommands-fX4Ygx3a.js} +37 -37
  70. package/dist/{subcommands-9u1ssw3u.js → subcommands-oIARj_mJ.js} +11 -11
  71. package/dist/{systemPathLink-DoyBuRQq.js → systemPathLink-eWUYHNXm.js} +1 -1
  72. package/dist/{terminal-D9TFbA7o.js → terminal-DlW0KNym.js} +2 -2
  73. package/dist/terminal.js +1 -1
  74. package/dist/{todoAutomation-CbVVS4re.js → todoAutomation-TTp_Qz9G.js} +2 -2
  75. package/dist/{todoCli-DwYlxIAY.js → todoCli-B62mo9af.js} +6 -6
  76. package/dist/{todoIdentity-CAmnkzzP.js → todoIdentity-CY1UkEs7.js} +2 -2
  77. package/dist/{todoStore-DF6vxHgV.js → todoStore-C9RTz0Vs.js} +2 -2
  78. package/dist/{tray-BcpHVeMk.js → tray-DJtC0yib.js} +2 -2
  79. package/dist/{trayApp-C3W5js5E.js → trayApp-DWVdr0Pr.js} +3 -3
  80. package/dist/trayApp-F_Xs3C2N.js +5 -0
  81. package/dist/{ts-hQmDVOPh.js → ts-D29CMeWZ.js} +15 -15
  82. package/dist/{versionChecker-5Ku8-XVc.js → versionChecker-DrjMn-XI.js} +2 -2
  83. package/dist/webrtcLink-CAdvnRM0.js +4 -0
  84. package/dist/{webrtcLink-DFRyWNMs.js → webrtcLink-CKnjNGaV.js} +3 -3
  85. package/dist/{webrtcRemote-Cy5kB8aR.js → webrtcRemote-BYy2lTTl.js} +15 -8
  86. package/dist/{widget-WjEcwJva.js → widget-CvcvPWF9.js} +3 -3
  87. package/dist/widget.js +1 -1
  88. package/dist/widgets.js +5 -5
  89. package/dist/{workspaceConfig-DTvPtr5j.js → workspaceConfig-CWGh8o36.js} +2 -2
  90. package/dist/{ws-MMgJ4-yD.js → ws-Cbx5sfsd.js} +3 -3
  91. package/dist/ws-DDB8jh0f.js +14 -0
  92. package/package.json +1 -1
  93. package/ts/serve.ts +3 -2
  94. package/ts/share.spec.ts +13 -0
  95. package/ts/shareCmd.ts +25 -0
  96. package/ts/webrtcRemote.ts +13 -4
  97. package/dist/SUPPORTED_CLIS-CmzXJEui.js +0 -12
  98. package/dist/callback-FGoFC8om.js +0 -15
  99. package/dist/peer-CGSJluSw.js +0 -4
  100. package/dist/pidStore-Bpe8i_oU.js +0 -6
  101. package/dist/spawnGate-BUEswFgo.js +0 -5
  102. package/dist/trayApp-CL67LMa0.js +0 -5
  103. package/dist/ws-tVhgSZfa.js +0 -14
package/dist/widgets.js CHANGED
@@ -1,8 +1,8 @@
1
- import "./e2e-z1xpwSAg.js";
2
- import "./channels-C3w3eAES.js";
3
- import "./peer-BZyUyCt3.js";
4
- import { t as AyChannel } from "./browser-XQnbPssj.js";
5
- import { t as AyTerminal } from "./browser-wkzxw6lx.js";
1
+ import "./e2e-BdLf8DvY.js";
2
+ import "./channels-jIa5fNjY.js";
3
+ import "./peer-L-prov9t.js";
4
+ import { t as AyChannel } from "./browser-BW90gl2w.js";
5
+ import { t as AyTerminal } from "./browser-BmxN1Ur9.js";
6
6
  import { AyWidget } from "./widget.js";
7
7
 
8
8
  export { AyChannel, AyTerminal, AyWidget };
@@ -1,4 +1,4 @@
1
- import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
1
+ import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
2
2
  import { lstatSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -215,4 +215,4 @@ function allowsSkipPermissions() {
215
215
 
216
216
  //#endregion
217
217
  export { getProvisionRoot as a, getWorkspaceRoot as c, isProvisionAllowed as d, resolveSpawnCwd as f, getProvisionHook as i, hasProvisionHook as l, getMaxAgents as n, getSpawnHook as o, setWorkspaceRoot as p, getMinFreeMb as r, getSpawnWaitMs as s, allowsSkipPermissions as t, hasSpawnHook as u };
218
- //# sourceMappingURL=workspaceConfig-DTvPtr5j.js.map
218
+ //# sourceMappingURL=workspaceConfig-CWGh8o36.js.map
@@ -1,5 +1,5 @@
1
- import { V as listRecords } from "./subcommands-Dk6tKM6B.js";
2
- import { a as getProvisionRoot } from "./workspaceConfig-DTvPtr5j.js";
1
+ import { V as listRecords } from "./subcommands-fX4Ygx3a.js";
2
+ import { a as getProvisionRoot } from "./workspaceConfig-CWGh8o36.js";
3
3
  import { existsSync } from "fs";
4
4
  import { lstat, opendir } from "fs/promises";
5
5
  import path from "path";
@@ -424,4 +424,4 @@ async function cmdWs(args) {
424
424
 
425
425
  //#endregion
426
426
  export { isPathInside as a, walkWorkspaces as c, importProvisionModule as i, workspaceStatus as l, cmdWs as n, loadProvision as o, collectWorkspaces as r, resolveOperand as s, WS_JSON_SCHEMA as t };
427
- //# sourceMappingURL=ws-MMgJ4-yD.js.map
427
+ //# sourceMappingURL=ws-Cbx5sfsd.js.map
@@ -0,0 +1,14 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./JsonlStore-BpYZZTap.js";
3
+ import "./globalPidIndex-CRB5KtyL.js";
4
+ import "./pidStore-433kvh9D.js";
5
+ import "./messageLog-Dq_ka-Bt.js";
6
+ import "./e2e-BdLf8DvY.js";
7
+ import "./configShared-De4bR5hH.js";
8
+ import "./subcommands-fX4Ygx3a.js";
9
+ import "./notifyStore-DI4iKFut.js";
10
+ import "./webrtcLink-CKnjNGaV.js";
11
+ import "./remotes-D10E_xUn.js";
12
+ import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-Cbx5sfsd.js";
13
+
14
+ export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.302.1",
3
+ "version": "1.302.2",
4
4
  "description": "A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses.",
5
5
  "keywords": [
6
6
  "ai",
package/ts/serve.ts CHANGED
@@ -1719,9 +1719,10 @@ async function cmdServeStatus(args: string[]): Promise<number> {
1719
1719
  // TS host's). `.share-link` is only ever written by the TS host, so for a
1720
1720
  // Rust daemon it is stale or absent; keep it as the fallback for TS daemons
1721
1721
  // and for the uninstalled-but-left-over case shareLinkStatus flags.
1722
- const { daemonShareLink } = await import("./shareCmd.ts");
1722
+ const { daemonShareLink, foregroundAyrsShareLink } = await import("./shareCmd.ts");
1723
1723
  const shareLink =
1724
- (installed ? await daemonShareLink(daemonArgs) : null) ?? (await readShareLink());
1724
+ (installed ? await daemonShareLink(daemonArgs) : await foregroundAyrsShareLink()) ??
1725
+ (await readShareLink());
1725
1726
  // Manager-reported process state — the only up/down signal for webrtc daemons.
1726
1727
  const running = installed ? await readDaemonRunning(mgr!) : false;
1727
1728
  const a = daemonArgs ?? [];
package/ts/share.spec.ts CHANGED
@@ -99,6 +99,19 @@ describe("share room files per runtime", () => {
99
99
  expect(await loadOrCreateShareRoom("s.example", "rust")).toBe(url);
100
100
  });
101
101
 
102
+ it("reports the ayrs room only while a live pid holds it", async () => {
103
+ const { foregroundAyrsShareLink } = await import("./shareCmd.ts");
104
+ expect(await foregroundAyrsShareLink()).toBeNull();
105
+ const url = await loadOrCreateShareRoom("s.example", "rust");
106
+ const room = url.slice("webrtc://".length).split(":")[0];
107
+ const lock = path.join(home, `.share-host-${room}.pid`);
108
+ expect(await foregroundAyrsShareLink()).toBeNull(); // nobody hosts it
109
+ await writeFile(lock, String(process.pid));
110
+ expect(await foregroundAyrsShareLink()).toBe(shareLinkFromRoomUrl(url));
111
+ await writeFile(lock, "2147483646"); // a pid that is not running
112
+ expect(await foregroundAyrsShareLink()).toBeNull();
113
+ });
114
+
102
115
  it("reads without minting, and ignores a legacy unencrypted room", async () => {
103
116
  expect(await readShareRoom("rust")).toBeNull();
104
117
  await expect(readFile(path.join(home, ".share-room-ayrs"))).rejects.toThrow();
package/ts/shareCmd.ts CHANGED
@@ -153,6 +153,31 @@ export async function daemonShareLink(args: string[] | null): Promise<string | n
153
153
  }
154
154
  }
155
155
 
156
+ // The console link of the room a FOREGROUND `ayrs serve --webrtc` is hosting
157
+ // right now (no daemon manager: a container's CMD, a terminal), or null. ayrs
158
+ // records its pid in ~/.agent-yes/.share-host-<room>.pid while it holds the
159
+ // room (rs/src/serve/share.rs room_lock_path); a dead pid means nobody does.
160
+ // Without this, status fell back to .share-link, which only the TypeScript
161
+ // host writes, and printed an old room the running host had never served.
162
+ export async function foregroundAyrsShareLink(): Promise<string | null> {
163
+ const { readShareRoom, shareLinkFromRoomUrl } = await import("./share.ts");
164
+ const { parseWebrtcLink } = await import("./webrtcLink.ts");
165
+ const { isPidAlive } = await import("./subcommands.ts");
166
+ const { agentYesHome } = await import("./agentYesHome.ts");
167
+ const { readFile } = await import("fs/promises");
168
+ const path = await import("path");
169
+ const url = await readShareRoom("rust");
170
+ const room = url && parseWebrtcLink(url)?.room;
171
+ if (!room) return null;
172
+ try {
173
+ const lock = path.join(agentYesHome(), `.share-host-${room}.pid`);
174
+ const pid = parseInt(await readFile(lock, "utf-8"), 10);
175
+ return pid > 0 && isPidAlive(pid) ? shareLinkFromRoomUrl(url) : null;
176
+ } catch {
177
+ return null; // no lock file, or a legacy unencrypted room
178
+ }
179
+ }
180
+
156
181
  // ay share status — end-to-end health of each way this machine is shared.
157
182
  async function cmdShareStatus(mount: string): Promise<number> {
158
183
  const { inspectServeDaemon } = await import("./serve.ts");
@@ -135,11 +135,17 @@ class WebRtcConn {
135
135
  this.hostPeer = action.from ?? null;
136
136
  const pc = new RTCPeerConnection({ iceServers: action.iceServers || [] });
137
137
  this.pc = pc;
138
+ // Our candidates go out only after the answer: setLocalDescription below
139
+ // fires onicecandidate before the answer is sent, and a host that gets a
140
+ // candidate before the answer cannot add it (ayrs up to 1.302.x dropped
141
+ // the whole peer over it).
142
+ let held: any[] | null = [];
143
+ const sendCandidate = (candidate: any) =>
144
+ this.ws.send(JSON.stringify({ type: "candidate", to: this.hostPeer, candidate }));
138
145
  pc.onicecandidate = (e: any) => {
139
- if (e.candidate)
140
- this.ws.send(
141
- JSON.stringify({ type: "candidate", to: this.hostPeer, candidate: e.candidate }),
142
- );
146
+ if (!e.candidate) return;
147
+ if (held) held.push(e.candidate);
148
+ else sendCandidate(e.candidate);
143
149
  };
144
150
  pc.ondatachannel = (e: any) => {
145
151
  const dc = e.channel;
@@ -166,6 +172,9 @@ class WebRtcConn {
166
172
  this.ws.send(
167
173
  JSON.stringify({ type: "answer", to: this.hostPeer, sdp: pc.localDescription.sdp }),
168
174
  );
175
+ const queued = held;
176
+ held = null;
177
+ for (const c of queued) sendCandidate(c);
169
178
  }
170
179
  }
171
180
 
@@ -1,12 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-5Ku8-XVc.js";
3
- import "./ts-hQmDVOPh.js";
4
- import "./todoAutomation-CbVVS4re.js";
5
- import "./JsonlStore-BqF7AQ6E.js";
6
- import "./globalPidIndex-CRH9L9tn.js";
7
- import "./pidStore-DXWqzTSz.js";
8
- import "./messageLog-Brx3w6zT.js";
9
- import "./todoStore-DF6vxHgV.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CNBBncE3.js";
11
-
12
- export { SUPPORTED_CLIS };
@@ -1,15 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./JsonlStore-BqF7AQ6E.js";
3
- import "./globalPidIndex-CRH9L9tn.js";
4
- import "./pidStore-DXWqzTSz.js";
5
- import "./messageLog-Brx3w6zT.js";
6
- import "./e2e-z1xpwSAg.js";
7
- import "./configShared-DKTgiz7K.js";
8
- import "./subcommands-Dk6tKM6B.js";
9
- import "./notifyStore-2SWKGwZI.js";
10
- import "./webrtcLink-DFRyWNMs.js";
11
- import "./remotes-B4CNXwDS.js";
12
- import "./callbackCore-Bl2gGcxg.js";
13
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-zMFnYwsJ.js";
14
-
15
- export { cmdCallback };
@@ -1,4 +0,0 @@
1
- import "./e2e-z1xpwSAg.js";
2
- import { t as ChannelPeer } from "./peer-BZyUyCt3.js";
3
-
4
- export { ChannelPeer };
@@ -1,6 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./JsonlStore-BqF7AQ6E.js";
3
- import "./globalPidIndex-CRH9L9tn.js";
4
- import { t as PidStore } from "./pidStore-DXWqzTSz.js";
5
-
6
- export { PidStore };
@@ -1,5 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./globalPidIndex-CRH9L9tn.js";
3
- import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-YpHopveO.js";
4
-
5
- export { waitForSpawnCapacity };
@@ -1,5 +0,0 @@
1
- import "./versionChecker-5Ku8-XVc.js";
2
- import "./rustBinary-TAG9KjfA.js";
3
- import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-C3W5js5E.js";
4
-
5
- export { cmdTray };
@@ -1,14 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./JsonlStore-BqF7AQ6E.js";
3
- import "./globalPidIndex-CRH9L9tn.js";
4
- import "./pidStore-DXWqzTSz.js";
5
- import "./messageLog-Brx3w6zT.js";
6
- import "./e2e-z1xpwSAg.js";
7
- import "./configShared-DKTgiz7K.js";
8
- import "./subcommands-Dk6tKM6B.js";
9
- import "./notifyStore-2SWKGwZI.js";
10
- import "./webrtcLink-DFRyWNMs.js";
11
- import "./remotes-B4CNXwDS.js";
12
- import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-MMgJ4-yD.js";
13
-
14
- export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };