agent-yes 1.272.0 → 1.274.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/README.md +9 -44
- package/agent-yes.config.schema.json +0 -1
- package/default.config.yaml +0 -138
- package/dist/{JsonlStore-CPGIR0Wy.js → JsonlStore-BqF7AQ6E.js} +1 -1
- package/dist/{SUPPORTED_CLIS-DFOStQkx.js → SUPPORTED_CLIS-CNrMN-89.js} +2 -2
- package/dist/SUPPORTED_CLIS-DibEQVjZ.js +12 -0
- package/dist/{agent-yes.config-2xKNJM5Y.js → agent-yes.config-C77SodMP.js} +2 -2
- package/dist/{agentShare-CLhjMsHZ.js → agentShare-YWrrxqN2.js} +10 -10
- package/dist/{agentYesHome-CtmsY6I-.js → agentYesHome-BNtn19J4.js} +1 -1
- package/dist/{askCli-Bbxt9Umz.js → askCli-DR9vhdcV.js} +6 -6
- package/dist/{browser-_2ndf80G.js → browser-XQnbPssj.js} +5 -5
- package/dist/{browser-CorYp8Yu.js → browser-oqC3Ln2a.js} +1 -1
- package/dist/callback-DK1hFHPw.js +13 -0
- package/dist/{callback-BVKHRbUE.js → callback-DwnU5Bnx.js} +6 -6
- package/dist/{callbackCore-Bbe7rpN2.js → callbackCore-Bl2gGcxg.js} +1 -1
- package/dist/{callbackCore-C0Cg9RbS.js → callbackCore-LDxJc8LY.js} +1 -1
- package/dist/{channels-CkaCyvEp.js → channels-C3w3eAES.js} +2 -2
- package/dist/{channels-3gz9gHP7.js → channels-hOG3-R_3.js} +6 -6
- package/dist/channels.js +5 -5
- package/dist/cli.js +14 -14
- package/dist/{cmdPs-Cu__YsO7.js → cmdPs-tpr2ARd3.js} +9 -9
- package/dist/{configShared-DYxlvrH0.js → configShared-DKTgiz7K.js} +1 -1
- package/dist/{cwdConflictWarn-Buy3r_qc.js → cwdConflictWarn-CqN5pJ-7.js} +2 -2
- package/dist/{cwdPassthroughHint-BlWO-h5w.js → cwdPassthroughHint-DxdqgwEN.js} +1 -1
- package/dist/{e2e-OLfcNxiv.js → e2e-z1xpwSAg.js} +1 -1
- package/dist/{expose-Bfo-dZdy.js → expose-DTxYWQeW.js} +1 -1
- package/dist/{forkNested-jc2ER9xn.js → forkNested-CZAvQj0y.js} +8 -5
- package/dist/{globalPidIndex-Dq4KY2IV.js → globalPidIndex-DoaKEUkO.js} +1 -1
- package/dist/{globalPidIndex-CQX_0JSB.js → globalPidIndex-yvWZXeWT.js} +1 -1
- package/dist/{hist-DiOYRXuD.js → hist-QkZZBp-y.js} +1 -1
- package/dist/{html2canvas-pro.esm-D19oTQeV.js → html2canvas-pro.esm-DbGFekkq.js} +1 -1
- package/dist/{identity-CLaJ9-uE.js → identity-CKRuYUFi.js} +1 -1
- package/dist/{identity-BmDYOuZE.js → identity-DFr3dfTO.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/{initMsg-CTAIqBWF.js → initMsg-C8ISz_C7.js} +1 -1
- package/dist/{initMsg-Bat5PUDf.js → initMsg-DAwRS89d.js} +1 -1
- package/dist/{invokedCli-uqM2YYA7.js → invokedCli-zdFbz1ST.js} +2 -5
- package/dist/{messageLog-BYFwioFY.js → messageLog-DdjBNqgt.js} +1 -1
- package/dist/{needsInput-DhfIwxse.js → needsInput-BHopZGM8.js} +1 -1
- package/dist/{nodeRuntime-CKc1BN5J.js → nodeRuntime-C_LtZrpR.js} +2 -2
- package/dist/{notifyDaemon-BmtjtW5L.js → notifyDaemon-Dx5sjDIx.js} +9 -9
- package/dist/{notifyStore-Dus2D1XA.js → notifyStore-2SWKGwZI.js} +2 -2
- package/dist/{notifyStore-0hlFPa6z.js → notifyStore-CdsB3crt.js} +1 -1
- package/dist/{openBrowser-Dmg2Oi4q.js → openBrowser-B50Lhaob.js} +1 -1
- package/dist/{parentLink-DS-XflaJ.js → parentLink-i817PzXK.js} +2 -2
- package/dist/{parentLink-BwX4jaGD.js → parentLink-svMgYhEi.js} +2 -2
- package/dist/{parentPingLoop-BtggDU06.js → parentPingLoop-DV7fBiMN.js} +7 -7
- package/dist/{peer-Dr4zvtcd.js → peer-BZyUyCt3.js} +3 -3
- package/dist/peer-CGSJluSw.js +4 -0
- package/dist/{pidStore-DJqSZPJi.js → pidStore-B73xnAeT.js} +4 -4
- package/dist/pidStore-V51mbgZY.js +6 -0
- package/dist/{reaper-B231i49s.js → reaper-BDMiMfwK.js} +1 -1
- package/dist/{reaper-C4BvNylH.js → reaper-UimuuTfO.js} +2 -2
- package/dist/{remotes-IzQHupeo.js → remotes-Cdlaj7AP.js} +17 -9
- package/dist/{remotes-BiftUp09.js → remotes-gAI6-nv9.js} +3 -3
- package/dist/{runningLock-DBoONoM-.js → runningLock-BOIPD_Vs.js} +1 -1
- package/dist/rustBinary-B7cNTxWn.js +4 -0
- package/dist/{rustBinary-ISnNc7Uf.js → rustBinary-DDwz4LdD.js} +73 -6
- package/dist/{schedule-D37Q9LGO.js → schedule-Bc5tKPJi.js} +12 -12
- package/dist/{serve-Dw0x9Of9.js → serve-ClCAkuSj.js} +41 -41
- package/dist/{setup-BmBjOyza.js → setup-D6v3wsXq.js} +4 -4
- package/dist/{share-DTPZgbfH.js → share-BvU4I8BI.js} +2 -2
- package/dist/{share-RgJUhzqG.js → share-DTlaFn6s.js} +2 -2
- package/dist/spawnGate-CdewnL8m.js +5 -0
- package/dist/{spawnGate-CS3oFdJ9.js → spawnGate-DtC_ffme.js} +3 -3
- package/dist/{store-C7I2CAu9.js → store-CnxYGoia.js} +1 -1
- package/dist/{subcommands-DKqbwkvb.js → subcommands-D0TqxBxb.js} +67 -85
- package/dist/subcommands-DLqtyQdw.js +11 -0
- package/dist/{systemPathLink-DGVcx0fg.js → systemPathLink-Df_pstm2.js} +1 -1
- package/dist/{terminal-BQ79zaFa.js → terminal-Dzu-PTIU.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoAutomation-BETGOik9.js → todoAutomation-CbVVS4re.js} +2 -2
- package/dist/{todoCli-DUoxA1dh.js → todoCli-Cf0EHvfy.js} +6 -6
- package/dist/{todoIdentity-BffBxRHA.js → todoIdentity-NEceTmEe.js} +2 -2
- package/dist/{todoStore-Wk8U4zJ8.js → todoStore-DF6vxHgV.js} +2 -2
- package/dist/{tray-Bxq_sfvU.js → tray-BeIs4ffu.js} +2 -2
- package/dist/{trayApp-BsETHuMR.js → trayApp-DCG8CjCV.js} +3 -3
- package/dist/trayApp-kjebnTl9.js +5 -0
- package/dist/{ts-Bb-h7XQP.js → ts-BmGAFUb7.js} +15 -19
- package/dist/{versionChecker-D9LB-MW5.js → versionChecker-DzWZizq2.js} +3 -3
- package/dist/{webrtcLink-B72AQ2eb.js → webrtcLink-DLaJfTcB.js} +2 -2
- package/dist/{webrtcRemote-D68dkqFp.js → webrtcRemote-CIbq5Hdt.js} +3 -3
- package/dist/{widget-gRjJprB5.js → widget-hU12_Sog.js} +3 -3
- package/dist/widget.js +1 -1
- package/dist/widgets.js +5 -5
- package/dist/{workspaceConfig-EK7XNsgR.js → workspaceConfig-DctWuxUP.js} +2 -2
- package/dist/ws-jKReYJJw.js +12 -0
- package/dist/{ws-BFli3FKi.js → ws-pRbF59zo.js} +3 -3
- package/examples/.agent-yes.config.yaml +0 -9
- package/examples/spawn-notify.sh +1 -1
- package/lab/ui/index.html +123 -34
- package/lab/ui/landing.html +7 -8
- package/package.json +1 -6
- package/ts/buildRustArgs.spec.ts +8 -10
- package/ts/configLoader.spec.ts +2 -2
- package/ts/cwdConflictWarn.spec.ts +1 -1
- package/ts/cwdConflictWarn.ts +1 -1
- package/ts/forkNested.spec.ts +2 -0
- package/ts/forkNested.ts +5 -2
- package/ts/index.ts +2 -8
- package/ts/invokedCli.spec.ts +0 -1
- package/ts/invokedCli.ts +1 -2
- package/ts/needsInput.spec.ts +7 -3
- package/ts/needsInput.ts +1 -1
- package/ts/parseCliArgs.spec.ts +1 -1
- package/ts/parseCliArgs.ts +1 -1
- package/ts/postbuild.ts +1 -1
- package/ts/remotes.ts +24 -7
- package/ts/rustBinary.spec.ts +81 -0
- package/ts/rustBinary.ts +106 -9
- package/ts/subcommands.spec.ts +7 -9
- package/ts/subcommands.ts +90 -64
- package/ts/todoParse.ts +1 -1
- package/dist/SUPPORTED_CLIS-C1rgBiLd.js +0 -12
- package/dist/callback-C64-nP2U.js +0 -13
- package/dist/gemini-yes.js +0 -10
- package/dist/openrouter-yes.js +0 -10
- package/dist/orcy.js +0 -10
- package/dist/peer-u1AUAZeA.js +0 -4
- package/dist/pidStore-D-b8I6Qx.js +0 -6
- package/dist/spawnGate-C6YKlnmb.js +0 -5
- package/dist/subcommands-TAOmVCxo.js +0 -11
- package/dist/trayApp-BHx2FN2d.js +0 -5
- package/dist/ws-CklRMQwW.js +0 -12
- package/scripts/deepseek-codex.ts +0 -580
package/ts/subcommands.ts
CHANGED
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { randomBytes } from "crypto";
|
|
15
|
-
import { spawn } from "child_process";
|
|
16
15
|
import { appendFile, mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
17
|
-
import { fileURLToPath } from "node:url";
|
|
18
16
|
import ms from "ms";
|
|
19
17
|
import { homedir } from "os";
|
|
20
18
|
import path from "path";
|
|
@@ -445,8 +443,7 @@ const SUBCOMMANDS = new Set([
|
|
|
445
443
|
"expose",
|
|
446
444
|
"callback",
|
|
447
445
|
"reap",
|
|
448
|
-
"
|
|
449
|
-
"ds",
|
|
446
|
+
"gc",
|
|
450
447
|
"help",
|
|
451
448
|
]);
|
|
452
449
|
|
|
@@ -715,9 +712,20 @@ export async function runSubcommand(argv: string[]): Promise<number | null> {
|
|
|
715
712
|
await reaper.sweep();
|
|
716
713
|
return 0;
|
|
717
714
|
}
|
|
718
|
-
case "
|
|
719
|
-
|
|
720
|
-
|
|
715
|
+
case "gc": {
|
|
716
|
+
const { gcOldBinaryDirs } = await import("./rustBinary.ts");
|
|
717
|
+
const res = gcOldBinaryDirs();
|
|
718
|
+
if (res.removed.length === 0) {
|
|
719
|
+
process.stdout.write("no old agent-yes binary cache dirs to remove\n");
|
|
720
|
+
} else {
|
|
721
|
+
for (const v of res.removed) process.stdout.write(`removed ${v}\n`);
|
|
722
|
+
const mib = (res.freedBytes / 1024 / 1024).toFixed(1);
|
|
723
|
+
process.stdout.write(
|
|
724
|
+
`freed ${mib} MiB (${res.freedBytes} bytes) across ${res.removed.length} version dir(s)\n`,
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
return 0;
|
|
728
|
+
}
|
|
721
729
|
case "help":
|
|
722
730
|
return cmdHelp(managerCommands);
|
|
723
731
|
default:
|
|
@@ -730,47 +738,6 @@ export async function runSubcommand(argv: string[]): Promise<number | null> {
|
|
|
730
738
|
}
|
|
731
739
|
}
|
|
732
740
|
|
|
733
|
-
// ---------------------------------------------------------------------------
|
|
734
|
-
// ay deepseek / ay ds
|
|
735
|
-
// ---------------------------------------------------------------------------
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* `ay deepseek [-- <args>…]` / `ay ds …`: run the local DeepSeek adapter that
|
|
739
|
-
* bridges Codex's Responses API to DeepSeek's chat completions, then spawn
|
|
740
|
-
* `codex` pointed at it. The adapter script lives in this package's
|
|
741
|
-
* `scripts/deepseek-codex.ts` and is Bun-only (Bun.serve / Bun.spawn), so it is
|
|
742
|
-
* re-exec'd via the same bun runtime that's running us — never imported into
|
|
743
|
-
* this process. Extra args are forwarded verbatim to `codex`.
|
|
744
|
-
*/
|
|
745
|
-
export function cmdDeepseek(rest: string[]): Promise<number> {
|
|
746
|
-
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
747
|
-
const script = path.join(root, "scripts", "deepseek-codex.ts");
|
|
748
|
-
const bunBin = process.execPath.split(/[/\\]/).at(-1)?.startsWith("bun")
|
|
749
|
-
? process.execPath
|
|
750
|
-
: "bun";
|
|
751
|
-
const child = spawn(bunBin, [script, ...rest], {
|
|
752
|
-
cwd: process.cwd(),
|
|
753
|
-
env: { ...process.env, AGENT_YES_BIN: process.argv[1] },
|
|
754
|
-
stdio: "inherit",
|
|
755
|
-
});
|
|
756
|
-
return new Promise((resolve) => {
|
|
757
|
-
child.on("error", (err) => {
|
|
758
|
-
process.stderr.write(`ay deepseek: failed to start: ${err.message}\n`);
|
|
759
|
-
resolve(1);
|
|
760
|
-
});
|
|
761
|
-
child.on("exit", (code, signal) => {
|
|
762
|
-
if (signal) {
|
|
763
|
-
resolve(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
764
|
-
} else {
|
|
765
|
-
resolve(code ?? 1);
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
for (const signal of ["SIGINT", "SIGTERM"] as const) {
|
|
769
|
-
process.on(signal, () => child.kill(signal));
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
|
|
774
741
|
// ---------------------------------------------------------------------------
|
|
775
742
|
// ay help
|
|
776
743
|
// ---------------------------------------------------------------------------
|
|
@@ -830,6 +797,11 @@ async function buildAgentContextSection(self: GlobalPidRecord): Promise<string>
|
|
|
830
797
|
` --advisor is a claude-cli flag — only takes effect for claude/cy)\n` +
|
|
831
798
|
` List agents (your children nest under your own pid in the tree):\n` +
|
|
832
799
|
` ay ls --cwd ${shortenPath(self.cwd)}\n` +
|
|
800
|
+
` Get notified when a sub-agent finishes / goes idle / crashes (preferred):\n` +
|
|
801
|
+
` ay notify watch --unread\n` +
|
|
802
|
+
` (one watch loop for your whole fan-out: needs_input / idle / exited edges land\n` +
|
|
803
|
+
` in your inbox; a hard child crash is caught by the 2s liveness poll, which\n` +
|
|
804
|
+
` nothing push-based can see)\n` +
|
|
833
805
|
` Watch agent state changes, scoped to your workspace:\n` +
|
|
834
806
|
` ay ls --watch --cwd ${shortenPath(self.cwd)}\n` +
|
|
835
807
|
` (NDJSON stream of state changes across every matched agent — one watcher\n` +
|
|
@@ -886,11 +858,12 @@ export async function cmdHelp(managerCommands = true): Promise<number> {
|
|
|
886
858
|
` ay exit <keyword> [reason] graceful shutdown, recording who/why (= 'ay send <kw> exit')\n` +
|
|
887
859
|
` ay restart <keyword> [--fresh] stop (if live) + relaunch resuming the session; --fresh replays the prompt\n` +
|
|
888
860
|
` ay status <keyword> agent status snapshot\n` +
|
|
861
|
+
` ay notify watch --unread get notified when sub-agents finish/stuck/crash (writes to inbox)\n` +
|
|
889
862
|
` ay whoami [--json] (inside an agent) your own registry identity + reply address\n` +
|
|
890
863
|
` ay result <keyword> [--wait] pull an agent's structured result envelope\n` +
|
|
891
864
|
` ay result set '<json>' (inside an agent) deposit your result envelope\n` +
|
|
892
865
|
` ay reap kill process groups leaked by dead agents\n` +
|
|
893
|
-
` ay
|
|
866
|
+
` ay gc remove old-version binary cache dirs and report freed space\n` +
|
|
894
867
|
wsLines +
|
|
895
868
|
`\n` +
|
|
896
869
|
`Remote:\n` +
|
|
@@ -906,7 +879,7 @@ export async function cmdHelp(managerCommands = true): Promise<number> {
|
|
|
906
879
|
` ay send <token>@<host>:<port>:<kw> <msg>\n` +
|
|
907
880
|
`\n` +
|
|
908
881
|
`Run an agent (naming a CLI is what launches one — bare 'ay' shows this help):\n` +
|
|
909
|
-
` ay <claude|codex
|
|
882
|
+
` ay <claude|codex|...> [options] -- [prompt]\n` +
|
|
910
883
|
` ay claude -- "fix the bug in auth.ts"\n` +
|
|
911
884
|
` cy [options] -- [prompt] shortcut for 'ay claude' (bare 'cy' starts claude)\n` +
|
|
912
885
|
` ay claude --help full agent-runner options\n` +
|
|
@@ -1181,12 +1154,12 @@ async function runRemoteLs(
|
|
|
1181
1154
|
if (records.length === 0) {
|
|
1182
1155
|
process.stderr.write(
|
|
1183
1156
|
remote.keyword
|
|
1184
|
-
? `no agents matched "${remote.keyword}" on ${remote.
|
|
1185
|
-
: `no running agents on ${remote.
|
|
1157
|
+
? `no agents matched "${remote.keyword}" on ${remote.label}\n`
|
|
1158
|
+
: `no running agents on ${remote.label}\n`,
|
|
1186
1159
|
);
|
|
1187
1160
|
return 0;
|
|
1188
1161
|
}
|
|
1189
|
-
process.stderr.write(`[remote ${remote.
|
|
1162
|
+
process.stderr.write(`[remote ${remote.label}]\n`);
|
|
1190
1163
|
const termWidth = (process.stdout as any).columns ?? 120;
|
|
1191
1164
|
const widths = {
|
|
1192
1165
|
pid: Math.max(3, ...records.map((r: any) => String(r.pid).length)),
|
|
@@ -1249,7 +1222,7 @@ async function runRemoteRead(
|
|
|
1249
1222
|
let attempt = 0;
|
|
1250
1223
|
|
|
1251
1224
|
process.stderr.write(
|
|
1252
|
-
`[remote ${remote.
|
|
1225
|
+
`[remote ${remote.label} ${keyword}]\nfollowing... (Ctrl-C to stop, timeout: ${Math.round(reconnectTimeoutMs / 1000)}s)\n`,
|
|
1253
1226
|
);
|
|
1254
1227
|
|
|
1255
1228
|
while (!ac.signal.aborted) {
|
|
@@ -1325,7 +1298,7 @@ async function runRemoteRead(
|
|
|
1325
1298
|
return 1;
|
|
1326
1299
|
}
|
|
1327
1300
|
const text = await res.text();
|
|
1328
|
-
process.stderr.write(`[remote ${remote.
|
|
1301
|
+
process.stderr.write(`[remote ${remote.label} ${keyword}]\n`);
|
|
1329
1302
|
process.stdout.write(text);
|
|
1330
1303
|
if (!text.endsWith("\n")) process.stdout.write("\n");
|
|
1331
1304
|
return 0;
|
|
@@ -1359,7 +1332,7 @@ async function runRemoteSend(remote: ResolvedRemote, msg: string, code: string):
|
|
|
1359
1332
|
cwd?: string;
|
|
1360
1333
|
agentId?: string;
|
|
1361
1334
|
};
|
|
1362
|
-
process.stdout.write(`sent to remote pid ${data.pid} (${remote.
|
|
1335
|
+
process.stdout.write(`sent to remote pid ${data.pid} (${remote.label} ${keyword})\n`);
|
|
1363
1336
|
// Record the sender's half of the exchange locally (the recipient's inbox is
|
|
1364
1337
|
// recorded on the remote host by its /api/send handler). Only real bodies.
|
|
1365
1338
|
if (msg && msg !== "-") {
|
|
@@ -1376,7 +1349,7 @@ async function runRemoteSend(remote: ResolvedRemote, msg: string, code: string):
|
|
|
1376
1349
|
code: code.toLowerCase() === "enter" ? undefined : code.toLowerCase(),
|
|
1377
1350
|
confirmed: true,
|
|
1378
1351
|
wrapped: false,
|
|
1379
|
-
remote: remote.
|
|
1352
|
+
remote: remote.label,
|
|
1380
1353
|
});
|
|
1381
1354
|
}
|
|
1382
1355
|
return 0;
|
|
@@ -1419,7 +1392,7 @@ async function runRemoteSpawn(
|
|
|
1419
1392
|
if (name === "TimeoutError" || name === "AbortError") {
|
|
1420
1393
|
// The request may or may not have spawned — do NOT retry. Let the operator check.
|
|
1421
1394
|
process.stderr.write(
|
|
1422
|
-
`remote spawn: no response from ${remote.
|
|
1395
|
+
`remote spawn: no response from ${remote.label} within ${Math.round(SPAWN_TIMEOUT_MS / 1000)}s — ` +
|
|
1423
1396
|
`result UNKNOWN (not retried).\n ay ls ${hint} # check whether it started\n`,
|
|
1424
1397
|
);
|
|
1425
1398
|
return 2;
|
|
@@ -1440,7 +1413,7 @@ async function runRemoteSpawn(
|
|
|
1440
1413
|
provisioned?: { action: string };
|
|
1441
1414
|
};
|
|
1442
1415
|
process.stdout.write(
|
|
1443
|
-
`spawned ${r.cli} on ${remote.
|
|
1416
|
+
`spawned ${r.cli} on ${remote.label} in ${r.cwd}` +
|
|
1444
1417
|
`${r.hook ? " (via spawn hook)" : ""}` +
|
|
1445
1418
|
`${r.provisioned ? ` (${r.provisioned.action})` : ""}\n`,
|
|
1446
1419
|
);
|
|
@@ -1452,10 +1425,14 @@ async function runRemoteSpawn(
|
|
|
1452
1425
|
if (r.agentId && !hint.includes("://")) {
|
|
1453
1426
|
process.stderr.write(
|
|
1454
1427
|
`\n ay tail ${hint}:${r.agentId} # watch its output\n` +
|
|
1455
|
-
` ay status ${hint}:${r.agentId} --wait # block until it needs you\n
|
|
1428
|
+
` ay status ${hint}:${r.agentId} --wait # block until it needs you\n` +
|
|
1429
|
+
` ay notify watch --unread # get notified when it finishes/stuck/crashes\n`,
|
|
1456
1430
|
);
|
|
1457
1431
|
} else {
|
|
1458
|
-
process.stderr.write(
|
|
1432
|
+
process.stderr.write(
|
|
1433
|
+
`\n ay ls ${hint} # the new ${r.cli} agent appears here\n` +
|
|
1434
|
+
` ay notify watch --unread # get notified when it finishes/stuck/crashes\n`,
|
|
1435
|
+
);
|
|
1459
1436
|
}
|
|
1460
1437
|
return 0;
|
|
1461
1438
|
}
|
|
@@ -3075,7 +3052,7 @@ async function cmdSpawn(rest: string[]): Promise<number> {
|
|
|
3075
3052
|
.option("cli", {
|
|
3076
3053
|
type: "string",
|
|
3077
3054
|
default: "claude",
|
|
3078
|
-
description: "CLI to wrap (claude|codex
|
|
3055
|
+
description: "CLI to wrap (claude|codex|…)",
|
|
3079
3056
|
})
|
|
3080
3057
|
.option("cwd", {
|
|
3081
3058
|
type: "string",
|
|
@@ -3983,7 +3960,6 @@ export function stopTipForCli(cli: string, pid: number): string | null {
|
|
|
3983
3960
|
/// Verified against current upstream CLIs:
|
|
3984
3961
|
/// claude — `/exit`
|
|
3985
3962
|
/// codex — `/exit`
|
|
3986
|
-
/// gemini — `/quit`
|
|
3987
3963
|
/// bash/cmd/powershell — `exit` (the shell builtin; closes the session at a
|
|
3988
3964
|
/// bare prompt, far cleaner than Ctrl+C which would instead hit whatever
|
|
3989
3965
|
/// app is running in the foreground).
|
|
@@ -3992,7 +3968,6 @@ export function stopTipForCli(cli: string, pid: number): string | null {
|
|
|
3992
3968
|
export const GRACEFUL_EXIT_COMMANDS: Record<string, string> = {
|
|
3993
3969
|
claude: "/exit",
|
|
3994
3970
|
codex: "/exit",
|
|
3995
|
-
gemini: "/quit",
|
|
3996
3971
|
bash: "exit",
|
|
3997
3972
|
cmd: "exit",
|
|
3998
3973
|
powershell: "exit",
|
|
@@ -5355,9 +5330,60 @@ function printNotifyEvents(events: NotifyEvent[], json: boolean): void {
|
|
|
5355
5330
|
}
|
|
5356
5331
|
}
|
|
5357
5332
|
|
|
5333
|
+
/** Full usage for `ay notify --help` / `ay notify watch --help`. Every verb and
|
|
5334
|
+
* option is listed so the caller never needs to enter the watch loop to find
|
|
5335
|
+
* out what the subcommand does. */
|
|
5336
|
+
function notifyHelp(): number {
|
|
5337
|
+
process.stdout.write(
|
|
5338
|
+
`ay notify — read sub-agent status-transition notifications (see docs/subagent-notify.md)\n\n` +
|
|
5339
|
+
`A parent runs ONE command in its Monitor loop to get every child's\n` +
|
|
5340
|
+
`needs_input / idle / exited edge, each with a payload (question / tail /\n` +
|
|
5341
|
+
`git head) so it can act without tailing the child:\n\n` +
|
|
5342
|
+
` ay notify watch --unread # tail your inbox; ensures the daemon is up\n\n` +
|
|
5343
|
+
`Usage:\n` +
|
|
5344
|
+
` ay notify watch [--parent <pid>] [--since <seq>] [--since-ts <ms>] [--unread]\n` +
|
|
5345
|
+
` [--ack] [--json] [--consumer <name>] [--interval <s>]\n` +
|
|
5346
|
+
` [--no-ensure-daemon]\n` +
|
|
5347
|
+
` ay notify read [--parent <pid>] [--since <seq>] [--since-ts <ms>] [--unread]\n` +
|
|
5348
|
+
` [--ack] [--json] [--consumer <name>] [--postmortem]\n` +
|
|
5349
|
+
` [--started-at <ms>]\n` +
|
|
5350
|
+
` ay notify cursor get|set <seq> [--parent <pid>] [--consumer <name>]\n\n` +
|
|
5351
|
+
`Verbs:\n` +
|
|
5352
|
+
` watch tail -f the inbox (at-least-once by default; --ack advances the cursor)\n` +
|
|
5353
|
+
` read one-shot drain of the inbox\n` +
|
|
5354
|
+
` cursor get/set the persisted unread cursor (multiple readers via --consumer)\n\n` +
|
|
5355
|
+
`Options:\n` +
|
|
5356
|
+
` --parent <pid> parent pid whose inbox to drain (default: $AGENT_YES_PID)\n` +
|
|
5357
|
+
` --since <seq> only edges with seq greater than this\n` +
|
|
5358
|
+
` --since-ts <ms> only edges at/after this epoch-ms\n` +
|
|
5359
|
+
` --unread only edges past the saved cursor\n` +
|
|
5360
|
+
` --ack advance the cursor past what's shown (at-least-once: off by default)\n` +
|
|
5361
|
+
` --json emit raw NDJSON events\n` +
|
|
5362
|
+
` --consumer <name> cursor identity (for multiple readers, default: parent)\n` +
|
|
5363
|
+
` --interval <s> poll interval in seconds (watch, default: 2)\n` +
|
|
5364
|
+
` --no-ensure-daemon don't start the notifyd singleton if not running (watch)\n` +
|
|
5365
|
+
` --postmortem read-only: inspect an inbox whose parent has exited (read)\n` +
|
|
5366
|
+
` --started-at <ms> disambiguate which incarnation to show (--postmortem)\n\n` +
|
|
5367
|
+
`Daemon (ay notifyd):\n` +
|
|
5368
|
+
` ay notifyd run|start|status|stop the detection engine (auto-started by watch)\n`,
|
|
5369
|
+
);
|
|
5370
|
+
return 0;
|
|
5371
|
+
}
|
|
5372
|
+
|
|
5358
5373
|
async function cmdNotify(rest: string[]): Promise<number> {
|
|
5359
5374
|
const verb = rest[0];
|
|
5360
5375
|
const args = rest.slice(1);
|
|
5376
|
+
// --help / -h (at either the verb or the sub-verb position) returns the full
|
|
5377
|
+
// usage immediately — it must never fall through into the watch loop.
|
|
5378
|
+
if (
|
|
5379
|
+
verb === "help" ||
|
|
5380
|
+
verb === "--help" ||
|
|
5381
|
+
verb === "-h" ||
|
|
5382
|
+
args.includes("--help") ||
|
|
5383
|
+
args.includes("-h")
|
|
5384
|
+
) {
|
|
5385
|
+
return notifyHelp();
|
|
5386
|
+
}
|
|
5361
5387
|
|
|
5362
5388
|
if (verb === "cursor") return cmdNotifyCursor(args);
|
|
5363
5389
|
if (verb !== "read" && verb !== "watch") {
|
package/ts/todoParse.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parse an agent's todo/task list out of its RENDERED TUI screen.
|
|
3
3
|
*
|
|
4
|
-
* Source of truth for EVERY CLI (claude, codex,
|
|
4
|
+
* Source of truth for EVERY CLI (claude, codex, …) is the screen the
|
|
5
5
|
* agent draws — never a CLI-specific session file. The durable copy is the
|
|
6
6
|
* per-pid raw log (`<cwd>/.agent-yes/<pid>.raw.log`); rendering it through a
|
|
7
7
|
* headless xterm (see renderRawLog) collapses the reflow/redraw frames into the
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./versionChecker-D9LB-MW5.js";
|
|
3
|
-
import "./ts-Bb-h7XQP.js";
|
|
4
|
-
import "./todoAutomation-BETGOik9.js";
|
|
5
|
-
import "./JsonlStore-CPGIR0Wy.js";
|
|
6
|
-
import "./globalPidIndex-Dq4KY2IV.js";
|
|
7
|
-
import "./pidStore-DJqSZPJi.js";
|
|
8
|
-
import "./messageLog-BYFwioFY.js";
|
|
9
|
-
import "./todoStore-Wk8U4zJ8.js";
|
|
10
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DFOStQkx.js";
|
|
11
|
-
|
|
12
|
-
export { SUPPORTED_CLIS };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
|
-
import "./messageLog-BYFwioFY.js";
|
|
4
|
-
import "./e2e-OLfcNxiv.js";
|
|
5
|
-
import "./configShared-DYxlvrH0.js";
|
|
6
|
-
import "./subcommands-DKqbwkvb.js";
|
|
7
|
-
import "./notifyStore-Dus2D1XA.js";
|
|
8
|
-
import "./webrtcLink-B72AQ2eb.js";
|
|
9
|
-
import "./remotes-IzQHupeo.js";
|
|
10
|
-
import "./callbackCore-Bbe7rpN2.js";
|
|
11
|
-
import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BVKHRbUE.js";
|
|
12
|
-
|
|
13
|
-
export { cmdCallback };
|
package/dist/gemini-yes.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { join, dirname } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6
|
-
if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
|
|
7
|
-
await import("../ts/cli.ts");
|
|
8
|
-
} else {
|
|
9
|
-
await import("./cli.js");
|
|
10
|
-
}
|
package/dist/openrouter-yes.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { join, dirname } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6
|
-
if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
|
|
7
|
-
await import("../ts/cli.ts");
|
|
8
|
-
} else {
|
|
9
|
-
await import("./cli.js");
|
|
10
|
-
}
|
package/dist/orcy.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { join, dirname } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6
|
-
if (typeof Bun !== "undefined" && existsSync(join(root, ".git"))) {
|
|
7
|
-
await import("../ts/cli.ts");
|
|
8
|
-
} else {
|
|
9
|
-
await import("./cli.js");
|
|
10
|
-
}
|
package/dist/peer-u1AUAZeA.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
|
-
import "./messageLog-BYFwioFY.js";
|
|
4
|
-
import "./e2e-OLfcNxiv.js";
|
|
5
|
-
import "./configShared-DYxlvrH0.js";
|
|
6
|
-
import { A as menuSelectKeys, B as resolveOne, C as isSubcommand, D as lastStdinAt, E as lastReadAt, F as recentMessageEdges, G as snapshotStatus, H as resolveResumeArgs, I as recentReadEdges, J as submitAndConfirm, K as stdinActivityPath, L as renderLogTailLines, M as readLogForRender, N as readNotes, O as listRecords, P as readPtysize, R as renderRawLog, S as isSlashCommand, T as isUserTyping, U as restartHintLines, V as resolveReadWindow, W as runSubcommand, X as writeKeysPaced, Y as waitForLogQuiet, Z as writeToIpc, _ as finalizedLines, a as TYPING_WINDOW_MS, b as isExitRequest, c as cmdHelp, d as deriveLiveState, f as deriveLiveStatus, g as extractTaskCounts, h as extractNeedsInput, i as READ_WINDOW_MS, j as readAgentPtysize, k as matchKeyword, l as controlCodeFromName, m as extractMenu, n as MAX_RENDER_BYTES, o as backoffWhileTyping, p as extractBadges, q as stopTipForCli, r as READ_PAGE_DEFAULT, s as cmdDeepseek, t as GRACEFUL_EXIT_COMMANDS, u as cursorAbs, v as isAgentStuck, w as isUnknownManagerToken, x as isPidAlive, y as isBareManagerInvocation, z as renderRawLogLines } from "./subcommands-DKqbwkvb.js";
|
|
7
|
-
import "./notifyStore-Dus2D1XA.js";
|
|
8
|
-
import "./webrtcLink-B72AQ2eb.js";
|
|
9
|
-
import "./remotes-IzQHupeo.js";
|
|
10
|
-
|
|
11
|
-
export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
|
package/dist/trayApp-BHx2FN2d.js
DELETED
package/dist/ws-CklRMQwW.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import "./globalPidIndex-Dq4KY2IV.js";
|
|
3
|
-
import "./messageLog-BYFwioFY.js";
|
|
4
|
-
import "./e2e-OLfcNxiv.js";
|
|
5
|
-
import "./configShared-DYxlvrH0.js";
|
|
6
|
-
import "./subcommands-DKqbwkvb.js";
|
|
7
|
-
import "./notifyStore-Dus2D1XA.js";
|
|
8
|
-
import "./webrtcLink-B72AQ2eb.js";
|
|
9
|
-
import "./remotes-IzQHupeo.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-BFli3FKi.js";
|
|
11
|
-
|
|
12
|
-
export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
|