agent-yes 1.235.1 → 1.236.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/{SUPPORTED_CLIS-DS815H76.js → SUPPORTED_CLIS-BDXbzEWF.js} +3 -3
- package/dist/{SUPPORTED_CLIS-Cn6VL_pU.js → SUPPORTED_CLIS-C7bkkXue.js} +2 -2
- package/dist/{agentShare-DPpEOa6M.js → agentShare-BxAaZ-UR.js} +3 -3
- package/dist/{callback-BBi7cQME.js → callback-B1AWp2tC.js} +3 -3
- package/dist/{callback-BHNjyXNU.js → callback-Dtk0wMsl.js} +3 -3
- package/dist/cli.js +16 -8
- package/dist/cwdDeprecation-BGX20-Fe.js +78 -0
- package/dist/{expose-IjObc0ox.js → expose-ByT4ef7C.js} +1 -1
- package/dist/{forkNested-D11UZMk8.js → forkNested-Bai0Q7BL.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{nodeRuntime-BF_kAOwO.js → nodeRuntime-fVRbz6w6.js} +1 -1
- package/dist/{notifyDaemon-Bk9j9x7S.js → notifyDaemon-Cxb0-5a0.js} +3 -3
- package/dist/{openBrowser-BkfVWvPx.js → openBrowser-DL-EO8Hi.js} +1 -1
- package/dist/{remotes-BM3Zm8Wh.js → remotes-BDdfhL6N.js} +2 -2
- package/dist/{remotes-CgXeqjac.js → remotes-CF1LJLxY.js} +1 -1
- package/dist/{rustBinary-DBdtA_Nk.js → rustBinary-CFSG7it2.js} +2 -2
- package/dist/{schedule-Cszo4hwr.js → schedule-CXHdiUHa.js} +6 -6
- package/dist/{serve-BLWE9Qgt.js → serve-DEEwIlVV.js} +22 -22
- package/dist/{setup-9kmSPmaW.js → setup-QfDtv5tw.js} +3 -3
- package/dist/{spawnGate-DQRr_Gsy.js → spawnGate-C21TL4f2.js} +1 -1
- package/dist/{spawnGate-CRMR19Ql.js → spawnGate-PwzImpOw.js} +2 -2
- package/dist/{subcommands-8qeO_aMF.js → subcommands-_Ci82sb1.js} +13 -13
- package/dist/{subcommands-CnkEQfyK.js → subcommands-m2DRpvHt.js} +2 -2
- package/dist/{todoCli-C6o6EP1r.js → todoCli-CAMVVz9u.js} +1 -1
- package/dist/{tray-DaNqCsZM.js → tray-CF8xRQqt.js} +1 -1
- package/dist/{ts-HOZtW52L.js → ts-D1FDmhc-.js} +2 -2
- package/dist/{versionChecker-t-qt-HYQ.js → versionChecker-DJEtU1JU.js} +2 -2
- package/dist/{webrtcRemote-BhJlxnpJ.js → webrtcRemote-CNC_bMH6.js} +1 -1
- package/dist/{workspaceConfig-DWLYPDdx.js → workspaceConfig-CuGjX2_R.js} +1 -1
- package/dist/{ws-BcRnKVFY.js → ws-C7B4xWQl.js} +4 -4
- package/package.json +1 -1
- package/ts/cli.ts +14 -0
- package/ts/cwdDeprecation.spec.ts +61 -0
- package/ts/cwdDeprecation.ts +92 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-D1FDmhc-.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-DJEtU1JU.js";
|
|
4
4
|
import "./todoAutomation-x6guaQXc.js";
|
|
5
5
|
import "./JsonlStore-CWOA3aDH.js";
|
|
6
6
|
import "./globalPidIndex-Ca4sTr1b.js";
|
|
7
7
|
import "./pidStore-Hjba3K6Q.js";
|
|
8
8
|
import "./messageLog-zVGWLX7w.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C7bkkXue.js";
|
|
10
10
|
|
|
11
11
|
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-D1FDmhc-.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-C7bkkXue.js.map
|
|
@@ -3,9 +3,9 @@ import "./globalPidIndex-Ca4sTr1b.js";
|
|
|
3
3
|
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./e2e-CYlKpfxa.js";
|
|
5
5
|
import "./configShared-BXz2vi4Q.js";
|
|
6
|
-
import { N as resolveOne } from "./subcommands-
|
|
6
|
+
import { N as resolveOne } from "./subcommands-_Ci82sb1.js";
|
|
7
7
|
import "./webrtcLink-CEYNs0pt.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-BDdfhL6N.js";
|
|
9
9
|
import { a as startShare } from "./share-D4K0JnHg.js";
|
|
10
10
|
|
|
11
11
|
//#region ts/agentShare.ts
|
|
@@ -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-BxAaZ-UR.js.map
|
|
@@ -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-_Ci82sb1.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-Me97qn68.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-DEEwIlVV.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-B1AWp2tC.js.map
|
|
@@ -3,10 +3,10 @@ import "./globalPidIndex-Ca4sTr1b.js";
|
|
|
3
3
|
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./e2e-CYlKpfxa.js";
|
|
5
5
|
import "./configShared-BXz2vi4Q.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-_Ci82sb1.js";
|
|
7
7
|
import "./webrtcLink-CEYNs0pt.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-BDdfhL6N.js";
|
|
9
9
|
import "./callbackCore-Me97qn68.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-B1AWp2tC.js";
|
|
11
11
|
|
|
12
12
|
export { cmdCallback };
|
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-DJEtU1JU.js";
|
|
5
|
+
import { n as getRustBinary } from "./rustBinary-CFSG7it2.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-m2DRpvHt.js");
|
|
289
289
|
if (isHelpFlag && process.argv.length === 3) {
|
|
290
290
|
await cmdHelp(managerCommands);
|
|
291
291
|
process.exit(0);
|
|
@@ -295,20 +295,28 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
295
295
|
process.exit(code ?? 0);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
+
{
|
|
299
|
+
const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation-BGX20-Fe.js");
|
|
300
|
+
const dep = detectCwdDeprecation(process.argv);
|
|
301
|
+
if (dep) {
|
|
302
|
+
console.warn(dep.message);
|
|
303
|
+
process.env[SUPPRESS_CWD_WARN_ENV] = "1";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
298
306
|
await checkAndAutoUpdate();
|
|
299
307
|
logger.info(versionString());
|
|
300
308
|
const config = parseCliArgs(process.argv);
|
|
301
309
|
if (config.tray) {
|
|
302
|
-
const { startTray } = await import("./tray-
|
|
310
|
+
const { startTray } = await import("./tray-CF8xRQqt.js");
|
|
303
311
|
await startTray();
|
|
304
312
|
await new Promise(() => {});
|
|
305
313
|
}
|
|
306
314
|
{
|
|
307
|
-
const { ensureTray } = await import("./tray-
|
|
315
|
+
const { ensureTray } = await import("./tray-CF8xRQqt.js");
|
|
308
316
|
ensureTray();
|
|
309
317
|
}
|
|
310
318
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
311
|
-
const { waitForSpawnCapacity } = await import("./spawnGate-
|
|
319
|
+
const { waitForSpawnCapacity } = await import("./spawnGate-C21TL4f2.js");
|
|
312
320
|
await waitForSpawnCapacity({
|
|
313
321
|
onWait: (reason, waitedMs) => {
|
|
314
322
|
if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
|
|
@@ -331,14 +339,14 @@ if (config.useRust) {
|
|
|
331
339
|
}
|
|
332
340
|
}
|
|
333
341
|
if (rustBinary) {
|
|
334
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
342
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BDXbzEWF.js");
|
|
335
343
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
336
344
|
if (config.verbose) {
|
|
337
345
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
338
346
|
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
339
347
|
}
|
|
340
348
|
const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
|
|
341
|
-
const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-
|
|
349
|
+
const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-Bai0Q7BL.js");
|
|
342
350
|
if (shouldForkNested({
|
|
343
351
|
isTTY: Boolean(process.stdout.isTTY),
|
|
344
352
|
ayPid: process.env.AGENT_YES_PID,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//#region ts/cwdDeprecation.ts
|
|
2
|
+
/**
|
|
3
|
+
* `--cwd <dir>` on an agent run is deprecated.
|
|
4
|
+
*
|
|
5
|
+
* It used to pick the directory the agent runs in. The shell already does this
|
|
6
|
+
* better: `cd <dir> && <same command>` puts the agent AND every relative path in
|
|
7
|
+
* the command in the same place, with no agent-yes-specific flag to remember.
|
|
8
|
+
* This module detects the flag on a raw argv and builds the copy-pasteable
|
|
9
|
+
* migration hint we print before continuing (the flag still works for now).
|
|
10
|
+
*
|
|
11
|
+
* Scope: the agent-run path only (ts/cli.ts). Management subcommands that take a
|
|
12
|
+
* `--cwd` FILTER (`ay ls/status/spawn/schedule …`) are a different flag and are
|
|
13
|
+
* not deprecated — they never reach this code because subcommands are dispatched
|
|
14
|
+
* earlier. The Rust runner mirrors this warning in rs/src/main.rs for direct
|
|
15
|
+
* `agent-yes` invocations that bypass this launcher.
|
|
16
|
+
*/
|
|
17
|
+
/** Env var the JS launcher sets on the spawned Rust child so the warning, once
|
|
18
|
+
* printed here, is not printed a second time by the Rust runner. Mirrored in
|
|
19
|
+
* rs/src/main.rs. */
|
|
20
|
+
const SUPPRESS_CWD_WARN_ENV = "AGENT_YES_SUPPRESS_CWD_WARN";
|
|
21
|
+
/**
|
|
22
|
+
* Quote a single argv token for display in a copy-pasteable shell command.
|
|
23
|
+
* Leaves shell-safe tokens (including a leading `~`/`~/path`, so `cd ~/foo`
|
|
24
|
+
* still expands) bare; single-quotes anything else.
|
|
25
|
+
*/
|
|
26
|
+
function shellDisplayQuote(s) {
|
|
27
|
+
if (s === "") return "''";
|
|
28
|
+
if (/^[A-Za-z0-9_@%+=:,./~-]+$/.test(s)) return s;
|
|
29
|
+
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
30
|
+
}
|
|
31
|
+
/** Program name as the user typed it, derived from argv[1] (the launched script). */
|
|
32
|
+
function programName(scriptPath) {
|
|
33
|
+
if (!scriptPath) return "agent-yes";
|
|
34
|
+
return (scriptPath.split(/[\\/]/).pop() || scriptPath).replace(/\.(js|ts|mjs|cjs)$/, "");
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Detect a deprecated `--cwd <dir>` / `--cwd=<dir>` flag on a full process.argv
|
|
38
|
+
* (`[exec, script, ...userArgs]`). Returns the migration hint, or null when no
|
|
39
|
+
* `--cwd` flag is present.
|
|
40
|
+
*/
|
|
41
|
+
function detectCwdDeprecation(argv) {
|
|
42
|
+
const prog = programName(argv[1]);
|
|
43
|
+
const userArgs = argv.slice(2);
|
|
44
|
+
let sawCwd = false;
|
|
45
|
+
let dir;
|
|
46
|
+
const rest = [];
|
|
47
|
+
for (let i = 0; i < userArgs.length; i++) {
|
|
48
|
+
const arg = userArgs[i];
|
|
49
|
+
if (arg === "--cwd") {
|
|
50
|
+
sawCwd = true;
|
|
51
|
+
const next = userArgs[i + 1];
|
|
52
|
+
if (next !== void 0 && !next.startsWith("-")) {
|
|
53
|
+
dir = next;
|
|
54
|
+
i++;
|
|
55
|
+
}
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (arg.startsWith("--cwd=")) {
|
|
59
|
+
sawCwd = true;
|
|
60
|
+
dir = arg.slice(6);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
rest.push(arg);
|
|
64
|
+
}
|
|
65
|
+
if (!sawCwd) return null;
|
|
66
|
+
const cmd = [prog, ...rest].map(shellDisplayQuote).join(" ");
|
|
67
|
+
const suggestion = `cd ${dir === void 0 ? "<dir>" : shellDisplayQuote(dir)} && ${cmd}`;
|
|
68
|
+
const message = `\x1b[33m⚠ --cwd is deprecated.\x1b[0m Run the command in the target directory instead:\n\n ${suggestion}`;
|
|
69
|
+
return {
|
|
70
|
+
dir,
|
|
71
|
+
suggestion,
|
|
72
|
+
message
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { SUPPRESS_CWD_WARN_ENV, detectCwdDeprecation };
|
|
78
|
+
//# sourceMappingURL=cwdDeprecation-BGX20-Fe.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
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-D1FDmhc-.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-DJEtU1JU.js";
|
|
4
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
5
|
import "./JsonlStore-CWOA3aDH.js";
|
|
6
6
|
import "./globalPidIndex-Ca4sTr1b.js";
|
|
@@ -3,9 +3,9 @@ import "./globalPidIndex-Ca4sTr1b.js";
|
|
|
3
3
|
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./e2e-CYlKpfxa.js";
|
|
5
5
|
import "./configShared-BXz2vi4Q.js";
|
|
6
|
-
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-
|
|
6
|
+
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-_Ci82sb1.js";
|
|
7
7
|
import "./webrtcLink-CEYNs0pt.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-BDdfhL6N.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-Cxb0-5a0.js.map
|
|
@@ -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-
|
|
89
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-CNC_bMH6.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-
|
|
176
|
+
//# sourceMappingURL=remotes-BDdfhL6N.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./e2e-CYlKpfxa.js";
|
|
2
2
|
import "./webrtcLink-CEYNs0pt.js";
|
|
3
|
-
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-
|
|
3
|
+
import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-BDdfhL6N.js";
|
|
4
4
|
|
|
5
5
|
export { cmdRemote };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-DJEtU1JU.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-CFSG7it2.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-D1FDmhc-.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-DJEtU1JU.js";
|
|
4
4
|
import "./todoAutomation-x6guaQXc.js";
|
|
5
5
|
import "./JsonlStore-CWOA3aDH.js";
|
|
6
6
|
import "./globalPidIndex-Ca4sTr1b.js";
|
|
7
7
|
import "./pidStore-Hjba3K6Q.js";
|
|
8
8
|
import "./messageLog-zVGWLX7w.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
-
import { d as resolveSpawnCwd } from "./workspaceConfig-
|
|
11
|
-
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C7bkkXue.js";
|
|
10
|
+
import { d as resolveSpawnCwd } from "./workspaceConfig-CuGjX2_R.js";
|
|
11
|
+
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-fVRbz6w6.js";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
13
|
|
|
14
14
|
//#region ts/oxmgrService.ts
|
|
@@ -153,4 +153,4 @@ async function cmdSchedule(rest) {
|
|
|
153
153
|
|
|
154
154
|
//#endregion
|
|
155
155
|
export { cmdSchedule };
|
|
156
|
-
//# sourceMappingURL=schedule-
|
|
156
|
+
//# sourceMappingURL=schedule-CXHdiUHa.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-
|
|
1
|
+
import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-D1FDmhc-.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-DJEtU1JU.js";
|
|
4
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-CFSG7it2.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-CtHb5b71.js";
|
|
6
6
|
import { x as removeControlCharacters } from "./todoAutomation-x6guaQXc.js";
|
|
7
7
|
import "./JsonlStore-CWOA3aDH.js";
|
|
@@ -11,15 +11,15 @@ import { r as recordInbox } from "./messageLog-zVGWLX7w.js";
|
|
|
11
11
|
import { t as pgidForWrapper } from "./reaper-iQXyufgp.js";
|
|
12
12
|
import "./e2e-CYlKpfxa.js";
|
|
13
13
|
import "./configShared-BXz2vi4Q.js";
|
|
14
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
15
|
-
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-
|
|
14
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C7bkkXue.js";
|
|
15
|
+
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-_Ci82sb1.js";
|
|
16
16
|
import "./webrtcLink-CEYNs0pt.js";
|
|
17
|
-
import "./remotes-
|
|
17
|
+
import "./remotes-BDdfhL6N.js";
|
|
18
18
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Me97qn68.js";
|
|
19
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
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-
|
|
21
|
-
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-
|
|
22
|
-
import { r as spawnRejectionReason } from "./spawnGate-
|
|
19
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-B1AWp2tC.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-CuGjX2_R.js";
|
|
21
|
+
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-fVRbz6w6.js";
|
|
22
|
+
import { r as spawnRejectionReason } from "./spawnGate-PwzImpOw.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";
|
|
@@ -952,7 +952,7 @@ async function cmdServeDaemon(sub, args) {
|
|
|
952
952
|
if (!webrtcDaemon) return;
|
|
953
953
|
if (shareLink) {
|
|
954
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` : ``));
|
|
955
|
-
const { offerOpenInBrowser } = await import("./openBrowser-
|
|
955
|
+
const { offerOpenInBrowser } = await import("./openBrowser-DL-EO8Hi.js");
|
|
956
956
|
await offerOpenInBrowser(shareLink);
|
|
957
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");
|
|
958
958
|
};
|
|
@@ -2038,7 +2038,7 @@ Options:
|
|
|
2038
2038
|
}
|
|
2039
2039
|
});
|
|
2040
2040
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2041
|
-
const ws = await import("./ws-
|
|
2041
|
+
const ws = await import("./ws-C7B4xWQl.js");
|
|
2042
2042
|
try {
|
|
2043
2043
|
await ws.loadProvision();
|
|
2044
2044
|
} catch (e) {
|
|
@@ -2058,7 +2058,7 @@ Options:
|
|
|
2058
2058
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2059
2059
|
const dirRaw = url.searchParams.get("path");
|
|
2060
2060
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2061
|
-
const ws = await import("./ws-
|
|
2061
|
+
const ws = await import("./ws-C7B4xWQl.js");
|
|
2062
2062
|
let prov;
|
|
2063
2063
|
try {
|
|
2064
2064
|
prov = await ws.loadProvision();
|
|
@@ -2647,7 +2647,7 @@ Options:
|
|
|
2647
2647
|
const perm = body.perm ?? "r";
|
|
2648
2648
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
2649
2649
|
try {
|
|
2650
|
-
const { createScopedShare } = await import("./agentShare-
|
|
2650
|
+
const { createScopedShare } = await import("./agentShare-BxAaZ-UR.js");
|
|
2651
2651
|
const share = await createScopedShare({
|
|
2652
2652
|
agent: body.agent,
|
|
2653
2653
|
perm,
|
|
@@ -2662,12 +2662,12 @@ Options:
|
|
|
2662
2662
|
}
|
|
2663
2663
|
}
|
|
2664
2664
|
if (req.method === "GET" && p === "/api/shares") {
|
|
2665
|
-
const { listShares } = await import("./agentShare-
|
|
2665
|
+
const { listShares } = await import("./agentShare-BxAaZ-UR.js");
|
|
2666
2666
|
return Response.json(listShares());
|
|
2667
2667
|
}
|
|
2668
2668
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
2669
2669
|
if (req.method === "DELETE" && revokeM) {
|
|
2670
|
-
const { revokeShare } = await import("./agentShare-
|
|
2670
|
+
const { revokeShare } = await import("./agentShare-BxAaZ-UR.js");
|
|
2671
2671
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
2672
2672
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
2673
2673
|
}
|
|
@@ -2681,7 +2681,7 @@ Options:
|
|
|
2681
2681
|
const port = Number(body.port);
|
|
2682
2682
|
if (!Number.isInteger(port) || port < 1 || port > 65535) return new Response("valid port required", { status: 400 });
|
|
2683
2683
|
try {
|
|
2684
|
-
const { ensureExposure } = await import("./expose-
|
|
2684
|
+
const { ensureExposure } = await import("./expose-ByT4ef7C.js");
|
|
2685
2685
|
const h = await ensureExposure(port, body.relay);
|
|
2686
2686
|
return Response.json({
|
|
2687
2687
|
id: h.id,
|
|
@@ -2695,12 +2695,12 @@ Options:
|
|
|
2695
2695
|
}
|
|
2696
2696
|
}
|
|
2697
2697
|
if (req.method === "GET" && p === "/api/exposes") {
|
|
2698
|
-
const { listExposures } = await import("./expose-
|
|
2698
|
+
const { listExposures } = await import("./expose-ByT4ef7C.js");
|
|
2699
2699
|
return Response.json(listExposures());
|
|
2700
2700
|
}
|
|
2701
2701
|
const unexposeM = /^\/api\/expose\/(\d+)$/.exec(p);
|
|
2702
2702
|
if (req.method === "DELETE" && unexposeM) {
|
|
2703
|
-
const { stopExposure } = await import("./expose-
|
|
2703
|
+
const { stopExposure } = await import("./expose-ByT4ef7C.js");
|
|
2704
2704
|
const ok = stopExposure(Number(unexposeM[1]));
|
|
2705
2705
|
return new Response(ok ? "revoked" : "no such exposure", { status: ok ? 200 : 404 });
|
|
2706
2706
|
}
|
|
@@ -2927,7 +2927,7 @@ Options:
|
|
|
2927
2927
|
const persistNote = explicitUrl ? "\n" : ` (persistent room — same link across restarts; delete ~/.agent-yes/.share-room to rotate)\n\n`;
|
|
2928
2928
|
process.stdout.write(`${wantHttp ? "\n" : ""}${lead}:\n ${link}\n` + persistNote);
|
|
2929
2929
|
if (!rotated) {
|
|
2930
|
-
const { offerOpenInBrowser } = await import("./openBrowser-
|
|
2930
|
+
const { offerOpenInBrowser } = await import("./openBrowser-DL-EO8Hi.js");
|
|
2931
2931
|
await offerOpenInBrowser(link);
|
|
2932
2932
|
}
|
|
2933
2933
|
} else {
|
|
@@ -2969,7 +2969,7 @@ Options:
|
|
|
2969
2969
|
const shutdown = (resolve) => {
|
|
2970
2970
|
if (heartbeat) clearInterval(heartbeat);
|
|
2971
2971
|
closeShare?.();
|
|
2972
|
-
import("./agentShare-
|
|
2972
|
+
import("./agentShare-BxAaZ-UR.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
2973
2973
|
server?.stop();
|
|
2974
2974
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
2975
2975
|
};
|
|
@@ -2982,4 +2982,4 @@ Options:
|
|
|
2982
2982
|
|
|
2983
2983
|
//#endregion
|
|
2984
2984
|
export { cmdServe, resolveLocalServeUrl };
|
|
2985
|
-
//# sourceMappingURL=serve-
|
|
2985
|
+
//# sourceMappingURL=serve-DEEwIlVV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as setWorkspaceRoot, s as getWorkspaceRoot } from "./workspaceConfig-
|
|
1
|
+
import { f as setWorkspaceRoot, s as getWorkspaceRoot } from "./workspaceConfig-CuGjX2_R.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-
|
|
35
|
+
const { cmdServe } = await import("./serve-DEEwIlVV.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-QfDtv5tw.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import "./globalPidIndex-Ca4sTr1b.js";
|
|
3
|
-
import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-
|
|
3
|
+
import { i as waitForSpawnCapacity, n as spawnGateEnabled, r as spawnRejectionReason, t as memAvailableMb } from "./spawnGate-PwzImpOw.js";
|
|
4
4
|
|
|
5
5
|
export { waitForSpawnCapacity };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as readGlobalPids } from "./globalPidIndex-Ca4sTr1b.js";
|
|
2
|
-
import { n as getMinFreeMb, o as getSpawnWaitMs, t as getMaxAgents } from "./workspaceConfig-
|
|
2
|
+
import { n as getMinFreeMb, o as getSpawnWaitMs, t as getMaxAgents } from "./workspaceConfig-CuGjX2_R.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-
|
|
107
|
+
//# sourceMappingURL=spawnGate-PwzImpOw.js.map
|
|
@@ -5,7 +5,7 @@ import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidInde
|
|
|
5
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-BXz2vi4Q.js";
|
|
7
7
|
import { n as isWebrtcSpec } from "./webrtcLink-CEYNs0pt.js";
|
|
8
|
-
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-
|
|
8
|
+
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-BDdfhL6N.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";
|
|
@@ -1241,7 +1241,7 @@ async function runSubcommand(argv) {
|
|
|
1241
1241
|
case "restart": return await cmdRestart(rest);
|
|
1242
1242
|
case "note": return await cmdNote(rest);
|
|
1243
1243
|
case "todo": {
|
|
1244
|
-
const { runTodoSubcommand } = await import("./todoCli-
|
|
1244
|
+
const { runTodoSubcommand } = await import("./todoCli-CAMVVz9u.js");
|
|
1245
1245
|
return runTodoSubcommand(rest);
|
|
1246
1246
|
}
|
|
1247
1247
|
case "ch":
|
|
@@ -1250,31 +1250,31 @@ async function runSubcommand(argv) {
|
|
|
1250
1250
|
return cmdCh(rest);
|
|
1251
1251
|
}
|
|
1252
1252
|
case "serve": {
|
|
1253
|
-
const { cmdServe } = await import("./serve-
|
|
1253
|
+
const { cmdServe } = await import("./serve-DEEwIlVV.js");
|
|
1254
1254
|
return cmdServe(rest);
|
|
1255
1255
|
}
|
|
1256
1256
|
case "setup": {
|
|
1257
|
-
const { cmdSetup } = await import("./setup-
|
|
1257
|
+
const { cmdSetup } = await import("./setup-QfDtv5tw.js");
|
|
1258
1258
|
return cmdSetup(rest);
|
|
1259
1259
|
}
|
|
1260
1260
|
case "ws": {
|
|
1261
|
-
const { cmdWs } = await import("./ws-
|
|
1261
|
+
const { cmdWs } = await import("./ws-C7B4xWQl.js");
|
|
1262
1262
|
return cmdWs(rest);
|
|
1263
1263
|
}
|
|
1264
1264
|
case "schedule": {
|
|
1265
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1265
|
+
const { cmdSchedule } = await import("./schedule-CXHdiUHa.js");
|
|
1266
1266
|
return cmdSchedule(rest);
|
|
1267
1267
|
}
|
|
1268
1268
|
case "remote": {
|
|
1269
|
-
const { cmdRemote } = await import("./remotes-
|
|
1269
|
+
const { cmdRemote } = await import("./remotes-CF1LJLxY.js");
|
|
1270
1270
|
return cmdRemote(rest);
|
|
1271
1271
|
}
|
|
1272
1272
|
case "expose": {
|
|
1273
|
-
const { cmdExpose } = await import("./expose-
|
|
1273
|
+
const { cmdExpose } = await import("./expose-ByT4ef7C.js");
|
|
1274
1274
|
return cmdExpose(rest);
|
|
1275
1275
|
}
|
|
1276
1276
|
case "callback": {
|
|
1277
|
-
const { cmdCallback } = await import("./callback-
|
|
1277
|
+
const { cmdCallback } = await import("./callback-Dtk0wMsl.js");
|
|
1278
1278
|
return cmdCallback(rest);
|
|
1279
1279
|
}
|
|
1280
1280
|
case "reap":
|
|
@@ -1692,7 +1692,7 @@ async function fetchRemoteRecordsRaw(url, token, opts) {
|
|
|
1692
1692
|
let base = url;
|
|
1693
1693
|
let bearer = token;
|
|
1694
1694
|
if (isWebrtcSpec(url)) {
|
|
1695
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
1695
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-CNC_bMH6.js");
|
|
1696
1696
|
bridge = await startWebrtcBridge(url);
|
|
1697
1697
|
base = bridge.baseUrl;
|
|
1698
1698
|
bearer = bridge.token;
|
|
@@ -4312,7 +4312,7 @@ async function cmdNotify(rest) {
|
|
|
4312
4312
|
}
|
|
4313
4313
|
const ensure = async () => {
|
|
4314
4314
|
if (!argv["ensure-daemon"]) return;
|
|
4315
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4315
|
+
const { ensureDaemon } = await import("./notifyDaemon-Cxb0-5a0.js");
|
|
4316
4316
|
await ensureDaemon().catch(() => null);
|
|
4317
4317
|
};
|
|
4318
4318
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4386,7 +4386,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4386
4386
|
}
|
|
4387
4387
|
async function cmdNotifyd(rest) {
|
|
4388
4388
|
const sub = rest[0] ?? "status";
|
|
4389
|
-
const daemon = await import("./notifyDaemon-
|
|
4389
|
+
const daemon = await import("./notifyDaemon-Cxb0-5a0.js");
|
|
4390
4390
|
switch (sub) {
|
|
4391
4391
|
case "run": return daemon.runDaemon();
|
|
4392
4392
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4413,4 +4413,4 @@ async function cmdNotifyd(rest) {
|
|
|
4413
4413
|
|
|
4414
4414
|
//#endregion
|
|
4415
4415
|
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 };
|
|
4416
|
-
//# sourceMappingURL=subcommands-
|
|
4416
|
+
//# sourceMappingURL=subcommands-_Ci82sb1.js.map
|
|
@@ -3,8 +3,8 @@ import "./globalPidIndex-Ca4sTr1b.js";
|
|
|
3
3
|
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./e2e-CYlKpfxa.js";
|
|
5
5
|
import "./configShared-BXz2vi4Q.js";
|
|
6
|
-
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-
|
|
6
|
+
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-_Ci82sb1.js";
|
|
7
7
|
import "./webrtcLink-CEYNs0pt.js";
|
|
8
|
-
import "./remotes-
|
|
8
|
+
import "./remotes-BDdfhL6N.js";
|
|
9
9
|
|
|
10
10
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-DJEtU1JU.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
|
|
4
4
|
import { d as openStore, p as LIFECYCLES, x as removeControlCharacters } from "./todoAutomation-x6guaQXc.js";
|
|
5
5
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-BFk3Mo8K.js";
|
|
@@ -2044,4 +2044,4 @@ function sleep(ms) {
|
|
|
2044
2044
|
|
|
2045
2045
|
//#endregion
|
|
2046
2046
|
export { hasTodoStore as a, AgentContext as c, answerAsk as i, CLAUDE_SESSION_PIN_ENV as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t };
|
|
2047
|
-
//# sourceMappingURL=ts-
|
|
2047
|
+
//# sourceMappingURL=ts-D1FDmhc-.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "agent-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.236.0";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ts/versionChecker.ts
|
|
@@ -215,4 +215,4 @@ async function displayVersion() {
|
|
|
215
215
|
|
|
216
216
|
//#endregion
|
|
217
217
|
export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
|
|
218
|
-
//# sourceMappingURL=versionChecker-
|
|
218
|
+
//# sourceMappingURL=versionChecker-DJEtU1JU.js.map
|
|
@@ -193,4 +193,4 @@ function resolveSpawnCwd(input) {
|
|
|
193
193
|
|
|
194
194
|
//#endregion
|
|
195
195
|
export { getSpawnHook as a, hasProvisionHook as c, resolveSpawnCwd as d, setWorkspaceRoot as f, getProvisionRoot as i, hasSpawnHook as l, getMinFreeMb as n, getSpawnWaitMs as o, getProvisionHook as r, getWorkspaceRoot as s, getMaxAgents as t, isProvisionAllowed as u };
|
|
196
|
-
//# sourceMappingURL=workspaceConfig-
|
|
196
|
+
//# sourceMappingURL=workspaceConfig-CuGjX2_R.js.map
|
|
@@ -3,10 +3,10 @@ import "./globalPidIndex-Ca4sTr1b.js";
|
|
|
3
3
|
import "./messageLog-zVGWLX7w.js";
|
|
4
4
|
import "./e2e-CYlKpfxa.js";
|
|
5
5
|
import "./configShared-BXz2vi4Q.js";
|
|
6
|
-
import { S as listRecords } from "./subcommands-
|
|
6
|
+
import { S as listRecords } from "./subcommands-_Ci82sb1.js";
|
|
7
7
|
import "./webrtcLink-CEYNs0pt.js";
|
|
8
|
-
import "./remotes-
|
|
9
|
-
import { i as getProvisionRoot } from "./workspaceConfig-
|
|
8
|
+
import "./remotes-BDdfhL6N.js";
|
|
9
|
+
import { i as getProvisionRoot } from "./workspaceConfig-CuGjX2_R.js";
|
|
10
10
|
import { existsSync } from "fs";
|
|
11
11
|
import { lstat, opendir } from "fs/promises";
|
|
12
12
|
import path from "path";
|
|
@@ -418,4 +418,4 @@ async function cmdWs(args) {
|
|
|
418
418
|
|
|
419
419
|
//#endregion
|
|
420
420
|
export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, workspaceStatus };
|
|
421
|
-
//# sourceMappingURL=ws-
|
|
421
|
+
//# sourceMappingURL=ws-C7B4xWQl.js.map
|
package/package.json
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -39,6 +39,20 @@ import { buildRustArgs } from "./buildRustArgs.ts";
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
// Deprecation: `--cwd <dir>` on an agent run. Runs AFTER the subcommand fast
|
|
43
|
+
// path above, so subcommand `--cwd` FILTERS (ay ls/status/spawn/schedule) are
|
|
44
|
+
// untouched — only a real agent launch reaches here. Warn once, then continue
|
|
45
|
+
// (the flag still works); suppress the Rust runner's mirror of this warning so
|
|
46
|
+
// it isn't printed twice when we spawn the Rust binary below.
|
|
47
|
+
{
|
|
48
|
+
const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation.ts");
|
|
49
|
+
const dep = detectCwdDeprecation(process.argv);
|
|
50
|
+
if (dep) {
|
|
51
|
+
console.warn(dep.message);
|
|
52
|
+
process.env[SUPPRESS_CWD_WARN_ENV] = "1";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
42
56
|
// Check for updates before starting — installs & re-execs if a newer version exists.
|
|
43
57
|
// Fast path: cached result (no network), so this adds near-zero latency most of the time.
|
|
44
58
|
await checkAndAutoUpdate();
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { detectCwdDeprecation } from "./cwdDeprecation.ts";
|
|
3
|
+
|
|
4
|
+
// argv shape is [exec, script, ...userArgs]; the script's basename is the
|
|
5
|
+
// program name the user typed (cy/ay/claude-yes/…).
|
|
6
|
+
const argv = (script: string, ...user: string[]) => ["/usr/bin/bun", script, ...user];
|
|
7
|
+
|
|
8
|
+
describe("detectCwdDeprecation", () => {
|
|
9
|
+
it("returns null when --cwd is absent", () => {
|
|
10
|
+
expect(detectCwdDeprecation(argv("/x/dist/cy.js", "claude", "-p", "hi"))).toBeNull();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it("detects `--cwd DIR` and rebuilds the command without it", () => {
|
|
14
|
+
const dep = detectCwdDeprecation(argv("/x/dist/cy.js", "claude", "--cwd", "/ws/app", "-p", "fix"));
|
|
15
|
+
expect(dep).not.toBeNull();
|
|
16
|
+
expect(dep!.dir).toBe("/ws/app");
|
|
17
|
+
expect(dep!.suggestion).toBe("cd /ws/app && cy claude -p fix");
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("detects `--cwd=DIR` form", () => {
|
|
21
|
+
const dep = detectCwdDeprecation(argv("/x/dist/agent-yes.js", "codex", "--cwd=/tmp/x"));
|
|
22
|
+
expect(dep!.dir).toBe("/tmp/x");
|
|
23
|
+
expect(dep!.suggestion).toBe("cd /tmp/x && agent-yes codex");
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("keeps a home-relative dir bare so the shell still expands ~", () => {
|
|
27
|
+
const dep = detectCwdDeprecation(argv("/x/dist/cy.js", "--cwd", "~/ws/product"));
|
|
28
|
+
expect(dep!.suggestion).toBe("cd ~/ws/product && cy");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("preserves the prompt after `--` and quotes tokens with spaces", () => {
|
|
32
|
+
// The shell splits `-- solve all todos` into one argv token per word.
|
|
33
|
+
const dep = detectCwdDeprecation(
|
|
34
|
+
argv("/x/dist/claude-yes.js", "--cwd", "/ws/app", "--", "solve", "all", "todos"),
|
|
35
|
+
);
|
|
36
|
+
// A single already-quoted token keeping its space is re-quoted for display.
|
|
37
|
+
const dep2 = detectCwdDeprecation(
|
|
38
|
+
argv("/x/dist/claude-yes.js", "--cwd", "/ws/app", "--", "a b"),
|
|
39
|
+
);
|
|
40
|
+
expect(dep!.suggestion).toBe("cd /ws/app && claude-yes -- solve all todos");
|
|
41
|
+
expect(dep2!.suggestion).toBe("cd /ws/app && claude-yes -- 'a b'");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("quotes a dir containing spaces", () => {
|
|
45
|
+
const dep = detectCwdDeprecation(argv("/x/dist/cy.js", "--cwd", "/my ws/app"));
|
|
46
|
+
expect(dep!.suggestion).toBe("cd '/my ws/app' && cy");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("handles `--cwd` given as the last token with no value", () => {
|
|
50
|
+
const dep = detectCwdDeprecation(argv("/x/dist/cy.js", "claude", "--cwd"));
|
|
51
|
+
expect(dep).not.toBeNull();
|
|
52
|
+
expect(dep!.dir).toBeUndefined();
|
|
53
|
+
expect(dep!.suggestion).toBe("cd <dir> && cy claude");
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("includes the deprecation notice in the message", () => {
|
|
57
|
+
const dep = detectCwdDeprecation(argv("/x/dist/cy.js", "--cwd", "/ws"));
|
|
58
|
+
expect(dep!.message).toContain("--cwd is deprecated");
|
|
59
|
+
expect(dep!.message).toContain("cd /ws && cy");
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--cwd <dir>` on an agent run is deprecated.
|
|
3
|
+
*
|
|
4
|
+
* It used to pick the directory the agent runs in. The shell already does this
|
|
5
|
+
* better: `cd <dir> && <same command>` puts the agent AND every relative path in
|
|
6
|
+
* the command in the same place, with no agent-yes-specific flag to remember.
|
|
7
|
+
* This module detects the flag on a raw argv and builds the copy-pasteable
|
|
8
|
+
* migration hint we print before continuing (the flag still works for now).
|
|
9
|
+
*
|
|
10
|
+
* Scope: the agent-run path only (ts/cli.ts). Management subcommands that take a
|
|
11
|
+
* `--cwd` FILTER (`ay ls/status/spawn/schedule …`) are a different flag and are
|
|
12
|
+
* not deprecated — they never reach this code because subcommands are dispatched
|
|
13
|
+
* earlier. The Rust runner mirrors this warning in rs/src/main.rs for direct
|
|
14
|
+
* `agent-yes` invocations that bypass this launcher.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** Env var the JS launcher sets on the spawned Rust child so the warning, once
|
|
18
|
+
* printed here, is not printed a second time by the Rust runner. Mirrored in
|
|
19
|
+
* rs/src/main.rs. */
|
|
20
|
+
export const SUPPRESS_CWD_WARN_ENV = "AGENT_YES_SUPPRESS_CWD_WARN";
|
|
21
|
+
|
|
22
|
+
export interface CwdDeprecation {
|
|
23
|
+
/** The directory value the user passed to --cwd (undefined if the flag had no value). */
|
|
24
|
+
dir: string | undefined;
|
|
25
|
+
/** The suggested replacement command line, e.g. `cd ~/foo && cy claude -- fix`. */
|
|
26
|
+
suggestion: string;
|
|
27
|
+
/** Colorized, multi-line warning ready to write to stderr (no trailing newline). */
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Quote a single argv token for display in a copy-pasteable shell command.
|
|
33
|
+
* Leaves shell-safe tokens (including a leading `~`/`~/path`, so `cd ~/foo`
|
|
34
|
+
* still expands) bare; single-quotes anything else.
|
|
35
|
+
*/
|
|
36
|
+
function shellDisplayQuote(s: string): string {
|
|
37
|
+
if (s === "") return "''";
|
|
38
|
+
// Safe unquoted: word chars and the handful of path/opt punctuation that carry
|
|
39
|
+
// no shell meaning here. `~` included so a home-relative dir keeps expanding.
|
|
40
|
+
if (/^[A-Za-z0-9_@%+=:,./~-]+$/.test(s)) return s;
|
|
41
|
+
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Program name as the user typed it, derived from argv[1] (the launched script). */
|
|
45
|
+
function programName(scriptPath: string | undefined): string {
|
|
46
|
+
if (!scriptPath) return "agent-yes";
|
|
47
|
+
const base = scriptPath.split(/[\\/]/).pop() || scriptPath;
|
|
48
|
+
return base.replace(/\.(js|ts|mjs|cjs)$/, "");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Detect a deprecated `--cwd <dir>` / `--cwd=<dir>` flag on a full process.argv
|
|
53
|
+
* (`[exec, script, ...userArgs]`). Returns the migration hint, or null when no
|
|
54
|
+
* `--cwd` flag is present.
|
|
55
|
+
*/
|
|
56
|
+
export function detectCwdDeprecation(argv: string[]): CwdDeprecation | null {
|
|
57
|
+
const prog = programName(argv[1]);
|
|
58
|
+
const userArgs = argv.slice(2);
|
|
59
|
+
|
|
60
|
+
let sawCwd = false;
|
|
61
|
+
let dir: string | undefined;
|
|
62
|
+
const rest: string[] = [];
|
|
63
|
+
for (let i = 0; i < userArgs.length; i++) {
|
|
64
|
+
const arg = userArgs[i]!;
|
|
65
|
+
if (arg === "--cwd") {
|
|
66
|
+
sawCwd = true;
|
|
67
|
+
const next = userArgs[i + 1];
|
|
68
|
+
// `--cwd DIR` — consume the value; a following flag means the value is missing.
|
|
69
|
+
if (next !== undefined && !next.startsWith("-")) {
|
|
70
|
+
dir = next;
|
|
71
|
+
i++;
|
|
72
|
+
}
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (arg.startsWith("--cwd=")) {
|
|
76
|
+
sawCwd = true;
|
|
77
|
+
dir = arg.slice("--cwd=".length);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
rest.push(arg);
|
|
81
|
+
}
|
|
82
|
+
if (!sawCwd) return null;
|
|
83
|
+
|
|
84
|
+
const cmd = [prog, ...rest].map(shellDisplayQuote).join(" ");
|
|
85
|
+
// `<dir>` is a placeholder shown when the flag had no value — keep it bare.
|
|
86
|
+
const dirDisplay = dir === undefined ? "<dir>" : shellDisplayQuote(dir);
|
|
87
|
+
const suggestion = `cd ${dirDisplay} && ${cmd}`;
|
|
88
|
+
const message =
|
|
89
|
+
`\x1b[33m⚠ --cwd is deprecated.\x1b[0m Run the command in the target directory instead:\n\n` +
|
|
90
|
+
` ${suggestion}`;
|
|
91
|
+
return { dir, suggestion, message };
|
|
92
|
+
}
|