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.
- package/dist/JsonlStore-Bm5Nj6v_.js +187 -0
- package/dist/{SUPPORTED_CLIS-CY6Qo_bF.js → SUPPORTED_CLIS-5asavJDC.js} +2 -2
- package/dist/SUPPORTED_CLIS-DtlIWGP2.js +11 -0
- package/dist/{agent-yes.config-whqkqq9P.js → agent-yes.config-DmW_TVFI.js} +2 -2
- package/dist/{agentShare-CRJb4GhE.js → agentShare-CE3boH9f.js} +8 -8
- package/dist/{callback-DZhSN9-O.js → callback-BtoB1O6q.js} +5 -5
- package/dist/callback-C77nNtIx.js +12 -0
- package/dist/{callbackCore-Cm_yYhep.js → callbackCore-CgnOT1Cp.js} +1 -1
- package/dist/{callbackCore-BbAMbeUp.js → callbackCore-DSxbO_6a.js} +1 -1
- package/dist/cli.js +9 -9
- package/dist/{configShared-aKTg-sa5.js → configShared-nnIwDYY-.js} +1 -1
- package/dist/{e2e-jb0Hp43q.js → e2e-D5jaSHyY.js} +1 -1
- package/dist/{expose-BiFqNtOa.js → expose-CGpMiQxp.js} +1 -1
- package/dist/{forkNested-BCxO485A.js → forkNested-BLa3Mz_t.js} +1 -1
- package/dist/index.js +8 -5
- package/dist/{messageLog-CxrKJj77.js → messageLog-Bb_Ie3Ck.js} +1 -1
- package/dist/{nodeRuntime-DttG711L.js → nodeRuntime-DoBOoeUW.js} +1 -1
- package/dist/{notifyDaemon-CjszDILI.js → notifyDaemon-BGN6c7NX.js} +7 -7
- package/dist/{openBrowser-C2xmaYpe.js → openBrowser-D_qKXZNj.js} +1 -1
- package/dist/pidStore-CatWvn5W.js +6 -0
- package/dist/{pidStore-BIvsBQ8X.js → pidStore-DCqpU_bI.js} +3 -183
- package/dist/{reaper-CJSu8UVZ.js → reaper-BBc2AIKA.js} +1 -1
- package/dist/{reaper-BUHCyxdF.js → reaper-BNKvujYy.js} +1 -1
- package/dist/{remotes-B4R8KvWI.js → remotes-C_YlVvr9.js} +3 -3
- package/dist/{remotes-CZGDxzIP.js → remotes-D-jPl9Fj.js} +3 -3
- package/dist/{rustBinary-CUJuJD2N.js → rustBinary-Dy4Ihc_-.js} +2 -2
- package/dist/{schedule-CKF_arnv.js → schedule-1h-bLkTA.js} +10 -8
- package/dist/{serve-v5fUhHiR.js → serve-Ds16KtBb.js} +33 -31
- package/dist/{setup-DojqtiR5.js → setup-DexcDADP.js} +3 -3
- package/dist/{share-_QYjPN7q.js → share-B7VP4_UF.js} +2 -2
- package/dist/{share-vchIyVd8.js → share-BwEUEHfy.js} +2 -2
- package/dist/{spawnGate-SmqvtNIZ.js → spawnGate-Vmd1d9OQ.js} +2 -2
- package/dist/{spawnGate-vT9DJbq0.js → spawnGate-nUBaOXoG.js} +1 -1
- package/dist/{subcommands-Dl2Kx1FC.js → subcommands-DNEyI_ft.js} +21 -16
- package/dist/{subcommands-ZqHQMFDJ.js → subcommands-DTfe_MGc.js} +6 -6
- package/dist/todoBlock-N6Kr9HnP.js +409 -0
- package/dist/todoCli-DXY3TEnZ.js +300 -0
- package/dist/todoDigest-BDVvC8wJ.js +3 -0
- package/dist/todoDigest-DvG0AVQ7.js +260 -0
- package/dist/{tray-xmaEYe1N.js → tray-CIm-5aWB.js} +1 -1
- package/dist/{ts-bE-SKMWi.js → ts-xL_389P-.js} +6 -6
- package/dist/{versionChecker-EEzUODBd.js → versionChecker-B3YbJSF2.js} +2 -2
- package/dist/{webrtcLink-B7REGtK2.js → webrtcLink-DknpJQ0y.js} +2 -2
- package/dist/{webrtcRemote-CMWelyTZ.js → webrtcRemote-CWogO7Qa.js} +3 -3
- package/dist/{workspaceConfig-Dcbe4y77.js → workspaceConfig-dHHBQh0F.js} +1 -1
- package/dist/{ws-qE_t5H8x.js → ws-VOsw_etQ.js} +8 -8
- package/lab/ui/blog/ay-callback/index.html +27 -22
- package/lab/ui/blog/index.html +3 -3
- package/lab/ui/index.html +9 -8
- package/package.json +1 -1
- package/ts/index.ts +26 -0
- package/ts/serve.ts +8 -2
- package/ts/subcommands.ts +5 -0
- package/ts/todoBlock.spec.ts +33 -0
- package/ts/todoBlock.ts +61 -0
- package/ts/todoCli.spec.ts +303 -0
- package/ts/todoCli.ts +356 -0
- package/ts/todoDigest.spec.ts +150 -0
- package/ts/todoDigest.ts +175 -0
- package/ts/todoLifecycle.spec.ts +67 -0
- package/ts/todoLifecycle.ts +121 -0
- package/ts/todoStore.spec.ts +410 -0
- package/ts/todoStore.ts +614 -0
- package/dist/SUPPORTED_CLIS-CE3JLqnP.js +0 -9
- package/dist/callback-CzFcLTZn.js +0 -12
- package/dist/pidStore-CLxwp0qI.js +0 -5
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import { closeSync, existsSync, fsyncSync, openSync } from "fs";
|
|
3
|
+
import { appendFile, mkdir, readFile, rename, writeFile } from "fs/promises";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { lock } from "proper-lockfile";
|
|
6
|
+
|
|
7
|
+
//#region ts/JsonlStore.ts
|
|
8
|
+
/**
|
|
9
|
+
* A lightweight NeDB-style JSONL persistence layer.
|
|
10
|
+
*
|
|
11
|
+
* - Append-only writes (one JSON object per line)
|
|
12
|
+
* - Same `_id` → last line wins (fields merged)
|
|
13
|
+
* - `$$deleted` lines act as tombstones
|
|
14
|
+
* - Crash recovery: skip partial last line, recover from temp file
|
|
15
|
+
* - Multi-process safe via proper-lockfile (reads don't need lock)
|
|
16
|
+
* - Compact on close: deduplicates into clean file via atomic rename
|
|
17
|
+
*/
|
|
18
|
+
var JsonlStore = class {
|
|
19
|
+
filePath;
|
|
20
|
+
tempPath;
|
|
21
|
+
docs = /* @__PURE__ */ new Map();
|
|
22
|
+
constructor(filePath) {
|
|
23
|
+
this.filePath = filePath;
|
|
24
|
+
this.tempPath = filePath + "~";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Load all records from the JSONL file. No lock needed.
|
|
28
|
+
* Handles crash recovery: partial last line skipped, temp file recovery.
|
|
29
|
+
*/
|
|
30
|
+
async load() {
|
|
31
|
+
await mkdir(path.dirname(this.filePath), { recursive: true });
|
|
32
|
+
if (!existsSync(this.filePath) && existsSync(this.tempPath)) {
|
|
33
|
+
logger.debug("[JsonlStore] Recovering from temp file");
|
|
34
|
+
await rename(this.tempPath, this.filePath);
|
|
35
|
+
}
|
|
36
|
+
this.docs = /* @__PURE__ */ new Map();
|
|
37
|
+
let raw = "";
|
|
38
|
+
try {
|
|
39
|
+
raw = await readFile(this.filePath, "utf-8");
|
|
40
|
+
} catch (err) {
|
|
41
|
+
if (err.code === "ENOENT") return this.docs;
|
|
42
|
+
throw err;
|
|
43
|
+
}
|
|
44
|
+
const lines = raw.split("\n");
|
|
45
|
+
let corruptCount = 0;
|
|
46
|
+
for (const line of lines) {
|
|
47
|
+
const trimmed = line.trim();
|
|
48
|
+
if (!trimmed) continue;
|
|
49
|
+
try {
|
|
50
|
+
const doc = JSON.parse(trimmed);
|
|
51
|
+
if (!doc._id) continue;
|
|
52
|
+
if (doc.$$deleted) this.docs.delete(doc._id);
|
|
53
|
+
else {
|
|
54
|
+
const existing = this.docs.get(doc._id);
|
|
55
|
+
if (existing) this.docs.set(doc._id, {
|
|
56
|
+
...existing,
|
|
57
|
+
...doc
|
|
58
|
+
});
|
|
59
|
+
else this.docs.set(doc._id, doc);
|
|
60
|
+
}
|
|
61
|
+
} catch {
|
|
62
|
+
corruptCount++;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (corruptCount > 0) logger.debug(`[JsonlStore] Skipped ${corruptCount} corrupt line(s) in ${this.filePath}`);
|
|
66
|
+
return this.docs;
|
|
67
|
+
}
|
|
68
|
+
/** Get all live documents. */
|
|
69
|
+
getAll() {
|
|
70
|
+
return Array.from(this.docs.values());
|
|
71
|
+
}
|
|
72
|
+
/** Find a document by _id. */
|
|
73
|
+
getById(id) {
|
|
74
|
+
return this.docs.get(id);
|
|
75
|
+
}
|
|
76
|
+
/** Find documents matching a predicate. */
|
|
77
|
+
find(predicate) {
|
|
78
|
+
return this.getAll().filter(predicate);
|
|
79
|
+
}
|
|
80
|
+
/** Find first document matching a predicate. */
|
|
81
|
+
findOne(predicate) {
|
|
82
|
+
for (const doc of this.docs.values()) if (predicate(doc)) return doc;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Append a new document. Acquires lock.
|
|
86
|
+
* If no _id is provided, one is generated.
|
|
87
|
+
*/
|
|
88
|
+
async append(doc) {
|
|
89
|
+
const id = doc._id || generateId();
|
|
90
|
+
const { _id: _, ...rest } = doc;
|
|
91
|
+
const fullDoc = {
|
|
92
|
+
_id: id,
|
|
93
|
+
...rest
|
|
94
|
+
};
|
|
95
|
+
return await this.withLock(async () => {
|
|
96
|
+
await appendFile(this.filePath, JSON.stringify(fullDoc) + "\n");
|
|
97
|
+
const existing = this.docs.get(fullDoc._id);
|
|
98
|
+
if (existing) this.docs.set(fullDoc._id, {
|
|
99
|
+
...existing,
|
|
100
|
+
...fullDoc
|
|
101
|
+
});
|
|
102
|
+
else this.docs.set(fullDoc._id, fullDoc);
|
|
103
|
+
return fullDoc;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Update a document by _id. Appends a merge line. Acquires lock.
|
|
108
|
+
*/
|
|
109
|
+
async updateById(id, patch) {
|
|
110
|
+
await this.withLock(async () => {
|
|
111
|
+
const line = {
|
|
112
|
+
_id: id,
|
|
113
|
+
...patch
|
|
114
|
+
};
|
|
115
|
+
await appendFile(this.filePath, JSON.stringify(line) + "\n");
|
|
116
|
+
const existing = this.docs.get(id);
|
|
117
|
+
if (existing) this.docs.set(id, {
|
|
118
|
+
...existing,
|
|
119
|
+
...patch
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Delete a document by _id. Appends a tombstone. Acquires lock.
|
|
125
|
+
*/
|
|
126
|
+
async deleteById(id) {
|
|
127
|
+
await this.withLock(async () => {
|
|
128
|
+
const tombstone = {
|
|
129
|
+
_id: id,
|
|
130
|
+
$$deleted: true
|
|
131
|
+
};
|
|
132
|
+
await appendFile(this.filePath, JSON.stringify(tombstone) + "\n");
|
|
133
|
+
this.docs.delete(id);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Compact the file: deduplicate entries, remove tombstones.
|
|
138
|
+
* Writes to temp file, fsyncs, then atomic renames.
|
|
139
|
+
* Acquires lock.
|
|
140
|
+
*/
|
|
141
|
+
async compact() {
|
|
142
|
+
const lines = Array.from(this.docs.values()).map((doc) => {
|
|
143
|
+
const { _id, $$deleted: _$$deleted, ...rest } = doc;
|
|
144
|
+
return JSON.stringify({
|
|
145
|
+
_id,
|
|
146
|
+
...rest
|
|
147
|
+
});
|
|
148
|
+
}).join("\n");
|
|
149
|
+
const content = lines ? lines + "\n" : "";
|
|
150
|
+
try {
|
|
151
|
+
await this.withLock(async () => {
|
|
152
|
+
await writeFile(this.tempPath, content);
|
|
153
|
+
const fd = openSync(this.tempPath, "r");
|
|
154
|
+
fsyncSync(fd);
|
|
155
|
+
closeSync(fd);
|
|
156
|
+
await rename(this.tempPath, this.filePath);
|
|
157
|
+
});
|
|
158
|
+
} catch {
|
|
159
|
+
await writeFile(this.filePath, content);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async withLock(fn) {
|
|
163
|
+
const dir = path.dirname(this.filePath);
|
|
164
|
+
let release;
|
|
165
|
+
try {
|
|
166
|
+
release = await lock(dir, {
|
|
167
|
+
lockfilePath: this.filePath + ".lock",
|
|
168
|
+
retries: {
|
|
169
|
+
retries: 5,
|
|
170
|
+
minTimeout: 50,
|
|
171
|
+
maxTimeout: 500
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return await fn();
|
|
175
|
+
} finally {
|
|
176
|
+
if (release) await release();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
let idCounter = 0;
|
|
181
|
+
function generateId() {
|
|
182
|
+
return Date.now().toString(36) + (idCounter++).toString(36) + Math.random().toString(36).slice(2, 6);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
//#endregion
|
|
186
|
+
export { JsonlStore as t };
|
|
187
|
+
//# sourceMappingURL=JsonlStore-Bm5Nj6v_.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-xL_389P-.js";
|
|
2
2
|
|
|
3
3
|
//#region ts/SUPPORTED_CLIS.ts
|
|
4
4
|
const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SUPPORTED_CLIS as t };
|
|
8
|
-
//# sourceMappingURL=SUPPORTED_CLIS-
|
|
8
|
+
//# sourceMappingURL=SUPPORTED_CLIS-5asavJDC.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./ts-xL_389P-.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-B3YbJSF2.js";
|
|
4
|
+
import "./JsonlStore-Bm5Nj6v_.js";
|
|
5
|
+
import "./globalPidIndex-CoNr7tS8.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
|
+
|
|
11
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-
|
|
2
|
+
import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-nnIwDYY-.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import { access, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
@@ -226,4 +226,4 @@ async function getDefaultConfig() {
|
|
|
226
226
|
|
|
227
227
|
//#endregion
|
|
228
228
|
export { agent_yes_config_default as default };
|
|
229
|
-
//# sourceMappingURL=agent-yes.config-
|
|
229
|
+
//# sourceMappingURL=agent-yes.config-DmW_TVFI.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
3
|
-
import "./messageLog-
|
|
4
|
-
import "./configShared-
|
|
5
|
-
import { M as resolveOne } from "./subcommands-
|
|
6
|
-
import "./e2e-
|
|
7
|
-
import "./webrtcLink-
|
|
8
|
-
import "./remotes-
|
|
9
|
-
import { r as startShare } from "./share-
|
|
3
|
+
import "./messageLog-Bb_Ie3Ck.js";
|
|
4
|
+
import "./configShared-nnIwDYY-.js";
|
|
5
|
+
import { M as resolveOne } from "./subcommands-DNEyI_ft.js";
|
|
6
|
+
import "./e2e-D5jaSHyY.js";
|
|
7
|
+
import "./webrtcLink-DknpJQ0y.js";
|
|
8
|
+
import "./remotes-D-jPl9Fj.js";
|
|
9
|
+
import { r as startShare } from "./share-BwEUEHfy.js";
|
|
10
10
|
|
|
11
11
|
//#region ts/agentShare.ts
|
|
12
12
|
const MAX_SHARES = 8;
|
|
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
229
229
|
|
|
230
230
|
//#endregion
|
|
231
231
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
232
|
-
//# sourceMappingURL=agentShare-
|
|
232
|
+
//# sourceMappingURL=agentShare-CE3boH9f.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
|
|
2
|
-
import { M as resolveOne } from "./subcommands-
|
|
3
|
-
import { a as mintCapability, o as parseExpires } from "./callbackCore-
|
|
2
|
+
import { M as resolveOne } from "./subcommands-DNEyI_ft.js";
|
|
3
|
+
import { a as mintCapability, o as parseExpires } from "./callbackCore-CgnOT1Cp.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
6
6
|
import path from "node:path";
|
|
@@ -72,7 +72,7 @@ async function resolveBase(flag) {
|
|
|
72
72
|
if (flag) return flag;
|
|
73
73
|
if (process.env.AGENT_YES_CALLBACK_BASE) return process.env.AGENT_YES_CALLBACK_BASE;
|
|
74
74
|
try {
|
|
75
|
-
const { resolveLocalServeUrl } = await import("./serve-
|
|
75
|
+
const { resolveLocalServeUrl } = await import("./serve-Ds16KtBb.js");
|
|
76
76
|
const url = await resolveLocalServeUrl();
|
|
77
77
|
if (url) return url;
|
|
78
78
|
} catch {}
|
|
@@ -170,7 +170,7 @@ async function cmdCallback(rest) {
|
|
|
170
170
|
createdAt: Date.now()
|
|
171
171
|
};
|
|
172
172
|
saveStore(all);
|
|
173
|
-
const { buildSnippet } = await import("./callbackCore-
|
|
173
|
+
const { buildSnippet } = await import("./callbackCore-DSxbO_6a.js");
|
|
174
174
|
w(`callback ${id} → ${record.cli} #${record.pid} @ ${record.cwd}`);
|
|
175
175
|
w(`expires: ${new Date(exp).toISOString()} (${expiresSpec})`);
|
|
176
176
|
w(`endpoint: ${base.replace(/\/+$/, "")}/cb/${cap}`);
|
|
@@ -187,4 +187,4 @@ async function cmdCallback(rest) {
|
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
189
|
export { loadOrCreateCallbackSecret as i, isCallbackRevoked as n, loadCallbackSecretReadOnly as r, cmdCallback as t };
|
|
190
|
-
//# sourceMappingURL=callback-
|
|
190
|
+
//# sourceMappingURL=callback-BtoB1O6q.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./globalPidIndex-CoNr7tS8.js";
|
|
3
|
+
import "./messageLog-Bb_Ie3Ck.js";
|
|
4
|
+
import "./configShared-nnIwDYY-.js";
|
|
5
|
+
import "./subcommands-DNEyI_ft.js";
|
|
6
|
+
import "./e2e-D5jaSHyY.js";
|
|
7
|
+
import "./webrtcLink-DknpJQ0y.js";
|
|
8
|
+
import "./remotes-D-jPl9Fj.js";
|
|
9
|
+
import "./callbackCore-CgnOT1Cp.js";
|
|
10
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BtoB1O6q.js";
|
|
11
|
+
|
|
12
|
+
export { cmdCallback };
|
|
@@ -140,4 +140,4 @@ function buildSnippet(opts) {
|
|
|
140
140
|
|
|
141
141
|
//#endregion
|
|
142
142
|
export { mintCapability as a, frameVisitorMessage as i, MAX_EXPIRES_MS as n, parseExpires as o, buildSnippet as r, verifyCapability as s, MAX_CALLBACK_MSG_BYTES as t };
|
|
143
|
-
//# sourceMappingURL=callbackCore-
|
|
143
|
+
//# sourceMappingURL=callbackCore-CgnOT1Cp.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as mintCapability, i as frameVisitorMessage, n as MAX_EXPIRES_MS, o as parseExpires, r as buildSnippet, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-
|
|
1
|
+
import { a as mintCapability, i as frameVisitorMessage, n as MAX_EXPIRES_MS, o as parseExpires, r as buildSnippet, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-CgnOT1Cp.js";
|
|
2
2
|
|
|
3
3
|
export { buildSnippet };
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-
|
|
5
|
-
import { n as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-B3YbJSF2.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-Dy4Ihc_-.js";
|
|
6
6
|
import { argv } from "process";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
8
|
import ms from "ms";
|
|
@@ -285,7 +285,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
285
285
|
const rawArg = process.argv[2];
|
|
286
286
|
const managerCommands = !invokedCliName(process.argv);
|
|
287
287
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
288
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
288
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DTfe_MGc.js");
|
|
289
289
|
if (isHelpFlag && process.argv.length === 3) {
|
|
290
290
|
await cmdHelp(managerCommands);
|
|
291
291
|
process.exit(0);
|
|
@@ -299,16 +299,16 @@ await checkAndAutoUpdate();
|
|
|
299
299
|
logger.info(versionString());
|
|
300
300
|
const config = parseCliArgs(process.argv);
|
|
301
301
|
if (config.tray) {
|
|
302
|
-
const { startTray } = await import("./tray-
|
|
302
|
+
const { startTray } = await import("./tray-CIm-5aWB.js");
|
|
303
303
|
await startTray();
|
|
304
304
|
await new Promise(() => {});
|
|
305
305
|
}
|
|
306
306
|
{
|
|
307
|
-
const { ensureTray } = await import("./tray-
|
|
307
|
+
const { ensureTray } = await import("./tray-CIm-5aWB.js");
|
|
308
308
|
ensureTray();
|
|
309
309
|
}
|
|
310
310
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
311
|
-
const { waitForSpawnCapacity } = await import("./spawnGate-
|
|
311
|
+
const { waitForSpawnCapacity } = await import("./spawnGate-nUBaOXoG.js");
|
|
312
312
|
await waitForSpawnCapacity({
|
|
313
313
|
onWait: (reason, waitedMs) => {
|
|
314
314
|
if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
|
|
@@ -327,14 +327,14 @@ if (config.useRust) {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
if (rustBinary) {
|
|
330
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
330
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DtlIWGP2.js");
|
|
331
331
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
332
332
|
if (config.verbose) {
|
|
333
333
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
334
334
|
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
335
335
|
}
|
|
336
336
|
const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
|
|
337
|
-
const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-
|
|
337
|
+
const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-BLa3Mz_t.js");
|
|
338
338
|
if (shouldForkNested({
|
|
339
339
|
isTTY: Boolean(process.stdout.isTTY),
|
|
340
340
|
ayPid: process.env.AGENT_YES_PID,
|
|
@@ -392,7 +392,7 @@ if (config.showVersion) {
|
|
|
392
392
|
process.exit(0);
|
|
393
393
|
}
|
|
394
394
|
if (config.appendPrompt) {
|
|
395
|
-
const { PidStore } = await import("./pidStore-
|
|
395
|
+
const { PidStore } = await import("./pidStore-CatWvn5W.js");
|
|
396
396
|
const ipcPath = await PidStore.findActiveFifo(process.cwd());
|
|
397
397
|
if (!ipcPath) {
|
|
398
398
|
console.error("No active agent with IPC found in current directory.");
|
|
@@ -172,4 +172,4 @@ function randomHex(n) {
|
|
|
172
172
|
|
|
173
173
|
//#endregion
|
|
174
174
|
export { computeTranscriptHash as a, open as c, randomHex as d, seal as f, MAX_CHUNK as i, packEnvelope as l, FLAG_CONFIRM as n, deriveAuthToken as o, unpackEnvelope as p, MARKER as r, deriveDirKeys as s, CONFIRM_TIMEOUT_MS as t, parseSecret as u };
|
|
175
|
-
//# sourceMappingURL=e2e-
|
|
175
|
+
//# sourceMappingURL=e2e-D5jaSHyY.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { i as AgentContext, n as agentYes, o as removeControlCharacters, r as config, t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { i as AgentContext, n as agentYes, o as removeControlCharacters, r as config, t as CLIS_CONFIG } from "./ts-xL_389P-.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
4
|
-
import "./
|
|
3
|
+
import "./versionChecker-B3YbJSF2.js";
|
|
4
|
+
import "./JsonlStore-Bm5Nj6v_.js";
|
|
5
5
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
6
|
-
import "./
|
|
6
|
+
import "./pidStore-DCqpU_bI.js";
|
|
7
|
+
import "./messageLog-Bb_Ie3Ck.js";
|
|
8
|
+
import { a as unblockedTasks, c as canTransition, d as nextStates, f as requiredGate, i as renderTree, l as initialState, n as openBlockers, p as statesOf, r as renderDigest, s as LIFECYCLES, u as isKnownKind } from "./todoDigest-DvG0AVQ7.js";
|
|
9
|
+
import { a as openStore, i as TodoStore, n as monitorHint, r as CycleError, t as describeBlock } from "./todoBlock-N6Kr9HnP.js";
|
|
7
10
|
|
|
8
|
-
export { AgentContext, CLIS_CONFIG, config, agentYes as default, removeControlCharacters };
|
|
11
|
+
export { AgentContext, CLIS_CONFIG, CycleError, LIFECYCLES, TodoStore, canTransition, config, agentYes as default, describeBlock, initialState, isKnownKind, monitorHint, nextStates, openBlockers, openStore, removeControlCharacters, renderDigest, renderTree, requiredGate, statesOf, unblockedTasks };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./globalPidIndex-CoNr7tS8.js";
|
|
3
|
-
import "./messageLog-
|
|
4
|
-
import "./configShared-
|
|
5
|
-
import { $ as daemonLockOwnerPath, G as gcInboxes, J as listInboxParents, K as hostId, Q as daemonLockDir, S as listRecords, W as appendEvent, X as readInbox, Y as liveWatchers, Z as shouldStealLock, _ as isPidAlive, c as deriveLiveState, et as notifyDir, k as renderLogTailLines } from "./subcommands-
|
|
6
|
-
import "./e2e-
|
|
7
|
-
import "./webrtcLink-
|
|
8
|
-
import "./remotes-
|
|
3
|
+
import "./messageLog-Bb_Ie3Ck.js";
|
|
4
|
+
import "./configShared-nnIwDYY-.js";
|
|
5
|
+
import { $ as daemonLockOwnerPath, G as gcInboxes, J as listInboxParents, K as hostId, Q as daemonLockDir, S as listRecords, W as appendEvent, X as readInbox, Y as liveWatchers, Z as shouldStealLock, _ as isPidAlive, c as deriveLiveState, et as notifyDir, k as renderLogTailLines } from "./subcommands-DNEyI_ft.js";
|
|
6
|
+
import "./e2e-D5jaSHyY.js";
|
|
7
|
+
import "./webrtcLink-DknpJQ0y.js";
|
|
8
|
+
import "./remotes-D-jPl9Fj.js";
|
|
9
9
|
import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { execFile } from "node:child_process";
|
|
@@ -589,4 +589,4 @@ async function ensureDaemon() {
|
|
|
589
589
|
|
|
590
590
|
//#endregion
|
|
591
591
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
592
|
-
//# sourceMappingURL=notifyDaemon-
|
|
592
|
+
//# sourceMappingURL=notifyDaemon-BGN6c7NX.js.map
|