agent-yes 1.265.1 → 1.265.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SUPPORTED_CLIS-CiX7yHEr.js → SUPPORTED_CLIS-B40EBgOm.js} +2 -2
- package/dist/{SUPPORTED_CLIS-OujpaqTl.js → SUPPORTED_CLIS-BVRthdk2.js} +3 -3
- package/dist/{agentShare-CFkmfmVq.js → agentShare-Cxe8gK2j.js} +2 -2
- package/dist/{callback-DZn2E6sd.js → callback-CmlTGa8e.js} +3 -3
- package/dist/{callback-CYr2w2UB.js → callback-Dl05jPAu.js} +2 -2
- package/dist/cli.js +6 -6
- package/dist/cwdDeprecation-D7Uigxoz.js +88 -0
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-Qg6V5qxO.js → notifyDaemon-DWx6urRu.js} +2 -2
- package/dist/{rustBinary-kNMmfNj8.js → rustBinary-CvWXl20J.js} +2 -2
- package/dist/{schedule-BMB6zodv.js → schedule-BFWdjYYp.js} +4 -4
- package/dist/{serve-BrGd7P1-.js → serve-BQz1bKiO.js} +17 -17
- package/dist/{setup-DSeq3EW2.js → setup-DtSRXhiX.js} +2 -2
- package/dist/{subcommands-6jo0AAC3.js → subcommands-CUlWeUxI.js} +1 -1
- package/dist/{subcommands-DgTRqMjP.js → subcommands-eh7jK76L.js} +13 -13
- package/dist/{terminal-C32Lt-xl.js → terminal-DYTP7g2z.js} +2 -2
- package/dist/{trayApp-MWLojgyP.js → trayApp-CT6GoAHN.js} +2 -2
- package/dist/trayApp-D8S-ex3p.js +5 -0
- package/dist/{ts-D0sh1_xQ.js → ts-CbrFfYfr.js} +2 -2
- package/dist/{versionChecker-KLyHD-uA.js → versionChecker-YtoKdWEP.js} +2 -2
- package/dist/{widget-DRsjPRum.js → widget-CtuZjthg.js} +3 -3
- package/dist/{ws-BuHoc6N5.js → ws-BnE_3k-P.js} +2 -2
- package/dist/{ws-B-IGyUgB.js → ws-CkKu7Ssn.js} +2 -2
- package/package.json +1 -1
- package/ts/cli.ts +5 -4
- package/ts/cwdDeprecation.spec.ts +13 -2
- package/ts/cwdDeprecation.ts +31 -20
- package/ts/subcommands.spec.ts +32 -1
- package/dist/cwdDeprecation-6iOtwFzS.js +0 -78
- package/dist/trayApp-BB_f9Qd4.js +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-CbrFfYfr.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-B40EBgOm.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-YtoKdWEP.js";
|
|
3
|
+
import "./ts-CbrFfYfr.js";
|
|
4
4
|
import "./todoAutomation-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
6
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
7
|
import "./pidStore-DJqSZPJi.js";
|
|
8
8
|
import "./messageLog-BYFwioFY.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-B40EBgOm.js";
|
|
10
10
|
|
|
11
11
|
export { SUPPORTED_CLIS };
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import { R as resolveOne } from "./subcommands-
|
|
6
|
+
import { R as resolveOne } from "./subcommands-eh7jK76L.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
9
|
import { a as startShare } from "./share-B-e_9WBx.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-Cxe8gK2j.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
2
|
-
import { R as resolveOne } from "./subcommands-
|
|
2
|
+
import { R as resolveOne } from "./subcommands-eh7jK76L.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-Cg3Ye0ZS.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
@@ -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-BQz1bKiO.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-CmlTGa8e.js.map
|
|
@@ -3,10 +3,10 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-eh7jK76L.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
9
|
import "./callbackCore-Cg3Ye0ZS.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-CmlTGa8e.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 { r as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-YtoKdWEP.js";
|
|
5
|
+
import { r as getRustBinary } from "./rustBinary-CvWXl20J.js";
|
|
6
6
|
import { argv } from "process";
|
|
7
7
|
import { spawn } from "child_process";
|
|
8
8
|
import ms from "ms";
|
|
@@ -295,7 +295,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
295
295
|
const rawArg = process.argv[2];
|
|
296
296
|
const managerCommands = !invokedCliName(process.argv);
|
|
297
297
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
298
|
-
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-
|
|
298
|
+
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-CUlWeUxI.js");
|
|
299
299
|
if (isHelpFlag && process.argv.length === 3) {
|
|
300
300
|
await cmdHelp(managerCommands);
|
|
301
301
|
process.exit(0);
|
|
@@ -309,7 +309,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
309
309
|
process.exit(code ?? 0);
|
|
310
310
|
}
|
|
311
311
|
{
|
|
312
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
312
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BVRthdk2.js");
|
|
313
313
|
if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
|
|
314
314
|
process.stderr.write(`ay: unknown subcommand or CLI '${rawArg}'.\n See 'ay help' for subcommands. To run an agent, name a CLI:\n 'ay <cli> …' (e.g. 'ay claude …') or 'ay --cli <cli> …'.\n`);
|
|
315
315
|
process.exit(1);
|
|
@@ -317,7 +317,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
{
|
|
320
|
-
const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation-
|
|
320
|
+
const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation-D7Uigxoz.js");
|
|
321
321
|
const dep = detectCwdDeprecation(process.argv);
|
|
322
322
|
if (dep) {
|
|
323
323
|
console.warn(dep.message);
|
|
@@ -360,7 +360,7 @@ if (config.useRust) {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
if (rustBinary) {
|
|
363
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
363
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BVRthdk2.js");
|
|
364
364
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
365
365
|
if (config.verbose) {
|
|
366
366
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region ts/cwdDeprecation.ts
|
|
2
|
+
/**
|
|
3
|
+
* `--cwd <dir>` on an agent run is NOT an agent-yes flag.
|
|
4
|
+
*
|
|
5
|
+
* It once selected the directory the agent runs in. It no longer does: agent-yes
|
|
6
|
+
* forwards it to the target CLI like any other unknown option, so the agent runs
|
|
7
|
+
* wherever `ay` was invoked and the CLI decides what `--cwd` means (usually:
|
|
8
|
+
* rejects it). Because agent-yes never handles a cwd but its own process cwd, the
|
|
9
|
+
* wrapper cwd / agent cwd / recorded cwd cannot drift apart.
|
|
10
|
+
*
|
|
11
|
+
* The shell does this job better anyway: `cd <dir> && <same command>` puts the
|
|
12
|
+
* agent AND every relative path in the command in the same place, with no
|
|
13
|
+
* agent-yes-specific flag to remember. This module detects the flag on a raw argv
|
|
14
|
+
* and builds the copy-pasteable hint we print before continuing.
|
|
15
|
+
*
|
|
16
|
+
* Scope: the agent-run path only (ts/cli.ts), and only tokens BEFORE `--` —
|
|
17
|
+
* past the separator the token belongs to the CLI or the prompt. Management
|
|
18
|
+
* subcommands that take a `--cwd` FILTER (`ay ls/status/spawn/schedule …`) are a
|
|
19
|
+
* different flag and are unaffected — they never reach this code because
|
|
20
|
+
* subcommands are dispatched earlier. The Rust runner mirrors this hint in
|
|
21
|
+
* rs/src/main.rs for direct `agent-yes` invocations that bypass this launcher.
|
|
22
|
+
*/
|
|
23
|
+
/** Env var the JS launcher sets on the spawned Rust child so the hint, once
|
|
24
|
+
* printed here, is not printed a second time by the Rust runner. Mirrored in
|
|
25
|
+
* rs/src/main.rs. */
|
|
26
|
+
const SUPPRESS_CWD_WARN_ENV = "AGENT_YES_SUPPRESS_CWD_WARN";
|
|
27
|
+
/**
|
|
28
|
+
* Quote a single argv token for display in a copy-pasteable shell command.
|
|
29
|
+
* Leaves shell-safe tokens (including a leading `~`/`~/path`, so `cd ~/foo`
|
|
30
|
+
* still expands) bare; single-quotes anything else.
|
|
31
|
+
*/
|
|
32
|
+
function shellDisplayQuote(s) {
|
|
33
|
+
if (s === "") return "''";
|
|
34
|
+
if (/^[A-Za-z0-9_@%+=:,./~-]+$/.test(s)) return s;
|
|
35
|
+
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
36
|
+
}
|
|
37
|
+
/** Program name as the user typed it, derived from argv[1] (the launched script). */
|
|
38
|
+
function programName(scriptPath) {
|
|
39
|
+
if (!scriptPath) return "agent-yes";
|
|
40
|
+
return (scriptPath.split(/[\\/]/).pop() || scriptPath).replace(/\.(js|ts|mjs|cjs)$/, "");
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Detect a `--cwd <dir>` / `--cwd=<dir>` token on a full process.argv
|
|
44
|
+
* (`[exec, script, ...userArgs]`). Returns the hint, or null when no `--cwd`
|
|
45
|
+
* appears before the `--` separator.
|
|
46
|
+
*/
|
|
47
|
+
function detectCwdDeprecation(argv) {
|
|
48
|
+
const prog = programName(argv[1]);
|
|
49
|
+
const userArgs = argv.slice(2);
|
|
50
|
+
const sepIndex = userArgs.indexOf("--");
|
|
51
|
+
const optionEnd = sepIndex === -1 ? userArgs.length : sepIndex;
|
|
52
|
+
let sawCwd = false;
|
|
53
|
+
let dir;
|
|
54
|
+
const rest = [];
|
|
55
|
+
for (let i = 0; i < userArgs.length; i++) {
|
|
56
|
+
const arg = userArgs[i];
|
|
57
|
+
if (i < optionEnd && arg === "--cwd") {
|
|
58
|
+
sawCwd = true;
|
|
59
|
+
const next = userArgs[i + 1];
|
|
60
|
+
if (next !== void 0 && !next.startsWith("-")) {
|
|
61
|
+
dir = next;
|
|
62
|
+
i++;
|
|
63
|
+
}
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (i < optionEnd && arg.startsWith("--cwd=")) {
|
|
67
|
+
sawCwd = true;
|
|
68
|
+
dir = arg.slice(6);
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
rest.push(arg);
|
|
72
|
+
}
|
|
73
|
+
if (!sawCwd) return null;
|
|
74
|
+
const cmd = [prog, ...rest].map(shellDisplayQuote).join(" ");
|
|
75
|
+
const suggestion = `cd ${dir === void 0 ? "<dir>" : shellDisplayQuote(dir)} && ${cmd}`;
|
|
76
|
+
const message = `[33m⚠ --cwd is not an agent-yes flag[0m — it is passed straight through to the CLI. To run the agent somewhere else:
|
|
77
|
+
|
|
78
|
+
${suggestion}`;
|
|
79
|
+
return {
|
|
80
|
+
dir,
|
|
81
|
+
suggestion,
|
|
82
|
+
message
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
export { SUPPRESS_CWD_WARN_ENV, detectCwdDeprecation };
|
|
88
|
+
//# sourceMappingURL=cwdDeprecation-D7Uigxoz.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-
|
|
2
|
+
import "./versionChecker-YtoKdWEP.js";
|
|
3
|
+
import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-CbrFfYfr.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-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
6
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import { E as listRecords, F as renderLogTailLines, Q as hostId, X as appendEvent, Z as gcInboxes, at as daemonLockOwnerPath, b as isPidAlive, et as listInboxParents, it as daemonLockDir, nt as readInbox, ot as notifyDir, rt as shouldStealLock, tt as liveWatchers, u as deriveLiveState } from "./subcommands-
|
|
6
|
+
import { E as listRecords, F as renderLogTailLines, Q as hostId, X as appendEvent, Z as gcInboxes, at as daemonLockOwnerPath, b as isPidAlive, et as listInboxParents, it as daemonLockDir, nt as readInbox, ot as notifyDir, rt as shouldStealLock, tt as liveWatchers, u as deriveLiveState } from "./subcommands-eh7jK76L.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
9
|
import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
|
|
@@ -836,4 +836,4 @@ async function ensureDaemon() {
|
|
|
836
836
|
|
|
837
837
|
//#endregion
|
|
838
838
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
839
|
-
//# sourceMappingURL=notifyDaemon-
|
|
839
|
+
//# sourceMappingURL=notifyDaemon-DWx6urRu.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-YtoKdWEP.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
3
|
import { existsSync, mkdirSync, unlinkSync } from "fs";
|
|
4
4
|
import { chmod, copyFile } from "fs/promises";
|
|
@@ -243,4 +243,4 @@ async function getRustBinary(options = {}) {
|
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
245
|
export { findTrayLauncher as n, getRustBinary as r, findSpawnHiddenLauncher as t };
|
|
246
|
-
//# sourceMappingURL=rustBinary-
|
|
246
|
+
//# sourceMappingURL=rustBinary-CvWXl20J.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-YtoKdWEP.js";
|
|
3
|
+
import "./ts-CbrFfYfr.js";
|
|
4
4
|
import "./todoAutomation-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
6
|
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
7
|
import "./pidStore-DJqSZPJi.js";
|
|
8
8
|
import "./messageLog-BYFwioFY.js";
|
|
9
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-B40EBgOm.js";
|
|
10
10
|
import { f as resolveSpawnCwd } from "./workspaceConfig-Bxuk_MOq.js";
|
|
11
11
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-vhOBffJ3.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-BFWdjYYp.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
-
import { t as findSpawnHiddenLauncher } from "./rustBinary-
|
|
4
|
-
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-YtoKdWEP.js";
|
|
3
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-CvWXl20J.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-CbrFfYfr.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-CtmsY6I-.js";
|
|
6
6
|
import { x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
|
|
7
7
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
@@ -11,17 +11,17 @@ import { r as recordInbox } from "./messageLog-BYFwioFY.js";
|
|
|
11
11
|
import { t as pgidForWrapper } from "./reaper-C4BvNylH.js";
|
|
12
12
|
import "./e2e-CUMZC53I.js";
|
|
13
13
|
import "./configShared-DtHMBCl7.js";
|
|
14
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
15
|
-
import { $ as isTransientLockMkdirError, A as readLogForRender, E as listRecords, F as renderLogTailLines, I as renderRawLog, L as renderRawLogLines, M as readPtysize, N as recentMessageEdges, P as recentReadEdges, R as resolveOne, U as snapshotStatus, Y as writeToIpc, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, h as extractTaskCounts, j as readNotes, m as extractNeedsInput, st as TYPING_BADGE, w as isUserTyping } from "./subcommands-
|
|
14
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-B40EBgOm.js";
|
|
15
|
+
import { $ as isTransientLockMkdirError, A as readLogForRender, E as listRecords, F as renderLogTailLines, I as renderRawLog, L as renderRawLogLines, M as readPtysize, N as recentMessageEdges, P as recentReadEdges, R as resolveOne, U as snapshotStatus, Y as writeToIpc, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, h as extractTaskCounts, j as readNotes, m as extractNeedsInput, st as TYPING_BADGE, w as isUserTyping } from "./subcommands-eh7jK76L.js";
|
|
16
16
|
import "./webrtcLink-CS4D-3G1.js";
|
|
17
17
|
import "./remotes-Cn-wszbK.js";
|
|
18
18
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Cg3Ye0ZS.js";
|
|
19
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
19
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-CmlTGa8e.js";
|
|
20
20
|
import { a as getProvisionRoot, d as isProvisionAllowed, f as resolveSpawnCwd, i as getProvisionHook, l as hasProvisionHook, o as getSpawnHook, t as allowsSkipPermissions, u as hasSpawnHook } from "./workspaceConfig-Bxuk_MOq.js";
|
|
21
21
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-vhOBffJ3.js";
|
|
22
|
-
import { i as importProvisionModule } from "./ws-
|
|
22
|
+
import { i as importProvisionModule } from "./ws-CkKu7Ssn.js";
|
|
23
23
|
import { r as spawnRejectionReason } from "./spawnGate-D0E1uRP7.js";
|
|
24
|
-
import { i as launchTray } from "./trayApp-
|
|
24
|
+
import { i as launchTray } from "./trayApp-CT6GoAHN.js";
|
|
25
25
|
import yargs from "yargs";
|
|
26
26
|
import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
|
|
27
27
|
import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
|
|
@@ -2434,7 +2434,7 @@ Options:
|
|
|
2434
2434
|
}
|
|
2435
2435
|
});
|
|
2436
2436
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2437
|
-
const ws = await import("./ws-
|
|
2437
|
+
const ws = await import("./ws-BnE_3k-P.js");
|
|
2438
2438
|
try {
|
|
2439
2439
|
await ws.loadProvision();
|
|
2440
2440
|
} catch (e) {
|
|
@@ -2454,7 +2454,7 @@ Options:
|
|
|
2454
2454
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2455
2455
|
const dirRaw = url.searchParams.get("path");
|
|
2456
2456
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2457
|
-
const ws = await import("./ws-
|
|
2457
|
+
const ws = await import("./ws-BnE_3k-P.js");
|
|
2458
2458
|
let prov;
|
|
2459
2459
|
try {
|
|
2460
2460
|
prov = await ws.loadProvision();
|
|
@@ -2476,7 +2476,7 @@ Options:
|
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
2478
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2479
|
-
const ws = await import("./ws-
|
|
2479
|
+
const ws = await import("./ws-BnE_3k-P.js");
|
|
2480
2480
|
try {
|
|
2481
2481
|
await ws.loadProvision();
|
|
2482
2482
|
} catch (e) {
|
|
@@ -2557,7 +2557,7 @@ Options:
|
|
|
2557
2557
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2558
2558
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2559
2559
|
const [, owner, repo] = m;
|
|
2560
|
-
const ws = await import("./ws-
|
|
2560
|
+
const ws = await import("./ws-BnE_3k-P.js");
|
|
2561
2561
|
let prov;
|
|
2562
2562
|
try {
|
|
2563
2563
|
prov = await ws.loadProvision();
|
|
@@ -3465,7 +3465,7 @@ Options:
|
|
|
3465
3465
|
const perm = body.perm ?? "r";
|
|
3466
3466
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3467
3467
|
try {
|
|
3468
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3468
|
+
const { createScopedShare } = await import("./agentShare-Cxe8gK2j.js");
|
|
3469
3469
|
const share = await createScopedShare({
|
|
3470
3470
|
agent: body.agent,
|
|
3471
3471
|
perm,
|
|
@@ -3480,12 +3480,12 @@ Options:
|
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
3482
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3483
|
-
const { listShares } = await import("./agentShare-
|
|
3483
|
+
const { listShares } = await import("./agentShare-Cxe8gK2j.js");
|
|
3484
3484
|
return Response.json(listShares());
|
|
3485
3485
|
}
|
|
3486
3486
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3487
3487
|
if (req.method === "DELETE" && revokeM) {
|
|
3488
|
-
const { revokeShare } = await import("./agentShare-
|
|
3488
|
+
const { revokeShare } = await import("./agentShare-Cxe8gK2j.js");
|
|
3489
3489
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3490
3490
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3491
3491
|
}
|
|
@@ -3787,7 +3787,7 @@ Options:
|
|
|
3787
3787
|
const shutdown = (resolve) => {
|
|
3788
3788
|
if (heartbeat) clearInterval(heartbeat);
|
|
3789
3789
|
closeShare?.();
|
|
3790
|
-
import("./agentShare-
|
|
3790
|
+
import("./agentShare-Cxe8gK2j.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
3791
3791
|
server?.stop();
|
|
3792
3792
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
3793
3793
|
};
|
|
@@ -3800,4 +3800,4 @@ Options:
|
|
|
3800
3800
|
|
|
3801
3801
|
//#endregion
|
|
3802
3802
|
export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
3803
|
-
//# sourceMappingURL=serve-
|
|
3803
|
+
//# sourceMappingURL=serve-BQz1bKiO.js.map
|
|
@@ -40,7 +40,7 @@ async function cmdSetup(rest) {
|
|
|
40
40
|
} catch {}
|
|
41
41
|
if (noShare) return 0;
|
|
42
42
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
43
|
-
const { cmdServe } = await import("./serve-
|
|
43
|
+
const { cmdServe } = await import("./serve-BQz1bKiO.js");
|
|
44
44
|
return cmdServe([
|
|
45
45
|
"install",
|
|
46
46
|
"--share",
|
|
@@ -50,4 +50,4 @@ async function cmdSetup(rest) {
|
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
52
|
export { cmdSetup };
|
|
53
|
-
//# sourceMappingURL=setup-
|
|
53
|
+
//# sourceMappingURL=setup-DtSRXhiX.js.map
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import { A as readLogForRender, B as resolveResumeArgs, C as isUnknownManagerToken, D as matchKeyword, E as listRecords, F as renderLogTailLines, G as stopTipForCli, H as runSubcommand, I as renderRawLog, J as writeKeysPaced, K as submitAndConfirm, L as renderRawLogLines, M as readPtysize, N as recentMessageEdges, O as menuSelectKeys, P as recentReadEdges, R as resolveOne, S as isSubcommand, T as lastStdinAt, U as snapshotStatus, V as restartHintLines, W as stdinActivityPath, Y as writeToIpc, _ as isAgentStuck, a as backoffWhileTyping, b as isPidAlive, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as TYPING_WINDOW_MS, j as readNotes, k as readAgentPtysize, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as cmdDeepseek, p as extractMenu, q as waitForLogQuiet, r as READ_PAGE_DEFAULT, s as cmdHelp, t as GRACEFUL_EXIT_COMMANDS, u as deriveLiveState, v as isBareManagerInvocation, w as isUserTyping, x as isSlashCommand, y as isExitRequest, z as resolveReadWindow } from "./subcommands-
|
|
6
|
+
import { A as readLogForRender, B as resolveResumeArgs, C as isUnknownManagerToken, D as matchKeyword, E as listRecords, F as renderLogTailLines, G as stopTipForCli, H as runSubcommand, I as renderRawLog, J as writeKeysPaced, K as submitAndConfirm, L as renderRawLogLines, M as readPtysize, N as recentMessageEdges, O as menuSelectKeys, P as recentReadEdges, R as resolveOne, S as isSubcommand, T as lastStdinAt, U as snapshotStatus, V as restartHintLines, W as stdinActivityPath, Y as writeToIpc, _ as isAgentStuck, a as backoffWhileTyping, b as isPidAlive, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as TYPING_WINDOW_MS, j as readNotes, k as readAgentPtysize, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as cmdDeepseek, p as extractMenu, q as waitForLogQuiet, r as READ_PAGE_DEFAULT, s as cmdHelp, t as GRACEFUL_EXIT_COMMANDS, u as deriveLiveState, v as isBareManagerInvocation, w as isUserTyping, x as isSlashCommand, y as isExitRequest, z as resolveReadWindow } from "./subcommands-eh7jK76L.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
9
|
|
|
@@ -1548,35 +1548,35 @@ async function runSubcommand(argv) {
|
|
|
1548
1548
|
return cmdCh(rest);
|
|
1549
1549
|
}
|
|
1550
1550
|
case "term": {
|
|
1551
|
-
const { cmdTerm } = await import("./terminal-
|
|
1551
|
+
const { cmdTerm } = await import("./terminal-DYTP7g2z.js");
|
|
1552
1552
|
return cmdTerm(rest);
|
|
1553
1553
|
}
|
|
1554
1554
|
case "widget": {
|
|
1555
|
-
const { cmdWidget } = await import("./widget-
|
|
1555
|
+
const { cmdWidget } = await import("./widget-CtuZjthg.js");
|
|
1556
1556
|
return cmdWidget(rest);
|
|
1557
1557
|
}
|
|
1558
1558
|
case "mint": {
|
|
1559
|
-
const { cmdMint } = await import("./widget-
|
|
1559
|
+
const { cmdMint } = await import("./widget-CtuZjthg.js");
|
|
1560
1560
|
return cmdMint(rest);
|
|
1561
1561
|
}
|
|
1562
1562
|
case "serve": {
|
|
1563
|
-
const { cmdServe } = await import("./serve-
|
|
1563
|
+
const { cmdServe } = await import("./serve-BQz1bKiO.js");
|
|
1564
1564
|
return cmdServe(rest);
|
|
1565
1565
|
}
|
|
1566
1566
|
case "tray": {
|
|
1567
|
-
const { cmdTray } = await import("./trayApp-
|
|
1567
|
+
const { cmdTray } = await import("./trayApp-D8S-ex3p.js");
|
|
1568
1568
|
return cmdTray(rest);
|
|
1569
1569
|
}
|
|
1570
1570
|
case "setup": {
|
|
1571
|
-
const { cmdSetup } = await import("./setup-
|
|
1571
|
+
const { cmdSetup } = await import("./setup-DtSRXhiX.js");
|
|
1572
1572
|
return cmdSetup(rest);
|
|
1573
1573
|
}
|
|
1574
1574
|
case "ws": {
|
|
1575
|
-
const { cmdWs } = await import("./ws-
|
|
1575
|
+
const { cmdWs } = await import("./ws-BnE_3k-P.js");
|
|
1576
1576
|
return cmdWs(rest);
|
|
1577
1577
|
}
|
|
1578
1578
|
case "schedule": {
|
|
1579
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1579
|
+
const { cmdSchedule } = await import("./schedule-BFWdjYYp.js");
|
|
1580
1580
|
return cmdSchedule(rest);
|
|
1581
1581
|
}
|
|
1582
1582
|
case "remote": {
|
|
@@ -1588,7 +1588,7 @@ async function runSubcommand(argv) {
|
|
|
1588
1588
|
return cmdExpose(rest);
|
|
1589
1589
|
}
|
|
1590
1590
|
case "callback": {
|
|
1591
|
-
const { cmdCallback } = await import("./callback-
|
|
1591
|
+
const { cmdCallback } = await import("./callback-Dl05jPAu.js");
|
|
1592
1592
|
return cmdCallback(rest);
|
|
1593
1593
|
}
|
|
1594
1594
|
case "reap":
|
|
@@ -4076,7 +4076,7 @@ async function cmdAttach(rest) {
|
|
|
4076
4076
|
const winsizeDir = path.join(ayHome, "winsize");
|
|
4077
4077
|
await mkdir(winsizeDir, { recursive: true });
|
|
4078
4078
|
const winsizePath = path.join(winsizeDir, String(record.pid));
|
|
4079
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
4079
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BQz1bKiO.js");
|
|
4080
4080
|
const daemonBase = await resolveDaemonHttpBase().catch(() => null);
|
|
4081
4081
|
const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
|
|
4082
4082
|
const capViewer = `attach:${process.pid}`;
|
|
@@ -4786,7 +4786,7 @@ async function cmdNotify(rest) {
|
|
|
4786
4786
|
}
|
|
4787
4787
|
const ensure = async () => {
|
|
4788
4788
|
if (!argv["ensure-daemon"]) return;
|
|
4789
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4789
|
+
const { ensureDaemon } = await import("./notifyDaemon-DWx6urRu.js");
|
|
4790
4790
|
await ensureDaemon().catch(() => null);
|
|
4791
4791
|
};
|
|
4792
4792
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4860,7 +4860,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4860
4860
|
}
|
|
4861
4861
|
async function cmdNotifyd(rest) {
|
|
4862
4862
|
const sub = rest[0] ?? "status";
|
|
4863
|
-
const daemon = await import("./notifyDaemon-
|
|
4863
|
+
const daemon = await import("./notifyDaemon-DWx6urRu.js");
|
|
4864
4864
|
switch (sub) {
|
|
4865
4865
|
case "run": return daemon.runDaemon();
|
|
4866
4866
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4887,4 +4887,4 @@ async function cmdNotifyd(rest) {
|
|
|
4887
4887
|
|
|
4888
4888
|
//#endregion
|
|
4889
4889
|
export { isTransientLockMkdirError as $, readLogForRender as A, resolveResumeArgs as B, isUnknownManagerToken as C, matchKeyword as D, listRecords as E, renderLogTailLines as F, stopTipForCli as G, runSubcommand as H, renderRawLog as I, writeKeysPaced as J, submitAndConfirm as K, renderRawLogLines as L, readPtysize as M, recentMessageEdges as N, menuSelectKeys as O, recentReadEdges as P, hostId as Q, resolveOne as R, isSubcommand as S, lastStdinAt as T, snapshotStatus as U, restartHintLines as V, stdinActivityPath as W, appendEvent as X, writeToIpc as Y, gcInboxes as Z, isAgentStuck as _, backoffWhileTyping as a, daemonLockOwnerPath as at, isPidAlive as b, controlCodeFromName as c, deriveLiveStatus as d, listInboxParents as et, extractBadges as f, finalizedLines as g, extractTaskCounts as h, TYPING_WINDOW_MS as i, daemonLockDir as it, readNotes as j, readAgentPtysize as k, cursorAbs as l, extractNeedsInput as m, MAX_RENDER_BYTES as n, readInbox as nt, cmdDeepseek as o, notifyDir as ot, extractMenu as p, waitForLogQuiet as q, READ_PAGE_DEFAULT as r, shouldStealLock as rt, cmdHelp as s, TYPING_BADGE as st, GRACEFUL_EXIT_COMMANDS as t, liveWatchers as tt, deriveLiveState as u, isBareManagerInvocation as v, isUserTyping as w, isSlashCommand as x, isExitRequest as y, resolveReadWindow as z };
|
|
4890
|
-
//# sourceMappingURL=subcommands-
|
|
4890
|
+
//# sourceMappingURL=subcommands-eh7jK76L.js.map
|
|
@@ -98,7 +98,7 @@ async function cmdTermMint(args) {
|
|
|
98
98
|
if (flags.ro && flags.interactive) throw new Error("--ro and --interactive are mutually exclusive");
|
|
99
99
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
|
100
100
|
const canSend = flags.interactive === true;
|
|
101
|
-
const { mintScopedTermToken } = await import("./serve-
|
|
101
|
+
const { mintScopedTermToken } = await import("./serve-BQz1bKiO.js");
|
|
102
102
|
const r = await mintScopedTermToken(pid, {
|
|
103
103
|
ttlSec,
|
|
104
104
|
canSend
|
|
@@ -135,4 +135,4 @@ async function cmdTerm(args) {
|
|
|
135
135
|
|
|
136
136
|
//#endregion
|
|
137
137
|
export { cmdTerm };
|
|
138
|
-
//# sourceMappingURL=terminal-
|
|
138
|
+
//# sourceMappingURL=terminal-DYTP7g2z.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as findTrayLauncher } from "./rustBinary-
|
|
1
|
+
import { n as findTrayLauncher } from "./rustBinary-CvWXl20J.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -97,4 +97,4 @@ async function cmdTray(args) {
|
|
|
97
97
|
|
|
98
98
|
//#endregion
|
|
99
99
|
export { trayHiddenMarker as a, launchTray as i, hasDesktop as n, isTrayHidden as r, cmdTray as t };
|
|
100
|
-
//# sourceMappingURL=trayApp-
|
|
100
|
+
//# sourceMappingURL=trayApp-CT6GoAHN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __esmMin, r as __exportAll } from "./chunk-cZBX9HZv.js";
|
|
2
2
|
import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-YtoKdWEP.js";
|
|
4
4
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
5
5
|
import { d as openStore, p as LIFECYCLES, x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
|
|
6
6
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DBoONoM-.js";
|
|
@@ -2299,4 +2299,4 @@ function sleep(ms) {
|
|
|
2299
2299
|
|
|
2300
2300
|
//#endregion
|
|
2301
2301
|
export { hasTodoStore as a, permissionBadge as c, answerAsk as i, AgentContext as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t, CLAUDE_SESSION_PIN_ENV as u };
|
|
2302
|
-
//# sourceMappingURL=ts-
|
|
2302
|
+
//# sourceMappingURL=ts-CbrFfYfr.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.265.
|
|
10
|
+
var version = "1.265.2";
|
|
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-YtoKdWEP.js.map
|
|
@@ -28,7 +28,7 @@ function parseFlags(args, known) {
|
|
|
28
28
|
}
|
|
29
29
|
/** Resolve the local daemon base URL + token (flags override discovery). */
|
|
30
30
|
async function daemonTarget(flags) {
|
|
31
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
31
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BQz1bKiO.js");
|
|
32
32
|
const base = typeof flags.base === "string" ? flags.base : await resolveDaemonHttpBase();
|
|
33
33
|
if (!base) throw new Error("no running ay serve daemon found — start `ay serve` or pass --base <url> (e.g. http://127.0.0.1:PORT)");
|
|
34
34
|
const token = typeof flags.token === "string" ? flags.token : await loadTokenReadOnly() ?? "";
|
|
@@ -186,7 +186,7 @@ async function cmdMint(args) {
|
|
|
186
186
|
const bad = caps.filter((c) => !KNOWN_CAPS.has(c));
|
|
187
187
|
if (bad.length) throw new Error(`unknown cap(s): ${bad.join(", ")} (valid: ${[...KNOWN_CAPS].join(", ")})`);
|
|
188
188
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
|
189
|
-
const { mintScopedTermToken } = await import("./serve-
|
|
189
|
+
const { mintScopedTermToken } = await import("./serve-BQz1bKiO.js");
|
|
190
190
|
const r = await mintScopedTermToken(target, {
|
|
191
191
|
ttlSec,
|
|
192
192
|
caps
|
|
@@ -202,4 +202,4 @@ async function cmdMint(args) {
|
|
|
202
202
|
|
|
203
203
|
//#endregion
|
|
204
204
|
export { cmdMint, cmdWidget };
|
|
205
|
-
//# sourceMappingURL=widget-
|
|
205
|
+
//# sourceMappingURL=widget-CtuZjthg.js.map
|
|
@@ -3,9 +3,9 @@ import "./globalPidIndex-Dq4KY2IV.js";
|
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-eh7jK76L.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
|
-
import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-
|
|
9
|
+
import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-CkKu7Ssn.js";
|
|
10
10
|
|
|
11
11
|
export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as listRecords } from "./subcommands-
|
|
1
|
+
import { E as listRecords } from "./subcommands-eh7jK76L.js";
|
|
2
2
|
import { a as getProvisionRoot } from "./workspaceConfig-Bxuk_MOq.js";
|
|
3
3
|
import { existsSync } from "fs";
|
|
4
4
|
import { lstat, opendir } from "fs/promises";
|
|
@@ -426,4 +426,4 @@ async function cmdWs(args) {
|
|
|
426
426
|
|
|
427
427
|
//#endregion
|
|
428
428
|
export { isPathInside as a, walkWorkspaces as c, importProvisionModule as i, workspaceStatus as l, cmdWs as n, loadProvision as o, collectWorkspaces as r, resolveOperand as s, WS_JSON_SCHEMA as t };
|
|
429
|
-
//# sourceMappingURL=ws-
|
|
429
|
+
//# sourceMappingURL=ws-CkKu7Ssn.js.map
|
package/package.json
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -63,11 +63,12 @@ import { buildRustArgs } from "./buildRustArgs.ts";
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
//
|
|
66
|
+
// `--cwd <dir>` on an agent run reads like an agent-yes flag but isn't one — it
|
|
67
|
+
// is forwarded to the target CLI, so the agent runs wherever `ay` was invoked.
|
|
68
|
+
// Point at `cd <dir> && …` once, then continue. Runs AFTER the subcommand fast
|
|
67
69
|
// path above, so subcommand `--cwd` FILTERS (ay ls/status/spawn/schedule) are
|
|
68
|
-
// untouched — only a real agent launch reaches here.
|
|
69
|
-
//
|
|
70
|
-
// it isn't printed twice when we spawn the Rust binary below.
|
|
70
|
+
// untouched — only a real agent launch reaches here. Suppress the Rust runner's
|
|
71
|
+
// mirror of this hint so it isn't printed twice when we spawn the binary below.
|
|
71
72
|
{
|
|
72
73
|
const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation.ts");
|
|
73
74
|
const dep = detectCwdDeprecation(process.argv);
|
|
@@ -55,9 +55,20 @@ describe("detectCwdDeprecation", () => {
|
|
|
55
55
|
expect(dep!.suggestion).toBe("cd <dir> && cy claude");
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
it("
|
|
58
|
+
it("says the flag is passed through, not handled", () => {
|
|
59
59
|
const dep = detectCwdDeprecation(argv("/x/dist/cy.js", "--cwd", "/ws"));
|
|
60
|
-
expect(dep!.message).toContain("--cwd is
|
|
60
|
+
expect(dep!.message).toContain("--cwd is not an agent-yes flag");
|
|
61
61
|
expect(dep!.message).toContain("cd /ws && cy");
|
|
62
62
|
});
|
|
63
|
+
|
|
64
|
+
it("ignores a --cwd that appears after `--`", () => {
|
|
65
|
+
// Past the separator the token belongs to the CLI or the prompt. It is
|
|
66
|
+
// forwarded verbatim either way, so there is nothing to suggest.
|
|
67
|
+
expect(
|
|
68
|
+
detectCwdDeprecation(argv("/x/dist/cy.js", "claude", "--", "--cwd", "/ws/app")),
|
|
69
|
+
).toBeNull();
|
|
70
|
+
expect(
|
|
71
|
+
detectCwdDeprecation(argv("/x/dist/cy.js", "claude", "--", "run with --cwd=/ws")),
|
|
72
|
+
).toBeNull();
|
|
73
|
+
});
|
|
63
74
|
});
|
package/ts/cwdDeprecation.ts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `--cwd <dir>` on an agent run is
|
|
2
|
+
* `--cwd <dir>` on an agent run is NOT an agent-yes flag.
|
|
3
3
|
*
|
|
4
|
-
* It
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* It once selected the directory the agent runs in. It no longer does: agent-yes
|
|
5
|
+
* forwards it to the target CLI like any other unknown option, so the agent runs
|
|
6
|
+
* wherever `ay` was invoked and the CLI decides what `--cwd` means (usually:
|
|
7
|
+
* rejects it). Because agent-yes never handles a cwd but its own process cwd, the
|
|
8
|
+
* wrapper cwd / agent cwd / recorded cwd cannot drift apart.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* The shell does this job better anyway: `cd <dir> && <same command>` puts the
|
|
11
|
+
* agent AND every relative path in the command in the same place, with no
|
|
12
|
+
* agent-yes-specific flag to remember. This module detects the flag on a raw argv
|
|
13
|
+
* and builds the copy-pasteable hint we print before continuing.
|
|
14
|
+
*
|
|
15
|
+
* Scope: the agent-run path only (ts/cli.ts), and only tokens BEFORE `--` —
|
|
16
|
+
* past the separator the token belongs to the CLI or the prompt. Management
|
|
17
|
+
* subcommands that take a `--cwd` FILTER (`ay ls/status/spawn/schedule …`) are a
|
|
18
|
+
* different flag and are unaffected — they never reach this code because
|
|
19
|
+
* subcommands are dispatched earlier. The Rust runner mirrors this hint in
|
|
20
|
+
* rs/src/main.rs for direct `agent-yes` invocations that bypass this launcher.
|
|
15
21
|
*/
|
|
16
22
|
|
|
17
|
-
/** Env var the JS launcher sets on the spawned Rust child so the
|
|
23
|
+
/** Env var the JS launcher sets on the spawned Rust child so the hint, once
|
|
18
24
|
* printed here, is not printed a second time by the Rust runner. Mirrored in
|
|
19
25
|
* rs/src/main.rs. */
|
|
20
26
|
export const SUPPRESS_CWD_WARN_ENV = "AGENT_YES_SUPPRESS_CWD_WARN";
|
|
21
27
|
|
|
22
|
-
export interface
|
|
28
|
+
export interface CwdPassthroughHint {
|
|
23
29
|
/** The directory value the user passed to --cwd (undefined if the flag had no value). */
|
|
24
30
|
dir: string | undefined;
|
|
25
31
|
/** The suggested replacement command line, e.g. `cd ~/foo && cy claude -- fix`. */
|
|
@@ -49,20 +55,24 @@ function programName(scriptPath: string | undefined): string {
|
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
/**
|
|
52
|
-
* Detect a
|
|
53
|
-
* (`[exec, script, ...userArgs]`). Returns the
|
|
54
|
-
*
|
|
58
|
+
* Detect a `--cwd <dir>` / `--cwd=<dir>` token on a full process.argv
|
|
59
|
+
* (`[exec, script, ...userArgs]`). Returns the hint, or null when no `--cwd`
|
|
60
|
+
* appears before the `--` separator.
|
|
55
61
|
*/
|
|
56
|
-
export function detectCwdDeprecation(argv: string[]):
|
|
62
|
+
export function detectCwdDeprecation(argv: string[]): CwdPassthroughHint | null {
|
|
57
63
|
const prog = programName(argv[1]);
|
|
58
64
|
const userArgs = argv.slice(2);
|
|
65
|
+
// Past `--` the token is the CLI's or the prompt's — forwarded verbatim either
|
|
66
|
+
// way, so there is nothing to suggest and nothing to strip.
|
|
67
|
+
const sepIndex = userArgs.indexOf("--");
|
|
68
|
+
const optionEnd = sepIndex === -1 ? userArgs.length : sepIndex;
|
|
59
69
|
|
|
60
70
|
let sawCwd = false;
|
|
61
71
|
let dir: string | undefined;
|
|
62
72
|
const rest: string[] = [];
|
|
63
73
|
for (let i = 0; i < userArgs.length; i++) {
|
|
64
74
|
const arg = userArgs[i]!;
|
|
65
|
-
if (arg === "--cwd") {
|
|
75
|
+
if (i < optionEnd && arg === "--cwd") {
|
|
66
76
|
sawCwd = true;
|
|
67
77
|
const next = userArgs[i + 1];
|
|
68
78
|
// `--cwd DIR` — consume the value; a following flag means the value is missing.
|
|
@@ -72,7 +82,7 @@ export function detectCwdDeprecation(argv: string[]): CwdDeprecation | null {
|
|
|
72
82
|
}
|
|
73
83
|
continue;
|
|
74
84
|
}
|
|
75
|
-
if (arg.startsWith("--cwd=")) {
|
|
85
|
+
if (i < optionEnd && arg.startsWith("--cwd=")) {
|
|
76
86
|
sawCwd = true;
|
|
77
87
|
dir = arg.slice("--cwd=".length);
|
|
78
88
|
continue;
|
|
@@ -86,7 +96,8 @@ export function detectCwdDeprecation(argv: string[]): CwdDeprecation | null {
|
|
|
86
96
|
const dirDisplay = dir === undefined ? "<dir>" : shellDisplayQuote(dir);
|
|
87
97
|
const suggestion = `cd ${dirDisplay} && ${cmd}`;
|
|
88
98
|
const message =
|
|
89
|
-
`\x1b[33m⚠ --cwd is
|
|
99
|
+
`\x1b[33m⚠ --cwd is not an agent-yes flag\x1b[0m — it is passed straight through to the CLI. ` +
|
|
100
|
+
`To run the agent somewhere else:\n\n` +
|
|
90
101
|
` ${suggestion}`;
|
|
91
102
|
return { dir, suggestion, message };
|
|
92
103
|
}
|
package/ts/subcommands.spec.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
-
import { mkdir, mkdtemp, rm, utimes, writeFile } from "fs/promises";
|
|
2
|
+
import { mkdir, mkdtemp, readFile, rm, utimes, writeFile } from "fs/promises";
|
|
3
3
|
import { appendFileSync } from "fs";
|
|
4
4
|
import { tmpdir } from "os";
|
|
5
5
|
import path from "path";
|
|
@@ -121,6 +121,8 @@ describe("subcommands.isSubcommand", () => {
|
|
|
121
121
|
expect(isSubcommand("stop")).toBe(true);
|
|
122
122
|
expect(isSubcommand("tail")).toBe(true);
|
|
123
123
|
expect(isSubcommand("send")).toBe(true);
|
|
124
|
+
expect(isSubcommand("deepseek")).toBe(true);
|
|
125
|
+
expect(isSubcommand("ds")).toBe(true);
|
|
124
126
|
expect(isSubcommand("not-a-command")).toBe(false);
|
|
125
127
|
expect(isSubcommand(undefined)).toBe(false);
|
|
126
128
|
});
|
|
@@ -139,6 +141,35 @@ describe("subcommands.isSubcommand", () => {
|
|
|
139
141
|
});
|
|
140
142
|
});
|
|
141
143
|
|
|
144
|
+
describe("subcommands ↔ rs/src/cli.rs subcommand mirror", () => {
|
|
145
|
+
// The Rust runner keeps its OWN hardcoded copy of both lists (it must decide
|
|
146
|
+
// whether to re-exec the JS launcher before clap swallows the word as prompt
|
|
147
|
+
// text). Nothing enforced that copy, so it silently drifted: `key`, `select`,
|
|
148
|
+
// `todo`, `tray`, `deepseek` and `ds` existed only on the TS side, and running
|
|
149
|
+
// them on the Rust binary directly launched an agent with the subcommand as
|
|
150
|
+
// its prompt. Parse both sources and require them to stay identical.
|
|
151
|
+
const names = (src: string, re: RegExp): string[] =>
|
|
152
|
+
[...(src.match(re)?.[1] ?? "").matchAll(/"([^"]+)"/g)].map((m) => m[1]).sort();
|
|
153
|
+
|
|
154
|
+
it("keeps SUBCOMMANDS and MANAGER_SUBCOMMANDS identical in both runtimes", async () => {
|
|
155
|
+
const ts = await readFile(new URL("./subcommands.ts", import.meta.url), "utf8");
|
|
156
|
+
const rs = await readFile(new URL("../rs/src/cli.rs", import.meta.url), "utf8");
|
|
157
|
+
expect(names(rs, /pub const SUBCOMMANDS: &\[&str\] = &\[([\s\S]*?)\];/)).toEqual(
|
|
158
|
+
names(ts, /const SUBCOMMANDS = new Set\(\[([\s\S]*?)\]\)/),
|
|
159
|
+
);
|
|
160
|
+
expect(names(rs, /pub const MANAGER_SUBCOMMANDS: &\[&str\] = &\[([\s\S]*?)\];/)).toEqual(
|
|
161
|
+
names(ts, /const MANAGER_SUBCOMMANDS = new Set\(\[([\s\S]*?)\]\)/),
|
|
162
|
+
);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("actually parsed something (guards against a regex that silently matches nothing)", async () => {
|
|
166
|
+
const rs = await readFile(new URL("../rs/src/cli.rs", import.meta.url), "utf8");
|
|
167
|
+
expect(names(rs, /pub const SUBCOMMANDS: &\[&str\] = &\[([\s\S]*?)\];/).length).toBeGreaterThan(
|
|
168
|
+
20,
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
142
173
|
describe("subcommands.isUnknownManagerToken (footgun guard)", () => {
|
|
143
174
|
const CLIS = ["claude", "codex", "gemini"];
|
|
144
175
|
it("flags a bare non-cli non-subcommand word on the manager entry", async () => {
|
|
@@ -1,78 +0,0 @@
|
|
|
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-6iOtwFzS.js.map
|
package/dist/trayApp-BB_f9Qd4.js
DELETED