agent-yes 1.223.1 → 1.224.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 (66) hide show
  1. package/dist/JsonlStore-Bm5Nj6v_.js +187 -0
  2. package/dist/{SUPPORTED_CLIS-CY6Qo_bF.js → SUPPORTED_CLIS-5asavJDC.js} +2 -2
  3. package/dist/SUPPORTED_CLIS-DtlIWGP2.js +11 -0
  4. package/dist/{agent-yes.config-whqkqq9P.js → agent-yes.config-DmW_TVFI.js} +2 -2
  5. package/dist/{agentShare-CRJb4GhE.js → agentShare-CE3boH9f.js} +8 -8
  6. package/dist/{callback-DZhSN9-O.js → callback-BtoB1O6q.js} +5 -5
  7. package/dist/callback-C77nNtIx.js +12 -0
  8. package/dist/{callbackCore-Cm_yYhep.js → callbackCore-CgnOT1Cp.js} +1 -1
  9. package/dist/{callbackCore-BbAMbeUp.js → callbackCore-DSxbO_6a.js} +1 -1
  10. package/dist/cli.js +9 -9
  11. package/dist/{configShared-aKTg-sa5.js → configShared-nnIwDYY-.js} +1 -1
  12. package/dist/{e2e-jb0Hp43q.js → e2e-D5jaSHyY.js} +1 -1
  13. package/dist/{expose-BiFqNtOa.js → expose-CGpMiQxp.js} +1 -1
  14. package/dist/{forkNested-BCxO485A.js → forkNested-BLa3Mz_t.js} +1 -1
  15. package/dist/index.js +8 -5
  16. package/dist/{messageLog-CxrKJj77.js → messageLog-Bb_Ie3Ck.js} +1 -1
  17. package/dist/{nodeRuntime-DttG711L.js → nodeRuntime-DoBOoeUW.js} +1 -1
  18. package/dist/{notifyDaemon-CjszDILI.js → notifyDaemon-BGN6c7NX.js} +7 -7
  19. package/dist/{openBrowser-C2xmaYpe.js → openBrowser-D_qKXZNj.js} +1 -1
  20. package/dist/pidStore-CatWvn5W.js +6 -0
  21. package/dist/{pidStore-BIvsBQ8X.js → pidStore-DCqpU_bI.js} +3 -183
  22. package/dist/{reaper-CJSu8UVZ.js → reaper-BBc2AIKA.js} +1 -1
  23. package/dist/{reaper-BUHCyxdF.js → reaper-BNKvujYy.js} +1 -1
  24. package/dist/{remotes-B4R8KvWI.js → remotes-C_YlVvr9.js} +3 -3
  25. package/dist/{remotes-CZGDxzIP.js → remotes-D-jPl9Fj.js} +3 -3
  26. package/dist/{rustBinary-CUJuJD2N.js → rustBinary-Dy4Ihc_-.js} +2 -2
  27. package/dist/{schedule-CKF_arnv.js → schedule-1h-bLkTA.js} +10 -8
  28. package/dist/{serve-v5fUhHiR.js → serve-Ds16KtBb.js} +33 -31
  29. package/dist/{setup-DojqtiR5.js → setup-DexcDADP.js} +3 -3
  30. package/dist/{share-_QYjPN7q.js → share-B7VP4_UF.js} +2 -2
  31. package/dist/{share-vchIyVd8.js → share-BwEUEHfy.js} +2 -2
  32. package/dist/{spawnGate-SmqvtNIZ.js → spawnGate-Vmd1d9OQ.js} +2 -2
  33. package/dist/{spawnGate-vT9DJbq0.js → spawnGate-nUBaOXoG.js} +1 -1
  34. package/dist/{subcommands-Dl2Kx1FC.js → subcommands-DNEyI_ft.js} +21 -16
  35. package/dist/{subcommands-ZqHQMFDJ.js → subcommands-DTfe_MGc.js} +6 -6
  36. package/dist/todoBlock-N6Kr9HnP.js +409 -0
  37. package/dist/todoCli-DXY3TEnZ.js +300 -0
  38. package/dist/todoDigest-BDVvC8wJ.js +3 -0
  39. package/dist/todoDigest-DvG0AVQ7.js +260 -0
  40. package/dist/{tray-xmaEYe1N.js → tray-CIm-5aWB.js} +1 -1
  41. package/dist/{ts-bE-SKMWi.js → ts-xL_389P-.js} +6 -6
  42. package/dist/{versionChecker-EEzUODBd.js → versionChecker-B3YbJSF2.js} +2 -2
  43. package/dist/{webrtcLink-B7REGtK2.js → webrtcLink-DknpJQ0y.js} +2 -2
  44. package/dist/{webrtcRemote-CMWelyTZ.js → webrtcRemote-CWogO7Qa.js} +3 -3
  45. package/dist/{workspaceConfig-Dcbe4y77.js → workspaceConfig-dHHBQh0F.js} +1 -1
  46. package/dist/{ws-qE_t5H8x.js → ws-VOsw_etQ.js} +8 -8
  47. package/lab/ui/blog/ay-callback/index.html +27 -22
  48. package/lab/ui/blog/index.html +3 -3
  49. package/lab/ui/index.html +9 -8
  50. package/package.json +1 -1
  51. package/ts/index.ts +26 -0
  52. package/ts/serve.ts +8 -2
  53. package/ts/subcommands.ts +5 -0
  54. package/ts/todoBlock.spec.ts +33 -0
  55. package/ts/todoBlock.ts +61 -0
  56. package/ts/todoCli.spec.ts +303 -0
  57. package/ts/todoCli.ts +356 -0
  58. package/ts/todoDigest.spec.ts +150 -0
  59. package/ts/todoDigest.ts +175 -0
  60. package/ts/todoLifecycle.spec.ts +67 -0
  61. package/ts/todoLifecycle.ts +121 -0
  62. package/ts/todoStore.spec.ts +410 -0
  63. package/ts/todoStore.ts +614 -0
  64. package/dist/SUPPORTED_CLIS-CE3JLqnP.js +0 -9
  65. package/dist/callback-CzFcLTZn.js +0 -12
  66. package/dist/pidStore-CLxwp0qI.js +0 -5
