agent-yes 1.263.0 → 1.264.0-beta.628.1
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-DHWwDTKJ.js +11 -0
- package/dist/{SUPPORTED_CLIS-DjFlWHpg.js → SUPPORTED_CLIS-DeBAuoVP.js} +2 -2
- package/dist/{agentShare-BP6wiu_5.js → agentShare-DEp7gZ14.js} +3 -3
- package/dist/{callback-DFUFLIZQ.js → callback-CIx2Orco.js} +3 -3
- package/dist/{callback-B0PQUZcK.js → callback-Cw-dRDyZ.js} +3 -3
- package/dist/cli.js +9 -9
- package/dist/{cwdConflictWarn-B_047KCF.js → cwdConflictWarn-DZTxTGXq.js} +2 -2
- package/dist/{forkNested-CBdhC852.js → forkNested-CgJ1rTnT.js} +2 -2
- package/dist/globalPidIndex-CQX_0JSB.js +4 -0
- package/dist/{globalPidIndex-pwp7Vb7o.js → globalPidIndex-Dq4KY2IV.js} +2 -8
- package/dist/index.js +4 -4
- package/dist/{notifyDaemon-BskLhHdg.js → notifyDaemon-Dfnl2c6t.js} +3 -3
- package/dist/pidStore-D-b8I6Qx.js +6 -0
- package/dist/{pidStore-DfSm1jog.js → pidStore-DJqSZPJi.js} +11 -7
- package/dist/{rustBinary-Borvwmya.js → rustBinary-HCTnXg6q.js} +2 -2
- package/dist/{schedule-BSEIVKQ0.js → schedule-WIZKf0ft.js} +6 -6
- package/dist/{serve-BEdLsSpv.js → serve-B9UA0oas.js} +32 -23
- package/dist/{setup-DFRvZ_ku.js → setup-BRGN1iGT.js} +2 -2
- package/dist/{spawnGate-D-68B907.js → spawnGate-D0E1uRP7.js} +2 -2
- package/dist/spawnGate-DqKBA07k.js +5 -0
- package/dist/{subcommands-B1YlmRaZ.js → subcommands-BkIoTWfm.js} +2 -2
- package/dist/{subcommands-Bo1MSwuC.js → subcommands-WOaagxHL.js} +134 -90
- package/dist/{terminal-BMQWojIp.js → terminal-CMc3Bibj.js} +2 -2
- package/dist/{todoCli-DNOk38lq.js → todoCli-CngDeaT2.js} +2 -2
- package/dist/trayApp-V8xSpWNN.js +5 -0
- package/dist/{trayApp-CjB5QhdV.js → trayApp-gSDxU5Dc.js} +2 -2
- package/dist/{ts-BSHR_dga.js → ts-D4qcguMU.js} +123 -5
- package/dist/{versionChecker-BTLZ3PAb.js → versionChecker-D270rzOl.js} +2 -2
- package/dist/{widget-BVss0Z9Y.js → widget-SY94Yq_J.js} +3 -3
- package/dist/{ws-DMudFezi.js → ws-CYmvdzxO.js} +3 -3
- package/dist/{ws-DxNNwnrc.js → ws-DAqaWr7F.js} +2 -2
- package/package.json +1 -1
- package/ts/globalPidIndex.spec.ts +5 -20
- package/ts/globalPidIndex.ts +9 -19
- package/ts/identity.spec.ts +108 -0
- package/ts/identity.ts +124 -0
- package/ts/index.ts +12 -4
- package/ts/messageLog.ts +0 -2
- package/ts/pidStore.spec.ts +14 -24
- package/ts/pidStore.ts +13 -10
- package/ts/serve.ts +20 -3
- package/ts/subcommands.spec.ts +11 -120
- package/ts/subcommands.ts +13 -103
- package/ts/titleScanner.spec.ts +65 -0
- package/ts/titleScanner.ts +137 -0
- package/dist/SUPPORTED_CLIS--5E9wO4L.js +0 -11
- package/dist/globalPidIndex-CHA__9Xf.js +0 -4
- package/dist/pidStore-1PQ4ARnh.js +0 -6
- package/dist/spawnGate-DbSHnfqA.js +0 -5
- package/dist/trayApp-DrdktFnW.js +0 -5
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./versionChecker-D270rzOl.js";
|
|
3
|
+
import "./ts-D4qcguMU.js";
|
|
4
|
+
import "./todoAutomation-BQRW614S.js";
|
|
5
|
+
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
|
+
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
|
+
import "./pidStore-DJqSZPJi.js";
|
|
8
|
+
import "./messageLog-BYFwioFY.js";
|
|
9
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DeBAuoVP.js";
|
|
10
|
+
|
|
11
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-D4qcguMU.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-DeBAuoVP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
2
|
+
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import { L as resolveOne } from "./subcommands-
|
|
6
|
+
import { L as resolveOne } from "./subcommands-WOaagxHL.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-DEp7gZ14.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
2
|
-
import { L as resolveOne } from "./subcommands-
|
|
2
|
+
import { L as resolveOne } from "./subcommands-WOaagxHL.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-B9UA0oas.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-CIx2Orco.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
2
|
+
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-WOaagxHL.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-CIx2Orco.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-D270rzOl.js";
|
|
5
|
+
import { r as getRustBinary } from "./rustBinary-HCTnXg6q.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 } = await import("./subcommands-
|
|
298
|
+
const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-BkIoTWfm.js");
|
|
299
299
|
if (isHelpFlag && process.argv.length === 3) {
|
|
300
300
|
await cmdHelp(managerCommands);
|
|
301
301
|
process.exit(0);
|
|
@@ -305,7 +305,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
305
305
|
process.exit(code ?? 0);
|
|
306
306
|
}
|
|
307
307
|
{
|
|
308
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS
|
|
308
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DHWwDTKJ.js");
|
|
309
309
|
if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
|
|
310
310
|
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`);
|
|
311
311
|
process.exit(1);
|
|
@@ -333,7 +333,7 @@ if (config.tray) {
|
|
|
333
333
|
ensureTray();
|
|
334
334
|
}
|
|
335
335
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
336
|
-
const { waitForSpawnCapacity } = await import("./spawnGate-
|
|
336
|
+
const { waitForSpawnCapacity } = await import("./spawnGate-DqKBA07k.js");
|
|
337
337
|
await waitForSpawnCapacity({
|
|
338
338
|
onWait: (reason, waitedMs) => {
|
|
339
339
|
if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
|
|
@@ -342,7 +342,7 @@ if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
if (!config.showVersion && !config.appendPrompt && !config.tray) {
|
|
345
|
-
const { warnIfCwdOccupied } = await import("./cwdConflictWarn-
|
|
345
|
+
const { warnIfCwdOccupied } = await import("./cwdConflictWarn-DZTxTGXq.js");
|
|
346
346
|
await warnIfCwdOccupied(process.argv);
|
|
347
347
|
}
|
|
348
348
|
if (config.useRust) {
|
|
@@ -356,14 +356,14 @@ if (config.useRust) {
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
if (rustBinary) {
|
|
359
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS
|
|
359
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DHWwDTKJ.js");
|
|
360
360
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
361
361
|
if (config.verbose) {
|
|
362
362
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
363
363
|
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
364
364
|
}
|
|
365
365
|
const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
|
|
366
|
-
const { shouldForkNested, buildSpawnTutorial, waitForRegistration, predictedLogPath } = await import("./forkNested-
|
|
366
|
+
const { shouldForkNested, buildSpawnTutorial, waitForRegistration, predictedLogPath } = await import("./forkNested-CgJ1rTnT.js");
|
|
367
367
|
if (shouldForkNested({
|
|
368
368
|
isTTY: Boolean(process.stdout.isTTY),
|
|
369
369
|
ayPid: process.env.AGENT_YES_PID,
|
|
@@ -424,7 +424,7 @@ if (config.showVersion) {
|
|
|
424
424
|
process.exit(0);
|
|
425
425
|
}
|
|
426
426
|
if (config.appendPrompt) {
|
|
427
|
-
const { PidStore } = await import("./pidStore-
|
|
427
|
+
const { PidStore } = await import("./pidStore-D-b8I6Qx.js");
|
|
428
428
|
const ipcPath = await PidStore.findActiveFifo(process.cwd());
|
|
429
429
|
if (!ipcPath) {
|
|
430
430
|
console.error("No active agent with IPC found in current directory.");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
2
|
+
import { i as readGlobalPids } from "./globalPidIndex-Dq4KY2IV.js";
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
5
|
//#region ts/cwdConflictWarn.ts
|
|
@@ -61,4 +61,4 @@ async function warnIfCwdOccupied(rawArgv) {
|
|
|
61
61
|
|
|
62
62
|
//#endregion
|
|
63
63
|
export { warnIfCwdOccupied };
|
|
64
|
-
//# sourceMappingURL=cwdConflictWarn-
|
|
64
|
+
//# sourceMappingURL=cwdConflictWarn-DZTxTGXq.js.map
|
|
@@ -49,7 +49,7 @@ function buildSpawnTutorial(cli, pid) {
|
|
|
49
49
|
* fast instead of waiting out the whole window).
|
|
50
50
|
*/
|
|
51
51
|
async function waitForRegistration(pid, timeoutMs = 5e3, aborted) {
|
|
52
|
-
const { readGlobalPids } = await import("./globalPidIndex-
|
|
52
|
+
const { readGlobalPids } = await import("./globalPidIndex-CQX_0JSB.js");
|
|
53
53
|
const isRegistered = async () => (await readGlobalPids()).some((r) => r.pid === pid && r.status !== "exited");
|
|
54
54
|
const deadline = Date.now() + timeoutMs;
|
|
55
55
|
while (Date.now() < deadline) {
|
|
@@ -68,4 +68,4 @@ function predictedLogPath(cwd, pid) {
|
|
|
68
68
|
|
|
69
69
|
//#endregion
|
|
70
70
|
export { buildSpawnTutorial, predictedLogPath, shouldForkNested, waitForRegistration };
|
|
71
|
-
//# sourceMappingURL=forkNested-
|
|
71
|
+
//# sourceMappingURL=forkNested-CgJ1rTnT.js.map
|
|
@@ -5,12 +5,6 @@ import path from "path";
|
|
|
5
5
|
import { lock } from "proper-lockfile";
|
|
6
6
|
|
|
7
7
|
//#region ts/globalPidIndex.ts
|
|
8
|
-
const ROLE_RE = /^[A-Za-z0-9._-]{1,32}$/;
|
|
9
|
-
/** Validate a role name; returns the trimmed role or null when unusable. */
|
|
10
|
-
function sanitizeRole(raw) {
|
|
11
|
-
const trimmed = raw?.trim();
|
|
12
|
-
return trimmed && ROLE_RE.test(trimmed) ? trimmed : null;
|
|
13
|
-
}
|
|
14
8
|
/**
|
|
15
9
|
* Resolved at call time (not module load time) so tests and other callers
|
|
16
10
|
* can override via $AGENT_YES_HOME without juggling module-cache resets.
|
|
@@ -193,5 +187,5 @@ async function pruneOldLogs(maxAgeMs = retentionMs()) {
|
|
|
193
187
|
}
|
|
194
188
|
|
|
195
189
|
//#endregion
|
|
196
|
-
export {
|
|
197
|
-
//# sourceMappingURL=globalPidIndex-
|
|
190
|
+
export { updateGlobalPidStatus as a, readGlobalPids as i, maybeCompactGlobalPids as n, pruneOldLogs as r, appendGlobalPid as t };
|
|
191
|
+
//# sourceMappingURL=globalPidIndex-Dq4KY2IV.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-D270rzOl.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-D4qcguMU.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
|
-
import "./globalPidIndex-
|
|
7
|
-
import "./pidStore-
|
|
6
|
+
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
|
+
import "./pidStore-DJqSZPJi.js";
|
|
8
8
|
import "./messageLog-BYFwioFY.js";
|
|
9
9
|
|
|
10
10
|
export { AgentContext, CLIS_CONFIG, CycleError, DONE_STATE, LIFECYCLES, ORPHANED_STATE, TodoStore, answerAsk, canTransition, config, agentYes as default, describeBlock, hasTodoStore, initialState, isKnownKind, listAsks, listAsksForProject, monitorHint, nextStates, openBlockers, openStore, reconcileTodos, removeControlCharacters, renderDigest, renderTree, requiredGate, statesOf, unblockedTasks };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
2
|
+
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
3
|
import "./messageLog-BYFwioFY.js";
|
|
4
4
|
import "./e2e-CUMZC53I.js";
|
|
5
5
|
import "./configShared-DtHMBCl7.js";
|
|
6
|
-
import { $ as listInboxParents, P as renderLogTailLines, T as listRecords, X as gcInboxes, Y as appendEvent, Z as hostId, at as notifyDir, et as liveWatchers, it as daemonLockOwnerPath, nt as shouldStealLock, rt as daemonLockDir, tt as readInbox, u as deriveLiveState, y as isPidAlive } from "./subcommands-
|
|
6
|
+
import { $ as listInboxParents, P as renderLogTailLines, T as listRecords, X as gcInboxes, Y as appendEvent, Z as hostId, at as notifyDir, et as liveWatchers, it as daemonLockOwnerPath, nt as shouldStealLock, rt as daemonLockDir, tt as readInbox, u as deriveLiveState, y as isPidAlive } from "./subcommands-WOaagxHL.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-Dfnl2c6t.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
|
|
3
3
|
import { t as JsonlStore } from "./JsonlStore-CPGIR0Wy.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-Dq4KY2IV.js";
|
|
5
5
|
import { mkdir, writeFile } from "fs/promises";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
@@ -32,7 +32,6 @@ var PidStore = class PidStore {
|
|
|
32
32
|
const injected = process.env.AGENT_YES_AGENT_ID;
|
|
33
33
|
const existing = this.store.findOne((doc) => doc.pid === pid);
|
|
34
34
|
const agentId = existing?.agentId ?? (injected && /^[0-9a-f]{6,32}$/i.test(injected) ? injected : randomBytes(6).toString("hex"));
|
|
35
|
-
const role = sanitizeRole(process.env.AGENT_YES_ROLE) ?? existing?.role;
|
|
36
35
|
const record = {
|
|
37
36
|
pid,
|
|
38
37
|
cli,
|
|
@@ -45,8 +44,7 @@ var PidStore = class PidStore {
|
|
|
45
44
|
status: "active",
|
|
46
45
|
exitReason: "",
|
|
47
46
|
startedAt: now,
|
|
48
|
-
agentId
|
|
49
|
-
...role ? { role } : {}
|
|
47
|
+
agentId
|
|
50
48
|
};
|
|
51
49
|
if (existing) await this.store.updateById(existing._id, record);
|
|
52
50
|
else await this.store.append(record);
|
|
@@ -71,8 +69,7 @@ var PidStore = class PidStore {
|
|
|
71
69
|
wrapper_pid: wrapperPid ?? null,
|
|
72
70
|
parent_pid: parentPid ?? null,
|
|
73
71
|
agent_id: agentId,
|
|
74
|
-
permissions: permissions ?? null
|
|
75
|
-
role: role ?? null
|
|
72
|
+
permissions: permissions ?? null
|
|
76
73
|
}).then(() => maybeCompactGlobalPids()).catch(() => null);
|
|
77
74
|
return result;
|
|
78
75
|
}
|
|
@@ -90,6 +87,13 @@ var PidStore = class PidStore {
|
|
|
90
87
|
exit_reason: extra?.exitReason ?? null
|
|
91
88
|
}).catch(() => null);
|
|
92
89
|
}
|
|
90
|
+
/** Record the child CLI's latest terminal title (see ts/titleScanner.ts —
|
|
91
|
+
* callers are change-gated + rate-limited, so each call may write). */
|
|
92
|
+
async updateTitle(pid, title) {
|
|
93
|
+
const existing = this.store.findOne((doc) => doc.pid === pid);
|
|
94
|
+
if (existing && existing.title !== title) await this.store.updateById(existing._id, { title });
|
|
95
|
+
updateGlobalPidStatus(pid, { title }).catch(() => null);
|
|
96
|
+
}
|
|
93
97
|
getAllRecords() {
|
|
94
98
|
return this.store.getAll();
|
|
95
99
|
}
|
|
@@ -193,4 +197,4 @@ pid-db/
|
|
|
193
197
|
|
|
194
198
|
//#endregion
|
|
195
199
|
export { PidStore as t };
|
|
196
|
-
//# sourceMappingURL=pidStore-
|
|
200
|
+
//# sourceMappingURL=pidStore-DJqSZPJi.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-D270rzOl.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-HCTnXg6q.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-D270rzOl.js";
|
|
3
|
+
import "./ts-D4qcguMU.js";
|
|
4
4
|
import "./todoAutomation-BQRW614S.js";
|
|
5
5
|
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
|
-
import "./globalPidIndex-
|
|
7
|
-
import "./pidStore-
|
|
6
|
+
import "./globalPidIndex-Dq4KY2IV.js";
|
|
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-DeBAuoVP.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-WIZKf0ft.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
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-D270rzOl.js";
|
|
3
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-HCTnXg6q.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-D4qcguMU.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";
|
|
8
|
-
import {
|
|
9
|
-
import "./pidStore-
|
|
8
|
+
import { a as updateGlobalPidStatus } from "./globalPidIndex-Dq4KY2IV.js";
|
|
9
|
+
import "./pidStore-DJqSZPJi.js";
|
|
10
10
|
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 { A as readNotes, C as isUserTyping, F as renderRawLog, H as snapshotStatus, I as renderRawLogLines, J as writeToIpc, L as resolveOne, M as recentMessageEdges, N as recentReadEdges, P as renderLogTailLines, Q as isTransientLockMkdirError, T as listRecords, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, h as extractTaskCounts, j as readPtysize, k as readLogForRender, m as extractNeedsInput, ot as TYPING_BADGE } from "./subcommands-
|
|
14
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DeBAuoVP.js";
|
|
15
|
+
import { A as readNotes, C as isUserTyping, F as renderRawLog, H as snapshotStatus, I as renderRawLogLines, J as writeToIpc, L as resolveOne, M as recentMessageEdges, N as recentReadEdges, P as renderLogTailLines, Q as isTransientLockMkdirError, T as listRecords, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, h as extractTaskCounts, j as readPtysize, k as readLogForRender, m as extractNeedsInput, ot as TYPING_BADGE } from "./subcommands-WOaagxHL.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-CIx2Orco.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-
|
|
23
|
-
import { r as spawnRejectionReason } from "./spawnGate-
|
|
24
|
-
import { i as launchTray } from "./trayApp-
|
|
22
|
+
import { i as importProvisionModule } from "./ws-DAqaWr7F.js";
|
|
23
|
+
import { r as spawnRejectionReason } from "./spawnGate-D0E1uRP7.js";
|
|
24
|
+
import { i as launchTray } from "./trayApp-gSDxU5Dc.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";
|
|
@@ -614,11 +614,16 @@ function loginShellEnv() {
|
|
|
614
614
|
loginShellEnvCache = null;
|
|
615
615
|
if (process.platform === "win32") return loginShellEnvCache;
|
|
616
616
|
try {
|
|
617
|
-
const shell =
|
|
617
|
+
const shell = [
|
|
618
|
+
process.env.SHELL,
|
|
619
|
+
"/bin/zsh",
|
|
620
|
+
"/bin/bash",
|
|
621
|
+
"/bin/sh"
|
|
622
|
+
].find((s) => Boolean(s && existsSync(s))) ?? "/bin/sh";
|
|
618
623
|
const delim = "_AY_SHELL_ENV_DELIM_";
|
|
619
624
|
const out = Bun.spawnSync([
|
|
620
625
|
shell,
|
|
621
|
-
"-
|
|
626
|
+
"-lic",
|
|
622
627
|
`printf %s "${delim}"; env -0; printf %s "${delim}"`
|
|
623
628
|
], {
|
|
624
629
|
stdin: "ignore",
|
|
@@ -637,7 +642,11 @@ function loginShellEnv() {
|
|
|
637
642
|
if (eq <= 0) continue;
|
|
638
643
|
env[pair.slice(0, eq)] = pair.slice(eq + 1);
|
|
639
644
|
}
|
|
640
|
-
if (env.PATH)
|
|
645
|
+
if (env.PATH) {
|
|
646
|
+
const seen = /* @__PURE__ */ new Set();
|
|
647
|
+
env.PATH = env.PATH.split(":").filter((p) => p && !seen.has(p) && (seen.add(p), true)).join(":");
|
|
648
|
+
loginShellEnvCache = env;
|
|
649
|
+
}
|
|
641
650
|
} catch {}
|
|
642
651
|
return loginShellEnvCache;
|
|
643
652
|
}
|
|
@@ -2425,7 +2434,7 @@ Options:
|
|
|
2425
2434
|
}
|
|
2426
2435
|
});
|
|
2427
2436
|
if (req.method === "GET" && p === "/api/ws") {
|
|
2428
|
-
const ws = await import("./ws-
|
|
2437
|
+
const ws = await import("./ws-CYmvdzxO.js");
|
|
2429
2438
|
try {
|
|
2430
2439
|
await ws.loadProvision();
|
|
2431
2440
|
} catch (e) {
|
|
@@ -2445,7 +2454,7 @@ Options:
|
|
|
2445
2454
|
if (req.method === "GET" && p === "/api/ws/status") {
|
|
2446
2455
|
const dirRaw = url.searchParams.get("path");
|
|
2447
2456
|
if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
|
|
2448
|
-
const ws = await import("./ws-
|
|
2457
|
+
const ws = await import("./ws-CYmvdzxO.js");
|
|
2449
2458
|
let prov;
|
|
2450
2459
|
try {
|
|
2451
2460
|
prov = await ws.loadProvision();
|
|
@@ -2467,7 +2476,7 @@ Options:
|
|
|
2467
2476
|
}
|
|
2468
2477
|
}
|
|
2469
2478
|
if (req.method === "GET" && p === "/api/ws/repos") {
|
|
2470
|
-
const ws = await import("./ws-
|
|
2479
|
+
const ws = await import("./ws-CYmvdzxO.js");
|
|
2471
2480
|
try {
|
|
2472
2481
|
await ws.loadProvision();
|
|
2473
2482
|
} catch (e) {
|
|
@@ -2548,7 +2557,7 @@ Options:
|
|
|
2548
2557
|
const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
|
|
2549
2558
|
if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
|
|
2550
2559
|
const [, owner, repo] = m;
|
|
2551
|
-
const ws = await import("./ws-
|
|
2560
|
+
const ws = await import("./ws-CYmvdzxO.js");
|
|
2552
2561
|
let prov;
|
|
2553
2562
|
try {
|
|
2554
2563
|
prov = await ws.loadProvision();
|
|
@@ -3456,7 +3465,7 @@ Options:
|
|
|
3456
3465
|
const perm = body.perm ?? "r";
|
|
3457
3466
|
if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
|
|
3458
3467
|
try {
|
|
3459
|
-
const { createScopedShare } = await import("./agentShare-
|
|
3468
|
+
const { createScopedShare } = await import("./agentShare-DEp7gZ14.js");
|
|
3460
3469
|
const share = await createScopedShare({
|
|
3461
3470
|
agent: body.agent,
|
|
3462
3471
|
perm,
|
|
@@ -3471,12 +3480,12 @@ Options:
|
|
|
3471
3480
|
}
|
|
3472
3481
|
}
|
|
3473
3482
|
if (req.method === "GET" && p === "/api/shares") {
|
|
3474
|
-
const { listShares } = await import("./agentShare-
|
|
3483
|
+
const { listShares } = await import("./agentShare-DEp7gZ14.js");
|
|
3475
3484
|
return Response.json(listShares());
|
|
3476
3485
|
}
|
|
3477
3486
|
const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
|
|
3478
3487
|
if (req.method === "DELETE" && revokeM) {
|
|
3479
|
-
const { revokeShare } = await import("./agentShare-
|
|
3488
|
+
const { revokeShare } = await import("./agentShare-DEp7gZ14.js");
|
|
3480
3489
|
const ok = revokeShare(decodeURIComponent(revokeM[1]));
|
|
3481
3490
|
return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
|
|
3482
3491
|
}
|
|
@@ -3778,7 +3787,7 @@ Options:
|
|
|
3778
3787
|
const shutdown = (resolve) => {
|
|
3779
3788
|
if (heartbeat) clearInterval(heartbeat);
|
|
3780
3789
|
closeShare?.();
|
|
3781
|
-
import("./agentShare-
|
|
3790
|
+
import("./agentShare-DEp7gZ14.js").then((m) => m.revokeAllShares()).catch(() => {});
|
|
3782
3791
|
server?.stop();
|
|
3783
3792
|
Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
|
|
3784
3793
|
};
|
|
@@ -3791,4 +3800,4 @@ Options:
|
|
|
3791
3800
|
|
|
3792
3801
|
//#endregion
|
|
3793
3802
|
export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
|
|
3794
|
-
//# sourceMappingURL=serve-
|
|
3803
|
+
//# sourceMappingURL=serve-B9UA0oas.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-B9UA0oas.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-BRGN1iGT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
1
|
+
import { i as readGlobalPids } from "./globalPidIndex-Dq4KY2IV.js";
|
|
2
2
|
import { n as getMaxAgents, r as getMinFreeMb, s as getSpawnWaitMs } from "./workspaceConfig-Bxuk_MOq.js";
|
|
3
3
|
import { readFile } from "fs/promises";
|
|
4
4
|
|
|
@@ -104,4 +104,4 @@ async function waitForSpawnCapacity(opts) {
|
|
|
104
104
|
|
|
105
105
|
//#endregion
|
|
106
106
|
export { waitForSpawnCapacity as i, spawnGateEnabled as n, spawnRejectionReason as r, memAvailableMb as t };
|
|
107
|
-
//# sourceMappingURL=spawnGate-
|
|
107
|
+
//# sourceMappingURL=spawnGate-D0E1uRP7.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-
|
|
2
|
+
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 readNotes, B as restartHintLines, C as isUserTyping, D as menuSelectKeys, E as matchKeyword, F as renderRawLog, G as submitAndConfirm, H as snapshotStatus, I as renderRawLogLines, J as writeToIpc, K as waitForLogQuiet, L as resolveOne, M as recentMessageEdges, N as recentReadEdges, O as readAgentPtysize, P as renderLogTailLines, R as resolveReadWindow, S as isUnknownManagerToken, T as listRecords, U as stdinActivityPath, V as runSubcommand, W as stopTipForCli, _ as isAgentStuck, a as backoffWhileTyping, b as isSlashCommand, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as TYPING_WINDOW_MS, j as readPtysize, k as readLogForRender, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as cmdDeepseek, p as extractMenu, q as writeKeysPaced, r as READ_PAGE_DEFAULT, s as cmdHelp, t as GRACEFUL_EXIT_COMMANDS, u as deriveLiveState, v as isExitRequest, w as lastStdinAt, x as isSubcommand, y as isPidAlive, z as resolveResumeArgs } from "./subcommands-
|
|
6
|
+
import { A as readNotes, B as restartHintLines, C as isUserTyping, D as menuSelectKeys, E as matchKeyword, F as renderRawLog, G as submitAndConfirm, H as snapshotStatus, I as renderRawLogLines, J as writeToIpc, K as waitForLogQuiet, L as resolveOne, M as recentMessageEdges, N as recentReadEdges, O as readAgentPtysize, P as renderLogTailLines, R as resolveReadWindow, S as isUnknownManagerToken, T as listRecords, U as stdinActivityPath, V as runSubcommand, W as stopTipForCli, _ as isAgentStuck, a as backoffWhileTyping, b as isSlashCommand, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as TYPING_WINDOW_MS, j as readPtysize, k as readLogForRender, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as cmdDeepseek, p as extractMenu, q as writeKeysPaced, r as READ_PAGE_DEFAULT, s as cmdHelp, t as GRACEFUL_EXIT_COMMANDS, u as deriveLiveState, v as isExitRequest, w as lastStdinAt, x as isSubcommand, y as isPidAlive, z as resolveResumeArgs } from "./subcommands-WOaagxHL.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
9
|
|