agent-yes 1.228.0 → 1.229.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 → JsonlStore-CWOA3aDH.js} +1 -1
- package/dist/{SUPPORTED_CLIS-C5d64Xqj.js → SUPPORTED_CLIS-CvLtp6LS.js} +2 -2
- package/dist/SUPPORTED_CLIS-DJEnqsp2.js +11 -0
- package/dist/{agentShare-CpglhRYb.js → agentShare-CQwvWWfd.js} +4 -4
- package/dist/{callback-B3N2VJ1i.js → callback-BFZDARQq.js} +4 -4
- package/dist/{callback-CCEQtwXX.js → callback-BN-tH9dB.js} +3 -3
- package/dist/cli.js +9 -9
- package/dist/{cwdConflictWarn-CJZRp4S0.js → cwdConflictWarn-CKUsQ5_o.js} +2 -2
- package/dist/{globalPidIndex-CoNr7tS8.js → globalPidIndex-Ca4sTr1b.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/{messageLog-Bb_Ie3Ck.js → messageLog-zVGWLX7w.js} +1 -1
- package/dist/{notifyDaemon-CfQN5blR.js → notifyDaemon-CENKHs1M.js} +4 -4
- package/dist/pidStore-Cp3HekUh.js +6 -0
- package/dist/{pidStore-DCqpU_bI.js → pidStore-Hjba3K6Q.js} +3 -3
- package/dist/{reaper-BNKvujYy.js → reaper-iQXyufgp.js} +1 -1
- package/dist/{reaper-BBc2AIKA.js → reaper-pJpMYKmj.js} +1 -1
- package/dist/{runningLock-CNMl13dC.js → runningLock-BFk3Mo8K.js} +1 -1
- package/dist/{rustBinary-B8IcqSw1.js → rustBinary-BjApGser.js} +2 -2
- package/dist/{schedule-B-RjgOOR.js → schedule-D0O3sb5A.js} +9 -9
- package/dist/{serve-DwF03sgB.js → serve-m-WChRrO.js} +67 -21
- package/dist/{setup-cZFxfS89.js → setup-fuwC5wlF.js} +2 -2
- package/dist/spawnGate-5jC6eiqk.js +5 -0
- package/dist/{spawnGate-CeFYH-Ib.js → spawnGate-CMlGqVN4.js} +2 -2
- package/dist/{subcommands-DSyCT0vl.js → subcommands-DzJbnYAx.js} +12 -12
- package/dist/{subcommands-UseeaeYM.js → subcommands-lwgJxJex.js} +3 -3
- package/dist/{todoAutomation-Cwnh4aWo.js → todoAutomation-x6guaQXc.js} +115 -6
- package/dist/{todoCli-6v1CYdxN.js → todoCli-Cjhx3DqQ.js} +38 -6
- package/dist/{tray-DBt8X-Qj.js → tray-C8VfnS7s.js} +2 -2
- package/dist/{ts-Cl3CmLH9.js → ts-oYrTk4Z_.js} +103 -20
- package/dist/{versionChecker-Dhjyjxs_.js → versionChecker-CgCXc8CJ.js} +2 -2
- package/dist/{ws-Dw2fGxTI.js → ws-D5q3R1kY.js} +4 -4
- package/package.json +1 -1
- package/ts/askApi.spec.ts +358 -0
- package/ts/askApi.ts +255 -0
- package/ts/index.ts +2 -0
- package/ts/serve.ts +131 -0
- package/ts/todoBlock.spec.ts +10 -0
- package/ts/todoBlock.ts +14 -2
- package/ts/todoCli.spec.ts +101 -0
- package/ts/todoCli.ts +69 -1
- package/ts/todoStore.spec.ts +126 -0
- package/ts/todoStore.ts +130 -2
- package/dist/SUPPORTED_CLIS-Bfresz1n.js +0 -11
- package/dist/pidStore-CatWvn5W.js +0 -6
- package/dist/spawnGate-CIC7b7nm.js +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-oYrTk4Z_.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-CvLtp6LS.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./ts-oYrTk4Z_.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-CgCXc8CJ.js";
|
|
4
|
+
import "./todoAutomation-x6guaQXc.js";
|
|
5
|
+
import "./JsonlStore-CWOA3aDH.js";
|
|
6
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
7
|
+
import "./pidStore-Hjba3K6Q.js";
|
|
8
|
+
import "./messageLog-zVGWLX7w.js";
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CvLtp6LS.js";
|
|
10
|
+
|
|
11
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
3
|
-
import "./messageLog-
|
|
2
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
3
|
+
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./configShared-YKfS6NMe.js";
|
|
5
|
-
import { N as resolveOne } from "./subcommands-
|
|
5
|
+
import { N as resolveOne } from "./subcommands-DzJbnYAx.js";
|
|
6
6
|
import "./e2e-DB7BDdEA.js";
|
|
7
7
|
import "./webrtcLink-CjckgIZe.js";
|
|
8
8
|
import "./remotes-ZqD0FHl_.js";
|
|
@@ -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-CQwvWWfd.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
3
|
-
import "./messageLog-
|
|
2
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
3
|
+
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./configShared-YKfS6NMe.js";
|
|
5
|
-
import "./subcommands-
|
|
5
|
+
import "./subcommands-DzJbnYAx.js";
|
|
6
6
|
import "./e2e-DB7BDdEA.js";
|
|
7
7
|
import "./webrtcLink-CjckgIZe.js";
|
|
8
8
|
import "./remotes-ZqD0FHl_.js";
|
|
9
9
|
import "./callbackCore-BlNdDILy.js";
|
|
10
|
-
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-
|
|
10
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BN-tH9dB.js";
|
|
11
11
|
|
|
12
12
|
export { cmdCallback };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
|
|
2
|
-
import { N as resolveOne } from "./subcommands-
|
|
2
|
+
import { N as resolveOne } from "./subcommands-DzJbnYAx.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-BlNdDILy.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -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-m-WChRrO.js");
|
|
76
76
|
const url = await resolveLocalServeUrl();
|
|
77
77
|
if (url) return url;
|
|
78
78
|
} catch {}
|
|
@@ -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-BN-tH9dB.js.map
|
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-CgCXc8CJ.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-BjApGser.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-lwgJxJex.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-C8VfnS7s.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-C8VfnS7s.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-5jC6eiqk.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…`);
|
|
@@ -317,7 +317,7 @@ if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
320
|
-
const { warnIfCwdOccupied } = await import("./cwdConflictWarn-
|
|
320
|
+
const { warnIfCwdOccupied } = await import("./cwdConflictWarn-CKUsQ5_o.js");
|
|
321
321
|
await warnIfCwdOccupied(process.argv);
|
|
322
322
|
}
|
|
323
323
|
if (config.useRust) {
|
|
@@ -331,7 +331,7 @@ if (config.useRust) {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
if (rustBinary) {
|
|
334
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
334
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DJEnqsp2.js");
|
|
335
335
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
336
336
|
if (config.verbose) {
|
|
337
337
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
@@ -396,7 +396,7 @@ if (config.showVersion) {
|
|
|
396
396
|
process.exit(0);
|
|
397
397
|
}
|
|
398
398
|
if (config.appendPrompt) {
|
|
399
|
-
const { PidStore } = await import("./pidStore-
|
|
399
|
+
const { PidStore } = await import("./pidStore-Cp3HekUh.js");
|
|
400
400
|
const ipcPath = await PidStore.findActiveFifo(process.cwd());
|
|
401
401
|
if (!ipcPath) {
|
|
402
402
|
console.error("No active agent with IPC found in current directory.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
2
|
+
import { i as readGlobalPids } from "./globalPidIndex-Ca4sTr1b.js";
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
5
|
//#region ts/cwdConflictWarn.ts
|
|
@@ -61,4 +61,4 @@ async function warnIfCwdOccupied(rawArgv) {
|
|
|
61
61
|
|
|
62
62
|
//#endregion
|
|
63
63
|
export { warnIfCwdOccupied };
|
|
64
|
-
//# sourceMappingURL=cwdConflictWarn-
|
|
64
|
+
//# sourceMappingURL=cwdConflictWarn-CKUsQ5_o.js.map
|
|
@@ -188,4 +188,4 @@ async function pruneOldLogs(maxAgeMs = retentionMs()) {
|
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
190
|
export { updateGlobalPidStatus as a, readGlobalPids as i, maybeCompactGlobalPids as n, pruneOldLogs as r, appendGlobalPid as t };
|
|
191
|
-
//# sourceMappingURL=globalPidIndex-
|
|
191
|
+
//# sourceMappingURL=globalPidIndex-Ca4sTr1b.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as hasTodoStore, c as AgentContext, i as answerAsk, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-oYrTk4Z_.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import
|
|
3
|
+
import "./versionChecker-CgCXc8CJ.js";
|
|
4
|
+
import { _ as isKnownKind, a as renderTree, b as statesOf, c as monitorHint, d as openStore, f as DONE_STATE, g as initialState, h as canTransition, i as renderDigest, l as CycleError, m as ORPHANED_STATE, o as unblockedTasks, p as LIFECYCLES, r as openBlockers, s as describeBlock, t as reconcileTodos, u as TodoStore, v as nextStates, x as removeControlCharacters, y as requiredGate } from "./todoAutomation-x6guaQXc.js";
|
|
5
|
+
import "./JsonlStore-CWOA3aDH.js";
|
|
6
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
7
|
+
import "./pidStore-Hjba3K6Q.js";
|
|
8
|
+
import "./messageLog-zVGWLX7w.js";
|
|
9
9
|
|
|
10
|
-
export { AgentContext, CLIS_CONFIG, CycleError, DONE_STATE, LIFECYCLES, ORPHANED_STATE, TodoStore, canTransition, config, agentYes as default, describeBlock, initialState, isKnownKind, monitorHint, nextStates, openBlockers, openStore, reconcileTodos, removeControlCharacters, renderDigest, renderTree, requiredGate, statesOf, unblockedTasks };
|
|
10
|
+
export { AgentContext, CLIS_CONFIG, CycleError, DONE_STATE, LIFECYCLES, ORPHANED_STATE, TodoStore, answerAsk, canTransition, config, agentYes as default, describeBlock, hasTodoStore, initialState, isKnownKind, listAsks, listAsksForProject, monitorHint, nextStates, openBlockers, openStore, reconcileTodos, removeControlCharacters, renderDigest, renderTree, requiredGate, statesOf, unblockedTasks };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
3
|
-
import "./messageLog-
|
|
2
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
3
|
+
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./configShared-YKfS6NMe.js";
|
|
5
|
-
import { $ as daemonLockDir, A as renderLogTailLines, G as appendEvent, K as gcInboxes, Q as shouldStealLock, S as listRecords, X as liveWatchers, Y as listInboxParents, Z as readInbox, _ as isPidAlive, c as deriveLiveState, et as daemonLockOwnerPath, q as hostId, tt as notifyDir } from "./subcommands-
|
|
5
|
+
import { $ as daemonLockDir, A as renderLogTailLines, G as appendEvent, K as gcInboxes, Q as shouldStealLock, S as listRecords, X as liveWatchers, Y as listInboxParents, Z as readInbox, _ as isPidAlive, c as deriveLiveState, et as daemonLockOwnerPath, q as hostId, tt as notifyDir } from "./subcommands-DzJbnYAx.js";
|
|
6
6
|
import "./e2e-DB7BDdEA.js";
|
|
7
7
|
import "./webrtcLink-CjckgIZe.js";
|
|
8
8
|
import "./remotes-ZqD0FHl_.js";
|
|
@@ -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-CENKHs1M.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-
|
|
3
|
+
import { t as JsonlStore } from "./JsonlStore-CWOA3aDH.js";
|
|
4
|
+
import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-Ca4sTr1b.js";
|
|
5
5
|
import { mkdir, writeFile } from "fs/promises";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
@@ -188,4 +188,4 @@ pid-db/
|
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
190
|
export { PidStore as t };
|
|
191
|
-
//# sourceMappingURL=pidStore-
|
|
191
|
+
//# sourceMappingURL=pidStore-Hjba3K6Q.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-CgCXc8CJ.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-
|
|
228
|
+
//# sourceMappingURL=rustBinary-BjApGser.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-oYrTk4Z_.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
3
|
+
import "./versionChecker-CgCXc8CJ.js";
|
|
4
|
+
import "./todoAutomation-x6guaQXc.js";
|
|
5
|
+
import "./JsonlStore-CWOA3aDH.js";
|
|
6
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
7
|
+
import "./pidStore-Hjba3K6Q.js";
|
|
8
|
+
import "./messageLog-zVGWLX7w.js";
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CvLtp6LS.js";
|
|
10
10
|
import { d as resolveSpawnCwd } from "./workspaceConfig-De5tgjeO.js";
|
|
11
11
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CgXWHe9p.js";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
@@ -153,4 +153,4 @@ async function cmdSchedule(rest) {
|
|
|
153
153
|
|
|
154
154
|
//#endregion
|
|
155
155
|
export { cmdSchedule };
|
|
156
|
-
//# sourceMappingURL=schedule-
|
|
156
|
+
//# sourceMappingURL=schedule-D0O3sb5A.js.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-oYrTk4Z_.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
4
|
-
import { t as findSpawnHiddenLauncher } from "./rustBinary-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-CgCXc8CJ.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-BjApGser.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-CtHb5b71.js";
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import "./
|
|
6
|
+
import { x as removeControlCharacters } from "./todoAutomation-x6guaQXc.js";
|
|
7
|
+
import "./JsonlStore-CWOA3aDH.js";
|
|
8
|
+
import { a as updateGlobalPidStatus } from "./globalPidIndex-Ca4sTr1b.js";
|
|
9
|
+
import "./pidStore-Hjba3K6Q.js";
|
|
10
|
+
import { r as recordInbox } from "./messageLog-zVGWLX7w.js";
|
|
11
|
+
import { t as pgidForWrapper } from "./reaper-iQXyufgp.js";
|
|
12
12
|
import "./configShared-YKfS6NMe.js";
|
|
13
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
14
|
-
import { A as renderLogTailLines, D as readPtysize, E as readNotes, J as isTransientLockMkdirError, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, R as snapshotStatus, S as listRecords, W as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, nt as TYPING_BADGE, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-
|
|
13
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CvLtp6LS.js";
|
|
14
|
+
import { A as renderLogTailLines, D as readPtysize, E as readNotes, J as isTransientLockMkdirError, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, R as snapshotStatus, S as listRecords, W as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, nt as TYPING_BADGE, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-DzJbnYAx.js";
|
|
15
15
|
import "./e2e-DB7BDdEA.js";
|
|
16
16
|
import "./webrtcLink-CjckgIZe.js";
|
|
17
17
|
import "./remotes-ZqD0FHl_.js";
|
|
18
18
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-BlNdDILy.js";
|
|
19
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
19
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BN-tH9dB.js";
|
|
20
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-De5tgjeO.js";
|
|
21
21
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CgXWHe9p.js";
|
|
22
|
-
import { r as spawnRejectionReason } from "./spawnGate-
|
|
22
|
+
import { r as spawnRejectionReason } from "./spawnGate-CMlGqVN4.js";
|
|
23
23
|
import yargs from "yargs";
|
|
24
24
|
import { appendFile, mkdir, open, readFile, rename, rm, stat, unlink, writeFile } from "fs/promises";
|
|
25
25
|
import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
|
|
26
26
|
import path from "path";
|
|
27
27
|
import { execFileSync } from "node:child_process";
|
|
28
|
+
import { existsSync, renameSync, watch, writeFileSync } from "node:fs";
|
|
28
29
|
import { fileURLToPath } from "node:url";
|
|
29
30
|
import { randomBytes, timingSafeEqual } from "crypto";
|
|
30
|
-
import { existsSync, renameSync, watch, writeFileSync } from "node:fs";
|
|
31
31
|
|
|
32
32
|
//#region ts/terminalReply.ts
|
|
33
33
|
/**
|
|
@@ -1612,6 +1612,52 @@ Options:
|
|
|
1612
1612
|
return new Response(e.message, { status: 500 });
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
+
const liveProjectRoots = async () => {
|
|
1616
|
+
const records = await listRecords(void 0, defaultOpts({ all: true }));
|
|
1617
|
+
return [...new Set(records.map((r) => r.cwd).filter(Boolean))];
|
|
1618
|
+
};
|
|
1619
|
+
if (req.method === "GET" && p === "/api/asks") try {
|
|
1620
|
+
const asks = await listAsks(await liveProjectRoots());
|
|
1621
|
+
return Response.json(asks);
|
|
1622
|
+
} catch (e) {
|
|
1623
|
+
return new Response(e.message, { status: 500 });
|
|
1624
|
+
}
|
|
1625
|
+
if (req.method === "POST" && p === "/api/asks/answer") {
|
|
1626
|
+
let raw;
|
|
1627
|
+
try {
|
|
1628
|
+
raw = await req.json();
|
|
1629
|
+
} catch {
|
|
1630
|
+
return new Response("invalid JSON body", { status: 400 });
|
|
1631
|
+
}
|
|
1632
|
+
if (typeof raw !== "object" || raw === null) return new Response("body must be a JSON object", { status: 400 });
|
|
1633
|
+
const { projectRoot, taskId, choice, acknowledged, expectedBlockRev } = raw;
|
|
1634
|
+
if (typeof projectRoot !== "string" || !projectRoot) return new Response("projectRoot must be a non-empty string", { status: 400 });
|
|
1635
|
+
if (typeof taskId !== "string" || !taskId) return new Response("taskId must be a non-empty string", { status: 400 });
|
|
1636
|
+
if (choice !== void 0 && typeof choice !== "string") return new Response("choice must be a string", { status: 400 });
|
|
1637
|
+
if (acknowledged !== void 0 && typeof acknowledged !== "boolean") return new Response("acknowledged must be a boolean", { status: 400 });
|
|
1638
|
+
if (expectedBlockRev !== void 0 && !Number.isSafeInteger(expectedBlockRev)) return new Response("expectedBlockRev must be a safe integer", { status: 400 });
|
|
1639
|
+
if (!(await liveProjectRoots()).includes(projectRoot)) return new Response(`no registered project at ${projectRoot}`, { status: 404 });
|
|
1640
|
+
let result;
|
|
1641
|
+
try {
|
|
1642
|
+
result = await answerAsk(projectRoot, taskId, {
|
|
1643
|
+
choice,
|
|
1644
|
+
acknowledged,
|
|
1645
|
+
expectedBlockRev
|
|
1646
|
+
});
|
|
1647
|
+
} catch (e) {
|
|
1648
|
+
return new Response(e.message, { status: 400 });
|
|
1649
|
+
}
|
|
1650
|
+
const { record: rec, answerText } = result;
|
|
1651
|
+
if (rec.owner) resolveOne(rec.owner, defaultOpts({
|
|
1652
|
+
all: true,
|
|
1653
|
+
cwdScope: projectRoot
|
|
1654
|
+
})).then((owner) => {
|
|
1655
|
+
if (!owner.fifo_file) return;
|
|
1656
|
+
const safeAnswerText = removeControlCharacters(answerText).replace(/[\r\n]+/g, " ");
|
|
1657
|
+
return writeToIpc(owner.fifo_file, `[/ask] ${taskId} answered: ${safeAnswerText}\n`);
|
|
1658
|
+
}).catch(() => {});
|
|
1659
|
+
return Response.json(rec);
|
|
1660
|
+
}
|
|
1615
1661
|
if (req.method === "GET" && p === "/api/search") {
|
|
1616
1662
|
const q = (url.searchParams.get("q") || "").trim();
|
|
1617
1663
|
if (q.length < 2) return Response.json({
|
|
@@ -1992,7 +2038,7 @@ Options:
|
|
|
1992
2038
|
}
|
|
1993
2039
|
});
|
|
1994
2040
|
if (req.method === "GET" && p === "/api/ws") {
|
|
1995
|
-
const ws = await import("./ws-
|
|
2041
|
+
const ws = await import("./ws-D5q3R1kY.js");
|
|
1996
2042
|
try {
|
|
1997
2043
|
await ws.loadProvision();
|
|
1998
2044
|
} catch (e) {
|
|
@@ -2012,7 +2058,7 @@ Options:
|
|
|
2012
2058
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2013
2059
|
const dirRaw = url.searchParams.get("path");
|
|
2014
2060
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2015
|
-
const ws = await import("./ws-
|
|
2061
|
+
const ws = await import("./ws-D5q3R1kY.js");
|
|
2016
2062
|
let prov;
|
|
2017
2063
|
try {
|
|
2018
2064
|
prov = await ws.loadProvision();
|
|
@@ -2601,7 +2647,7 @@ Options:
|
|
|
2601
2647
|
const perm = body.perm ?? "r";
|
|
2602
2648
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
2603
2649
|
try {
|
|
2604
|
-
const { createScopedShare } = await import("./agentShare-
|
|
2650
|
+
const { createScopedShare } = await import("./agentShare-CQwvWWfd.js");
|
|
2605
2651
|
const share = await createScopedShare({
|
|
2606
2652
|
agent: body.agent,
|
|
2607
2653
|
perm,
|
|
@@ -2616,12 +2662,12 @@ Options:
|
|
|
2616
2662
|
}
|
|
2617
2663
|
}
|
|
2618
2664
|
if (req.method === "GET" && p === "/api/shares") {
|
|
2619
|
-
const { listShares } = await import("./agentShare-
|
|
2665
|
+
const { listShares } = await import("./agentShare-CQwvWWfd.js");
|
|
2620
2666
|
return Response.json(listShares());
|
|
2621
2667
|
}
|
|
2622
2668
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
2623
2669
|
if (req.method === "DELETE" && revokeM) {
|
|
2624
|
-
const { revokeShare } = await import("./agentShare-
|
|
2670
|
+
const { revokeShare } = await import("./agentShare-CQwvWWfd.js");
|
|
2625
2671
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
2626
2672
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
2627
2673
|
}
|
|
@@ -2923,7 +2969,7 @@ Options:
|
|
|
2923
2969
|
const shutdown = (resolve) => {
|
|
2924
2970
|
if (heartbeat) clearInterval(heartbeat);
|
|
2925
2971
|
closeShare?.();
|
|
2926
|
-
import("./agentShare-
|
|
2972
|
+
import("./agentShare-CQwvWWfd.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
2927
2973
|
server?.stop();
|
|
2928
2974
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
2929
2975
|
};
|
|
@@ -2936,4 +2982,4 @@ Options:
|
|
|
2936
2982
|
|
|
2937
2983
|
//#endregion
|
|
2938
2984
|
export { cmdServe, resolveLocalServeUrl };
|
|
2939
|
-
//# sourceMappingURL=serve-
|
|
2985
|
+
//# sourceMappingURL=serve-m-WChRrO.js.map
|
|
@@ -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-
|
|
35
|
+
const { cmdServe } = await import("./serve-m-WChRrO.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-
|
|
45
|
+
//# sourceMappingURL=setup-fuwC5wlF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
1
|
+
import { i as readGlobalPids } from "./globalPidIndex-Ca4sTr1b.js";
|
|
2
2
|
import { n as getMinFreeMb, o as getSpawnWaitMs, t as getMaxAgents } from "./workspaceConfig-De5tgjeO.js";
|
|
3
3
|
import { readFile } from "fs/promises";
|
|
4
4
|
|
|
@@ -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-
|
|
107
|
+
//# sourceMappingURL=spawnGate-CMlGqVN4.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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
|
-
import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-
|
|
5
|
-
import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-
|
|
4
|
+
import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-Ca4sTr1b.js";
|
|
5
|
+
import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-zVGWLX7w.js";
|
|
6
6
|
import { t as loadSharedCliDefaults } from "./configShared-YKfS6NMe.js";
|
|
7
7
|
import { n as isWebrtcSpec } from "./webrtcLink-CjckgIZe.js";
|
|
8
8
|
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-ZqD0FHl_.js";
|
|
@@ -1239,23 +1239,23 @@ async function runSubcommand(argv) {
|
|
|
1239
1239
|
case "restart": return await cmdRestart(rest);
|
|
1240
1240
|
case "note": return await cmdNote(rest);
|
|
1241
1241
|
case "todo": {
|
|
1242
|
-
const { runTodoSubcommand } = await import("./todoCli-
|
|
1242
|
+
const { runTodoSubcommand } = await import("./todoCli-Cjhx3DqQ.js");
|
|
1243
1243
|
return runTodoSubcommand(rest);
|
|
1244
1244
|
}
|
|
1245
1245
|
case "serve": {
|
|
1246
|
-
const { cmdServe } = await import("./serve-
|
|
1246
|
+
const { cmdServe } = await import("./serve-m-WChRrO.js");
|
|
1247
1247
|
return cmdServe(rest);
|
|
1248
1248
|
}
|
|
1249
1249
|
case "setup": {
|
|
1250
|
-
const { cmdSetup } = await import("./setup-
|
|
1250
|
+
const { cmdSetup } = await import("./setup-fuwC5wlF.js");
|
|
1251
1251
|
return cmdSetup(rest);
|
|
1252
1252
|
}
|
|
1253
1253
|
case "ws": {
|
|
1254
|
-
const { cmdWs } = await import("./ws-
|
|
1254
|
+
const { cmdWs } = await import("./ws-D5q3R1kY.js");
|
|
1255
1255
|
return cmdWs(rest);
|
|
1256
1256
|
}
|
|
1257
1257
|
case "schedule": {
|
|
1258
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1258
|
+
const { cmdSchedule } = await import("./schedule-D0O3sb5A.js");
|
|
1259
1259
|
return cmdSchedule(rest);
|
|
1260
1260
|
}
|
|
1261
1261
|
case "remote": {
|
|
@@ -1267,11 +1267,11 @@ async function runSubcommand(argv) {
|
|
|
1267
1267
|
return cmdExpose(rest);
|
|
1268
1268
|
}
|
|
1269
1269
|
case "callback": {
|
|
1270
|
-
const { cmdCallback } = await import("./callback-
|
|
1270
|
+
const { cmdCallback } = await import("./callback-BFZDARQq.js");
|
|
1271
1271
|
return cmdCallback(rest);
|
|
1272
1272
|
}
|
|
1273
1273
|
case "reap":
|
|
1274
|
-
await (await import("./reaper-
|
|
1274
|
+
await (await import("./reaper-pJpMYKmj.js")).sweep();
|
|
1275
1275
|
return 0;
|
|
1276
1276
|
case "help": return cmdHelp(managerCommands);
|
|
1277
1277
|
default: return null;
|
|
@@ -4305,7 +4305,7 @@ async function cmdNotify(rest) {
|
|
|
4305
4305
|
}
|
|
4306
4306
|
const ensure = async () => {
|
|
4307
4307
|
if (!argv["ensure-daemon"]) return;
|
|
4308
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4308
|
+
const { ensureDaemon } = await import("./notifyDaemon-CENKHs1M.js");
|
|
4309
4309
|
await ensureDaemon().catch(() => null);
|
|
4310
4310
|
};
|
|
4311
4311
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4379,7 +4379,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4379
4379
|
}
|
|
4380
4380
|
async function cmdNotifyd(rest) {
|
|
4381
4381
|
const sub = rest[0] ?? "status";
|
|
4382
|
-
const daemon = await import("./notifyDaemon-
|
|
4382
|
+
const daemon = await import("./notifyDaemon-CENKHs1M.js");
|
|
4383
4383
|
switch (sub) {
|
|
4384
4384
|
case "run": return daemon.runDaemon();
|
|
4385
4385
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4406,4 +4406,4 @@ async function cmdNotifyd(rest) {
|
|
|
4406
4406
|
|
|
4407
4407
|
//#endregion
|
|
4408
4408
|
export { daemonLockDir as $, renderLogTailLines as A, stopTipForCli as B, matchKeyword as C, readPtysize as D, readNotes as E, resolveResumeArgs as F, appendEvent as G, waitForLogQuiet as H, restartHintLines as I, isTransientLockMkdirError as J, gcInboxes as K, runSubcommand as L, renderRawLogLines as M, resolveOne as N, recentMessageEdges as O, resolveReadWindow as P, shouldStealLock as Q, snapshotStatus as R, listRecords as S, readAgentPtysize as T, writeKeysPaced as U, submitAndConfirm as V, writeToIpc as W, liveWatchers as X, listInboxParents as Y, readInbox as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, daemonLockOwnerPath as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderRawLog as j, recentReadEdges as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, TYPING_BADGE as nt, controlCodeFromName as o, extractTaskCounts as p, hostId as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, notifyDir as tt, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stdinActivityPath as z };
|
|
4409
|
-
//# sourceMappingURL=subcommands-
|
|
4409
|
+
//# sourceMappingURL=subcommands-DzJbnYAx.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
3
|
-
import "./messageLog-
|
|
2
|
+
import "./globalPidIndex-Ca4sTr1b.js";
|
|
3
|
+
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./configShared-YKfS6NMe.js";
|
|
5
|
-
import { A as renderLogTailLines, B as stopTipForCli, C as matchKeyword, D as readPtysize, E as readNotes, F as resolveResumeArgs, H as waitForLogQuiet, I as restartHintLines, L as runSubcommand, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, P as resolveReadWindow, R as snapshotStatus, S as listRecords, T as readAgentPtysize, U as writeKeysPaced, V as submitAndConfirm, W as writeToIpc, _ 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 renderRawLog, k as recentReadEdges, 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 stdinActivityPath } from "./subcommands-
|
|
5
|
+
import { A as renderLogTailLines, B as stopTipForCli, C as matchKeyword, D as readPtysize, E as readNotes, F as resolveResumeArgs, H as waitForLogQuiet, I as restartHintLines, L as runSubcommand, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, P as resolveReadWindow, R as snapshotStatus, S as listRecords, T as readAgentPtysize, U as writeKeysPaced, V as submitAndConfirm, W as writeToIpc, _ 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 renderRawLog, k as recentReadEdges, 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 stdinActivityPath } from "./subcommands-DzJbnYAx.js";
|
|
6
6
|
import "./e2e-DB7BDdEA.js";
|
|
7
7
|
import "./webrtcLink-CjckgIZe.js";
|
|
8
8
|
import "./remotes-ZqD0FHl_.js";
|