@@ -1,191 +1,11 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
3
+ import { t as JsonlStore } from "./JsonlStore-Bm5Nj6v_.js";
3
4
  import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-CoNr7tS8.js";
4
- import { closeSync, existsSync, fsyncSync, openSync } from "fs";
5
- import { appendFile, mkdir, readFile, rename, writeFile } from "fs/promises";
5
+ import { mkdir, writeFile } from "fs/promises";
6
6
  import path from "path";
7
7
  import { randomBytes } from "node:crypto";
8
- import { lock } from "proper-lockfile";
9
8
 
10
- //#region ts/JsonlStore.ts
11
- /**
12
- * A lightweight NeDB-style JSONL persistence layer.
13
- *
14
- * - Append-only writes (one JSON object per line)
15
- * - Same `_id` → last line wins (fields merged)
16
- * - `$$deleted` lines act as tombstones
17
- * - Crash recovery: skip partial last line, recover from temp file
18
- * - Multi-process safe via proper-lockfile (reads don't need lock)
19
- * - Compact on close: deduplicates into clean file via atomic rename
20
- */
21
- var JsonlStore = class {
22
- filePath;
23
- tempPath;
24
- docs = /* @__PURE__ */ new Map();
25
- constructor(filePath) {
26
- this.filePath = filePath;
27
- this.tempPath = filePath + "~";
28
- }
29
- /**
30
- * Load all records from the JSONL file. No lock needed.
31
- * Handles crash recovery: partial last line skipped, temp file recovery.
32
- */
33
- async load() {
34
- await mkdir(path.dirname(this.filePath), { recursive: true });
35
- if (!existsSync(this.filePath) && existsSync(this.tempPath)) {
36
- logger.debug("[JsonlStore] Recovering from temp file");
37
- await rename(this.tempPath, this.filePath);
38
- }
39
- this.docs = /* @__PURE__ */ new Map();
40
- let raw = "";
41
- try {
42
- raw = await readFile(this.filePath, "utf-8");
43
- } catch (err) {
44
- if (err.code === "ENOENT") return this.docs;
45
- throw err;
46
- }
47
- const lines = raw.split("\n");
48
- let corruptCount = 0;
49
- for (const line of lines) {
50
- const trimmed = line.trim();
51
- if (!trimmed) continue;
52
- try {
53
- const doc = JSON.parse(trimmed);
54
- if (!doc._id) continue;
55
- if (doc.$$deleted) this.docs.delete(doc._id);
56
- else {
57
- const existing = this.docs.get(doc._id);
58
- if (existing) this.docs.set(doc._id, {
59
- ...existing,
60
- ...doc
61
- });
62
- else this.docs.set(doc._id, doc);
63
- }
64
- } catch {
65
- corruptCount++;
66
- }
67
- }
68
- if (corruptCount > 0) logger.debug(`[JsonlStore] Skipped ${corruptCount} corrupt line(s) in ${this.filePath}`);
69
- return this.docs;
70
- }
71
- /** Get all live documents. */
72
- getAll() {
73
- return Array.from(this.docs.values());
74
- }
75
- /** Find a document by _id. */
76
- getById(id) {
77
- return this.docs.get(id);
78
- }
79
- /** Find documents matching a predicate. */
80
- find(predicate) {
81
- return this.getAll().filter(predicate);
82
- }
83
- /** Find first document matching a predicate. */
84
- findOne(predicate) {
85
- for (const doc of this.docs.values()) if (predicate(doc)) return doc;
86
- }
87
- /**
88
- * Append a new document. Acquires lock.
89
- * If no _id is provided, one is generated.
90
- */
91
- async append(doc) {
92
- const id = doc._id || generateId();
93
- const { _id: _, ...rest } = doc;
94
- const fullDoc = {
95
- _id: id,
96
- ...rest
97
- };
98
- return await this.withLock(async () => {
99
- await appendFile(this.filePath, JSON.stringify(fullDoc) + "\n");
100
- const existing = this.docs.get(fullDoc._id);
101
- if (existing) this.docs.set(fullDoc._id, {
102
- ...existing,
103
- ...fullDoc
104
- });
105
- else this.docs.set(fullDoc._id, fullDoc);
106
- return fullDoc;
107
- });
108
- }
109
- /**
110
- * Update a document by _id. Appends a merge line. Acquires lock.
111
- */
112
- async updateById(id, patch) {
113
- await this.withLock(async () => {
114
- const line = {
115
- _id: id,
116
- ...patch
117
- };
118
- await appendFile(this.filePath, JSON.stringify(line) + "\n");
119
- const existing = this.docs.get(id);
120
- if (existing) this.docs.set(id, {
121
- ...existing,
122
- ...patch
123
- });
124
- });
125
- }
126
- /**
127
- * Delete a document by _id. Appends a tombstone. Acquires lock.
128
- */
129
- async deleteById(id) {
130
- await this.withLock(async () => {
131
- const tombstone = {
132
- _id: id,
133
- $$deleted: true
134
- };
135
- await appendFile(this.filePath, JSON.stringify(tombstone) + "\n");
136
- this.docs.delete(id);
137
- });
138
- }
139
- /**
140
- * Compact the file: deduplicate entries, remove tombstones.
141
- * Writes to temp file, fsyncs, then atomic renames.
142
- * Acquires lock.
143
- */
144
- async compact() {
145
- const lines = Array.from(this.docs.values()).map((doc) => {
146
- const { _id, $$deleted: _$$deleted, ...rest } = doc;
147
- return JSON.stringify({
148
- _id,
149
- ...rest
150
- });
151
- }).join("\n");
152
- const content = lines ? lines + "\n" : "";
153
- try {
154
- await this.withLock(async () => {
155
- await writeFile(this.tempPath, content);
156
- const fd = openSync(this.tempPath, "r");
157
- fsyncSync(fd);
158
- closeSync(fd);
159
- await rename(this.tempPath, this.filePath);
160
- });
161
- } catch {
162
- await writeFile(this.filePath, content);
163
- }
164
- }
165
- async withLock(fn) {
166
- const dir = path.dirname(this.filePath);
167
- let release;
168
- try {
169
- release = await lock(dir, {
170
- lockfilePath: this.filePath + ".lock",
171
- retries: {
172
- retries: 5,
173
- minTimeout: 50,
174
- maxTimeout: 500
175
- }
176
- });
177
- return await fn();
178
- } finally {
179
- if (release) await release();
180
- }
181
- }
182
- };
183
- let idCounter = 0;
184
- function generateId() {
185
- return Date.now().toString(36) + (idCounter++).toString(36) + Math.random().toString(36).slice(2, 6);
186
- }
187
-
188
- //#endregion
189
9
  //#region ts/pidStore.ts
