agent-yes 1.264.0 → 1.264.1-beta.630.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-DlxOPg-j.js → SUPPORTED_CLIS-B38FP4gK.js} +3 -3
- package/dist/{SUPPORTED_CLIS-JcVs6jt7.js → SUPPORTED_CLIS-Db5UCos9.js} +2 -2
- package/dist/{agentShare-B8h_JkOw.js → agentShare-BFnV2TW5.js} +2 -2
- package/dist/{callback-C9rkbjgR.js → callback-C51UaBJ-.js} +2 -2
- package/dist/{callback-DlJ_glcF.js → callback-INcb7rkW.js} +3 -3
- package/dist/cli.js +5 -5
- package/dist/index.js +2 -2
- package/dist/{notifyDaemon--TDDJupp.js → notifyDaemon-DTcGS-g-.js} +2 -2
- package/dist/{rustBinary-DA-C6PjH.js → rustBinary-DW97CEGC.js} +2 -2
- package/dist/{schedule-CdgYYRti.js → schedule-CjSKRO4q.js} +4 -4
- package/dist/{serve-Z8FAjest.js → serve-DQjJbdzu.js} +29 -20
- package/dist/{setup-D6B85mUe.js → setup-BfgXHNAi.js} +2 -2
- package/dist/{subcommands-C2ipqBtq.js → subcommands-CDUDP83e.js} +1 -1
- package/dist/{subcommands-C3w4bg6x.js → subcommands-uJ1gTmHo.js} +13 -13
- package/dist/{terminal-iObUHvkj.js → terminal-DOsJ2E_n.js} +2 -2
- package/dist/trayApp-Ck6B7TQj.js +5 -0
- package/dist/{trayApp-BUI7SXiY.js → trayApp-DcbBmwJH.js} +2 -2
- package/dist/{ts-ClHKe4d8.js → ts-CA1br_Uq.js} +2 -2
- package/dist/{versionChecker-DRAbaxo-.js → versionChecker-lbpBU9O4.js} +2 -2
- package/dist/{widget-BRBsnbLn.js → widget-DEk8fmNx.js} +3 -3
- package/dist/{ws-CAFA4oXH.js → ws-CMpDQQ0g.js} +2 -2
- package/dist/{ws-BppNz49U.js → ws-Tx-x9Ior.js} +2 -2
- package/package.json +1 -1
- package/ts/serve.ts +20 -3
- package/dist/trayApp-Cb9a-quB.js +0 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-lbpBU9O4.js";
|
|
3
|
+
import "./ts-CA1br_Uq.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-Db5UCos9.js";
|
|
10
10
|
|
|
11
11
|
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-CA1br_Uq.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-Db5UCos9.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 { L as resolveOne } from "./subcommands-
|
|
6
|
+
import { L as resolveOne } from "./subcommands-uJ1gTmHo.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-BFnV2TW5.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-uJ1gTmHo.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-INcb7rkW.js";
|
|
11
11
|
|
|
12
12
|
export { cmdCallback };
|
|
@@ -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-uJ1gTmHo.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-DQjJbdzu.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-INcb7rkW.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-
|
|
5
|
-
import { r as getRustBinary } from "./rustBinary-
|
|
4
|
+
import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-lbpBU9O4.js";
|
|
5
|
+
import { r as getRustBinary } from "./rustBinary-DW97CEGC.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-CDUDP83e.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-B38FP4gK.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);
|
|
@@ -356,7 +356,7 @@ 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-B38FP4gK.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}`);
|
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-lbpBU9O4.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-CA1br_Uq.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 { $ 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-uJ1gTmHo.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-DTcGS-g-.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
1
|
+
import { r as getInstalledPackage } from "./versionChecker-lbpBU9O4.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-DW97CEGC.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-
|
|
3
|
-
import "./ts-
|
|
2
|
+
import "./versionChecker-lbpBU9O4.js";
|
|
3
|
+
import "./ts-CA1br_Uq.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-Db5UCos9.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-CjSKRO4q.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-lbpBU9O4.js";
|
|
3
|
+
import { t as findSpawnHiddenLauncher } from "./rustBinary-DW97CEGC.js";
|
|
4
|
+
import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-CA1br_Uq.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 { 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-Db5UCos9.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-uJ1gTmHo.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-INcb7rkW.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-CMpDQQ0g.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-DcbBmwJH.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-Tx-x9Ior.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-Tx-x9Ior.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-Tx-x9Ior.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-Tx-x9Ior.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-BFnV2TW5.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-BFnV2TW5.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-BFnV2TW5.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-BFnV2TW5.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-DQjJbdzu.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-DQjJbdzu.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-BfgXHNAi.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 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-uJ1gTmHo.js";
|
|
7
7
|
import "./webrtcLink-CS4D-3G1.js";
|
|
8
8
|
import "./remotes-Cn-wszbK.js";
|
|
9
9
|
|
|
@@ -1533,35 +1533,35 @@ async function runSubcommand(argv) {
|
|
|
1533
1533
|
return cmdCh(rest);
|
|
1534
1534
|
}
|
|
1535
1535
|
case "term": {
|
|
1536
|
-
const { cmdTerm } = await import("./terminal-
|
|
1536
|
+
const { cmdTerm } = await import("./terminal-DOsJ2E_n.js");
|
|
1537
1537
|
return cmdTerm(rest);
|
|
1538
1538
|
}
|
|
1539
1539
|
case "widget": {
|
|
1540
|
-
const { cmdWidget } = await import("./widget-
|
|
1540
|
+
const { cmdWidget } = await import("./widget-DEk8fmNx.js");
|
|
1541
1541
|
return cmdWidget(rest);
|
|
1542
1542
|
}
|
|
1543
1543
|
case "mint": {
|
|
1544
|
-
const { cmdMint } = await import("./widget-
|
|
1544
|
+
const { cmdMint } = await import("./widget-DEk8fmNx.js");
|
|
1545
1545
|
return cmdMint(rest);
|
|
1546
1546
|
}
|
|
1547
1547
|
case "serve": {
|
|
1548
|
-
const { cmdServe } = await import("./serve-
|
|
1548
|
+
const { cmdServe } = await import("./serve-DQjJbdzu.js");
|
|
1549
1549
|
return cmdServe(rest);
|
|
1550
1550
|
}
|
|
1551
1551
|
case "tray": {
|
|
1552
|
-
const { cmdTray } = await import("./trayApp-
|
|
1552
|
+
const { cmdTray } = await import("./trayApp-Ck6B7TQj.js");
|
|
1553
1553
|
return cmdTray(rest);
|
|
1554
1554
|
}
|
|
1555
1555
|
case "setup": {
|
|
1556
|
-
const { cmdSetup } = await import("./setup-
|
|
1556
|
+
const { cmdSetup } = await import("./setup-BfgXHNAi.js");
|
|
1557
1557
|
return cmdSetup(rest);
|
|
1558
1558
|
}
|
|
1559
1559
|
case "ws": {
|
|
1560
|
-
const { cmdWs } = await import("./ws-
|
|
1560
|
+
const { cmdWs } = await import("./ws-Tx-x9Ior.js");
|
|
1561
1561
|
return cmdWs(rest);
|
|
1562
1562
|
}
|
|
1563
1563
|
case "schedule": {
|
|
1564
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1564
|
+
const { cmdSchedule } = await import("./schedule-CjSKRO4q.js");
|
|
1565
1565
|
return cmdSchedule(rest);
|
|
1566
1566
|
}
|
|
1567
1567
|
case "remote": {
|
|
@@ -1573,7 +1573,7 @@ async function runSubcommand(argv) {
|
|
|
1573
1573
|
return cmdExpose(rest);
|
|
1574
1574
|
}
|
|
1575
1575
|
case "callback": {
|
|
1576
|
-
const { cmdCallback } = await import("./callback-
|
|
1576
|
+
const { cmdCallback } = await import("./callback-C51UaBJ-.js");
|
|
1577
1577
|
return cmdCallback(rest);
|
|
1578
1578
|
}
|
|
1579
1579
|
case "reap":
|
|
@@ -4061,7 +4061,7 @@ async function cmdAttach(rest) {
|
|
|
4061
4061
|
const winsizeDir = path.join(ayHome, "winsize");
|
|
4062
4062
|
await mkdir(winsizeDir, { recursive: true });
|
|
4063
4063
|
const winsizePath = path.join(winsizeDir, String(record.pid));
|
|
4064
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
4064
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DQjJbdzu.js");
|
|
4065
4065
|
const daemonBase = await resolveDaemonHttpBase().catch(() => null);
|
|
4066
4066
|
const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
|
|
4067
4067
|
const capViewer = `attach:${process.pid}`;
|
|
@@ -4771,7 +4771,7 @@ async function cmdNotify(rest) {
|
|
|
4771
4771
|
}
|
|
4772
4772
|
const ensure = async () => {
|
|
4773
4773
|
if (!argv["ensure-daemon"]) return;
|
|
4774
|
-
const { ensureDaemon } = await import("./notifyDaemon
|
|
4774
|
+
const { ensureDaemon } = await import("./notifyDaemon-DTcGS-g-.js");
|
|
4775
4775
|
await ensureDaemon().catch(() => null);
|
|
4776
4776
|
};
|
|
4777
4777
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4845,7 +4845,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4845
4845
|
}
|
|
4846
4846
|
async function cmdNotifyd(rest) {
|
|
4847
4847
|
const sub = rest[0] ?? "status";
|
|
4848
|
-
const daemon = await import("./notifyDaemon
|
|
4848
|
+
const daemon = await import("./notifyDaemon-DTcGS-g-.js");
|
|
4849
4849
|
switch (sub) {
|
|
4850
4850
|
case "run": return daemon.runDaemon();
|
|
4851
4851
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4872,4 +4872,4 @@ async function cmdNotifyd(rest) {
|
|
|
4872
4872
|
|
|
4873
4873
|
//#endregion
|
|
4874
4874
|
export { listInboxParents as $, readNotes as A, restartHintLines as B, isUserTyping as C, menuSelectKeys as D, matchKeyword as E, renderRawLog as F, submitAndConfirm as G, snapshotStatus as H, renderRawLogLines as I, writeToIpc as J, waitForLogQuiet as K, resolveOne as L, recentMessageEdges as M, recentReadEdges as N, readAgentPtysize as O, renderLogTailLines as P, isTransientLockMkdirError as Q, resolveReadWindow as R, isUnknownManagerToken as S, listRecords as T, stdinActivityPath as U, runSubcommand as V, stopTipForCli as W, gcInboxes as X, appendEvent as Y, hostId as Z, isAgentStuck as _, backoffWhileTyping as a, notifyDir as at, isSlashCommand as b, controlCodeFromName as c, deriveLiveStatus as d, liveWatchers as et, extractBadges as f, finalizedLines as g, extractTaskCounts as h, TYPING_WINDOW_MS as i, daemonLockOwnerPath as it, readPtysize as j, readLogForRender as k, cursorAbs as l, extractNeedsInput as m, MAX_RENDER_BYTES as n, shouldStealLock as nt, cmdDeepseek as o, TYPING_BADGE as ot, extractMenu as p, writeKeysPaced as q, READ_PAGE_DEFAULT as r, daemonLockDir as rt, cmdHelp as s, GRACEFUL_EXIT_COMMANDS as t, readInbox as tt, deriveLiveState as u, isExitRequest as v, lastStdinAt as w, isSubcommand as x, isPidAlive as y, resolveResumeArgs as z };
|
|
4875
|
-
//# sourceMappingURL=subcommands-
|
|
4875
|
+
//# sourceMappingURL=subcommands-uJ1gTmHo.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-DQjJbdzu.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-DOsJ2E_n.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as findTrayLauncher } from "./rustBinary-
|
|
1
|
+
import { n as findTrayLauncher } from "./rustBinary-DW97CEGC.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-DcbBmwJH.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-lbpBU9O4.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-CA1br_Uq.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.264.
|
|
10
|
+
var version = "1.264.1-beta.630.1";
|
|
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-lbpBU9O4.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-DQjJbdzu.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-DQjJbdzu.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-DEk8fmNx.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as listRecords } from "./subcommands-
|
|
1
|
+
import { T as listRecords } from "./subcommands-uJ1gTmHo.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-CMpDQQ0g.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-uJ1gTmHo.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-CMpDQQ0g.js";
|
|
10
10
|
|
|
11
11
|
export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
|
package/package.json
CHANGED
package/ts/serve.ts
CHANGED
|
@@ -464,12 +464,21 @@ function loginShellEnv(): Record<string, string> | null {
|
|
|
464
464
|
loginShellEnvCache = null;
|
|
465
465
|
if (process.platform === "win32") return loginShellEnvCache;
|
|
466
466
|
try {
|
|
467
|
-
|
|
467
|
+
// $SHELL when the daemon has one; a launchd/systemd env usually doesn't,
|
|
468
|
+
// so fall back through the common defaults (zsh first — the macOS default).
|
|
469
|
+
const shell =
|
|
470
|
+
[process.env.SHELL, "/bin/zsh", "/bin/bash", "/bin/sh"].find(
|
|
471
|
+
(s): s is string => Boolean(s && existsSync(s)),
|
|
472
|
+
) ?? "/bin/sh";
|
|
468
473
|
// Delimiters fence off the env dump from any banner/prompt noise the rc files
|
|
469
474
|
// print to stdout; `env -0` is NUL-separated so values with newlines survive.
|
|
475
|
+
// `-i` (interactive) on top of `-l`: PATH exports are commonly scattered
|
|
476
|
+
// across .zshenv/.zprofile/.zshrc, and a plain login shell never reads
|
|
477
|
+
// .zshrc — silently dropping those entries. The timeout guards against an
|
|
478
|
+
// rc file that blocks under -i.
|
|
470
479
|
const delim = "_AY_SHELL_ENV_DELIM_";
|
|
471
480
|
const res = Bun.spawnSync(
|
|
472
|
-
[shell, "-
|
|
481
|
+
[shell, "-lic", `printf %s "${delim}"; env -0; printf %s "${delim}"`],
|
|
473
482
|
{
|
|
474
483
|
stdin: "ignore",
|
|
475
484
|
stderr: "ignore",
|
|
@@ -490,7 +499,15 @@ function loginShellEnv(): Record<string, string> | null {
|
|
|
490
499
|
env[pair.slice(0, eq)] = pair.slice(eq + 1);
|
|
491
500
|
}
|
|
492
501
|
// Require a usable result — a PATH carrying ~/.bun/bin is the whole point.
|
|
493
|
-
if (env.PATH)
|
|
502
|
+
if (env.PATH) {
|
|
503
|
+
// Order-preserving dedup: rc files re-prepend the same dirs on every
|
|
504
|
+
// nesting level (.zshenv/.zprofile/.zshrc each adding ~/.bun/bin again).
|
|
505
|
+
const seen = new Set<string>();
|
|
506
|
+
env.PATH = env.PATH.split(":")
|
|
507
|
+
.filter((p) => p && !seen.has(p) && (seen.add(p), true))
|
|
508
|
+
.join(":");
|
|
509
|
+
loginShellEnvCache = env;
|
|
510
|
+
}
|
|
494
511
|
} catch {
|
|
495
512
|
// best-effort; fall back to process.env
|
|
496
513
|
}
|
package/dist/trayApp-Cb9a-quB.js
DELETED