agent-yes 1.277.1 → 1.278.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-DMA2T-LF.js → SUPPORTED_CLIS-CsdJ9ioV.js} +2 -2
- package/dist/{SUPPORTED_CLIS-DzVEFVKI.js → SUPPORTED_CLIS-VhMjMwUF.js} +3 -3
- package/dist/{agentShare-DqT9USG5.js → agentShare-CrrK5XS6.js} +2 -2
- package/dist/{callback-D60U9zFd.js → callback-BWzWDxmW.js} +2 -2
- package/dist/{callback-PKIAkhNq.js → callback-vLC1gkta.js} +3 -3
- package/dist/cli.js +5 -5
- package/dist/{cmdPs-BeUkjSOH.js → cmdPs-CkAYEpir.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon-Bw70QCkC.js → notifyDaemon-C2ZvTuP9.js} +2 -2
- package/dist/{parentPingLoop-DJAPbp6D.js → parentPingLoop-D76L9Wfz.js} +2 -2
- package/dist/{rustBinary-DQHcq1Wr.js → rustBinary-4cx8XQVi.js} +2 -2
- package/dist/{rustBinary-CxtSgRSg.js → rustBinary-seVEdbv0.js} +2 -2
- package/dist/{schedule-BI7-Pa2F.js → schedule-Nkg4x5L_.js} +4 -4
- package/dist/{serve-Bfxc3VWQ.js → serve-DpEwtxE1.js} +17 -17
- package/dist/{setup-Cp31FALW.js → setup-Cqb-C9Fc.js} +2 -2
- package/dist/{subcommands-CjgHXjZd.js → subcommands-CTYuwj6q.js} +1 -1
- package/dist/{subcommands-Cohq91Dx.js → subcommands-GXYgnWc8.js} +17 -15
- package/dist/{terminal-8ipst6Wf.js → terminal-DKkGov9E.js} +2 -2
- package/dist/{trayApp-CL_iZpnR.js → trayApp-BzQD6Yst.js} +2 -2
- package/dist/trayApp-DJeWk65b.js +5 -0
- package/dist/{ts-RBN1OMQ_.js → ts-Bux2wmDB.js} +3 -3
- package/dist/{versionChecker-F_WiFsVg.js → versionChecker-C3XTN3V7.js} +2 -2
- package/dist/{widget-DTramHv8.js → widget-BeVnojVJ.js} +3 -3
- package/dist/{ws-sf8JPYPq.js → ws-Bv3g3GgQ.js} +2 -2
- package/dist/{ws-dgltfu3A.js → ws-C6-Cpoy4.js} +2 -2
- package/package.json +1 -1
- package/ts/subcommands.spec.ts +33 -0
- package/ts/subcommands.ts +17 -0
- package/dist/trayApp-DaekNsVe.js +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-Bux2wmDB.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-CsdJ9ioV.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-C3XTN3V7.js";
|
|
3
|
+
import "./ts-Bux2wmDB.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-DoaKEUkO.js";
|
|
7
7
|
import "./pidStore-B73xnAeT.js";
|
|
8
8
|
import "./messageLog-DdjBNqgt.js";
|
|
9
9
|
import "./todoStore-DF6vxHgV.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CsdJ9ioV.js";
|
|
11
11
|
|
|
12
12
|
export { SUPPORTED_CLIS };
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-DoaKEUkO.js";
|
|
|
3
3
|
import "./messageLog-DdjBNqgt.js";
|
|
4
4
|
import "./e2e-z1xpwSAg.js";
|
|
5
5
|
import "./configShared-DKTgiz7K.js";
|
|
6
|
-
import { z as resolveOne } from "./subcommands-
|
|
6
|
+
import { z as resolveOne } from "./subcommands-GXYgnWc8.js";
|
|
7
7
|
import "./notifyStore-2SWKGwZI.js";
|
|
8
8
|
import "./webrtcLink-DLaJfTcB.js";
|
|
9
9
|
import "./remotes-b6reVXzo.js";
|
|
@@ -230,4 +230,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
|
|
|
230
230
|
|
|
231
231
|
//#endregion
|
|
232
232
|
export { createScopedShare, listShares, revokeAllShares, revokeShare };
|
|
233
|
-
//# sourceMappingURL=agentShare-
|
|
233
|
+
//# sourceMappingURL=agentShare-CrrK5XS6.js.map
|
|
@@ -3,11 +3,11 @@ import "./globalPidIndex-DoaKEUkO.js";
|
|
|
3
3
|
import "./messageLog-DdjBNqgt.js";
|
|
4
4
|
import "./e2e-z1xpwSAg.js";
|
|
5
5
|
import "./configShared-DKTgiz7K.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-GXYgnWc8.js";
|
|
7
7
|
import "./notifyStore-2SWKGwZI.js";
|
|
8
8
|
import "./webrtcLink-DLaJfTcB.js";
|
|
9
9
|
import "./remotes-b6reVXzo.js";
|
|
10
10
|
import "./callbackCore-Bl2gGcxg.js";
|
|
11
|
-
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-
|
|
11
|
+
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-vLC1gkta.js";
|
|
12
12
|
|
|
13
13
|
export { cmdCallback };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
2
|
-
import { z as resolveOne } from "./subcommands-
|
|
2
|
+
import { z as resolveOne } from "./subcommands-GXYgnWc8.js";
|
|
3
3
|
import { a as mintCapability, o as parseExpires } from "./callbackCore-Bl2gGcxg.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-DpEwtxE1.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-vLC1gkta.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-
|
|
5
|
-
import { l as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-C3XTN3V7.js";
|
|
5
|
+
import { l as getRustBinary } from "./rustBinary-seVEdbv0.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-CTYuwj6q.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-VhMjMwUF.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);
|
|
@@ -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-VhMjMwUF.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}`);
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-DoaKEUkO.js";
|
|
|
3
3
|
import "./messageLog-DdjBNqgt.js";
|
|
4
4
|
import "./e2e-z1xpwSAg.js";
|
|
5
5
|
import "./configShared-DKTgiz7K.js";
|
|
6
|
-
import { $ as buildAgentForest, D as listRecords, et as flattenForest, u as deriveLiveState } from "./subcommands-
|
|
6
|
+
import { $ as buildAgentForest, D as listRecords, et as flattenForest, u as deriveLiveState } from "./subcommands-GXYgnWc8.js";
|
|
7
7
|
import "./notifyStore-2SWKGwZI.js";
|
|
8
8
|
import "./webrtcLink-DLaJfTcB.js";
|
|
9
9
|
import "./remotes-b6reVXzo.js";
|
|
@@ -574,4 +574,4 @@ function readPpidSync(pid) {
|
|
|
574
574
|
|
|
575
575
|
//#endregion
|
|
576
576
|
export { cmdPs };
|
|
577
|
-
//# sourceMappingURL=cmdPs-
|
|
577
|
+
//# sourceMappingURL=cmdPs-CkAYEpir.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-C3XTN3V7.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-Bux2wmDB.js";
|
|
4
4
|
import { a as renderTree, c as describeBlock, i as renderDigest, l as monitorHint, o as unblockedTasks, r as openBlockers, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-DoaKEUkO.js";
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-DoaKEUkO.js";
|
|
|
3
3
|
import "./messageLog-DdjBNqgt.js";
|
|
4
4
|
import "./e2e-z1xpwSAg.js";
|
|
5
5
|
import "./configShared-DKTgiz7K.js";
|
|
6
|
-
import { D as listRecords, I as renderLogTailLines, b as isPidAlive, u as deriveLiveState } from "./subcommands-
|
|
6
|
+
import { D as listRecords, I as renderLogTailLines, b as isPidAlive, u as deriveLiveState } from "./subcommands-GXYgnWc8.js";
|
|
7
7
|
import { f as readInbox, g as daemonLockOwnerPath, h as daemonLockDir, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, s as hostId, u as liveWatchers, x as notifyDir } from "./notifyStore-2SWKGwZI.js";
|
|
8
8
|
import "./webrtcLink-DLaJfTcB.js";
|
|
9
9
|
import "./remotes-b6reVXzo.js";
|
|
@@ -863,4 +863,4 @@ async function ensureDaemon() {
|
|
|
863
863
|
|
|
864
864
|
//#endregion
|
|
865
865
|
export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
|
|
866
|
-
//# sourceMappingURL=notifyDaemon-
|
|
866
|
+
//# sourceMappingURL=notifyDaemon-C2ZvTuP9.js.map
|
|
@@ -338,7 +338,7 @@ async function isParentWatching(parentWrapperPid, parentAgentPid, selfAgentPid,
|
|
|
338
338
|
logger.debug("[parent-ping] watcher lookup failed:", error);
|
|
339
339
|
}
|
|
340
340
|
try {
|
|
341
|
-
const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-
|
|
341
|
+
const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-CTYuwj6q.js");
|
|
342
342
|
const last = await lastReadAt(`agent:${parentAgentPid}`, selfAgentPid);
|
|
343
343
|
if (last !== null && now - last <= READ_WINDOW_MS) return true;
|
|
344
344
|
} catch (error) {
|
|
@@ -466,4 +466,4 @@ function startParentPingLoop(opts) {
|
|
|
466
466
|
|
|
467
467
|
//#endregion
|
|
468
468
|
export { startParentPingLoop };
|
|
469
|
-
//# sourceMappingURL=parentPingLoop-
|
|
469
|
+
//# sourceMappingURL=parentPingLoop-D76L9Wfz.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./versionChecker-
|
|
2
|
-
import { a as gcOldBinaryDirs, c as getDownloadUrl, i as findTrayLauncher, l as getRustBinary, n as findRustBinary, o as getBinDir, r as findSpawnHiddenLauncher, s as getBinaryName, t as downloadBinary } from "./rustBinary-
|
|
1
|
+
import "./versionChecker-C3XTN3V7.js";
|
|
2
|
+
import { a as gcOldBinaryDirs, c as getDownloadUrl, i as findTrayLauncher, l as getRustBinary, n as findRustBinary, o as getBinDir, r as findSpawnHiddenLauncher, s as getBinaryName, t as downloadBinary } from "./rustBinary-seVEdbv0.js";
|
|
3
3
|
|
|
4
4
|
export { gcOldBinaryDirs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-
|
|
1
|
+
import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-C3XTN3V7.js";
|
|
2
2
|
import { execFileSync } from "child_process";
|
|
3
3
|
import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
|
|
4
4
|
import { chmod, copyFile } from "fs/promises";
|
|
@@ -310,4 +310,4 @@ async function getRustBinary(options = {}) {
|
|
|
310
310
|
|
|
311
311
|
//#endregion
|
|
312
312
|
export { gcOldBinaryDirs as a, getDownloadUrl as c, findTrayLauncher as i, getRustBinary as l, findRustBinary as n, getBinDir as o, findSpawnHiddenLauncher as r, getBinaryName as s, downloadBinary as t };
|
|
313
|
-
//# sourceMappingURL=rustBinary-
|
|
313
|
+
//# sourceMappingURL=rustBinary-seVEdbv0.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-C3XTN3V7.js";
|
|
3
|
+
import "./ts-Bux2wmDB.js";
|
|
4
4
|
import "./todoAutomation-CbVVS4re.js";
|
|
5
5
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
6
6
|
import "./globalPidIndex-DoaKEUkO.js";
|
|
7
7
|
import "./pidStore-B73xnAeT.js";
|
|
8
8
|
import "./messageLog-DdjBNqgt.js";
|
|
9
9
|
import "./todoStore-DF6vxHgV.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
10
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CsdJ9ioV.js";
|
|
11
11
|
import { f as resolveSpawnCwd } from "./workspaceConfig-D6QndOCz.js";
|
|
12
12
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-_zeWDISM.js";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
@@ -154,4 +154,4 @@ async function cmdSchedule(rest) {
|
|
|
154
154
|
|
|
155
155
|
//#endregion
|
|
156
156
|
export { cmdSchedule };
|
|
157
|
-
//# sourceMappingURL=schedule-
|
|
157
|
+
//# sourceMappingURL=schedule-Nkg4x5L_.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { i as getInstalledPackage } from "./versionChecker-
|
|
3
|
-
import { r 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 { i as getInstalledPackage } from "./versionChecker-C3XTN3V7.js";
|
|
3
|
+
import { r as findSpawnHiddenLauncher } from "./rustBinary-seVEdbv0.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-Bux2wmDB.js";
|
|
5
5
|
import { t as agentYesHome$1 } from "./agentYesHome-BNtn19J4.js";
|
|
6
6
|
import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
7
7
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
@@ -12,18 +12,18 @@ import { t as pgidForWrapper } from "./reaper-UimuuTfO.js";
|
|
|
12
12
|
import "./todoStore-DF6vxHgV.js";
|
|
13
13
|
import "./e2e-z1xpwSAg.js";
|
|
14
14
|
import "./configShared-DKTgiz7K.js";
|
|
15
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
16
|
-
import { D as listRecords, F as recentReadEdges, I as renderLogTailLines, L as renderRawLog, M as readNotes, N as readPtysize, P as recentMessageEdges, Q as TYPING_BADGE, R as renderRawLogLines, W as snapshotStatus, X as writeToIpc, Z as withIpcLock, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, h as extractTaskCounts, j as readLogForRender, m as extractNeedsInput, w as isUserTyping, z as resolveOne } from "./subcommands-
|
|
15
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CsdJ9ioV.js";
|
|
16
|
+
import { D as listRecords, F as recentReadEdges, I as renderLogTailLines, L as renderRawLog, M as readNotes, N as readPtysize, P as recentMessageEdges, Q as TYPING_BADGE, R as renderRawLogLines, W as snapshotStatus, X as writeToIpc, Z as withIpcLock, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, h as extractTaskCounts, j as readLogForRender, m as extractNeedsInput, w as isUserTyping, z as resolveOne } from "./subcommands-GXYgnWc8.js";
|
|
17
17
|
import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
|
|
18
18
|
import "./webrtcLink-DLaJfTcB.js";
|
|
19
19
|
import "./remotes-b6reVXzo.js";
|
|
20
20
|
import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Bl2gGcxg.js";
|
|
21
|
-
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-
|
|
21
|
+
import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-vLC1gkta.js";
|
|
22
22
|
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-D6QndOCz.js";
|
|
23
23
|
import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-_zeWDISM.js";
|
|
24
|
-
import { i as importProvisionModule } from "./ws-
|
|
24
|
+
import { i as importProvisionModule } from "./ws-Bv3g3GgQ.js";
|
|
25
25
|
import { r as spawnRejectionReason } from "./spawnGate-B2hA_2NQ.js";
|
|
26
|
-
import { i as launchTray } from "./trayApp-
|
|
26
|
+
import { i as launchTray } from "./trayApp-BzQD6Yst.js";
|
|
27
27
|
import yargs from "yargs";
|
|
28
28
|
import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
|
|
29
29
|
import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
|
|
@@ -2436,7 +2436,7 @@ Options:
|
|
|
2436
2436
|
}
|
|
2437
2437
|
});
|
|
2438
2438
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2439
|
-
const ws = await import("./ws-
|
|
2439
|
+
const ws = await import("./ws-C6-Cpoy4.js");
|
|
2440
2440
|
try {
|
|
2441
2441
|
await ws.loadProvision();
|
|
2442
2442
|
} catch (e) {
|
|
@@ -2456,7 +2456,7 @@ Options:
|
|
|
2456
2456
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2457
2457
|
const dirRaw = url.searchParams.get("path");
|
|
2458
2458
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2459
|
-
const ws = await import("./ws-
|
|
2459
|
+
const ws = await import("./ws-C6-Cpoy4.js");
|
|
2460
2460
|
let prov;
|
|
2461
2461
|
try {
|
|
2462
2462
|
prov = await ws.loadProvision();
|
|
@@ -2478,7 +2478,7 @@ Options:
|
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|
|
2480
2480
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2481
|
-
const ws = await import("./ws-
|
|
2481
|
+
const ws = await import("./ws-C6-Cpoy4.js");
|
|
2482
2482
|
try {
|
|
2483
2483
|
await ws.loadProvision();
|
|
2484
2484
|
} catch (e) {
|
|
@@ -2559,7 +2559,7 @@ Options:
|
|
|
2559
2559
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2560
2560
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2561
2561
|
const [, owner, repo] = m;
|
|
2562
|
-
const ws = await import("./ws-
|
|
2562
|
+
const ws = await import("./ws-C6-Cpoy4.js");
|
|
2563
2563
|
let prov;
|
|
2564
2564
|
try {
|
|
2565
2565
|
prov = await ws.loadProvision();
|
|
@@ -3470,7 +3470,7 @@ Options:
|
|
|
3470
3470
|
const perm = body.perm ?? "r";
|
|
3471
3471
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3472
3472
|
try {
|
|
3473
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3473
|
+
const { createScopedShare } = await import("./agentShare-CrrK5XS6.js");
|
|
3474
3474
|
const share = await createScopedShare({
|
|
3475
3475
|
agent: body.agent,
|
|
3476
3476
|
perm,
|
|
@@ -3485,12 +3485,12 @@ Options:
|
|
|
3485
3485
|
}
|
|
3486
3486
|
}
|
|
3487
3487
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3488
|
-
const { listShares } = await import("./agentShare-
|
|
3488
|
+
const { listShares } = await import("./agentShare-CrrK5XS6.js");
|
|
3489
3489
|
return Response.json(listShares());
|
|
3490
3490
|
}
|
|
3491
3491
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3492
3492
|
if (req.method === "DELETE" && revokeM) {
|
|
3493
|
-
const { revokeShare } = await import("./agentShare-
|
|
3493
|
+
const { revokeShare } = await import("./agentShare-CrrK5XS6.js");
|
|
3494
3494
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3495
3495
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3496
3496
|
}
|
|
@@ -3795,7 +3795,7 @@ Options:
|
|
|
3795
3795
|
const shutdown = (resolve) => {
|
|
3796
3796
|
if (heartbeat) clearInterval(heartbeat);
|
|
3797
3797
|
closeShare?.();
|
|
3798
|
-
import("./agentShare-
|
|
3798
|
+
import("./agentShare-CrrK5XS6.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
3799
3799
|
server?.stop();
|
|
3800
3800
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
3801
3801
|
};
|
|
@@ -3808,4 +3808,4 @@ Options:
|
|
|
3808
3808
|
|
|
3809
3809
|
//#endregion
|
|
3810
3810
|
export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
3811
|
-
//# sourceMappingURL=serve-
|
|
3811
|
+
//# sourceMappingURL=serve-DpEwtxE1.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-DpEwtxE1.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-Cqb-C9Fc.js.map
|
|
@@ -3,7 +3,7 @@ import "./globalPidIndex-DoaKEUkO.js";
|
|
|
3
3
|
import "./messageLog-DdjBNqgt.js";
|
|
4
4
|
import "./e2e-z1xpwSAg.js";
|
|
5
5
|
import "./configShared-DKTgiz7K.js";
|
|
6
|
-
import { A as readAgentPtysize, B as resolveReadWindow, C as isUnknownManagerToken, D as listRecords, E as lastStdinAt, F as recentReadEdges, G as stdinActivityPath, H as restartHintLines, I as renderLogTailLines, J as waitForLogQuiet, K as stopTipForCli, L as renderRawLog, M as readNotes, N as readPtysize, O as matchKeyword, P as recentMessageEdges, R as renderRawLogLines, S as isSubcommand, T as lastReadAt, U as runSubcommand, V as resolveResumeArgs, W as snapshotStatus, X as writeToIpc, Y as writeKeysPaced, _ as isAgentStuck, a as TYPING_WINDOW_MS, b as isPidAlive, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as READ_WINDOW_MS, j as readLogForRender, k as menuSelectKeys, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as backoffWhileTyping, p as extractMenu, q as submitAndConfirm, 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 resolveOne } from "./subcommands-
|
|
6
|
+
import { A as readAgentPtysize, B as resolveReadWindow, C as isUnknownManagerToken, D as listRecords, E as lastStdinAt, F as recentReadEdges, G as stdinActivityPath, H as restartHintLines, I as renderLogTailLines, J as waitForLogQuiet, K as stopTipForCli, L as renderRawLog, M as readNotes, N as readPtysize, O as matchKeyword, P as recentMessageEdges, R as renderRawLogLines, S as isSubcommand, T as lastReadAt, U as runSubcommand, V as resolveResumeArgs, W as snapshotStatus, X as writeToIpc, Y as writeKeysPaced, _ as isAgentStuck, a as TYPING_WINDOW_MS, b as isPidAlive, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as READ_WINDOW_MS, j as readLogForRender, k as menuSelectKeys, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as backoffWhileTyping, p as extractMenu, q as submitAndConfirm, 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 resolveOne } from "./subcommands-GXYgnWc8.js";
|
|
7
7
|
import "./notifyStore-2SWKGwZI.js";
|
|
8
8
|
import "./webrtcLink-DLaJfTcB.js";
|
|
9
9
|
import "./remotes-b6reVXzo.js";
|
|
@@ -831,6 +831,7 @@ const SEND_CONFIRM_MIN_GROWTH_BYTES = 8;
|
|
|
831
831
|
const SEND_SUBMIT_MAX_RETRIES = 2;
|
|
832
832
|
const SEND_TYPING_POLL_MS = 200;
|
|
833
833
|
const SEND_TYPING_MAX_WAIT_MS = 1e4;
|
|
834
|
+
const SEND_BODY_MAX_CHARS = 2048;
|
|
834
835
|
/**
|
|
835
836
|
* Whether `name` is a subcommand. `managerCommands` (default true, for the
|
|
836
837
|
* generic `ay`/`agent-yes` entry) additionally admits manager-only commands
|
|
@@ -905,7 +906,7 @@ async function runSubcommand(argv) {
|
|
|
905
906
|
switch (sub) {
|
|
906
907
|
case "ls":
|
|
907
908
|
case "list": return await cmdLs(rest);
|
|
908
|
-
case "ps": return await (await import("./cmdPs-
|
|
909
|
+
case "ps": return await (await import("./cmdPs-CkAYEpir.js")).cmdPs(rest);
|
|
909
910
|
case "status": return await cmdStatus(rest);
|
|
910
911
|
case "whoami": return await cmdWhoami(rest);
|
|
911
912
|
case "result": return await cmdResult(rest);
|
|
@@ -952,35 +953,35 @@ async function runSubcommand(argv) {
|
|
|
952
953
|
return cmdCh(rest);
|
|
953
954
|
}
|
|
954
955
|
case "term": {
|
|
955
|
-
const { cmdTerm } = await import("./terminal-
|
|
956
|
+
const { cmdTerm } = await import("./terminal-DKkGov9E.js");
|
|
956
957
|
return cmdTerm(rest);
|
|
957
958
|
}
|
|
958
959
|
case "widget": {
|
|
959
|
-
const { cmdWidget } = await import("./widget-
|
|
960
|
+
const { cmdWidget } = await import("./widget-BeVnojVJ.js");
|
|
960
961
|
return cmdWidget(rest);
|
|
961
962
|
}
|
|
962
963
|
case "mint": {
|
|
963
|
-
const { cmdMint } = await import("./widget-
|
|
964
|
+
const { cmdMint } = await import("./widget-BeVnojVJ.js");
|
|
964
965
|
return cmdMint(rest);
|
|
965
966
|
}
|
|
966
967
|
case "serve": {
|
|
967
|
-
const { cmdServe } = await import("./serve-
|
|
968
|
+
const { cmdServe } = await import("./serve-DpEwtxE1.js");
|
|
968
969
|
return cmdServe(rest);
|
|
969
970
|
}
|
|
970
971
|
case "tray": {
|
|
971
|
-
const { cmdTray } = await import("./trayApp-
|
|
972
|
+
const { cmdTray } = await import("./trayApp-DJeWk65b.js");
|
|
972
973
|
return cmdTray(rest);
|
|
973
974
|
}
|
|
974
975
|
case "setup": {
|
|
975
|
-
const { cmdSetup } = await import("./setup-
|
|
976
|
+
const { cmdSetup } = await import("./setup-Cqb-C9Fc.js");
|
|
976
977
|
return cmdSetup(rest);
|
|
977
978
|
}
|
|
978
979
|
case "ws": {
|
|
979
|
-
const { cmdWs } = await import("./ws-
|
|
980
|
+
const { cmdWs } = await import("./ws-C6-Cpoy4.js");
|
|
980
981
|
return cmdWs(rest);
|
|
981
982
|
}
|
|
982
983
|
case "schedule": {
|
|
983
|
-
const { cmdSchedule } = await import("./schedule-
|
|
984
|
+
const { cmdSchedule } = await import("./schedule-Nkg4x5L_.js");
|
|
984
985
|
return cmdSchedule(rest);
|
|
985
986
|
}
|
|
986
987
|
case "remote": {
|
|
@@ -992,7 +993,7 @@ async function runSubcommand(argv) {
|
|
|
992
993
|
return cmdExpose(rest);
|
|
993
994
|
}
|
|
994
995
|
case "callback": {
|
|
995
|
-
const { cmdCallback } = await import("./callback-
|
|
996
|
+
const { cmdCallback } = await import("./callback-BWzWDxmW.js");
|
|
996
997
|
return cmdCallback(rest);
|
|
997
998
|
}
|
|
998
999
|
case "reap":
|
|
@@ -1003,7 +1004,7 @@ async function runSubcommand(argv) {
|
|
|
1003
1004
|
return await cmdDsh(rest);
|
|
1004
1005
|
}
|
|
1005
1006
|
case "gc": {
|
|
1006
|
-
const { gcOldBinaryDirs } = await import("./rustBinary-
|
|
1007
|
+
const { gcOldBinaryDirs } = await import("./rustBinary-4cx8XQVi.js");
|
|
1007
1008
|
const res = gcOldBinaryDirs();
|
|
1008
1009
|
if (res.removed.length === 0) process.stdout.write("no old agent-yes binary cache dirs to remove\n");
|
|
1009
1010
|
else {
|
|
@@ -2862,6 +2863,7 @@ async function cmdSend(rest) {
|
|
|
2862
2863
|
body = Buffer.concat(chunks).toString("utf-8").trimEnd();
|
|
2863
2864
|
if (body.trim() === "") throw new Error("ay send: refusing to send an empty message (stdin was empty).");
|
|
2864
2865
|
} else body = rawMessage;
|
|
2866
|
+
if (body.length > SEND_BODY_MAX_CHARS) throw new Error(`message is ${body.length} chars, over the ${SEND_BODY_MAX_CHARS}-char limit. Longer text isn't a terminal prompt — write it to a file and pipe it, e.g. 'ay send <keyword> - < file.txt', or shorten to ≤${SEND_BODY_MAX_CHARS} chars.`);
|
|
2865
2867
|
const force = Boolean(argv.force) || process.env.AGENT_YES_FORCE_SEND === "1";
|
|
2866
2868
|
const raw = Boolean(argv.raw) || process.env.AGENT_YES_SEND_RAW === "1";
|
|
2867
2869
|
const sender = await enforceSendGuards(record, force);
|
|
@@ -3479,7 +3481,7 @@ async function cmdAttach(rest) {
|
|
|
3479
3481
|
const winsizeDir = path.join(ayHome, "winsize");
|
|
3480
3482
|
await mkdir(winsizeDir, { recursive: true });
|
|
3481
3483
|
const winsizePath = path.join(winsizeDir, String(record.pid));
|
|
3482
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
3484
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DpEwtxE1.js");
|
|
3483
3485
|
const daemonBase = await resolveDaemonHttpBase().catch(() => null);
|
|
3484
3486
|
const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
|
|
3485
3487
|
const capViewer = `attach:${process.pid}`;
|
|
@@ -4197,7 +4199,7 @@ async function cmdNotify(rest) {
|
|
|
4197
4199
|
}
|
|
4198
4200
|
const ensure = async () => {
|
|
4199
4201
|
if (!argv["ensure-daemon"]) return;
|
|
4200
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4202
|
+
const { ensureDaemon } = await import("./notifyDaemon-C2ZvTuP9.js");
|
|
4201
4203
|
await ensureDaemon().catch(() => null);
|
|
4202
4204
|
};
|
|
4203
4205
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4271,7 +4273,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4271
4273
|
}
|
|
4272
4274
|
async function cmdNotifyd(rest) {
|
|
4273
4275
|
const sub = rest[0] ?? "status";
|
|
4274
|
-
const daemon = await import("./notifyDaemon-
|
|
4276
|
+
const daemon = await import("./notifyDaemon-C2ZvTuP9.js");
|
|
4275
4277
|
switch (sub) {
|
|
4276
4278
|
case "run": return daemon.runDaemon();
|
|
4277
4279
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4298,4 +4300,4 @@ async function cmdNotifyd(rest) {
|
|
|
4298
4300
|
|
|
4299
4301
|
//#endregion
|
|
4300
4302
|
export { buildAgentForest as $, readAgentPtysize as A, resolveReadWindow as B, isUnknownManagerToken as C, listRecords as D, lastStdinAt as E, recentReadEdges as F, stdinActivityPath as G, restartHintLines as H, renderLogTailLines as I, waitForLogQuiet as J, stopTipForCli as K, renderRawLog as L, readNotes as M, readPtysize as N, matchKeyword as O, recentMessageEdges as P, TYPING_BADGE as Q, renderRawLogLines as R, isSubcommand as S, lastReadAt as T, runSubcommand as U, resolveResumeArgs as V, snapshotStatus as W, writeToIpc as X, writeKeysPaced as Y, withIpcLock as Z, isAgentStuck as _, TYPING_WINDOW_MS as a, isPidAlive as b, controlCodeFromName as c, deriveLiveStatus as d, flattenForest as et, extractBadges as f, finalizedLines as g, extractTaskCounts as h, READ_WINDOW_MS as i, readLogForRender as j, menuSelectKeys as k, cursorAbs as l, extractNeedsInput as m, MAX_RENDER_BYTES as n, backoffWhileTyping as o, extractMenu as p, submitAndConfirm as q, READ_PAGE_DEFAULT as r, cmdHelp as s, GRACEFUL_EXIT_COMMANDS as t, deriveLiveState as u, isBareManagerInvocation as v, isUserTyping as w, isSlashCommand as x, isExitRequest as y, resolveOne as z };
|
|
4301
|
-
//# sourceMappingURL=subcommands-
|
|
4303
|
+
//# sourceMappingURL=subcommands-GXYgnWc8.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-DpEwtxE1.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-DKkGov9E.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as findTrayLauncher } from "./rustBinary-
|
|
1
|
+
import { i as findTrayLauncher } from "./rustBinary-seVEdbv0.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.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-BzQD6Yst.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 { i as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { i as getInstalledPackage } from "./versionChecker-C3XTN3V7.js";
|
|
4
4
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
5
5
|
import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
6
6
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-BOIPD_Vs.js";
|
|
@@ -2071,7 +2071,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
2071
2071
|
}, 100);
|
|
2072
2072
|
const cleanupHeartbeat = () => clearInterval(heartbeatInterval);
|
|
2073
2073
|
shell.onExit(cleanupHeartbeat);
|
|
2074
|
-
const { startParentPingLoop } = await import("./parentPingLoop-
|
|
2074
|
+
const { startParentPingLoop } = await import("./parentPingLoop-D76L9Wfz.js");
|
|
2075
2075
|
const parentPingLoop = startParentPingLoop({
|
|
2076
2076
|
parentPid,
|
|
2077
2077
|
selfWrapperPid: process.pid,
|
|
@@ -2334,4 +2334,4 @@ function sleep(ms) {
|
|
|
2334
2334
|
|
|
2335
2335
|
//#endregion
|
|
2336
2336
|
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 };
|
|
2337
|
-
//# sourceMappingURL=ts-
|
|
2337
|
+
//# sourceMappingURL=ts-Bux2wmDB.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.278.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 a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
|
|
218
|
-
//# sourceMappingURL=versionChecker-
|
|
218
|
+
//# sourceMappingURL=versionChecker-C3XTN3V7.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-DpEwtxE1.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-DpEwtxE1.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-BeVnojVJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as listRecords } from "./subcommands-
|
|
1
|
+
import { D as listRecords } from "./subcommands-GXYgnWc8.js";
|
|
2
2
|
import { a as getProvisionRoot } from "./workspaceConfig-D6QndOCz.js";
|
|
3
3
|
import { existsSync } from "fs";
|
|
4
4
|
import { lstat, opendir } from "fs/promises";
|
|
@@ -424,4 +424,4 @@ async function cmdWs(args) {
|
|
|
424
424
|
|
|
425
425
|
//#endregion
|
|
426
426
|
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 };
|
|
427
|
-
//# sourceMappingURL=ws-
|
|
427
|
+
//# sourceMappingURL=ws-Bv3g3GgQ.js.map
|
|
@@ -3,10 +3,10 @@ import "./globalPidIndex-DoaKEUkO.js";
|
|
|
3
3
|
import "./messageLog-DdjBNqgt.js";
|
|
4
4
|
import "./e2e-z1xpwSAg.js";
|
|
5
5
|
import "./configShared-DKTgiz7K.js";
|
|
6
|
-
import "./subcommands-
|
|
6
|
+
import "./subcommands-GXYgnWc8.js";
|
|
7
7
|
import "./notifyStore-2SWKGwZI.js";
|
|
8
8
|
import "./webrtcLink-DLaJfTcB.js";
|
|
9
9
|
import "./remotes-b6reVXzo.js";
|
|
10
|
-
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-
|
|
10
|
+
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-Bv3g3GgQ.js";
|
|
11
11
|
|
|
12
12
|
export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
|
package/package.json
CHANGED
package/ts/subcommands.spec.ts
CHANGED
|
@@ -1668,6 +1668,39 @@ describe("subcommands.cmdSend safety guards", () => {
|
|
|
1668
1668
|
else process.env.AGENT_YES_PID = savedAyPid;
|
|
1669
1669
|
}
|
|
1670
1670
|
});
|
|
1671
|
+
|
|
1672
|
+
it("refuses a body longer than the 2048-char cap and points at the stdin path", async () => {
|
|
1673
|
+
const { runSubcommand } = await loadModule();
|
|
1674
|
+
const { appendGlobalPid } = await import("./globalPidIndex.ts");
|
|
1675
|
+
// Register a target agent so resolveOne succeeds and we reach the length gate.
|
|
1676
|
+
await appendGlobalPid({
|
|
1677
|
+
pid: process.pid,
|
|
1678
|
+
cli: "claude",
|
|
1679
|
+
prompt: null,
|
|
1680
|
+
cwd: process.cwd(),
|
|
1681
|
+
log_file: null,
|
|
1682
|
+
fifo_file: "/tmp/ay-length-test.fifo",
|
|
1683
|
+
status: "active",
|
|
1684
|
+
exit_code: null,
|
|
1685
|
+
exit_reason: null,
|
|
1686
|
+
started_at: Date.now(),
|
|
1687
|
+
});
|
|
1688
|
+
const stderr: string[] = [];
|
|
1689
|
+
const orig = process.stderr.write.bind(process.stderr);
|
|
1690
|
+
(process.stderr as any).write = (s: any) => {
|
|
1691
|
+
stderr.push(String(s));
|
|
1692
|
+
return true;
|
|
1693
|
+
};
|
|
1694
|
+
try {
|
|
1695
|
+
const long = "x".repeat(2049);
|
|
1696
|
+
const code = await runSubcommand(["bun", "cli.js", "send", String(process.pid), long]);
|
|
1697
|
+
expect(code).toBe(1);
|
|
1698
|
+
expect(stderr.join("")).toMatch(/over the 2048-char limit/);
|
|
1699
|
+
expect(stderr.join("")).toMatch(/ay send <keyword> - < file\.txt/);
|
|
1700
|
+
} finally {
|
|
1701
|
+
process.stderr.write = orig;
|
|
1702
|
+
}
|
|
1703
|
+
});
|
|
1671
1704
|
});
|
|
1672
1705
|
|
|
1673
1706
|
// ---------------------------------------------------------------------------
|
package/ts/subcommands.ts
CHANGED
|
@@ -484,6 +484,11 @@ const SEND_SUBMIT_MAX_RETRIES = 2; // total attempts = 1 + this
|
|
|
484
484
|
// we give up, then send anyway with a warning rather than dropping the message.
|
|
485
485
|
const SEND_TYPING_POLL_MS = 200;
|
|
486
486
|
const SEND_TYPING_MAX_WAIT_MS = 10_000;
|
|
487
|
+
// `ay send` body length cap. Longer text isn't a prompt to type at a live CLI's
|
|
488
|
+
// stdin — it's a document, and pasting it mid-session fuses with / truncates the
|
|
489
|
+
// agent's terminal. Reject it outright and point at the stdin/file path so the
|
|
490
|
+
// full text survives instead of being silently mangled by a bracketed paste.
|
|
491
|
+
const SEND_BODY_MAX_CHARS = 2048;
|
|
487
492
|
|
|
488
493
|
/**
|
|
489
494
|
* Whether `name` is a subcommand. `managerCommands` (default true, for the
|
|
@@ -3426,6 +3431,18 @@ async function cmdSend(rest: string[]): Promise<number> {
|
|
|
3426
3431
|
body = rawMessage;
|
|
3427
3432
|
}
|
|
3428
3433
|
|
|
3434
|
+
// Length cap: a body longer than this is a document, not a prompt — rejecting it
|
|
3435
|
+
// is kinder than pasting it into a live CLI where bracketed-paste will fuse or
|
|
3436
|
+
// truncate it. The `-` (stdin) path carries multi-line bodies verbatim too, so
|
|
3437
|
+
// the hint points at a real alternative that doesn't silently lose text.
|
|
3438
|
+
if (body.length > SEND_BODY_MAX_CHARS) {
|
|
3439
|
+
throw new Error(
|
|
3440
|
+
`message is ${body.length} chars, over the ${SEND_BODY_MAX_CHARS}-char limit. ` +
|
|
3441
|
+
`Longer text isn't a terminal prompt — write it to a file and pipe it, ` +
|
|
3442
|
+
`e.g. 'ay send <keyword> - < file.txt', or shorten to ≤${SEND_BODY_MAX_CHARS} chars.`,
|
|
3443
|
+
);
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3429
3446
|
// Who's sending, and have they actually looked at this target recently?
|
|
3430
3447
|
const force = Boolean(argv.force) || process.env.AGENT_YES_FORCE_SEND === "1";
|
|
3431
3448
|
const raw = Boolean(argv.raw) || process.env.AGENT_YES_SEND_RAW === "1";
|
package/dist/trayApp-DaekNsVe.js
DELETED