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
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import { t as invokedCliName } from "./invokedCli-
|
|
2
|
-
import { t as agentYesHome } from "./agentYesHome-
|
|
3
|
-
import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-
|
|
4
|
-
import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-
|
|
5
|
-
import { t as loadSharedCliDefaults } from "./configShared-
|
|
6
|
-
import { t as formatIdentity } from "./identity-
|
|
7
|
-
import { n as isWorkingScreen, r as parseMenu, t as classifyNeedsInput } from "./needsInput-
|
|
8
|
-
import { S as postmortemStartedAt, _ as filterSinceSeq, a as getCursor, b as maxSeq, f as readInbox, o as heartbeatWatcher, p as setCursor, r as clearWatcher, s as hostId, v as filterSinceTs, y as filterUnread } from "./notifyStore-
|
|
9
|
-
import { n as isWebrtcSpec } from "./webrtcLink-
|
|
10
|
-
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-
|
|
11
|
-
import { spawn } from "child_process";
|
|
1
|
+
import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
|
|
2
|
+
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
3
|
+
import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-DoaKEUkO.js";
|
|
4
|
+
import { a as recordOutbox, i as recordMessage, n as readMailbox, t as partyMatches } from "./messageLog-DdjBNqgt.js";
|
|
5
|
+
import { t as loadSharedCliDefaults } from "./configShared-DKTgiz7K.js";
|
|
6
|
+
import { t as formatIdentity } from "./identity-CKRuYUFi.js";
|
|
7
|
+
import { n as isWorkingScreen, r as parseMenu, t as classifyNeedsInput } from "./needsInput-BHopZGM8.js";
|
|
8
|
+
import { S as postmortemStartedAt, _ as filterSinceSeq, a as getCursor, b as maxSeq, f as readInbox, o as heartbeatWatcher, p as setCursor, r as clearWatcher, s as hostId, v as filterSinceTs, y as filterUnread } from "./notifyStore-2SWKGwZI.js";
|
|
9
|
+
import { n as isWebrtcSpec } from "./webrtcLink-DLaJfTcB.js";
|
|
10
|
+
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-Cdlaj7AP.js";
|
|
12
11
|
import ms from "ms";
|
|
13
12
|
import yargs from "yargs";
|
|
14
13
|
import { appendFile, mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
15
14
|
import { homedir } from "os";
|
|
16
15
|
import path from "path";
|
|
17
16
|
import { lock } from "proper-lockfile";
|
|
18
|
-
import { fileURLToPath } from "node:url";
|
|
19
17
|
import { randomBytes } from "crypto";
|
|
20
18
|
|
|
21
19
|
//#region ts/agentTree.ts
|
|
@@ -83,7 +81,7 @@ function flattenForest(roots) {
|
|
|
83
81
|
/**
|
|
84
82
|
* Parse an agent's todo/task list out of its RENDERED TUI screen.
|
|
85
83
|
*
|
|
86
|
-
* Source of truth for EVERY CLI (claude, codex,
|
|
84
|
+
* Source of truth for EVERY CLI (claude, codex, …) is the screen the
|
|
87
85
|
* agent draws — never a CLI-specific session file. The durable copy is the
|
|
88
86
|
* per-pid raw log (`<cwd>/.agent-yes/<pid>.raw.log`); rendering it through a
|
|
89
87
|
* headless xterm (see renderRawLog) collapses the reflow/redraw frames into the
|
|
@@ -815,8 +813,7 @@ const SUBCOMMANDS = new Set([
|
|
|
815
813
|
"expose",
|
|
816
814
|
"callback",
|
|
817
815
|
"reap",
|
|
818
|
-
"
|
|
819
|
-
"ds",
|
|
816
|
+
"gc",
|
|
820
817
|
"help"
|
|
821
818
|
]);
|
|
822
819
|
const MANAGER_SUBCOMMANDS = new Set(["setup", "ws"]);
|
|
@@ -907,7 +904,7 @@ async function runSubcommand(argv) {
|
|
|
907
904
|
switch (sub) {
|
|
908
905
|
case "ls":
|
|
909
906
|
case "list": return await cmdLs(rest);
|
|
910
|
-
case "ps": return await (await import("./cmdPs-
|
|
907
|
+
case "ps": return await (await import("./cmdPs-tpr2ARd3.js")).cmdPs(rest);
|
|
911
908
|
case "status": return await cmdStatus(rest);
|
|
912
909
|
case "whoami": return await cmdWhoami(rest);
|
|
913
910
|
case "result": return await cmdResult(rest);
|
|
@@ -918,7 +915,7 @@ async function runSubcommand(argv) {
|
|
|
918
915
|
case "tail": return await cmdRead(rest, { mode: "tail" });
|
|
919
916
|
case "head": return await cmdRead(rest, { mode: "head" });
|
|
920
917
|
case "hist":
|
|
921
|
-
case "history": return await (await import("./hist-
|
|
918
|
+
case "history": return await (await import("./hist-QkZZBp-y.js")).cmdHist(rest);
|
|
922
919
|
case "send": return await cmdSend(rest);
|
|
923
920
|
case "msgs": return await cmdMsgs(rest);
|
|
924
921
|
case "key": return await cmdKey(rest);
|
|
@@ -931,7 +928,7 @@ async function runSubcommand(argv) {
|
|
|
931
928
|
case "note": return await cmdNote(rest);
|
|
932
929
|
case "ask":
|
|
933
930
|
case "answer": {
|
|
934
|
-
const { runAskSubcommand, runAnswerSubcommand } = await import("./askCli-
|
|
931
|
+
const { runAskSubcommand, runAnswerSubcommand } = await import("./askCli-DR9vhdcV.js");
|
|
935
932
|
const deps = {
|
|
936
933
|
resolveAgent: (keyword) => resolveOne(keyword, {
|
|
937
934
|
all: true,
|
|
@@ -945,63 +942,72 @@ async function runSubcommand(argv) {
|
|
|
945
942
|
return sub === "ask" ? await runAskSubcommand(rest, deps) : await runAnswerSubcommand(rest, deps);
|
|
946
943
|
}
|
|
947
944
|
case "todo": {
|
|
948
|
-
const { runTodoSubcommand } = await import("./todoCli-
|
|
945
|
+
const { runTodoSubcommand } = await import("./todoCli-Cf0EHvfy.js");
|
|
949
946
|
return runTodoSubcommand(rest);
|
|
950
947
|
}
|
|
951
948
|
case "ch":
|
|
952
949
|
case "channels": {
|
|
953
|
-
const { cmdCh } = await import("./channels-
|
|
950
|
+
const { cmdCh } = await import("./channels-hOG3-R_3.js");
|
|
954
951
|
return cmdCh(rest);
|
|
955
952
|
}
|
|
956
953
|
case "term": {
|
|
957
|
-
const { cmdTerm } = await import("./terminal-
|
|
954
|
+
const { cmdTerm } = await import("./terminal-Dzu-PTIU.js");
|
|
958
955
|
return cmdTerm(rest);
|
|
959
956
|
}
|
|
960
957
|
case "widget": {
|
|
961
|
-
const { cmdWidget } = await import("./widget-
|
|
958
|
+
const { cmdWidget } = await import("./widget-hU12_Sog.js");
|
|
962
959
|
return cmdWidget(rest);
|
|
963
960
|
}
|
|
964
961
|
case "mint": {
|
|
965
|
-
const { cmdMint } = await import("./widget-
|
|
962
|
+
const { cmdMint } = await import("./widget-hU12_Sog.js");
|
|
966
963
|
return cmdMint(rest);
|
|
967
964
|
}
|
|
968
965
|
case "serve": {
|
|
969
|
-
const { cmdServe } = await import("./serve-
|
|
966
|
+
const { cmdServe } = await import("./serve-ClCAkuSj.js");
|
|
970
967
|
return cmdServe(rest);
|
|
971
968
|
}
|
|
972
969
|
case "tray": {
|
|
973
|
-
const { cmdTray } = await import("./trayApp-
|
|
970
|
+
const { cmdTray } = await import("./trayApp-kjebnTl9.js");
|
|
974
971
|
return cmdTray(rest);
|
|
975
972
|
}
|
|
976
973
|
case "setup": {
|
|
977
|
-
const { cmdSetup } = await import("./setup-
|
|
974
|
+
const { cmdSetup } = await import("./setup-D6v3wsXq.js");
|
|
978
975
|
return cmdSetup(rest);
|
|
979
976
|
}
|
|
980
977
|
case "ws": {
|
|
981
|
-
const { cmdWs } = await import("./ws-
|
|
978
|
+
const { cmdWs } = await import("./ws-jKReYJJw.js");
|
|
982
979
|
return cmdWs(rest);
|
|
983
980
|
}
|
|
984
981
|
case "schedule": {
|
|
985
|
-
const { cmdSchedule } = await import("./schedule-
|
|
982
|
+
const { cmdSchedule } = await import("./schedule-Bc5tKPJi.js");
|
|
986
983
|
return cmdSchedule(rest);
|
|
987
984
|
}
|
|
988
985
|
case "remote": {
|
|
989
|
-
const { cmdRemote } = await import("./remotes-
|
|
986
|
+
const { cmdRemote } = await import("./remotes-gAI6-nv9.js");
|
|
990
987
|
return cmdRemote(rest);
|
|
991
988
|
}
|
|
992
989
|
case "expose": {
|
|
993
|
-
const { cmdExpose } = await import("./expose-
|
|
990
|
+
const { cmdExpose } = await import("./expose-DTxYWQeW.js");
|
|
994
991
|
return cmdExpose(rest);
|
|
995
992
|
}
|
|
996
993
|
case "callback": {
|
|
997
|
-
const { cmdCallback } = await import("./callback-
|
|
994
|
+
const { cmdCallback } = await import("./callback-DK1hFHPw.js");
|
|
998
995
|
return cmdCallback(rest);
|
|
999
996
|
}
|
|
1000
997
|
case "reap":
|
|
1001
|
-
await (await import("./reaper-
|
|
998
|
+
await (await import("./reaper-BDMiMfwK.js")).sweep();
|
|
1002
999
|
return 0;
|
|
1003
|
-
case "
|
|
1004
|
-
|
|
1000
|
+
case "gc": {
|
|
1001
|
+
const { gcOldBinaryDirs } = await import("./rustBinary-B7cNTxWn.js");
|
|
1002
|
+
const res = gcOldBinaryDirs();
|
|
1003
|
+
if (res.removed.length === 0) process.stdout.write("no old agent-yes binary cache dirs to remove\n");
|
|
1004
|
+
else {
|
|
1005
|
+
for (const v of res.removed) process.stdout.write(`removed ${v}\n`);
|
|
1006
|
+
const mib = (res.freedBytes / 1024 / 1024).toFixed(1);
|
|
1007
|
+
process.stdout.write(`freed ${mib} MiB (${res.freedBytes} bytes) across ${res.removed.length} version dir(s)\n`);
|
|
1008
|
+
}
|
|
1009
|
+
return 0;
|
|
1010
|
+
}
|
|
1005
1011
|
case "help": return cmdHelp(managerCommands);
|
|
1006
1012
|
default: return null;
|
|
1007
1013
|
}
|
|
@@ -1012,37 +1018,6 @@ async function runSubcommand(argv) {
|
|
|
1012
1018
|
}
|
|
1013
1019
|
}
|
|
1014
1020
|
/**
|
|
1015
|
-
* `ay deepseek [-- <args>…]` / `ay ds …`: run the local DeepSeek adapter that
|
|
1016
|
-
* bridges Codex's Responses API to DeepSeek's chat completions, then spawn
|
|
1017
|
-
* `codex` pointed at it. The adapter script lives in this package's
|
|
1018
|
-
* `scripts/deepseek-codex.ts` and is Bun-only (Bun.serve / Bun.spawn), so it is
|
|
1019
|
-
* re-exec'd via the same bun runtime that's running us — never imported into
|
|
1020
|
-
* this process. Extra args are forwarded verbatim to `codex`.
|
|
1021
|
-
*/
|
|
1022
|
-
function cmdDeepseek(rest) {
|
|
1023
|
-
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
1024
|
-
const script = path.join(root, "scripts", "deepseek-codex.ts");
|
|
1025
|
-
const child = spawn(process.execPath.split(/[/\\]/).at(-1)?.startsWith("bun") ? process.execPath : "bun", [script, ...rest], {
|
|
1026
|
-
cwd: process.cwd(),
|
|
1027
|
-
env: {
|
|
1028
|
-
...process.env,
|
|
1029
|
-
AGENT_YES_BIN: process.argv[1]
|
|
1030
|
-
},
|
|
1031
|
-
stdio: "inherit"
|
|
1032
|
-
});
|
|
1033
|
-
return new Promise((resolve) => {
|
|
1034
|
-
child.on("error", (err) => {
|
|
1035
|
-
process.stderr.write(`ay deepseek: failed to start: ${err.message}\n`);
|
|
1036
|
-
resolve(1);
|
|
1037
|
-
});
|
|
1038
|
-
child.on("exit", (code, signal) => {
|
|
1039
|
-
if (signal) resolve(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
1040
|
-
else resolve(code ?? 1);
|
|
1041
|
-
});
|
|
1042
|
-
for (const signal of ["SIGINT", "SIGTERM"]) process.on(signal, () => child.kill(signal));
|
|
1043
|
-
});
|
|
1044
|
-
}
|
|
1045
|
-
/**
|
|
1046
1021
|
* The banner shown by `ay help` / `ay -h` when this process is itself running
|
|
1047
1022
|
* inside an agent (`AGENT_YES_PID` set — see resolveSender). Answers the three
|
|
1048
1023
|
* things a nested agent actually needs: who am I, who spawned me, and how do I
|
|
@@ -1070,14 +1045,14 @@ As an agent, you can:
|
|
|
1070
1045
|
(pick --model by task complexity so easy tasks don't cost like hard ones;
|
|
1071
1046
|
--advisor is a claude-cli flag — only takes effect for claude/cy)
|
|
1072
1047
|
List agents (your children nest under your own pid in the tree):
|
|
1073
|
-
ay ls --cwd ${shortenPath(self.cwd)}\n Watch agent state changes, scoped to your workspace:\n ay ls --watch --cwd ${shortenPath(self.cwd)}\n (NDJSON stream of state changes across every matched agent — one watcher\n for the whole fan-out instead of N \`ay status --watch\`es)\n Read one sub-agent's output:\n ay tail -f <pid> follow live output (no single command tails\n many agents' content at once yet — loop\n \`ay ls --json\` pids into per-pid \`ay tail\`)\n\n`;
|
|
1048
|
+
ay ls --cwd ${shortenPath(self.cwd)}\n Get notified when a sub-agent finishes / goes idle / crashes (preferred):\n ay notify watch --unread\n (one watch loop for your whole fan-out: needs_input / idle / exited edges land\n in your inbox; a hard child crash is caught by the 2s liveness poll, which\n nothing push-based can see)\n Watch agent state changes, scoped to your workspace:\n ay ls --watch --cwd ${shortenPath(self.cwd)}\n (NDJSON stream of state changes across every matched agent — one watcher\n for the whole fan-out instead of N \`ay status --watch\`es)\n Read one sub-agent's output:\n ay tail -f <pid> follow live output (no single command tails\n many agents' content at once yet — loop\n \`ay ls --json\` pids into per-pid \`ay tail\`)\n\n`;
|
|
1074
1049
|
}
|
|
1075
1050
|
async function cmdHelp(managerCommands = true) {
|
|
1076
1051
|
const setupLine = managerCommands ? ` ay setup guided setup: pick a workspace, share to agent-yes.com\n` : ``;
|
|
1077
1052
|
const wsLines = managerCommands ? " ay ws ls [--status] list <owner>/<repo>/tree/<branch> workspaces\n ay ws new <owner>/<repo>[@branch] clone/refresh a workspace (ay ws help for more)\n" : ``;
|
|
1078
1053
|
const self = process.env.AGENT_YES_PID ? await resolveSender() : null;
|
|
1079
1054
|
const agentSection = self ? await buildAgentContextSection(self) : "";
|
|
1080
|
-
process.stdout.write(agentSection + "ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay ps [keyword] per-agent CPU/RSS, rolled up over each\n agent's whole process tree, + box vitals\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n ay cat <keyword> full log\n ay head <keyword> first N lines\n ay hist [-n 6] [--all] [--json] past agent conversations (claude/codex\n transcripts, incl. exited sessions);\n this cwd unless --all\n ay send <keyword> <msg> send a message (keyword '.' = agent in this cwd)\n ay msgs [keyword] [--in|--out] inter-agent message log (sent + received)\n ay ch mk|join|send|read|tail <topic> local-first E2E channels: AI ↔ humans on a topic (ay ch help)\n ay term embed <pid> <script> to embed a live read-only agent terminal in a page (ay term help)\n ay widget ls | read selection|dom read an opted-in page widget's context (selection/DOM) (ay widget help)\n ay mint <target> --caps ... mint a scoped, short-TTL capability token (embeddable in a page)\n ay key <keyword> <key...> send raw keystrokes (down/up/enter/esc/…) — drives menus\n ay select <keyword> <N> pick option N of a needs_input selection menu\n ay attach <keyword> interactive attach (detach: Ctrl-\\)\n ay stop <keyword> graceful shutdown (/exit for claude/codex)\n ay exit <keyword> [reason] graceful shutdown, recording who/why (= 'ay send <kw> exit')\n ay restart <keyword> [--fresh] stop (if live) + relaunch resuming the session; --fresh replays the prompt\n ay status <keyword> agent status snapshot\n ay whoami [--json] (inside an agent) your own registry identity + reply address\n ay result <keyword> [--wait] pull an agent's structured result envelope\n ay result set '<json>' (inside an agent) deposit your result envelope\n ay reap kill process groups leaked by dead agents\n ay
|
|
1055
|
+
process.stdout.write(agentSection + "ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay ps [keyword] per-agent CPU/RSS, rolled up over each\n agent's whole process tree, + box vitals\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n ay cat <keyword> full log\n ay head <keyword> first N lines\n ay hist [-n 6] [--all] [--json] past agent conversations (claude/codex\n transcripts, incl. exited sessions);\n this cwd unless --all\n ay send <keyword> <msg> send a message (keyword '.' = agent in this cwd)\n ay msgs [keyword] [--in|--out] inter-agent message log (sent + received)\n ay ch mk|join|send|read|tail <topic> local-first E2E channels: AI ↔ humans on a topic (ay ch help)\n ay term embed <pid> <script> to embed a live read-only agent terminal in a page (ay term help)\n ay widget ls | read selection|dom read an opted-in page widget's context (selection/DOM) (ay widget help)\n ay mint <target> --caps ... mint a scoped, short-TTL capability token (embeddable in a page)\n ay key <keyword> <key...> send raw keystrokes (down/up/enter/esc/…) — drives menus\n ay select <keyword> <N> pick option N of a needs_input selection menu\n ay attach <keyword> interactive attach (detach: Ctrl-\\)\n ay stop <keyword> graceful shutdown (/exit for claude/codex)\n ay exit <keyword> [reason] graceful shutdown, recording who/why (= 'ay send <kw> exit')\n ay restart <keyword> [--fresh] stop (if live) + relaunch resuming the session; --fresh replays the prompt\n ay status <keyword> agent status snapshot\n ay notify watch --unread get notified when sub-agents finish/stuck/crash (writes to inbox)\n ay whoami [--json] (inside an agent) your own registry identity + reply address\n ay result <keyword> [--wait] pull an agent's structured result envelope\n ay result set '<json>' (inside an agent) deposit your result envelope\n ay reap kill process groups leaked by dead agents\n ay gc remove old-version binary cache dirs and report freed space\n" + wsLines + "\nRemote:\n" + setupLine + " ay schedule <when> <cli> -- <msg> run an agent on a schedule (HH:MM or cron)\n ay serve [--port N] start HTTP API server (prints token)\n ay serve status show serve daemon/server status\n ay remote add <alias> http://<token>@<host>:<port>\n ay remote ls / rm <alias> manage saved remotes\n ay expose <port> share localhost:<port> at https://<id>.agent-yes.com (private link)\n ay callback --expires 7d mint an embeddable message-me widget for one agent\n ay ls <token>@<host>:<port> connect inline (no alias needed)\n ay send <token>@<host>:<port>:<kw> <msg>\n\nRun an agent (naming a CLI is what launches one — bare 'ay' shows this help):\n ay <claude|codex|...> [options] -- [prompt]\n ay claude -- \"fix the bug in auth.ts\"\n cy [options] -- [prompt] shortcut for 'ay claude' (bare 'cy' starts claude)\n ay claude --help full agent-runner options\n\nLabs (examples at https://github.com/snomiao/agent-yes/tree/main/lab):\n local-role-play/ designer + builder on one machine\n http-remote/ ay serve remote access demo\n p2p-pairing/ libp2p P2P (needs: cargo build --features swarm)\n");
|
|
1081
1056
|
return 0;
|
|
1082
1057
|
}
|
|
1083
1058
|
function matchKeyword(record, keyword) {
|
|
@@ -1234,10 +1209,10 @@ async function runRemoteLs(remote, opts) {
|
|
|
1234
1209
|
}
|
|
1235
1210
|
const records = await res.json();
|
|
1236
1211
|
if (records.length === 0) {
|
|
1237
|
-
process.stderr.write(remote.keyword ? `no agents matched "${remote.keyword}" on ${remote.
|
|
1212
|
+
process.stderr.write(remote.keyword ? `no agents matched "${remote.keyword}" on ${remote.label}\n` : `no running agents on ${remote.label}\n`);
|
|
1238
1213
|
return 0;
|
|
1239
1214
|
}
|
|
1240
|
-
process.stderr.write(`[remote ${remote.
|
|
1215
|
+
process.stderr.write(`[remote ${remote.label}]\n`);
|
|
1241
1216
|
const termWidth = process.stdout.columns ?? 120;
|
|
1242
1217
|
const widths = {
|
|
1243
1218
|
pid: Math.max(3, ...records.map((r) => String(r.pid).length)),
|
|
@@ -1280,7 +1255,7 @@ async function runRemoteRead(remote, mode, follow, n, reconnectTimeoutMs = 12e4,
|
|
|
1280
1255
|
const deadline = Date.now() + reconnectTimeoutMs;
|
|
1281
1256
|
let delay = 1e3;
|
|
1282
1257
|
let attempt = 0;
|
|
1283
|
-
process.stderr.write(`[remote ${remote.
|
|
1258
|
+
process.stderr.write(`[remote ${remote.label} ${keyword}]\nfollowing... (Ctrl-C to stop, timeout: ${Math.round(reconnectTimeoutMs / 1e3)}s)\n`);
|
|
1284
1259
|
while (!ac.signal.aborted) try {
|
|
1285
1260
|
const res = await fetch(`${remote.url}/api/tail/${encodeURIComponent(keyword)}`, {
|
|
1286
1261
|
headers: {
|
|
@@ -1347,7 +1322,7 @@ async function runRemoteRead(remote, mode, follow, n, reconnectTimeoutMs = 12e4,
|
|
|
1347
1322
|
return 1;
|
|
1348
1323
|
}
|
|
1349
1324
|
const text = await res.text();
|
|
1350
|
-
process.stderr.write(`[remote ${remote.
|
|
1325
|
+
process.stderr.write(`[remote ${remote.label} ${keyword}]\n`);
|
|
1351
1326
|
process.stdout.write(text);
|
|
1352
1327
|
if (!text.endsWith("\n")) process.stdout.write("\n");
|
|
1353
1328
|
return 0;
|
|
@@ -1376,7 +1351,7 @@ async function runRemoteSend(remote, msg, code) {
|
|
|
1376
1351
|
return 1;
|
|
1377
1352
|
}
|
|
1378
1353
|
const data = await res.json();
|
|
1379
|
-
process.stdout.write(`sent to remote pid ${data.pid} (${remote.
|
|
1354
|
+
process.stdout.write(`sent to remote pid ${data.pid} (${remote.label} ${keyword})\n`);
|
|
1380
1355
|
if (msg && msg !== "-") await recordOutbox({
|
|
1381
1356
|
at: Date.now(),
|
|
1382
1357
|
from,
|
|
@@ -1390,7 +1365,7 @@ async function runRemoteSend(remote, msg, code) {
|
|
|
1390
1365
|
code: code.toLowerCase() === "enter" ? void 0 : code.toLowerCase(),
|
|
1391
1366
|
confirmed: true,
|
|
1392
1367
|
wrapped: false,
|
|
1393
|
-
remote: remote.
|
|
1368
|
+
remote: remote.label
|
|
1394
1369
|
});
|
|
1395
1370
|
return 0;
|
|
1396
1371
|
}
|
|
@@ -1417,7 +1392,7 @@ async function runRemoteSpawn(remote, hint, spec) {
|
|
|
1417
1392
|
} catch (e) {
|
|
1418
1393
|
const name = e?.name;
|
|
1419
1394
|
if (name === "TimeoutError" || name === "AbortError") {
|
|
1420
|
-
process.stderr.write(`remote spawn: no response from ${remote.
|
|
1395
|
+
process.stderr.write(`remote spawn: no response from ${remote.label} within ${Math.round(SPAWN_TIMEOUT_MS / 1e3)}s — result UNKNOWN (not retried).\n ay ls ${hint} # check whether it started\n`);
|
|
1421
1396
|
return 2;
|
|
1422
1397
|
}
|
|
1423
1398
|
process.stderr.write(`remote spawn failed: ${e.message}\n`);
|
|
@@ -1428,9 +1403,9 @@ async function runRemoteSpawn(remote, hint, spec) {
|
|
|
1428
1403
|
return 1;
|
|
1429
1404
|
}
|
|
1430
1405
|
const r = await res.json();
|
|
1431
|
-
process.stdout.write(`spawned ${r.cli} on ${remote.
|
|
1432
|
-
if (r.agentId && !hint.includes("://")) process.stderr.write(`\n ay tail ${hint}:${r.agentId} # watch its output\n ay status ${hint}:${r.agentId} --wait # block until it needs you\n`);
|
|
1433
|
-
else process.stderr.write(`\n ay ls ${hint} # the new ${r.cli} agent appears here\n`);
|
|
1406
|
+
process.stdout.write(`spawned ${r.cli} on ${remote.label} in ${r.cwd}${r.hook ? " (via spawn hook)" : ""}${r.provisioned ? ` (${r.provisioned.action})` : ""}\n`);
|
|
1407
|
+
if (r.agentId && !hint.includes("://")) process.stderr.write(`\n ay tail ${hint}:${r.agentId} # watch its output\n ay status ${hint}:${r.agentId} --wait # block until it needs you\n ay notify watch --unread # get notified when it finishes/stuck/crashes\n`);
|
|
1408
|
+
else process.stderr.write(`\n ay ls ${hint} # the new ${r.cli} agent appears here\n ay notify watch --unread # get notified when it finishes/stuck/crashes\n`);
|
|
1434
1409
|
return 0;
|
|
1435
1410
|
}
|
|
1436
1411
|
async function runRemoteStatus(remote) {
|
|
@@ -1457,7 +1432,7 @@ async function fetchRemoteRecordsRaw(url, token, opts) {
|
|
|
1457
1432
|
let base = url;
|
|
1458
1433
|
let bearer = token;
|
|
1459
1434
|
if (isWebrtcSpec(url)) {
|
|
1460
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
1435
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-CIbq5Hdt.js");
|
|
1461
1436
|
bridge = await startWebrtcBridge(url);
|
|
1462
1437
|
base = bridge.baseUrl;
|
|
1463
1438
|
bearer = bridge.token;
|
|
@@ -2652,7 +2627,7 @@ async function cmdSpawn(rest) {
|
|
|
2652
2627
|
const argv = await yargs(rest).usage("Usage: ay spawn <remote> [--cli claude] [--cwd <dir>] [--from <src>] -- <prompt>").option("cli", {
|
|
2653
2628
|
type: "string",
|
|
2654
2629
|
default: "claude",
|
|
2655
|
-
description: "CLI to wrap (claude|codex
|
|
2630
|
+
description: "CLI to wrap (claude|codex|…)"
|
|
2656
2631
|
}).option("cwd", {
|
|
2657
2632
|
type: "string",
|
|
2658
2633
|
description: "Working dir ON THE REMOTE (resolved against the remote's workspace root)"
|
|
@@ -3199,7 +3174,6 @@ function stopTipForCli(cli, pid) {
|
|
|
3199
3174
|
const GRACEFUL_EXIT_COMMANDS = {
|
|
3200
3175
|
claude: "/exit",
|
|
3201
3176
|
codex: "/exit",
|
|
3202
|
-
gemini: "/quit",
|
|
3203
3177
|
bash: "exit",
|
|
3204
3178
|
cmd: "exit",
|
|
3205
3179
|
powershell: "exit"
|
|
@@ -3500,7 +3474,7 @@ async function cmdAttach(rest) {
|
|
|
3500
3474
|
const winsizeDir = path.join(ayHome, "winsize");
|
|
3501
3475
|
await mkdir(winsizeDir, { recursive: true });
|
|
3502
3476
|
const winsizePath = path.join(winsizeDir, String(record.pid));
|
|
3503
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
3477
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-ClCAkuSj.js");
|
|
3504
3478
|
const daemonBase = await resolveDaemonHttpBase().catch(() => null);
|
|
3505
3479
|
const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
|
|
3506
3480
|
const capViewer = `attach:${process.pid}`;
|
|
@@ -4126,9 +4100,17 @@ function printNotifyEvents(events, json) {
|
|
|
4126
4100
|
if (e.tail) process.stdout.write(e.tail.split("\n").map((l) => ` | ${l}`).join("\n") + "\n");
|
|
4127
4101
|
}
|
|
4128
4102
|
}
|
|
4103
|
+
/** Full usage for `ay notify --help` / `ay notify watch --help`. Every verb and
|
|
4104
|
+
* option is listed so the caller never needs to enter the watch loop to find
|
|
4105
|
+
* out what the subcommand does. */
|
|
4106
|
+
function notifyHelp() {
|
|
4107
|
+
process.stdout.write("ay notify — read sub-agent status-transition notifications (see docs/subagent-notify.md)\n\nA parent runs ONE command in its Monitor loop to get every child's\nneeds_input / idle / exited edge, each with a payload (question / tail /\ngit head) so it can act without tailing the child:\n\n ay notify watch --unread # tail your inbox; ensures the daemon is up\n\nUsage:\n ay notify watch [--parent <pid>] [--since <seq>] [--since-ts <ms>] [--unread]\n [--ack] [--json] [--consumer <name>] [--interval <s>]\n [--no-ensure-daemon]\n ay notify read [--parent <pid>] [--since <seq>] [--since-ts <ms>] [--unread]\n [--ack] [--json] [--consumer <name>] [--postmortem]\n [--started-at <ms>]\n ay notify cursor get|set <seq> [--parent <pid>] [--consumer <name>]\n\nVerbs:\n watch tail -f the inbox (at-least-once by default; --ack advances the cursor)\n read one-shot drain of the inbox\n cursor get/set the persisted unread cursor (multiple readers via --consumer)\n\nOptions:\n --parent <pid> parent pid whose inbox to drain (default: $AGENT_YES_PID)\n --since <seq> only edges with seq greater than this\n --since-ts <ms> only edges at/after this epoch-ms\n --unread only edges past the saved cursor\n --ack advance the cursor past what's shown (at-least-once: off by default)\n --json emit raw NDJSON events\n --consumer <name> cursor identity (for multiple readers, default: parent)\n --interval <s> poll interval in seconds (watch, default: 2)\n --no-ensure-daemon don't start the notifyd singleton if not running (watch)\n --postmortem read-only: inspect an inbox whose parent has exited (read)\n --started-at <ms> disambiguate which incarnation to show (--postmortem)\n\nDaemon (ay notifyd):\n ay notifyd run|start|status|stop the detection engine (auto-started by watch)\n");
|
|
4108
|
+
return 0;
|
|
4109
|
+
}
|
|
4129
4110
|
async function cmdNotify(rest) {
|
|
4130
4111
|
const verb = rest[0];
|
|
4131
4112
|
const args = rest.slice(1);
|
|
4113
|
+
if (verb === "help" || verb === "--help" || verb === "-h" || args.includes("--help") || args.includes("-h")) return notifyHelp();
|
|
4132
4114
|
if (verb === "cursor") return cmdNotifyCursor(args);
|
|
4133
4115
|
if (verb !== "read" && verb !== "watch") {
|
|
4134
4116
|
process.stderr.write("usage: ay notify <read|watch|cursor> [--parent <pid>] [--since <seq>] [--since-ts <ms>] [--unread] [--ack] [--json] [--postmortem]\n");
|
|
@@ -4210,7 +4192,7 @@ async function cmdNotify(rest) {
|
|
|
4210
4192
|
}
|
|
4211
4193
|
const ensure = async () => {
|
|
4212
4194
|
if (!argv["ensure-daemon"]) return;
|
|
4213
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
4195
|
+
const { ensureDaemon } = await import("./notifyDaemon-Dx5sjDIx.js");
|
|
4214
4196
|
await ensureDaemon().catch(() => null);
|
|
4215
4197
|
};
|
|
4216
4198
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4284,7 +4266,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4284
4266
|
}
|
|
4285
4267
|
async function cmdNotifyd(rest) {
|
|
4286
4268
|
const sub = rest[0] ?? "status";
|
|
4287
|
-
const daemon = await import("./notifyDaemon-
|
|
4269
|
+
const daemon = await import("./notifyDaemon-Dx5sjDIx.js");
|
|
4288
4270
|
switch (sub) {
|
|
4289
4271
|
case "run": return daemon.runDaemon();
|
|
4290
4272
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4310,5 +4292,5 @@ async function cmdNotifyd(rest) {
|
|
|
4310
4292
|
}
|
|
4311
4293
|
|
|
4312
4294
|
//#endregion
|
|
4313
|
-
export {
|
|
4314
|
-
//# sourceMappingURL=subcommands-
|
|
4295
|
+
export { buildAgentForest as $, readAgentPtysize as A, resolveReadWindow as B, isUnknownManagerToken as C, listRecords as D, lastStdinAt as E, recentReadEdges as F, stdinActivityPath as G, restartHintLines as H, renderLogTailLines as I, waitForLogQuiet as J, stopTipForCli as K, renderRawLog as L, readNotes as M, readPtysize as N, matchKeyword as O, recentMessageEdges as P, TYPING_BADGE as Q, renderRawLogLines as R, isSubcommand as S, lastReadAt as T, runSubcommand as U, resolveResumeArgs as V, snapshotStatus as W, writeToIpc as X, writeKeysPaced as Y, withIpcLock as Z, isAgentStuck as _, TYPING_WINDOW_MS as a, isPidAlive as b, controlCodeFromName as c, deriveLiveStatus as d, flattenForest as et, extractBadges as f, finalizedLines as g, extractTaskCounts as h, READ_WINDOW_MS as i, readLogForRender as j, menuSelectKeys as k, cursorAbs as l, extractNeedsInput as m, MAX_RENDER_BYTES as n, backoffWhileTyping as o, extractMenu as p, submitAndConfirm as q, READ_PAGE_DEFAULT as r, cmdHelp as s, GRACEFUL_EXIT_COMMANDS as t, deriveLiveState as u, isBareManagerInvocation as v, isUserTyping as w, isSlashCommand as x, isExitRequest as y, resolveOne as z };
|
|
4296
|
+
//# sourceMappingURL=subcommands-D0TqxBxb.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./logger-CDIsZ-Pp.js";
|
|
2
|
+
import "./globalPidIndex-DoaKEUkO.js";
|
|
3
|
+
import "./messageLog-DdjBNqgt.js";
|
|
4
|
+
import "./e2e-z1xpwSAg.js";
|
|
5
|
+
import "./configShared-DKTgiz7K.js";
|
|
6
|
+
import { A as readAgentPtysize, B as resolveReadWindow, C as isUnknownManagerToken, D as listRecords, E as lastStdinAt, F as recentReadEdges, G as stdinActivityPath, H as restartHintLines, I as renderLogTailLines, J as waitForLogQuiet, K as stopTipForCli, L as renderRawLog, M as readNotes, N as readPtysize, O as matchKeyword, P as recentMessageEdges, R as renderRawLogLines, S as isSubcommand, T as lastReadAt, U as runSubcommand, V as resolveResumeArgs, W as snapshotStatus, X as writeToIpc, Y as writeKeysPaced, _ as isAgentStuck, a as TYPING_WINDOW_MS, b as isPidAlive, c as controlCodeFromName, d as deriveLiveStatus, f as extractBadges, g as finalizedLines, h as extractTaskCounts, i as READ_WINDOW_MS, j as readLogForRender, k as menuSelectKeys, l as cursorAbs, m as extractNeedsInput, n as MAX_RENDER_BYTES, o as backoffWhileTyping, p as extractMenu, q as submitAndConfirm, r as READ_PAGE_DEFAULT, s as cmdHelp, t as GRACEFUL_EXIT_COMMANDS, u as deriveLiveState, v as isBareManagerInvocation, w as isUserTyping, x as isSlashCommand, y as isExitRequest, z as resolveOne } from "./subcommands-D0TqxBxb.js";
|
|
7
|
+
import "./notifyStore-2SWKGwZI.js";
|
|
8
|
+
import "./webrtcLink-DLaJfTcB.js";
|
|
9
|
+
import "./remotes-Cdlaj7AP.js";
|
|
10
|
+
|
|
11
|
+
export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
|
|
@@ -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-ClCAkuSj.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-Dzu-PTIU.js.map
|
package/dist/terminal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as DONE_STATE, o as ORPHANED_STATE, p as transitionsOf } from "./todoStore-
|
|
1
|
+
import { i as DONE_STATE, o as ORPHANED_STATE, p as transitionsOf } from "./todoStore-DF6vxHgV.js";
|
|
2
2
|
|
|
3
3
|
//#region ts/removeControlCharacters.ts
|
|
4
4
|
const ESC = String.fromCharCode(27);
|
|
@@ -299,4 +299,4 @@ function reconcileTodos(tasks, agents, registeredGates) {
|
|
|
299
299
|
|
|
300
300
|
//#endregion
|
|
301
301
|
export { renderTree as a, describeBlock as c, renderDigest as i, monitorHint as l, buildTreeJSON as n, unblockedTasks as o, openBlockers as r, blockedOnAgent as s, reconcileTodos as t, removeControlCharacters as u };
|
|
302
|
-
//# sourceMappingURL=todoAutomation-
|
|
302
|
+
//# sourceMappingURL=todoAutomation-CbVVS4re.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { a as renderTree, c as describeBlock, i as renderDigest, n as buildTreeJSON, o as unblockedTasks, s as blockedOnAgent, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-
|
|
3
|
-
import "./JsonlStore-
|
|
4
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
5
|
-
import { a as LIFECYCLES, l as isKnownKind, r as openStore, t as CycleError } from "./todoStore-
|
|
6
|
-
import { a as resolveTodoRoot, i as resolveSelf, n as SELF_OWNER, r as ownerLiveness, t as NO_OWNER } from "./todoIdentity-
|
|
2
|
+
import { a as renderTree, c as describeBlock, i as renderDigest, n as buildTreeJSON, o as unblockedTasks, s as blockedOnAgent, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
3
|
+
import "./JsonlStore-BqF7AQ6E.js";
|
|
4
|
+
import { i as readGlobalPids } from "./globalPidIndex-DoaKEUkO.js";
|
|
5
|
+
import { a as LIFECYCLES, l as isKnownKind, r as openStore, t as CycleError } from "./todoStore-DF6vxHgV.js";
|
|
6
|
+
import { a as resolveTodoRoot, i as resolveSelf, n as SELF_OWNER, r as ownerLiveness, t as NO_OWNER } from "./todoIdentity-NEceTmEe.js";
|
|
7
7
|
import yargs from "yargs";
|
|
8
8
|
|
|
9
9
|
//#region ts/todoCli.ts
|
|
@@ -583,4 +583,4 @@ async function runTodoSubcommand(rest0) {
|
|
|
583
583
|
|
|
584
584
|
//#endregion
|
|
585
585
|
export { runTodoSubcommand };
|
|
586
|
-
//# sourceMappingURL=todoCli-
|
|
586
|
+
//# sourceMappingURL=todoCli-Cf0EHvfy.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
1
|
+
import { i as readGlobalPids } from "./globalPidIndex-DoaKEUkO.js";
|
|
2
2
|
import { execFile } from "child_process";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { promisify } from "util";
|
|
@@ -135,4 +135,4 @@ function ownerLiveness(owner, agents) {
|
|
|
135
135
|
|
|
136
136
|
//#endregion
|
|
137
137
|
export { resolveTodoRoot as a, resolveSelf as i, SELF_OWNER as n, ownerLiveness as r, NO_OWNER as t };
|
|
138
|
-
//# sourceMappingURL=todoIdentity-
|
|
138
|
+
//# sourceMappingURL=todoIdentity-NEceTmEe.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as JsonlStore } from "./JsonlStore-
|
|
1
|
+
import { t as JsonlStore } from "./JsonlStore-BqF7AQ6E.js";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { lock } from "proper-lockfile";
|
|
4
4
|
|
|
@@ -741,4 +741,4 @@ async function openStore(projectRoot) {
|
|
|
741
741
|
|
|
742
742
|
//#endregion
|
|
743
743
|
export { LIFECYCLES as a, initialState as c, requiredGate as d, statesOf as f, DONE_STATE as i, isKnownKind as l, TodoStore as n, ORPHANED_STATE as o, transitionsOf as p, openStore as r, canTransition as s, CycleError as t, nextStates as u };
|
|
744
|
-
//# sourceMappingURL=todoStore-
|
|
744
|
+
//# sourceMappingURL=todoStore-DF6vxHgV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getRunningAgentCount } from "./runningLock-
|
|
1
|
+
import { n as getRunningAgentCount } from "./runningLock-BOIPD_Vs.js";
|
|
2
2
|
import { existsSync } from "fs";
|
|
3
3
|
import { mkdir, readFile, unlink, writeFile } from "fs/promises";
|
|
4
4
|
import { homedir } from "os";
|
|
@@ -187,4 +187,4 @@ async function startTray() {
|
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
189
|
export { ensureTray, startTray };
|
|
190
|
-
//# sourceMappingURL=tray-
|
|
190
|
+
//# sourceMappingURL=tray-BeIs4ffu.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as agentYesHome } from "./agentYesHome-
|
|
1
|
+
import { i as findTrayLauncher } from "./rustBinary-DDwz4LdD.js";
|
|
2
|
+
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { unlink, writeFile } from "node:fs/promises";
|
|
@@ -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-DCG8CjCV.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
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 {
|
|
4
|
-
import { t as agentYesHome } from "./agentYesHome-
|
|
5
|
-
import { u as removeControlCharacters } from "./todoAutomation-
|
|
6
|
-
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-
|
|
7
|
-
import { i as readGlobalPids } from "./globalPidIndex-
|
|
8
|
-
import { t as PidStore } from "./pidStore-
|
|
9
|
-
import { r as recordInbox } from "./messageLog-
|
|
10
|
-
import { n as register, r as sweep } from "./reaper-
|
|
11
|
-
import { a as LIFECYCLES, r as openStore } from "./todoStore-
|
|
3
|
+
import { i as getInstalledPackage } from "./versionChecker-DzWZizq2.js";
|
|
4
|
+
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
5
|
+
import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
6
|
+
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-BOIPD_Vs.js";
|
|
7
|
+
import { i as readGlobalPids } from "./globalPidIndex-DoaKEUkO.js";
|
|
8
|
+
import { t as PidStore } from "./pidStore-B73xnAeT.js";
|
|
9
|
+
import { r as recordInbox } from "./messageLog-DdjBNqgt.js";
|
|
10
|
+
import { n as register, r as sweep } from "./reaper-UimuuTfO.js";
|
|
11
|
+
import { a as LIFECYCLES, r as openStore } from "./todoStore-DF6vxHgV.js";
|
|
12
12
|
import { arch, platform } from "process";
|
|
13
13
|
import { execSync } from "child_process";
|
|
14
14
|
import { closeSync, constants, createReadStream, existsSync, mkdirSync, openSync } from "fs";
|
|
@@ -1526,7 +1526,7 @@ async function compactRawLogTail(logPath, keepBytes = RAW_LOG_KEEP_BYTES) {
|
|
|
1526
1526
|
await fh.close();
|
|
1527
1527
|
}
|
|
1528
1528
|
}
|
|
1529
|
-
const config = await import("./agent-yes.config-
|
|
1529
|
+
const config = await import("./agent-yes.config-C77SodMP.js").then((mod) => mod.default || mod);
|
|
1530
1530
|
const CLIS_CONFIG = config.clis;
|
|
1531
1531
|
/**
|
|
1532
1532
|
* Main function to run agent-cli with automatic yes/no responses
|
|
@@ -1599,11 +1599,11 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
1599
1599
|
})();
|
|
1600
1600
|
const originalPrompt = prompt;
|
|
1601
1601
|
if (prompt && inheritedParentPid) try {
|
|
1602
|
-
const { resolveSpawner } = await import("./parentLink-
|
|
1602
|
+
const { resolveSpawner } = await import("./parentLink-i817PzXK.js");
|
|
1603
1603
|
const spawner = await resolveSpawner(inheritedParentPid);
|
|
1604
1604
|
if (spawner) {
|
|
1605
|
-
const { buildInitMsg } = await import("./initMsg-
|
|
1606
|
-
const { formatIdentity } = await import("./identity-
|
|
1605
|
+
const { buildInitMsg } = await import("./initMsg-DAwRS89d.js");
|
|
1606
|
+
const { formatIdentity } = await import("./identity-DFr3dfTO.js");
|
|
1607
1607
|
const identity = formatIdentity({
|
|
1608
1608
|
cwd: spawner.cwd,
|
|
1609
1609
|
pid: spawner.pid
|
|
@@ -1679,9 +1679,6 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
1679
1679
|
} else if (cli === "claude") {
|
|
1680
1680
|
cliArgs = ["--continue", ...cliArgs];
|
|
1681
1681
|
await logger.debug(`resume|adding --continue flag for claude`);
|
|
1682
|
-
} else if (cli === "gemini") {
|
|
1683
|
-
cliArgs = ["--resume", ...cliArgs];
|
|
1684
|
-
await logger.debug(`resume|adding --resume flag for gemini`);
|
|
1685
1682
|
} else throw new Error(`Resume option is not supported for cli: ${cli}, make a feature request if you want it. https://github.com/snomiao/agent-yes/issues`);
|
|
1686
1683
|
if (prompt && cliConf.promptArg) if (cliConf.promptArg === "first-arg") {
|
|
1687
1684
|
cliArgs = [prompt, ...cliArgs];
|
|
@@ -2074,7 +2071,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
2074
2071
|
}, 100);
|
|
2075
2072
|
const cleanupHeartbeat = () => clearInterval(heartbeatInterval);
|
|
2076
2073
|
shell.onExit(cleanupHeartbeat);
|
|
2077
|
-
const { startParentPingLoop } = await import("./parentPingLoop-
|
|
2074
|
+
const { startParentPingLoop } = await import("./parentPingLoop-DV7fBiMN.js");
|
|
2078
2075
|
const parentPingLoop = startParentPingLoop({
|
|
2079
2076
|
parentPid,
|
|
2080
2077
|
selfWrapperPid: process.pid,
|
|
@@ -2266,7 +2263,6 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
2266
2263
|
}
|
|
2267
2264
|
if (conf.ready?.some((rx) => line.match(rx))) {
|
|
2268
2265
|
logger.debug(`ready |${line}`);
|
|
2269
|
-
if (cli === "gemini" && lineIndex <= 80) return;
|
|
2270
2266
|
ctx.stdinReady.ready();
|
|
2271
2267
|
ctx.stdinFirstReady.ready();
|
|
2272
2268
|
}
|
|
@@ -2338,4 +2334,4 @@ function sleep(ms) {
|
|
|
2338
2334
|
|
|
2339
2335
|
//#endregion
|
|
2340
2336
|
export { hasTodoStore as a, permissionBadge as c, answerAsk as i, AgentContext as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t, CLAUDE_SESSION_PIN_ENV as u };
|
|
2341
|
-
//# sourceMappingURL=ts-
|
|
2337
|
+
//# sourceMappingURL=ts-BmGAFUb7.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "agent-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.274.0";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ts/versionChecker.ts
|
|
@@ -214,5 +214,5 @@ async function displayVersion() {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
//#endregion
|
|
217
|
-
export { versionString as i,
|
|
218
|
-
//# sourceMappingURL=versionChecker-
|
|
217
|
+
export { versionString as a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
|
|
218
|
+
//# sourceMappingURL=versionChecker-DzWZizq2.js.map
|