claude-yes 1.158.0 → 1.159.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-CeyKUwT5.js → SUPPORTED_CLIS-BtV-mke0.js} +2 -2
- package/dist/SUPPORTED_CLIS-CdneNjsn.js +8 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{schedule-BVKN6cO5.js → schedule-DzSUoqqh.js} +4 -4
- package/dist/{serve-Dij1y--H.js → serve-CTtO8sIP.js} +7 -5
- package/dist/{setup-DymiMHke.js → setup-Bh3eBiQ8.js} +2 -2
- package/dist/{subcommands-COLw05N-.js → subcommands-BhGxt0eA.js} +4 -4
- package/dist/{subcommands-CyKom1IU.js → subcommands-e07QqFnu.js} +1 -1
- package/dist/{ts-IAAUoBpk.js → ts-CXTowpzb.js} +2 -2
- package/dist/{versionChecker-Dwe07Fe6.js → versionChecker-GyNJfWh9.js} +2 -2
- package/examples/spawn-notify.sh +58 -0
- package/lab/ui/index.html +16 -0
- package/package.json +1 -1
- package/ts/openBrowser.ts +1 -3
- package/ts/serve.ts +10 -0
- package/dist/SUPPORTED_CLIS-BSuNAuIv.js +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-CXTowpzb.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-BtV-mke0.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-CXTowpzb.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-GyNJfWh9.js";
|
|
4
|
+
import "./pidStore-fqXqTKkh.js";
|
|
5
|
+
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BtV-mke0.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
4
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-GyNJfWh9.js";
|
|
5
5
|
import { argv } from "process";
|
|
6
6
|
import { execFileSync, spawn } from "child_process";
|
|
7
7
|
import ms from "ms";
|
|
@@ -481,7 +481,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
481
481
|
const rawArg = process.argv[2];
|
|
482
482
|
const managerCommands = !invokedCliName(process.argv);
|
|
483
483
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
484
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
484
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-e07QqFnu.js");
|
|
485
485
|
if (isHelpFlag && process.argv.length === 3) {
|
|
486
486
|
cmdHelp(managerCommands);
|
|
487
487
|
process.exit(0);
|
|
@@ -514,7 +514,7 @@ if (config.useRust) {
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
if (rustBinary) {
|
|
517
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
517
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CdneNjsn.js");
|
|
518
518
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
519
519
|
if (config.verbose) {
|
|
520
520
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-CXTowpzb.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-GyNJfWh9.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-CXTowpzb.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-GyNJfWh9.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BtV-mke0.js";
|
|
7
7
|
import { o as resolveSpawnCwd } from "./workspaceConfig-B0Q9-q2B.js";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
|
|
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
|
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { cmdSchedule };
|
|
144
|
-
//# sourceMappingURL=schedule-
|
|
144
|
+
//# sourceMappingURL=schedule-DzSUoqqh.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-CXTowpzb.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-GyNJfWh9.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
import { t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
|
|
7
7
|
import "./configShared-CEyhl0WH.js";
|
|
8
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
8
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BtV-mke0.js";
|
|
9
9
|
import "./e2e-Bfw7qL9O.js";
|
|
10
10
|
import "./webrtcLink-CBZkZ-LT.js";
|
|
11
11
|
import "./remotes-DBCvpp3B.js";
|
|
12
12
|
import { a as isProvisionAllowed, i as hasSpawnHook, n as getSpawnHook, o as resolveSpawnCwd, t as getProvisionRoot } from "./workspaceConfig-B0Q9-q2B.js";
|
|
13
|
-
import { E as writeToIpc, _ as readPtysize, b as resolveOne, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, v as renderRawLog, w as snapshotStatus } from "./subcommands-
|
|
13
|
+
import { E as writeToIpc, _ as readPtysize, b as resolveOne, c as extractTaskCounts, g as readNotes, i as controlCodeFromName, m as listRecords, o as deriveLiveStatus, v as renderRawLog, w as snapshotStatus } from "./subcommands-BhGxt0eA.js";
|
|
14
14
|
import yargs from "yargs";
|
|
15
15
|
import { mkdir, open, readFile, stat, unlink, writeFile } from "fs/promises";
|
|
16
16
|
import { homedir, hostname, userInfo } from "os";
|
|
@@ -1175,6 +1175,7 @@ Options:
|
|
|
1175
1175
|
...agentArgv
|
|
1176
1176
|
], {
|
|
1177
1177
|
cwd,
|
|
1178
|
+
detached: true,
|
|
1178
1179
|
env: {
|
|
1179
1180
|
...agentEnv,
|
|
1180
1181
|
AGENT_YES_CWD: cwd,
|
|
@@ -1207,6 +1208,7 @@ Options:
|
|
|
1207
1208
|
}
|
|
1208
1209
|
const child = Bun.spawn(agentArgv, {
|
|
1209
1210
|
cwd,
|
|
1211
|
+
detached: true,
|
|
1210
1212
|
env: agentEnv,
|
|
1211
1213
|
stdin: "ignore",
|
|
1212
1214
|
stdout: "ignore",
|
|
@@ -1348,4 +1350,4 @@ Options:
|
|
|
1348
1350
|
|
|
1349
1351
|
//#endregion
|
|
1350
1352
|
export { cmdServe };
|
|
1351
|
-
//# sourceMappingURL=serve-
|
|
1353
|
+
//# sourceMappingURL=serve-CTtO8sIP.js.map
|
|
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
|
|
|
32
32
|
if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
|
|
33
33
|
if (noShare) return 0;
|
|
34
34
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
35
|
-
const { cmdServe } = await import("./serve-
|
|
35
|
+
const { cmdServe } = await import("./serve-CTtO8sIP.js");
|
|
36
36
|
return cmdServe([
|
|
37
37
|
"install",
|
|
38
38
|
"--share",
|
|
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { cmdSetup };
|
|
45
|
-
//# sourceMappingURL=setup-
|
|
45
|
+
//# sourceMappingURL=setup-Bh3eBiQ8.js.map
|
|
@@ -554,15 +554,15 @@ async function runSubcommand(argv) {
|
|
|
554
554
|
case "restart": return await cmdRestart(rest);
|
|
555
555
|
case "note": return await cmdNote(rest);
|
|
556
556
|
case "serve": {
|
|
557
|
-
const { cmdServe } = await import("./serve-
|
|
557
|
+
const { cmdServe } = await import("./serve-CTtO8sIP.js");
|
|
558
558
|
return cmdServe(rest);
|
|
559
559
|
}
|
|
560
560
|
case "setup": {
|
|
561
|
-
const { cmdSetup } = await import("./setup-
|
|
561
|
+
const { cmdSetup } = await import("./setup-Bh3eBiQ8.js");
|
|
562
562
|
return cmdSetup(rest);
|
|
563
563
|
}
|
|
564
564
|
case "schedule": {
|
|
565
|
-
const { cmdSchedule } = await import("./schedule-
|
|
565
|
+
const { cmdSchedule } = await import("./schedule-DzSUoqqh.js");
|
|
566
566
|
return cmdSchedule(rest);
|
|
567
567
|
}
|
|
568
568
|
case "remote": {
|
|
@@ -2710,4 +2710,4 @@ async function cmdResultSet(rest) {
|
|
|
2710
2710
|
|
|
2711
2711
|
//#endregion
|
|
2712
2712
|
export { runSubcommand as C, writeToIpc as E, resolveResumeArgs as S, stopTipForCli as T, readPtysize as _, cursorAbs as a, resolveOne as b, extractTaskCounts as c, isExitRequest as d, isPidAlive as f, readNotes as g, matchKeyword as h, controlCodeFromName as i, finalizedLines as l, listRecords as m, READ_PAGE_DEFAULT as n, deriveLiveStatus as o, isSubcommand as p, cmdHelp as r, extractNeedsInput as s, GRACEFUL_EXIT_COMMANDS as t, isAgentStuck as u, renderRawLog as v, snapshotStatus as w, resolveReadWindow as x, renderRawLogLines as y };
|
|
2713
|
-
//# sourceMappingURL=subcommands-
|
|
2713
|
+
//# sourceMappingURL=subcommands-BhGxt0eA.js.map
|
|
@@ -4,6 +4,6 @@ import "./configShared-CEyhl0WH.js";
|
|
|
4
4
|
import "./e2e-Bfw7qL9O.js";
|
|
5
5
|
import "./webrtcLink-CBZkZ-LT.js";
|
|
6
6
|
import "./remotes-DBCvpp3B.js";
|
|
7
|
-
import { C as runSubcommand, E as writeToIpc, S as resolveResumeArgs, T as stopTipForCli, _ as readPtysize, a as cursorAbs, b as resolveOne, c as extractTaskCounts, d as isExitRequest, f as isPidAlive, g as readNotes, h as matchKeyword, i as controlCodeFromName, l as finalizedLines, m as listRecords, n as READ_PAGE_DEFAULT, o as deriveLiveStatus, p as isSubcommand, r as cmdHelp, s as extractNeedsInput, t as GRACEFUL_EXIT_COMMANDS, u as isAgentStuck, v as renderRawLog, w as snapshotStatus, x as resolveReadWindow, y as renderRawLogLines } from "./subcommands-
|
|
7
|
+
import { C as runSubcommand, E as writeToIpc, S as resolveResumeArgs, T as stopTipForCli, _ as readPtysize, a as cursorAbs, b as resolveOne, c as extractTaskCounts, d as isExitRequest, f as isPidAlive, g as readNotes, h as matchKeyword, i as controlCodeFromName, l as finalizedLines, m as listRecords, n as READ_PAGE_DEFAULT, o as deriveLiveStatus, p as isSubcommand, r as cmdHelp, s as extractNeedsInput, t as GRACEFUL_EXIT_COMMANDS, u as isAgentStuck, v as renderRawLog, w as snapshotStatus, x as resolveReadWindow, y as renderRawLogLines } from "./subcommands-BhGxt0eA.js";
|
|
8
8
|
|
|
9
9
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-GyNJfWh9.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
|
|
4
4
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-V4qvXgAw.js";
|
|
5
5
|
import { t as PidStore } from "./pidStore-fqXqTKkh.js";
|
|
@@ -1802,4 +1802,4 @@ function sleep(ms) {
|
|
|
1802
1802
|
|
|
1803
1803
|
//#endregion
|
|
1804
1804
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1805
|
-
//# sourceMappingURL=ts-
|
|
1805
|
+
//# sourceMappingURL=ts-CXTowpzb.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "claude-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.159.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-GyNJfWh9.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spawn-notify — fan-out completion detection for an orchestrator parent.
|
|
3
|
+
#
|
|
4
|
+
# Spawns an agent-yes agent FIRE-AND-FORGET (it outlives this script), then
|
|
5
|
+
# BLOCKS until the agent needs attention. Launch THIS via the parent's
|
|
6
|
+
# background runner (e.g. Claude Code's run_in_background): a background command
|
|
7
|
+
# only notifies its parent when the PROCESS EXITS, but an agent never exits — it
|
|
8
|
+
# idles at its prompt waiting for re-instruction. So we let a tiny sibling — this
|
|
9
|
+
# script, blocked on `ay status --wait` — be the thing that exits. The agent
|
|
10
|
+
# itself keeps living, so you can still re-instruct it with `ay send <pid> "…"`.
|
|
11
|
+
#
|
|
12
|
+
# Verified: a nohup+disown child survives the spawning shell's exit, so the agent
|
|
13
|
+
# outlives this waiter.
|
|
14
|
+
#
|
|
15
|
+
# Usage: spawn-notify <cwd> -- <task...>
|
|
16
|
+
# Env: CLI=claude wrapped CLI (claude|codex|gemini|…)
|
|
17
|
+
# AY_FLAGS="-y" extra flags for `ay <cli>` (e.g. -y for yolo)
|
|
18
|
+
# WAIT_MODE=--wait --wait → wake on idle|needs_input|stuck|stopped (recommended:
|
|
19
|
+
# also catches a blocked AskUserQuestion menu)
|
|
20
|
+
# --wait-idle → wake on idle only (misses blocked menus)
|
|
21
|
+
# WAIT_TIMEOUT=6h waiter timeout (ms() syntax: 30s, 5m, 6h)
|
|
22
|
+
# Exit: 0 agent needs attention (idle / blocked-on-input / done)
|
|
23
|
+
# 2 waiter timed out (agent still actively working)
|
|
24
|
+
# 3 agent never registered in ~/.agent-yes/pids.jsonl
|
|
25
|
+
set -uo pipefail
|
|
26
|
+
|
|
27
|
+
cli="${CLI:-claude}"
|
|
28
|
+
cwd="${1:?usage: spawn-notify <cwd> -- <task...>}"; shift
|
|
29
|
+
[ "${1:-}" = "--" ] && shift
|
|
30
|
+
task="$*"
|
|
31
|
+
|
|
32
|
+
# 1) Fire-and-forget. nohup+disown so the agent outlives this waiter; agent-yes
|
|
33
|
+
# keeps its own PTY log under ~/.agent-yes, so /dev/null here loses nothing.
|
|
34
|
+
mkdir -p "$cwd"
|
|
35
|
+
# shellcheck disable=SC2086
|
|
36
|
+
nohup ay "$cli" ${AY_FLAGS:-} --cwd "$cwd" -- "$task" >/dev/null 2>&1 &
|
|
37
|
+
disown || true
|
|
38
|
+
|
|
39
|
+
# 2) Resolve the agent we just spawned to an EXACT pid (newest match in this cwd),
|
|
40
|
+
# retrying until its record lands in pids.jsonl. From here on we key off the
|
|
41
|
+
# pid — exact identity, no --latest ambiguity, no sibling-collision risk.
|
|
42
|
+
pid=""
|
|
43
|
+
for _ in $(seq 1 30); do
|
|
44
|
+
pid=$(ay status "$cwd" --latest 2>/dev/null | sed -n 's/.*"pid":\([0-9]\{1,\}\).*/\1/p' | head -1)
|
|
45
|
+
[ -n "$pid" ] && break
|
|
46
|
+
sleep 1
|
|
47
|
+
done
|
|
48
|
+
[ -z "$pid" ] && { echo "spawn-notify: agent never registered under $cwd" >&2; exit 3; }
|
|
49
|
+
echo "spawn-notify: agent pid=$pid cwd=$cwd — waiting (${WAIT_MODE:---wait})…" >&2
|
|
50
|
+
|
|
51
|
+
# 3) Block until the ball is in the parent's court. Pid keyword = exact identity.
|
|
52
|
+
ay status "$pid" "${WAIT_MODE:---wait}" --timeout "${WAIT_TIMEOUT:-6h}"
|
|
53
|
+
rc=$?
|
|
54
|
+
|
|
55
|
+
# 4) Surface the structured envelope (if the agent ran `ay result set '{...}'`) so
|
|
56
|
+
# it rides along in the parent's notification payload. Non-fatal if absent.
|
|
57
|
+
ay result "$pid" 2>/dev/null || true
|
|
58
|
+
exit $rc
|
package/lab/ui/index.html
CHANGED
|
@@ -4555,9 +4555,25 @@
|
|
|
4555
4555
|
<button class="lfleet" id="nf-go">▷ Launch</button>
|
|
4556
4556
|
<button class="lcancel" id="nf-cancel">cancel</button>
|
|
4557
4557
|
</div>
|
|
4558
|
+
<div id="nf-hook" class="lhint" style="display:none"></div>
|
|
4558
4559
|
<div class="lhint">POST /api/spawn on this fleet. ${IS_MAC ? "⌘" : "Ctrl"}+Enter to launch.</div></div>`;
|
|
4559
4560
|
$("newform").style.display = "flex";
|
|
4560
4561
|
setTimeout(() => $("nf-prompt")?.focus(), 0);
|
|
4562
|
+
// Surface whether this host runs a spawn hook (a trusted local command run
|
|
4563
|
+
// before every launch — provisions env/cwd; see ~/.agent-yes/config.json).
|
|
4564
|
+
// Read-only: /api/spawn-config discloses only the boolean, never the body.
|
|
4565
|
+
if (target?.tx?.fetchJSON) {
|
|
4566
|
+
target.tx
|
|
4567
|
+
.fetchJSON("/api/spawn-config")
|
|
4568
|
+
.then((c) => {
|
|
4569
|
+
const el = $("nf-hook");
|
|
4570
|
+
if (el && c && c.hasSpawnHook) {
|
|
4571
|
+
el.textContent = "⚙ this host runs a spawn hook before launch";
|
|
4572
|
+
el.style.display = "";
|
|
4573
|
+
}
|
|
4574
|
+
})
|
|
4575
|
+
.catch(() => {});
|
|
4576
|
+
}
|
|
4561
4577
|
}
|
|
4562
4578
|
|
|
4563
4579
|
async function submitNew() {
|
package/package.json
CHANGED
package/ts/openBrowser.ts
CHANGED
|
@@ -54,9 +54,7 @@ export async function offerOpenInBrowser(
|
|
|
54
54
|
if (!resolveOpener(url)) return false;
|
|
55
55
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
56
56
|
try {
|
|
57
|
-
const answer = (
|
|
58
|
-
await new Promise<string>((resolve) => rl.question(prompt, resolve))
|
|
59
|
-
)
|
|
57
|
+
const answer = (await new Promise<string>((resolve) => rl.question(prompt, resolve)))
|
|
60
58
|
.trim()
|
|
61
59
|
.toLowerCase();
|
|
62
60
|
if (answer !== "" && answer !== "y" && answer !== "yes") return false;
|
package/ts/serve.ts
CHANGED
|
@@ -1703,6 +1703,14 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1703
1703
|
const agentArgv = [...ayCmd, cli, ...(prompt ? ["--", prompt] : [])];
|
|
1704
1704
|
// don't leak our Claude Code session into the agent
|
|
1705
1705
|
const agentEnv = freshAgentEnv();
|
|
1706
|
+
// Detach the agent into its OWN session (setsid). When `ay serve` runs WITH a
|
|
1707
|
+
// controlling terminal (started in a shell rather than as a headless daemon),
|
|
1708
|
+
// an undetached child inherits the daemon's session + controlling tty and lands
|
|
1709
|
+
// in a *background* process group. The first terminal op it makes then raises
|
|
1710
|
+
// SIGTTOU/SIGTTIN → the child is STOPPED before emitting any output (console
|
|
1711
|
+
// renders nothing), and the stop hits the whole group — freezing `ay serve`
|
|
1712
|
+
// itself. `detached: true` (setsid) gives the agent a fresh session with no
|
|
1713
|
+
// controlling terminal, immune to both. Matches the restart/openBrowser paths.
|
|
1706
1714
|
try {
|
|
1707
1715
|
const hook = getSpawnHook();
|
|
1708
1716
|
if (hook) {
|
|
@@ -1723,6 +1731,7 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1723
1731
|
// after exec would), and bounds our read to the first few KB.
|
|
1724
1732
|
const child = Bun.spawn([shell, "-c", script, "ay-spawn", ...agentArgv], {
|
|
1725
1733
|
cwd,
|
|
1734
|
+
detached: true,
|
|
1726
1735
|
env: { ...agentEnv, AGENT_YES_CWD: cwd, AGENT_YES_CLI: cli },
|
|
1727
1736
|
stdin: "ignore",
|
|
1728
1737
|
stdout: "ignore",
|
|
@@ -1768,6 +1777,7 @@ export async function cmdServe(rest: string[]): Promise<number> {
|
|
|
1768
1777
|
}
|
|
1769
1778
|
const child = Bun.spawn(agentArgv, {
|
|
1770
1779
|
cwd,
|
|
1780
|
+
detached: true,
|
|
1771
1781
|
env: agentEnv,
|
|
1772
1782
|
stdin: "ignore",
|
|
1773
1783
|
stdout: "ignore",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-IAAUoBpk.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-Dwe07Fe6.js";
|
|
4
|
-
import "./pidStore-fqXqTKkh.js";
|
|
5
|
-
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CeyKUwT5.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|