190
10
  var PidStore = class PidStore {
191
11
  storeDir;
@@ -368,4 +188,4 @@ pid-db/
368
188
 
369
189
  //#endregion
370
190
  export { PidStore as t };
371
- //# sourceMappingURL=pidStore-BIvsBQ8X.js.map
191
+ //# sourceMappingURL=pidStore-DCqpU_bI.js.map
@@ -1,3 +1,3 @@
1
- import { n as register, r as sweep, t as pgidForWrapper } from "./reaper-BUHCyxdF.js";
1
+ import { n as register, r as sweep, t as pgidForWrapper } from "./reaper-BNKvujYy.js";
2
2
 
3
3
  export { sweep };
@@ -107,4 +107,4 @@ async function pruneStaleActivityMarkers() {
107
107
 
108
108
  //#endregion
109
109
  export { register as n, sweep as r, pgidForWrapper as t };
110
- //# sourceMappingURL=reaper-BUHCyxdF.js.map
110
+ //# sourceMappingURL=reaper-BNKvujYy.js.map
@@ -1,5 +1,5 @@
1
- import "./e2e-jb0Hp43q.js";
2
- import "./webrtcLink-B7REGtK2.js";
3
- import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-CZGDxzIP.js";
1
+ import "./e2e-D5jaSHyY.js";
2
+ import "./webrtcLink-DknpJQ0y.js";
3
+ import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-D-jPl9Fj.js";
4
4
 
5
5
  export { cmdRemote };
@@ -1,4 +1,4 @@
1
- import { n as isWebrtcSpec } from "./webrtcLink-B7REGtK2.js";
1
+ import { n as isWebrtcSpec } from "./webrtcLink-DknpJQ0y.js";
2
2
  import { mkdir, readFile, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -86,7 +86,7 @@ async function resolveRemoteSpec(spec) {
86
86
  * The bridge lives for the rest of the process (torn down on `process.exit`).
87
87
  */
88
88
  async function resolveWebrtc(link, keyword) {
89
- const { startWebrtcBridge } = await import("./webrtcRemote-CMWelyTZ.js");
89
+ const { startWebrtcBridge } = await import("./webrtcRemote-CWogO7Qa.js");
90
90
  const bridge = await startWebrtcBridge(link);
91
91
  return {
92
92
  url: bridge.baseUrl,
@@ -173,4 +173,4 @@ async function cmdRemote(rest) {
173
173
 
174
174
  //#endregion
175
175
  export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
176
- //# sourceMappingURL=remotes-CZGDxzIP.js.map
176
+ //# sourceMappingURL=remotes-D-jPl9Fj.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-EEzUODBd.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-B3YbJSF2.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -225,4 +225,4 @@ async function getRustBinary(options = {}) {
225
225
 
226
226
  //#endregion
227
227
  export { getRustBinary as n, findSpawnHiddenLauncher as t };
228
- //# sourceMappingURL=rustBinary-CUJuJD2N.js.map
228
+ //# sourceMappingURL=rustBinary-Dy4Ihc_-.js.map
@@ -1,12 +1,14 @@
1
- import "./ts-bE-SKMWi.js";
1
+ import "./ts-xL_389P-.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-EEzUODBd.js";
4
- import "./pidStore-BIvsBQ8X.js";
3
+ import "./versionChecker-B3YbJSF2.js";
4
+ import "./JsonlStore-Bm5Nj6v_.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
- import "./messageLog-CxrKJj77.js";
7
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CY6Qo_bF.js";
8
- import { d as resolveSpawnCwd } from "./workspaceConfig-Dcbe4y77.js";
9
- import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DttG711L.js";
6
+ import "./pidStore-DCqpU_bI.js";
7
+ import "./messageLog-Bb_Ie3Ck.js";
8
+ import "./todoBlock-N6Kr9HnP.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-5asavJDC.js";
10
+ import { d as resolveSpawnCwd } from "./workspaceConfig-dHHBQh0F.js";
11
+ import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DoBOoeUW.js";
10
12
  import { createHash } from "node:crypto";
11
13
 
12
14
  //#region ts/oxmgrService.ts
@@ -151,4 +153,4 @@ async function cmdSchedule(rest) {
151
153
 
152
154
  //#endregion
153
155
  export { cmdSchedule };
154
- //# sourceMappingURL=schedule-CKF_arnv.js.map
156
+ //# sourceMappingURL=schedule-1h-bLkTA.js.map
@@ -1,23 +1,25 @@
1
- import { a as CLAUDE_SESSION_PIN_ENV } from "./ts-bE-SKMWi.js";
1
+ import { a as CLAUDE_SESSION_PIN_ENV } from "./ts-xL_389P-.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-EEzUODBd.js";
4
- import { t as findSpawnHiddenLauncher } from "./rustBinary-CUJuJD2N.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-B3YbJSF2.js";
4
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-Dy4Ihc_-.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-CtHb5b71.js";
6
- import "./pidStore-BIvsBQ8X.js";
6
+ import "./JsonlStore-Bm5Nj6v_.js";
7
7
  import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
8
- import { r as recordInbox } from "./messageLog-CxrKJj77.js";
9
- import { t as pgidForWrapper } from "./reaper-BUHCyxdF.js";
10
- import "./configShared-aKTg-sa5.js";
11
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CY6Qo_bF.js";
12
- import { A as renderRawLog, D as recentMessageEdges, E as readPtysize, L as snapshotStatus, M as resolveOne, O as recentReadEdges, S as listRecords, T as readNotes, U as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-Dl2Kx1FC.js";
13
- import "./e2e-jb0Hp43q.js";
14
- import "./webrtcLink-B7REGtK2.js";
15
- import "./remotes-CZGDxzIP.js";
16
- import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Cm_yYhep.js";
17
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-DZhSN9-O.js";
18
- import { a as getSpawnHook, c as hasProvisionHook, d as resolveSpawnCwd, i as getProvisionRoot, l as hasSpawnHook, r as getProvisionHook, u as isProvisionAllowed } from "./workspaceConfig-Dcbe4y77.js";
19
- import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DttG711L.js";
20
- import { r as spawnRejectionReason } from "./spawnGate-SmqvtNIZ.js";
8
+ import "./pidStore-DCqpU_bI.js";
9
+ import { r as recordInbox } from "./messageLog-Bb_Ie3Ck.js";
10
+ import { t as pgidForWrapper } from "./reaper-BNKvujYy.js";
11
+ import "./todoBlock-N6Kr9HnP.js";
12
+ import "./configShared-nnIwDYY-.js";
13
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-5asavJDC.js";
14
+ import { A as renderRawLog, D as recentMessageEdges, E as readPtysize, L as snapshotStatus, M as resolveOne, O as recentReadEdges, S as listRecords, T as readNotes, U as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-DNEyI_ft.js";
15
+ import "./e2e-D5jaSHyY.js";
16
+ import "./webrtcLink-DknpJQ0y.js";
17
+ import "./remotes-D-jPl9Fj.js";
18
+ import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-CgnOT1Cp.js";
19
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BtoB1O6q.js";
20
+ import { a as getSpawnHook, c as hasProvisionHook, d as resolveSpawnCwd, i as getProvisionRoot, l as hasSpawnHook, r as getProvisionHook, u as isProvisionAllowed } from "./workspaceConfig-dHHBQh0F.js";
21
+ import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DoBOoeUW.js";
22
+ import { r as spawnRejectionReason } from "./spawnGate-Vmd1d9OQ.js";
21
23
  import yargs from "yargs";
22
24
  import { appendFile, mkdir, open, readFile, rename, rm, stat, unlink, writeFile } from "fs/promises";
23
25
  import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
@@ -941,7 +943,7 @@ async function cmdServeDaemon(sub, args) {
941
943
  let shareLink = null;
942
944
  let shareLinkMinted = false;
943
945
  if (webrtcDaemon) try {
944
- const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-_QYjPN7q.js");
946
+ const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-B7VP4_UF.js");
945
947
  const explicit = explicitWebrtcUrl(effArgs);
946
948
  shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom());
947
949
  shareLinkMinted = !explicit;
@@ -950,7 +952,7 @@ async function cmdServeDaemon(sub, args) {
950
952
  if (!webrtcDaemon) return;
951
953
  if (shareLink) {
952
954
  process.stdout.write(`\nshared over WebRTC — open this link (the token is eaten from the URL on open):\n ${shareLink}\n` + (shareLinkMinted ? ` (persistent room — same link across restarts; delete ~/.agent-yes/.share-room to rotate)\n` : ``));
953
- const { offerOpenInBrowser } = await import("./openBrowser-C2xmaYpe.js");
955
+ const { offerOpenInBrowser } = await import("./openBrowser-D_qKXZNj.js");
954
956
  await offerOpenInBrowser(shareLink);
955
957
  } else process.stdout.write("\nthe WebRTC share link carries a secret, so the daemon does NOT log it —\nread it from ~/.agent-yes/.share-link (mode 0600). The room persists in\n~/.agent-yes/.share-room, so the link survives restarts.\n");
956
958
  };
@@ -1990,7 +1992,7 @@ Options:
1990
1992
  }
1991
1993
  });
1992
1994
  if (req.method === "GET" && p === "/api/ws") {
1993
- const ws = await import("./ws-qE_t5H8x.js");
1995
+ const ws = await import("./ws-VOsw_etQ.js");
1994
1996
  try {
1995
1997
  await ws.loadProvision();
1996
1998
  } catch (e) {
@@ -2010,7 +2012,7 @@ Options:
2010
2012
  if (req.method === "GET" && p === "/api/ws/status") {
2011
2013
  const dirRaw = url.searchParams.get("path");
2012
2014
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2013
- const ws = await import("./ws-qE_t5H8x.js");
2015
+ const ws = await import("./ws-VOsw_etQ.js");
2014
2016
  let prov;
2015
2017
  try {
2016
2018
  prov = await ws.loadProvision();
@@ -2599,7 +2601,7 @@ Options:
2599
2601
  const perm = body.perm ?? "r";
2600
2602
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
2601
2603
  try {
2602
- const { createScopedShare } = await import("./agentShare-CRJb4GhE.js");
2604
+ const { createScopedShare } = await import("./agentShare-CE3boH9f.js");
2603
2605
  const share = await createScopedShare({
2604
2606
  agent: body.agent,
2605
2607
  perm,
@@ -2614,12 +2616,12 @@ Options:
2614
2616
  }
2615
2617
  }
2616
2618
  if (req.method === "GET" && p === "/api/shares") {
2617
- const { listShares } = await import("./agentShare-CRJb4GhE.js");
2619
+ const { listShares } = await import("./agentShare-CE3boH9f.js");
2618
2620
  return Response.json(listShares());
2619
2621
  }
2620
2622
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
2621
2623
  if (req.method === "DELETE" && revokeM) {
2622
- const { revokeShare } = await import("./agentShare-CRJb4GhE.js");
2624
+ const { revokeShare } = await import("./agentShare-CE3boH9f.js");
2623
2625
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
2624
2626
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
2625
2627
  }
@@ -2633,7 +2635,7 @@ Options:
2633
2635
  const port = Number(body.port);
2634
2636
  if (!Number.isInteger(port) || port < 1 || port > 65535) return new Response("valid port required", { status: 400 });
2635
2637
  try {
2636
- const { ensureExposure } = await import("./expose-BiFqNtOa.js");
2638
+ const { ensureExposure } = await import("./expose-CGpMiQxp.js");
2637
2639
  const h = await ensureExposure(port, body.relay);
2638
2640
  return Response.json({
2639
2641
  id: h.id,
@@ -2647,12 +2649,12 @@ Options:
2647
2649
  }
2648
2650
  }
2649
2651
  if (req.method === "GET" && p === "/api/exposes") {
2650
- const { listExposures } = await import("./expose-BiFqNtOa.js");
2652
+ const { listExposures } = await import("./expose-CGpMiQxp.js");
2651
2653
  return Response.json(listExposures());
2652
2654
  }
2653
2655
  const unexposeM = /^\/api\/expose\/(\d+)$/.exec(p);
2654
2656
  if (req.method === "DELETE" && unexposeM) {
2655
- const { stopExposure } = await import("./expose-BiFqNtOa.js");
2657
+ const { stopExposure } = await import("./expose-CGpMiQxp.js");
2656
2658
  const ok = stopExposure(Number(unexposeM[1]));
2657
2659
  return new Response(ok ? "revoked" : "no such exposure", { status: ok ? 200 : 404 });
2658
2660
  }
@@ -2871,7 +2873,7 @@ Options:
2871
2873
  const webrtcVal = argv.webrtc ?? argv.share;
2872
2874
  const explicitUrl = typeof webrtcVal === "string" && webrtcVal.startsWith("webrtc://") ? webrtcVal : void 0;
2873
2875
  try {
2874
- const { startShare, loadOrCreateShareRoom } = await import("./share-_QYjPN7q.js");
2876
+ const { startShare, loadOrCreateShareRoom } = await import("./share-B7VP4_UF.js");
2875
2877
  const linkFile = path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), ".share-link");
2876
2878
  const announce = async (room, link, rotated) => {
2877
2879
  const lead = rotated ? "the room was rejected by signaling (stale generation) — rotated to a fresh link" : "shared over WebRTC — open this link (the token is eaten from the URL on open)";
@@ -2879,7 +2881,7 @@ Options:
2879
2881
  const persistNote = explicitUrl ? "\n" : ` (persistent room — same link across restarts; delete ~/.agent-yes/.share-room to rotate)\n\n`;
2880
2882
  process.stdout.write(`${wantHttp ? "\n" : ""}${lead}:\n ${link}\n` + persistNote);
2881
2883
  if (!rotated) {
2882
- const { offerOpenInBrowser } = await import("./openBrowser-C2xmaYpe.js");
2884
+ const { offerOpenInBrowser } = await import("./openBrowser-D_qKXZNj.js");
2883
2885
  await offerOpenInBrowser(link);
2884
2886
  }
2885
2887
  } else {
@@ -2921,7 +2923,7 @@ Options:
2921
2923
  const shutdown = (resolve) => {
2922
2924
  if (heartbeat) clearInterval(heartbeat);
2923
2925
  closeShare?.();
2924
- import("./agentShare-CRJb4GhE.js").then((m) => m.revokeAllShares()).catch(() => {});
2926
+ import("./agentShare-CE3boH9f.js").then((m) => m.revokeAllShares()).catch(() => {});
2925
2927
  server?.stop();
2926
2928
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
2927
2929
  };
@@ -2934,4 +2936,4 @@ Options:
2934
2936
 
2935
2937
  //#endregion
2936
2938
  export { cmdServe, resolveLocalServeUrl };
2937
- //# sourceMappingURL=serve-v5fUhHiR.js.map
2939
+ //# sourceMappingURL=serve-Ds16KtBb.js.map
@@ -1,4 +1,4 @@
1
- import { f as setWorkspaceRoot, s as getWorkspaceRoot } from "./workspaceConfig-Dcbe4y77.js";
1
+ import { f as setWorkspaceRoot, s as getWorkspaceRoot } from "./workspaceConfig-dHHBQh0F.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import { stdin, stdout } from "node:process";
4
4
  import { createInterface } from "node:readline/promises";
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
32
32
  if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
33
33
  if (noShare) return 0;
34
34
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
35
- const { cmdServe } = await import("./serve-v5fUhHiR.js");
35
+ const { cmdServe } = await import("./serve-Ds16KtBb.js");
36
36
  return cmdServe([
37
37
  "install",
38
38
  "--share",
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
42
42
 
43
43
  //#endregion
44
44
  export { cmdSetup };
45
- //# sourceMappingURL=setup-DojqtiR5.js.map
45
+ //# sourceMappingURL=setup-DexcDADP.js.map
@@ -1,4 +1,4 @@
1
- import "./e2e-jb0Hp43q.js";
2
- import { n as shareLinkFromRoomUrl, r as startShare, t as loadOrCreateShareRoom } from "./share-vchIyVd8.js";
1
+ import "./e2e-D5jaSHyY.js";
2
+ import { n as shareLinkFromRoomUrl, r as startShare, t as loadOrCreateShareRoom } from "./share-BwEUEHfy.js";
3
3
 
4
4
  export { loadOrCreateShareRoom, shareLinkFromRoomUrl, startShare };
@@ -1,4 +1,4 @@
1
- import { a as computeTranscriptHash, c as open$1, d as randomHex, f as seal, i as MAX_CHUNK, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, r as MARKER, s as deriveDirKeys, t as CONFIRM_TIMEOUT_MS, u as parseSecret } from "./e2e-jb0Hp43q.js";
1
+ import { a as computeTranscriptHash, c as open$1, d as randomHex, f as seal, i as MAX_CHUNK, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, r as MARKER, s as deriveDirKeys, t as CONFIRM_TIMEOUT_MS, u as parseSecret } from "./e2e-D5jaSHyY.js";
2
2
  import { mkdir, readFile, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -627,4 +627,4 @@ async function startShare(opts) {
627
627
 
628
628
  //#endregion
629
629
  export { shareLinkFromRoomUrl as n, startShare as r, loadOrCreateShareRoom as t };
630
- //# sourceMappingURL=share-vchIyVd8.js.map
630
+ //# sourceMappingURL=share-BwEUEHfy.js.map
@@ -1,5 +1,5 @@
1
1
  import { i as readGlobalPids } from "./globalPidIndex-CoNr7tS8.js";
2
- import { n as getMinFreeMb, o as getSpawnWaitMs, t as getMaxAgents } from "./workspaceConfig-Dcbe4y77.js";
2
+ import { n as getMinFreeMb, o as getSpawnWaitMs, t as getMaxAgents } from "./workspaceConfig-dHHBQh0F.js";
3
3
  import { readFile } from "fs/promises";
4
4
 
5
5
  //#region ts/spawnGate.ts
@@ -104,4 +104,4 @@ async function waitForSpawnCapacity(opts) {
104
104
 
105
105
  //#endregion
106
106
  export { waitForSpawnCapacity as i, spawnGateEnabled as n, spawnRejectionReason as r, memAvailableMb as t };
107
- //# sourceMappingURL=spawnGate-SmqvtNIZ.js.map
107
+ //# sourceMappingURL=spawnGate-Vmd1d9OQ.js.map
@@ -1,5 +1,5 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
- import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-SmqvtNIZ.js";
3
+ import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-Vmd1d9OQ.js";
4
4
 
5
5
  export { waitForSpawnCapacity };
@@ -2,10 +2,10 @@ import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
2
2
  import { n as logger } from "./logger-CDIsZ-Pp.js";
3
3
  import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
4
4
  import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-CoNr7tS8.js";
5
- import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-CxrKJj77.js";
6
- import { t as loadSharedCliDefaults } from "./configShared-aKTg-sa5.js";
7
- import { n as isWebrtcSpec } from "./webrtcLink-B7REGtK2.js";
8
- import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-CZGDxzIP.js";
5
+ import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-Bb_Ie3Ck.js";
6
+ import { t as loadSharedCliDefaults } from "./configShared-nnIwDYY-.js";
7
+ import { n as isWebrtcSpec } from "./webrtcLink-DknpJQ0y.js";
8
+ import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-D-jPl9Fj.js";
9
9
  import ms from "ms";
10
10
  import yargs from "yargs";
11
11
  import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, writeFile } from "fs/promises";
@@ -1173,6 +1173,7 @@ const SUBCOMMANDS = new Set([
1173
1173
  "exit",
1174
1174
  "restart",
1175
1175
  "note",
1176
+ "todo",
1176
1177
  "serve",
1177
1178
  "schedule",
1178
1179
  "remote",
@@ -1237,36 +1238,40 @@ async function runSubcommand(argv) {
1237
1238
  case "exit": return await cmdExit(rest);
1238
1239
  case "restart": return await cmdRestart(rest);
1239
1240
  case "note": return await cmdNote(rest);
1241
+ case "todo": {
1242
+ const { runTodoSubcommand } = await import("./todoCli-DXY3TEnZ.js");
1243
+ return runTodoSubcommand(rest);
1244
+ }
1240
1245
  case "serve": {
1241
- const { cmdServe } = await import("./serve-v5fUhHiR.js");
1246
+ const { cmdServe } = await import("./serve-Ds16KtBb.js");
1242
1247
  return cmdServe(rest);
1243
1248
  }
1244
1249
  case "setup": {
1245
- const { cmdSetup } = await import("./setup-DojqtiR5.js");
1250
+ const { cmdSetup } = await import("./setup-DexcDADP.js");
1246
1251
  return cmdSetup(rest);
1247
1252
  }
1248
1253
  case "ws": {
1249
- const { cmdWs } = await import("./ws-qE_t5H8x.js");
1254
+ const { cmdWs } = await import("./ws-VOsw_etQ.js");
1250
1255
  return cmdWs(rest);
1251
1256
  }
1252
1257
  case "schedule": {
1253
- const { cmdSchedule } = await import("./schedule-CKF_arnv.js");
1258
+ const { cmdSchedule } = await import("./schedule-1h-bLkTA.js");
1254
1259
  return cmdSchedule(rest);
1255
1260
  }
1256
1261
  case "remote": {
1257
- const { cmdRemote } = await import("./remotes-B4R8KvWI.js");
1262
+ const { cmdRemote } = await import("./remotes-C_YlVvr9.js");
1258
1263
  return cmdRemote(rest);
1259
1264
  }
1260
1265
  case "expose": {
1261
- const { cmdExpose } = await import("./expose-BiFqNtOa.js");
1266
+ const { cmdExpose } = await import("./expose-CGpMiQxp.js");
1262
1267
  return cmdExpose(rest);
1263
1268
  }
1264
1269
  case "callback": {
1265
- const { cmdCallback } = await import("./callback-CzFcLTZn.js");
1270
+ const { cmdCallback } = await import("./callback-C77nNtIx.js");
1266
1271
  return cmdCallback(rest);
1267
1272
  }
1268
1273
  case "reap":
1269
- await (await import("./reaper-CJSu8UVZ.js")).sweep();
1274
+ await (await import("./reaper-BBc2AIKA.js")).sweep();
1270
1275
  return 0;
1271
1276
  case "help": return cmdHelp(managerCommands);
1272
1277
  default: return null;
@@ -1679,7 +1684,7 @@ async function fetchRemoteRecordsRaw(url, token, opts) {
1679
1684
  let base = url;
1680
1685
  let bearer = token;
1681
1686
  if (isWebrtcSpec(url)) {
1682
- const { startWebrtcBridge } = await import("./webrtcRemote-CMWelyTZ.js");
1687
+ const { startWebrtcBridge } = await import("./webrtcRemote-CWogO7Qa.js");
1683
1688
  bridge = await startWebrtcBridge(url);
1684
1689
  base = bridge.baseUrl;
1685
1690
  bearer = bridge.token;
@@ -4274,7 +4279,7 @@ async function cmdNotify(rest) {
4274
4279
  }
4275
4280
  const ensure = async () => {
4276
4281
  if (!argv["ensure-daemon"]) return;
4277
- const { ensureDaemon } = await import("./notifyDaemon-CjszDILI.js");
4282
+ const { ensureDaemon } = await import("./notifyDaemon-BGN6c7NX.js");
4278
4283
  await ensureDaemon().catch(() => null);
4279
4284
  };
4280
4285
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4348,7 +4353,7 @@ async function cmdNotifyCursor(args) {
4348
4353
  }
4349
4354
  async function cmdNotifyd(rest) {
4350
4355
  const sub = rest[0] ?? "status";
4351
- const daemon = await import("./notifyDaemon-CjszDILI.js");
4356
+ const daemon = await import("./notifyDaemon-BGN6c7NX.js");
4352
4357
  switch (sub) {
4353
4358
  case "run": return daemon.runDaemon();
4354
4359
  case "once": return daemon.runDaemon({ once: true });
@@ -4375,4 +4380,4 @@ async function cmdNotifyd(rest) {
4375
4380
 
4376
4381
  //#endregion
4377
4382
  export { daemonLockOwnerPath as $, renderRawLog as A, submitAndConfirm as B, matchKeyword as C, recentMessageEdges as D, readPtysize as E, restartHintLines as F, gcInboxes as G, writeKeysPaced as H, runSubcommand as I, listInboxParents as J, hostId as K, snapshotStatus as L, resolveOne as M, resolveReadWindow as N, recentReadEdges as O, resolveResumeArgs as P, daemonLockDir as Q, stdinActivityPath as R, listRecords as S, readNotes as T, writeToIpc as U, waitForLogQuiet as V, appendEvent as W, readInbox as X, liveWatchers as Y, shouldStealLock as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, notifyDir as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderRawLogLines as j, renderLogTailLines as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, controlCodeFromName as o, extractTaskCounts as p, isTransientLockMkdirError as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, TYPING_BADGE as tt, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stopTipForCli as z };
4378
- //# sourceMappingURL=subcommands-Dl2Kx1FC.js.map
4383
+ //# sourceMappingURL=subcommands-DNEyI_ft.js.map
@@ -1,10 +1,10 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
- import "./messageLog-CxrKJj77.js";
4
- import "./configShared-aKTg-sa5.js";
5
- import { A as renderRawLog, B as submitAndConfirm, C as matchKeyword, D as recentMessageEdges, E as readPtysize, F as restartHintLines, H as writeKeysPaced, I as runSubcommand, L as snapshotStatus, M as resolveOne, N as resolveReadWindow, O as recentReadEdges, P as resolveResumeArgs, R as stdinActivityPath, S as listRecords, T as readNotes, U as writeToIpc, V as waitForLogQuiet, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stopTipForCli } from "./subcommands-Dl2Kx1FC.js";
6
- import "./e2e-jb0Hp43q.js";
7
- import "./webrtcLink-B7REGtK2.js";
8
- import "./remotes-CZGDxzIP.js";
3
+ import "./messageLog-Bb_Ie3Ck.js";
4
+ import "./configShared-nnIwDYY-.js";
5
+ import { A as renderRawLog, B as submitAndConfirm, C as matchKeyword, D as recentMessageEdges, E as readPtysize, F as restartHintLines, H as writeKeysPaced, I as runSubcommand, L as snapshotStatus, M as resolveOne, N as resolveReadWindow, O as recentReadEdges, P as resolveResumeArgs, R as stdinActivityPath, S as listRecords, T as readNotes, U as writeToIpc, V as waitForLogQuiet, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stopTipForCli } from "./subcommands-DNEyI_ft.js";
6
+ import "./e2e-D5jaSHyY.js";
7
+ import "./webrtcLink-DknpJQ0y.js";
8
+ import "./remotes-D-jPl9Fj.js";
9
9
 
10
10
  export { cmdHelp, isSubcommand, runSubcommand };