agent-yes 1.290.7 → 1.291.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/dist/SUPPORTED_CLIS-BZP767UR.js +12 -0
- package/dist/{SUPPORTED_CLIS-hTRegnm5.js → SUPPORTED_CLIS-TiOdGi1h.js} +2 -2
- package/dist/{agentShare-C_LTEKEb.js → agentShare-D4N8StHO.js} +8 -8
- package/dist/{askCli-DR9vhdcV.js → askCli-DFsWcgpF.js} +3 -3
- package/dist/{browser-oqC3Ln2a.js → browser-wkzxw6lx.js} +3 -2
- package/dist/{callback-DAQ8wCtJ.js → callback-Bc2gnr_f.js} +3 -3
- package/dist/{callback-BEvLUUBR.js → callback-yCpK6Qpg.js} +7 -7
- package/dist/{channels-hOG3-R_3.js → channels-aYwLMbFV.js} +2 -2
- package/dist/cli.js +9 -9
- package/dist/{cmdPs-BAaLB4Pz.js → cmdPs-D5L3Eyh5.js} +7 -7
- package/dist/{cwdConflictWarn-BgXN56Jc.js → cwdConflictWarn-sQUONAye.js} +2 -2
- package/dist/{forkNested-CJ7lQQCe.js → forkNested-xtEeYpBQ.js} +3 -3
- package/dist/{globalPidIndex-DoaKEUkO.js → globalPidIndex-CRH9L9tn.js} +139 -12
- package/dist/globalPidIndex-DC93JhHQ.js +4 -0
- package/dist/index.js +5 -5
- package/dist/{messageLog-CVRSTLza.js → messageLog-Brx3w6zT.js} +2 -1
- package/dist/{notifyDaemon-Dnbe66Fl.js → notifyDaemon-CvUtRnAB.js} +7 -7
- package/dist/{parentLink-fdiuB13i.js → parentLink-BILJ32nA.js} +2 -2
- package/dist/{parentLink-bpDGuQi6.js → parentLink-CfbxykCv.js} +2 -2
- package/dist/{parentPingLoop-DWv-xJoi.js → parentPingLoop-CVOCiQp2.js} +4 -4
- package/dist/pidStore-Bpe8i_oU.js +6 -0
- package/dist/{pidStore-B73xnAeT.js → pidStore-DXWqzTSz.js} +2 -2
- package/dist/{remotes-DTXPW8U1.js → remotes-tmKwrr20.js} +3 -3
- package/dist/{remotes-C696AJzL.js → remotes-wPL0JtBs.js} +2 -2
- package/dist/{rustBinary-CZRPfa4y.js → rustBinary-C_EbyMTk.js} +2 -2
- package/dist/{rustBinary-jO6EN8LR.js → rustBinary-Clbk_K5c.js} +2 -2
- package/dist/{schedule-Hao0WqyJ.js → schedule-Ba_4wNVK.js} +7 -7
- package/dist/{serve-B2nisui8.js → serve-CJDQq_Jp.js} +46 -40
- package/dist/{setup-vCDTqyqR.js → setup-DwLAkbTC.js} +2 -2
- package/dist/share-Bmnd_qT0.js +4 -0
- package/dist/{share-DTlaFn6s.js → share-C9oGvjXT.js} +13 -4
- package/dist/spawnGate-BUEswFgo.js +5 -0
- package/dist/{spawnGate-B26UnzqP.js → spawnGate-YpHopveO.js} +2 -2
- package/dist/{subcommands-BpFdlCY0.js → subcommands-x8Pe7DrF.js} +6 -6
- package/dist/{subcommands-D6LBtVPM.js → subcommands-yWgVRM2r.js} +273 -45
- package/dist/{terminal-iGHEnc7Z.js → terminal-Dv73BTE-.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoCli-azqbjBtz.js → todoCli-DSQXAcwA.js} +3 -3
- package/dist/{todoIdentity-NEceTmEe.js → todoIdentity-CAmnkzzP.js} +2 -2
- package/dist/{trayApp-BdNlQCFx.js → trayApp-BRw8f0mT.js} +2 -2
- package/dist/trayApp-BjQ5V3WV.js +5 -0
- package/dist/{ts-oyuaLWWx.js → ts-C8PxhJZM.js} +7 -7
- package/dist/{versionChecker-CMjS88mL.js → versionChecker-CWPGASjD.js} +2 -2
- package/dist/webrtcLink-CnQf9pmu.js +73 -0
- package/dist/{webrtcRemote-L5NxhLLR.js → webrtcRemote-yvMYsij3.js} +2 -2
- package/dist/{widget-OvkqW2Z6.js → widget-DhBSNUey.js} +3 -3
- package/dist/widgets.js +1 -1
- package/dist/{ws-BeMouYAU.js → ws-CMX0pkti.js} +2 -2
- package/dist/{ws-qZy7Giub.js → ws-DZ9YAXlY.js} +7 -7
- package/lab/ui/console-logic.js +27 -4
- package/package.json +1 -1
- package/ts/crossTreeClaim.bun.spec.ts +76 -0
- package/ts/crossTreeClaim.spec.ts +76 -0
- package/ts/globalPidIndex.spec.ts +153 -0
- package/ts/globalPidIndex.ts +151 -10
- package/ts/messageLog.bun.spec.ts +33 -0
- package/ts/messageLog.spec.ts +33 -0
- package/ts/messageLog.ts +3 -0
- package/ts/rawInputDeclared.bun.spec.ts +68 -0
- package/ts/rawInputDeclared.spec.ts +68 -0
- package/ts/remoteHealth.bun.spec.ts +130 -0
- package/ts/remoteHealth.spec.ts +130 -0
- package/ts/remoteHealth.ts +149 -0
- package/ts/restartKillGuard.bun.spec.ts +40 -0
- package/ts/restartKillGuard.spec.ts +40 -0
- package/ts/senderAncestry.ts +45 -7
- package/ts/serve.ts +46 -20
- package/ts/share.bun.spec.ts +24 -2
- package/ts/share.spec.ts +24 -2
- package/ts/share.ts +37 -5
- package/ts/subcommands.ts +239 -19
- package/ts/terminal/browser.ts +5 -1
- package/ts/webrtcLink.bun.spec.ts +45 -1
- package/ts/webrtcLink.spec.ts +45 -1
- package/ts/webrtcLink.ts +63 -19
- package/dist/SUPPORTED_CLIS-CuvT3tKq.js +0 -12
- package/dist/globalPidIndex-yvWZXeWT.js +0 -4
- package/dist/pidStore-V51mbgZY.js +0 -6
- package/dist/share-BvU4I8BI.js +0 -4
- package/dist/spawnGate-C8MSRt7X.js +0 -5
- package/dist/trayApp-Br2T2Yrb.js +0 -5
- package/dist/webrtcLink-DLaJfTcB.js +0 -45
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
3
|
-
import { a as
|
|
4
|
-
import { t as PidStore } from "./pidStore-
|
|
5
|
-
import { a as recordOutbox, i as recordMessage, n as readMailbox, o as senderLabel, t as partyMatches } from "./messageLog-
|
|
3
|
+
import { a as readGlobalPids, s as updateGlobalPidStatus } from "./globalPidIndex-CRH9L9tn.js";
|
|
4
|
+
import { t as PidStore } from "./pidStore-DXWqzTSz.js";
|
|
5
|
+
import { a as recordOutbox, i as recordMessage, n as readMailbox, o as senderLabel, t as partyMatches } from "./messageLog-Brx3w6zT.js";
|
|
6
6
|
import { t as loadSharedCliDefaults } from "./configShared-DKTgiz7K.js";
|
|
7
7
|
import { n as localHost, r as localUser, t as formatIdentity } from "./identity-CKRuYUFi.js";
|
|
8
8
|
import { n as isWorkingScreen, r as parseMenu, t as classifyNeedsInput } from "./needsInput-BHopZGM8.js";
|
|
9
9
|
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";
|
|
10
|
-
import { n as isWebrtcSpec } from "./webrtcLink-
|
|
11
|
-
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-
|
|
10
|
+
import { n as isWebrtcSpec } from "./webrtcLink-CnQf9pmu.js";
|
|
11
|
+
import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-tmKwrr20.js";
|
|
12
12
|
import { execFile } from "child_process";
|
|
13
13
|
import ms from "ms";
|
|
14
14
|
import yargs from "yargs";
|
|
15
|
-
import { closeSync, constants, openSync } from "fs";
|
|
16
|
-
import { appendFile, mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
15
|
+
import { closeSync, constants, openSync, realpathSync } from "fs";
|
|
16
|
+
import { appendFile, mkdir, open, readFile, rename, stat, writeFile } from "fs/promises";
|
|
17
17
|
import { homedir } from "os";
|
|
18
18
|
import path from "path";
|
|
19
19
|
import { lock } from "proper-lockfile";
|
|
20
|
+
import { execFileSync as execFileSync$1 } from "node:child_process";
|
|
20
21
|
import { randomBytes } from "crypto";
|
|
21
22
|
import { promisify } from "util";
|
|
22
23
|
|
|
@@ -606,11 +607,19 @@ async function findAgentAncestor(pid, isAgent, opts) {
|
|
|
606
607
|
return null;
|
|
607
608
|
}
|
|
608
609
|
/**
|
|
609
|
-
*
|
|
610
|
+
* Whether the process holding a pid is still the agent that registered it.
|
|
610
611
|
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
612
|
+
* Three-way on purpose, and the third value is the point. "Cannot establish"
|
|
613
|
+
* is not "established that it is not ours": win32 has no process table reader
|
|
614
|
+
* here at all, so folding unknown into reused would not guard a destructive
|
|
615
|
+
* action on that platform — it would delete the action from it, permanently,
|
|
616
|
+
* to protect a case that has never occurred. Callers refuse on evidence
|
|
617
|
+
* ("reused") and keep their prior behaviour on "unknown".
|
|
613
618
|
*/
|
|
619
|
+
function pidOwnershipVerdict(ageSecs, startedAt, now = Date.now(), toleranceSecs = 60) {
|
|
620
|
+
if (ageSecs === void 0 || startedAt === void 0) return "unknown";
|
|
621
|
+
return ageMatchesRegistration(ageSecs, startedAt, now, toleranceSecs) ? "ours" : "reused";
|
|
622
|
+
}
|
|
614
623
|
async function readAncestryTable(read = readProcessTable) {
|
|
615
624
|
try {
|
|
616
625
|
return await read();
|
|
@@ -619,6 +628,124 @@ async function readAncestryTable(read = readProcessTable) {
|
|
|
619
628
|
}
|
|
620
629
|
}
|
|
621
630
|
|
|
631
|
+
//#endregion
|
|
632
|
+
//#region ts/remoteHealth.ts
|
|
633
|
+
/**
|
|
634
|
+
* Backoff for remotes that are not answering.
|
|
635
|
+
*
|
|
636
|
+
* `ay ls` gathers every configured remote on every invocation. A host that has
|
|
637
|
+
* gone away costs a full `CONNECT_TIMEOUT_MS` (25s for a WebRTC spec) and
|
|
638
|
+
* returns nothing, and `Promise.allSettled` waits for all of them — so two dead
|
|
639
|
+
* entries in `remotes.yaml` made every `ay ls` on this fleet take 27s instead of
|
|
640
|
+
* 5s. Measured, then confirmed by removing only those two from a COPY of the
|
|
641
|
+
* config: 27.40s → 5.49s.
|
|
642
|
+
*
|
|
643
|
+
* Deleting the remote is the wrong remedy: those machines can come back, and a
|
|
644
|
+
* config someone must REMEMBER to re-add is a worse failure than a slow list.
|
|
645
|
+
* So the entry stays, and we stop paying for it every time.
|
|
646
|
+
*
|
|
647
|
+
* WHY EXPONENTIAL AND NOT φ: the operator's φ-backoff rule (golden ratio, no
|
|
648
|
+
* 2x) is a symval/symval convention — its AGENTS.md, its helpers. agent-yes is a
|
|
649
|
+
* general tool in snomiao/ and that rule does not reach it. This repo already
|
|
650
|
+
* has one backoff shape, `ts/autoRetry.ts` (base × 2ⁿ, capped, mirrored in
|
|
651
|
+
* rs/src/context.rs), and one repo with two backoff shapes is its own defect.
|
|
652
|
+
* So this mirrors autoRetry deliberately rather than importing a foreign
|
|
653
|
+
* convention or inventing a third.
|
|
654
|
+
*/
|
|
655
|
+
/** First skip window after a host fails. Short: a blip should barely register. */
|
|
656
|
+
const REMOTE_BACKOFF_BASE_MS = 6e4;
|
|
657
|
+
/** Cap, mirroring autoRetry's shape: 1m, 2m, 4m, … 32m, then hold. */
|
|
658
|
+
const REMOTE_BACKOFF_MAX_MS = 32 * 6e4;
|
|
659
|
+
/**
|
|
660
|
+
* How long to skip a host after `streak` consecutive failures — doubling, then
|
|
661
|
+
* capped, exactly as `autoRetryBackoffMs` does.
|
|
662
|
+
*/
|
|
663
|
+
function remoteBackoffMs(streak) {
|
|
664
|
+
if (streak <= 0) return 0;
|
|
665
|
+
const shift = Math.min(streak - 1, 20);
|
|
666
|
+
return Math.min(REMOTE_BACKOFF_BASE_MS * 2 ** shift, REMOTE_BACKOFF_MAX_MS);
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Whether a host should be SKIPPED right now.
|
|
670
|
+
*
|
|
671
|
+
* Fails OPEN in every ambiguous case — no record, a zero/negative streak, a
|
|
672
|
+
* clock that has gone backwards. The cost of wrongly skipping is an agent that
|
|
673
|
+
* silently vanishes from `ay ls`; the cost of wrongly probing is one slow list.
|
|
674
|
+
* Those are not symmetric, so the tie goes to probing.
|
|
675
|
+
*/
|
|
676
|
+
function shouldSkipRemote(health, now) {
|
|
677
|
+
if (!health || health.streak <= 0) return false;
|
|
678
|
+
const elapsed = now - health.lastFailedAt;
|
|
679
|
+
if (elapsed < 0) return false;
|
|
680
|
+
return elapsed < remoteBackoffMs(health.streak);
|
|
681
|
+
}
|
|
682
|
+
/** Record an outcome. Success clears the streak entirely; failure extends it. */
|
|
683
|
+
function noteRemoteResult(health, ok, now) {
|
|
684
|
+
if (ok) return {
|
|
685
|
+
streak: 0,
|
|
686
|
+
lastFailedAt: 0
|
|
687
|
+
};
|
|
688
|
+
return {
|
|
689
|
+
streak: (health?.streak ?? 0) + 1,
|
|
690
|
+
lastFailedAt: now
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Health lives beside `remotes.yaml` in the state dir, NOT inside it: that file
|
|
695
|
+
* is the operator's config and this is derived, disposable data. Deleting it
|
|
696
|
+
* costs one slow `ay ls` and nothing else.
|
|
697
|
+
*/
|
|
698
|
+
function healthPath() {
|
|
699
|
+
const dir = process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes");
|
|
700
|
+
return path.join(dir, "remote-health.json");
|
|
701
|
+
}
|
|
702
|
+
/** Read the per-alias health map. Any error yields {} — probe rather than skip. */
|
|
703
|
+
async function readRemoteHealth() {
|
|
704
|
+
try {
|
|
705
|
+
const raw = await readFile(healthPath(), "utf-8");
|
|
706
|
+
const parsed = JSON.parse(raw);
|
|
707
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
708
|
+
const out = {};
|
|
709
|
+
for (const [alias, v] of Object.entries(parsed)) {
|
|
710
|
+
if (!v || typeof v !== "object") continue;
|
|
711
|
+
const { streak, lastFailedAt } = v;
|
|
712
|
+
if (typeof streak !== "number" || !Number.isFinite(streak)) continue;
|
|
713
|
+
if (typeof lastFailedAt !== "number" || !Number.isFinite(lastFailedAt)) continue;
|
|
714
|
+
out[alias] = {
|
|
715
|
+
streak,
|
|
716
|
+
lastFailedAt
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
return out;
|
|
720
|
+
} catch {
|
|
721
|
+
return {};
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Best-effort write. A health file we cannot persist must never break `ay ls`.
|
|
726
|
+
*
|
|
727
|
+
* Written to a temp file and renamed, so a concurrent reader sees either the old
|
|
728
|
+
* file or the new one and never a truncated one. Two `ay ls` processes finishing
|
|
729
|
+
* together still last-writer-wins — that is acceptable here because the loser's
|
|
730
|
+
* data is one probe's worth of a self-correcting counter, and because reading a
|
|
731
|
+
* torn file already fails open to "probe".
|
|
732
|
+
*/
|
|
733
|
+
async function writeRemoteHealth(health) {
|
|
734
|
+
const dest = healthPath();
|
|
735
|
+
await mkdir(path.dirname(dest), { recursive: true });
|
|
736
|
+
const tmp = `${dest}.${process.pid}.tmp`;
|
|
737
|
+
await writeFile(tmp, JSON.stringify(health, null, 2));
|
|
738
|
+
await rename(tmp, dest);
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Drop entries for aliases that are no longer configured, so the file cannot
|
|
742
|
+
* grow without bound as remotes come and go. Called with the live alias set.
|
|
743
|
+
*/
|
|
744
|
+
function pruneRemoteHealth(health, aliases) {
|
|
745
|
+
const live = new Set(aliases);
|
|
746
|
+
return Object.fromEntries(Object.entries(health).filter(([alias]) => live.has(alias)));
|
|
747
|
+
}
|
|
748
|
+
|
|
622
749
|
//#endregion
|
|
623
750
|
//#region ts/ipcLock.ts
|
|
624
751
|
/**
|
|
@@ -904,6 +1031,41 @@ function observedSender() {
|
|
|
904
1031
|
pid: process.pid
|
|
905
1032
|
};
|
|
906
1033
|
}
|
|
1034
|
+
/**
|
|
1035
|
+
* The repository a directory belongs to, as git itself defines it: the common
|
|
1036
|
+
* dir, which every linked worktree of one repository shares and no separate
|
|
1037
|
+
* clone does. Null when the path is not in a repository or git cannot answer.
|
|
1038
|
+
*
|
|
1039
|
+
* Synchronous and cached: it is consulted at most twice per send, and only on
|
|
1040
|
+
* the path where the cheaper directory check already failed.
|
|
1041
|
+
*/
|
|
1042
|
+
const _commonDirCache = /* @__PURE__ */ new Map();
|
|
1043
|
+
function gitCommonDir(dir) {
|
|
1044
|
+
const hit = _commonDirCache.get(dir);
|
|
1045
|
+
if (hit !== void 0) return hit;
|
|
1046
|
+
let out = null;
|
|
1047
|
+
try {
|
|
1048
|
+
out = execFileSync$1("git", [
|
|
1049
|
+
"-C",
|
|
1050
|
+
dir,
|
|
1051
|
+
"rev-parse",
|
|
1052
|
+
"--path-format=absolute",
|
|
1053
|
+
"--git-common-dir"
|
|
1054
|
+
], {
|
|
1055
|
+
encoding: "utf8",
|
|
1056
|
+
timeout: 5e3,
|
|
1057
|
+
stdio: [
|
|
1058
|
+
"ignore",
|
|
1059
|
+
"pipe",
|
|
1060
|
+
"ignore"
|
|
1061
|
+
]
|
|
1062
|
+
}).trim().replace(/\/+$/, "") || null;
|
|
1063
|
+
} catch {
|
|
1064
|
+
out = null;
|
|
1065
|
+
}
|
|
1066
|
+
_commonDirCache.set(dir, out);
|
|
1067
|
+
return out;
|
|
1068
|
+
}
|
|
907
1069
|
async function resolveSender() {
|
|
908
1070
|
return (await resolveSenderVia()).agent;
|
|
909
1071
|
}
|
|
@@ -949,10 +1111,37 @@ async function computeSenderVia() {
|
|
|
949
1111
|
return ageMatchesRegistration(table?.get(pid)?.ageSecs, rec.started_at) ? rec : null;
|
|
950
1112
|
};
|
|
951
1113
|
const inherited = table ? await findAgentAncestor(process.pid, isLiveAgent, { readTable: async () => table }) : null;
|
|
952
|
-
if (declared)
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1114
|
+
if (declared) {
|
|
1115
|
+
if (inherited?.pid === declared.pid) return {
|
|
1116
|
+
agent: declared,
|
|
1117
|
+
via: "env"
|
|
1118
|
+
};
|
|
1119
|
+
const real = (p2) => {
|
|
1120
|
+
try {
|
|
1121
|
+
return realpathSync(p2).replace(/\/+$/, "");
|
|
1122
|
+
} catch {
|
|
1123
|
+
return p2.replace(/\/+$/, "");
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
const here = real(process.cwd());
|
|
1127
|
+
const claimedRoot = declared.cwd ? real(declared.cwd) : "";
|
|
1128
|
+
const insideClaimedTree = Boolean(claimedRoot) && (here === claimedRoot || here.startsWith(claimedRoot + path.sep));
|
|
1129
|
+
const sameRepo = () => {
|
|
1130
|
+
if (!claimedRoot) return false;
|
|
1131
|
+
const a = gitCommonDir(here);
|
|
1132
|
+
const b = gitCommonDir(claimedRoot);
|
|
1133
|
+
if (a === null || b === null) return false;
|
|
1134
|
+
return a === b || a.startsWith(b + path.sep) || b.startsWith(a + path.sep);
|
|
1135
|
+
};
|
|
1136
|
+
if (!insideClaimedTree && !sameRepo()) return {
|
|
1137
|
+
agent: declared,
|
|
1138
|
+
via: "env-uncorroborated"
|
|
1139
|
+
};
|
|
1140
|
+
return {
|
|
1141
|
+
agent: declared,
|
|
1142
|
+
via: "env-unverified"
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
956
1145
|
if (inherited) return {
|
|
957
1146
|
agent: inherited,
|
|
958
1147
|
via: "ancestry"
|
|
@@ -1226,6 +1415,7 @@ function envelopeAttribution(via) {
|
|
|
1226
1415
|
switch (via) {
|
|
1227
1416
|
case "ancestry": return " via process-tree";
|
|
1228
1417
|
case "env-uncorroborated": return " UNCORROBORATED-SENDER";
|
|
1418
|
+
case "env-unverified": return "";
|
|
1229
1419
|
default: return "";
|
|
1230
1420
|
}
|
|
1231
1421
|
}
|
|
@@ -1356,7 +1546,7 @@ async function runSubcommand(argv) {
|
|
|
1356
1546
|
switch (sub) {
|
|
1357
1547
|
case "ls":
|
|
1358
1548
|
case "list": return await cmdLs(rest);
|
|
1359
|
-
case "ps": return await (await import("./cmdPs-
|
|
1549
|
+
case "ps": return await (await import("./cmdPs-D5L3Eyh5.js")).cmdPs(rest);
|
|
1360
1550
|
case "status": return await cmdStatus(rest);
|
|
1361
1551
|
case "whoami": return await cmdWhoami(rest);
|
|
1362
1552
|
case "result": return await cmdResult(rest);
|
|
@@ -1380,7 +1570,7 @@ async function runSubcommand(argv) {
|
|
|
1380
1570
|
case "note": return await cmdNote(rest);
|
|
1381
1571
|
case "ask":
|
|
1382
1572
|
case "answer": {
|
|
1383
|
-
const { runAskSubcommand, runAnswerSubcommand } = await import("./askCli-
|
|
1573
|
+
const { runAskSubcommand, runAnswerSubcommand } = await import("./askCli-DFsWcgpF.js");
|
|
1384
1574
|
const deps = {
|
|
1385
1575
|
resolveAgent: (keyword) => resolveOne(keyword, {
|
|
1386
1576
|
all: true,
|
|
@@ -1394,48 +1584,48 @@ async function runSubcommand(argv) {
|
|
|
1394
1584
|
return sub === "ask" ? await runAskSubcommand(rest, deps) : await runAnswerSubcommand(rest, deps);
|
|
1395
1585
|
}
|
|
1396
1586
|
case "todo": {
|
|
1397
|
-
const { runTodoSubcommand } = await import("./todoCli-
|
|
1587
|
+
const { runTodoSubcommand } = await import("./todoCli-DSQXAcwA.js");
|
|
1398
1588
|
return runTodoSubcommand(rest);
|
|
1399
1589
|
}
|
|
1400
1590
|
case "ch":
|
|
1401
1591
|
case "channels": {
|
|
1402
|
-
const { cmdCh } = await import("./channels-
|
|
1592
|
+
const { cmdCh } = await import("./channels-aYwLMbFV.js");
|
|
1403
1593
|
return cmdCh(rest);
|
|
1404
1594
|
}
|
|
1405
1595
|
case "term": {
|
|
1406
|
-
const { cmdTerm } = await import("./terminal-
|
|
1596
|
+
const { cmdTerm } = await import("./terminal-Dv73BTE-.js");
|
|
1407
1597
|
return cmdTerm(rest);
|
|
1408
1598
|
}
|
|
1409
1599
|
case "widget": {
|
|
1410
|
-
const { cmdWidget } = await import("./widget-
|
|
1600
|
+
const { cmdWidget } = await import("./widget-DhBSNUey.js");
|
|
1411
1601
|
return cmdWidget(rest);
|
|
1412
1602
|
}
|
|
1413
1603
|
case "mint": {
|
|
1414
|
-
const { cmdMint } = await import("./widget-
|
|
1604
|
+
const { cmdMint } = await import("./widget-DhBSNUey.js");
|
|
1415
1605
|
return cmdMint(rest);
|
|
1416
1606
|
}
|
|
1417
1607
|
case "serve": {
|
|
1418
|
-
const { cmdServe } = await import("./serve-
|
|
1608
|
+
const { cmdServe } = await import("./serve-CJDQq_Jp.js");
|
|
1419
1609
|
return cmdServe(rest);
|
|
1420
1610
|
}
|
|
1421
1611
|
case "tray": {
|
|
1422
|
-
const { cmdTray } = await import("./trayApp-
|
|
1612
|
+
const { cmdTray } = await import("./trayApp-BjQ5V3WV.js");
|
|
1423
1613
|
return cmdTray(rest);
|
|
1424
1614
|
}
|
|
1425
1615
|
case "setup": {
|
|
1426
|
-
const { cmdSetup } = await import("./setup-
|
|
1616
|
+
const { cmdSetup } = await import("./setup-DwLAkbTC.js");
|
|
1427
1617
|
return cmdSetup(rest);
|
|
1428
1618
|
}
|
|
1429
1619
|
case "ws": {
|
|
1430
|
-
const { cmdWs } = await import("./ws-
|
|
1620
|
+
const { cmdWs } = await import("./ws-DZ9YAXlY.js");
|
|
1431
1621
|
return cmdWs(rest);
|
|
1432
1622
|
}
|
|
1433
1623
|
case "schedule": {
|
|
1434
|
-
const { cmdSchedule } = await import("./schedule-
|
|
1624
|
+
const { cmdSchedule } = await import("./schedule-Ba_4wNVK.js");
|
|
1435
1625
|
return cmdSchedule(rest);
|
|
1436
1626
|
}
|
|
1437
1627
|
case "remote": {
|
|
1438
|
-
const { cmdRemote } = await import("./remotes-
|
|
1628
|
+
const { cmdRemote } = await import("./remotes-wPL0JtBs.js");
|
|
1439
1629
|
return cmdRemote(rest);
|
|
1440
1630
|
}
|
|
1441
1631
|
case "expose": {
|
|
@@ -1443,7 +1633,7 @@ async function runSubcommand(argv) {
|
|
|
1443
1633
|
return cmdExpose(rest);
|
|
1444
1634
|
}
|
|
1445
1635
|
case "callback": {
|
|
1446
|
-
const { cmdCallback } = await import("./callback-
|
|
1636
|
+
const { cmdCallback } = await import("./callback-yCpK6Qpg.js");
|
|
1447
1637
|
return cmdCallback(rest);
|
|
1448
1638
|
}
|
|
1449
1639
|
case "reap":
|
|
@@ -1454,13 +1644,20 @@ async function runSubcommand(argv) {
|
|
|
1454
1644
|
return await cmdDsh(rest);
|
|
1455
1645
|
}
|
|
1456
1646
|
case "gc": {
|
|
1457
|
-
const { gcOldBinaryDirs } = await import("./rustBinary-
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1647
|
+
const { gcOldBinaryDirs } = await import("./rustBinary-C_EbyMTk.js");
|
|
1648
|
+
const { gcLogs } = await import("./globalPidIndex-DC93JhHQ.js");
|
|
1649
|
+
const bins = gcOldBinaryDirs();
|
|
1650
|
+
const logs = await gcLogs();
|
|
1651
|
+
if (bins.removed.length === 0) process.stdout.write("no old agent-yes binary cache dirs to remove\n");
|
|
1652
|
+
else {
|
|
1653
|
+
for (const v of bins.removed) process.stdout.write(`removed ${v}\n`);
|
|
1654
|
+
const mib = (bins.freedBytes / 1024 / 1024).toFixed(1);
|
|
1655
|
+
process.stdout.write(`freed ${mib} MiB (${bins.freedBytes} bytes) across ${bins.removed.length} version dir(s)\n`);
|
|
1656
|
+
}
|
|
1657
|
+
if (logs.removed.length === 0) process.stdout.write("no stale session logs to remove\n");
|
|
1460
1658
|
else {
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
process.stdout.write(`freed ${mib} MiB (${res.freedBytes} bytes) across ${res.removed.length} version dir(s)\n`);
|
|
1659
|
+
const mib = (logs.freedBytes / 1024 / 1024).toFixed(1);
|
|
1660
|
+
process.stdout.write(`freed ${mib} MiB (${logs.freedBytes} bytes) across ${logs.removed.length} session log file(s)\n`);
|
|
1464
1661
|
}
|
|
1465
1662
|
return 0;
|
|
1466
1663
|
}
|
|
@@ -1508,7 +1705,7 @@ async function cmdHelp(managerCommands = true) {
|
|
|
1508
1705
|
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" : ``;
|
|
1509
1706
|
const self = process.env.AGENT_YES_PID ? await resolveSender() : null;
|
|
1510
1707
|
const agentSection = self ? await buildAgentContextSection(self) : "";
|
|
1511
|
-
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
|
|
1708
|
+
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 reclaim old-version binary cache dirs + stale session logs\n ay dsh-legacy [args...] launch the DeepSeek Harness terminal client (dsh-tui)\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");
|
|
1512
1709
|
return 0;
|
|
1513
1710
|
}
|
|
1514
1711
|
function matchKeyword(record, keyword) {
|
|
@@ -1899,7 +2096,7 @@ async function runRemoteStatus(remote) {
|
|
|
1899
2096
|
process.stdout.write(JSON.stringify(await res.json(), null, 2) + "\n");
|
|
1900
2097
|
return 0;
|
|
1901
2098
|
}
|
|
1902
|
-
async function fetchRemoteRecordsRaw(url, token, opts) {
|
|
2099
|
+
async function fetchRemoteRecordsRaw(url, token, opts, onReachable) {
|
|
1903
2100
|
const params = new URLSearchParams();
|
|
1904
2101
|
if (opts.all) params.set("all", "1");
|
|
1905
2102
|
if (opts.active) params.set("active", "1");
|
|
@@ -1909,7 +2106,7 @@ async function fetchRemoteRecordsRaw(url, token, opts) {
|
|
|
1909
2106
|
let base = url;
|
|
1910
2107
|
let bearer = token;
|
|
1911
2108
|
if (isWebrtcSpec(url)) {
|
|
1912
|
-
const { startWebrtcBridge } = await import("./webrtcRemote-
|
|
2109
|
+
const { startWebrtcBridge } = await import("./webrtcRemote-yvMYsij3.js");
|
|
1913
2110
|
bridge = await startWebrtcBridge(url);
|
|
1914
2111
|
base = bridge.baseUrl;
|
|
1915
2112
|
bearer = bridge.token;
|
|
@@ -1918,9 +2115,11 @@ async function fetchRemoteRecordsRaw(url, token, opts) {
|
|
|
1918
2115
|
headers: { Authorization: `Bearer ${bearer}` },
|
|
1919
2116
|
signal: AbortSignal.timeout(8e3)
|
|
1920
2117
|
});
|
|
2118
|
+
onReachable?.(true);
|
|
1921
2119
|
if (!res.ok) return [];
|
|
1922
2120
|
return await res.json();
|
|
1923
2121
|
} catch {
|
|
2122
|
+
onReachable?.(false);
|
|
1924
2123
|
return [];
|
|
1925
2124
|
} finally {
|
|
1926
2125
|
bridge?.close();
|
|
@@ -1935,13 +2134,32 @@ async function runAllRemotesLs(opts) {
|
|
|
1935
2134
|
latest: false,
|
|
1936
2135
|
cwdScope: null
|
|
1937
2136
|
};
|
|
2137
|
+
const health = await readRemoteHealth();
|
|
2138
|
+
const healthNow = Date.now();
|
|
2139
|
+
const skipped = new Set([...remotes.keys()].filter((alias) => shouldSkipRemote(health[alias], healthNow)));
|
|
2140
|
+
const probed = [...remotes.entries()].filter(([alias]) => !skipped.has(alias));
|
|
1938
2141
|
const [localResult, ...remoteResults] = await Promise.allSettled([listRecords(opts.keyword, localOpts).then((recs) => ({
|
|
1939
2142
|
host: "local",
|
|
1940
2143
|
records: recs
|
|
1941
|
-
})), ...
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
2144
|
+
})), ...probed.map(([alias, cfg]) => {
|
|
2145
|
+
let reachable = false;
|
|
2146
|
+
return fetchRemoteRecordsRaw(cfg.url, cfg.token, opts, (ok) => {
|
|
2147
|
+
reachable = ok;
|
|
2148
|
+
}).then((records) => ({
|
|
2149
|
+
host: alias,
|
|
2150
|
+
records,
|
|
2151
|
+
ok: reachable
|
|
2152
|
+
}));
|
|
2153
|
+
})]);
|
|
2154
|
+
{
|
|
2155
|
+
const next = pruneRemoteHealth({ ...health }, remotes.keys());
|
|
2156
|
+
for (const [i, [alias]] of probed.entries()) {
|
|
2157
|
+
const res = remoteResults[i];
|
|
2158
|
+
const ok = res?.status === "fulfilled" && res.value.ok === true;
|
|
2159
|
+
next[alias] = noteRemoteResult(health[alias], ok, healthNow);
|
|
2160
|
+
}
|
|
2161
|
+
await writeRemoteHealth(next).catch(() => {});
|
|
2162
|
+
}
|
|
1945
2163
|
const byHost = [];
|
|
1946
2164
|
const gitRootCache = /* @__PURE__ */ new Map();
|
|
1947
2165
|
const gitInfoCache = /* @__PURE__ */ new Map();
|
|
@@ -1974,6 +2192,12 @@ async function runAllRemotesLs(opts) {
|
|
|
1974
2192
|
records: enriched
|
|
1975
2193
|
});
|
|
1976
2194
|
}
|
|
2195
|
+
for (const alias of skipped) {
|
|
2196
|
+
const h = health[alias];
|
|
2197
|
+
const leftMs = Math.max(0, remoteBackoffMs(h?.streak ?? 1) - (healthNow - (h?.lastFailedAt ?? healthNow)));
|
|
2198
|
+
const left = leftMs >= 6e4 ? `${Math.round(leftMs / 6e4)}m` : `${Math.ceil(leftMs / 1e3)}s`;
|
|
2199
|
+
process.stderr.write(`${alias}: unreachable — skipped after ${h?.streak ?? 0} failed attempt(s), retrying in ${left} (ay ls ${alias} to force a probe now)\n`);
|
|
2200
|
+
}
|
|
1977
2201
|
for (const res of remoteResults) if (res.status === "fulfilled") byHost.push({
|
|
1978
2202
|
host: res.value.host,
|
|
1979
2203
|
records: res.value.records
|
|
@@ -4127,7 +4351,7 @@ async function cmdAttach(rest) {
|
|
|
4127
4351
|
const winsizeDir = path.join(ayHome, "winsize");
|
|
4128
4352
|
await mkdir(winsizeDir, { recursive: true });
|
|
4129
4353
|
const winsizePath = path.join(winsizeDir, String(record.pid));
|
|
4130
|
-
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-
|
|
4354
|
+
const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-CJDQq_Jp.js");
|
|
4131
4355
|
const daemonBase = await resolveDaemonHttpBase().catch(() => null);
|
|
4132
4356
|
const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
|
|
4133
4357
|
const capViewer = `attach:${process.pid}`;
|
|
@@ -4390,6 +4614,10 @@ async function cmdRestart(rest) {
|
|
|
4390
4614
|
process.stdout.write(`stopping pid ${record.pid} (${record.cli}) before restart…\n`);
|
|
4391
4615
|
let exited = await waitForExit(record.pid, 3e4);
|
|
4392
4616
|
if (!exited) {
|
|
4617
|
+
if (pidOwnershipVerdict((await readAncestryTable())?.get(record.pid)?.ageSecs, record.started_at) === "reused") {
|
|
4618
|
+
process.stderr.write(`pid ${record.pid} is alive but is NOT the agent that registered it — its process is younger than the registration, so the number was reused. Refusing to kill it.\n check with: ps -p ${record.pid} -o pid=,user=,comm=\n retire the stale row instead: ay stop ${record.pid}\n`);
|
|
4619
|
+
return 1;
|
|
4620
|
+
}
|
|
4393
4621
|
try {
|
|
4394
4622
|
process.kill(record.pid, "SIGKILL");
|
|
4395
4623
|
} catch {}
|
|
@@ -4850,7 +5078,7 @@ async function cmdNotify(rest) {
|
|
|
4850
5078
|
}
|
|
4851
5079
|
const ensure = async () => {
|
|
4852
5080
|
if (!argv["ensure-daemon"]) return;
|
|
4853
|
-
const { ensureDaemon } = await import("./notifyDaemon-
|
|
5081
|
+
const { ensureDaemon } = await import("./notifyDaemon-CvUtRnAB.js");
|
|
4854
5082
|
await ensureDaemon().catch(() => null);
|
|
4855
5083
|
};
|
|
4856
5084
|
await heartbeatWatcher(parent, selfStartedAt);
|
|
@@ -4924,7 +5152,7 @@ async function cmdNotifyCursor(args) {
|
|
|
4924
5152
|
}
|
|
4925
5153
|
async function cmdNotifyd(rest) {
|
|
4926
5154
|
const sub = rest[0] ?? "status";
|
|
4927
|
-
const daemon = await import("./notifyDaemon-
|
|
5155
|
+
const daemon = await import("./notifyDaemon-CvUtRnAB.js");
|
|
4928
5156
|
switch (sub) {
|
|
4929
5157
|
case "run": return daemon.runDaemon();
|
|
4930
5158
|
case "once": return daemon.runDaemon({ once: true });
|
|
@@ -4951,4 +5179,4 @@ async function cmdNotifyd(rest) {
|
|
|
4951
5179
|
|
|
4952
5180
|
//#endregion
|
|
4953
5181
|
export { sendPayloadCapError as $, isUnknownManagerToken as A, readLogForRender as B, finalizedLines as C, isPidAlive as D, isExitRequest as E, listRecords as F, renderLogTailLines as G, readPtysize as H, matchKeyword as I, resolveOne as J, renderRawLog as K, menuSelectKeys as L, isUserTyping as M, lastReadAt as N, isSlashCommand as O, lastStdinAt as P, runSubcommand as Q, probeStdinReachable as R, extractTaskCounts as S, isBareManagerInvocation as T, recentMessageEdges as U, readNotes as V, recentReadEdges as W, resolveResumeArgs as X, resolveReadWindow as Y, restartHintLines as Z, envelopeAttribution as _, SEND_BODY_MAX_CHARS as a, writeKeysPaced as at, extractMenu as b, backoffWhileTyping as c, framePaste as ct, cmdHelp as d, buildAgentForest as dt, snapshotStatus as et, confirmStdinUnreachable as f, flattenForest as ft, deriveLiveStatus as g, deriveLiveState as h, READ_WINDOW_MS as i, waitForLogQuiet as it, isUnreachableWriteErrno as j, isSubcommand as k, buildEnvelope as l, shouldFramePaste as lt, cursorAbs as m, MAX_RENDER_BYTES as n, stopTipForCli as nt, SEND_EXIT_UNREACHABLE as o, writeToIpc as ot, controlCodeFromName as p, renderRawLogLines as q, READ_PAGE_DEFAULT as r, submitAndConfirm as rt, TYPING_WINDOW_MS as s, withIpcLock as st, GRACEFUL_EXIT_COMMANDS as t, stdinActivityPath as tt, cliDefaults as u, TYPING_BADGE as ut, envelopeCostFor as v, isAgentStuck as w, extractNeedsInput as x, extractBadges as y, readAgentPtysize as z };
|
|
4954
|
-
//# sourceMappingURL=subcommands-
|
|
5182
|
+
//# sourceMappingURL=subcommands-yWgVRM2r.js.map
|
|
@@ -98,7 +98,7 @@ async function cmdTermMint(args) {
|
|
|
98
98
|
if (flags.ro && flags.interactive) throw new Error("--ro and --interactive are mutually exclusive");
|
|
99
99
|
const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
|
|
100
100
|
const canSend = flags.interactive === true;
|
|
101
|
-
const { mintScopedTermToken } = await import("./serve-
|
|
101
|
+
const { mintScopedTermToken } = await import("./serve-CJDQq_Jp.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-Dv73BTE-.js.map
|
package/dist/terminal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./logger-CDIsZ-Pp.js";
|
|
2
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
3
|
import "./JsonlStore-BqF7AQ6E.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as readGlobalPids } from "./globalPidIndex-CRH9L9tn.js";
|
|
5
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-
|
|
6
|
+
import { a as resolveTodoRoot, i as resolveSelf, n as SELF_OWNER, r as ownerLiveness, t as NO_OWNER } from "./todoIdentity-CAmnkzzP.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-DSQXAcwA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as readGlobalPids } from "./globalPidIndex-CRH9L9tn.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-CAmnkzzP.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as findTrayLauncher } from "./rustBinary-
|
|
1
|
+
import { i as findTrayLauncher } from "./rustBinary-Clbk_K5c.js";
|
|
2
2
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -97,4 +97,4 @@ async function cmdTray(args) {
|
|
|
97
97
|
|
|
98
98
|
//#endregion
|
|
99
99
|
export { trayHiddenMarker as a, launchTray as i, hasDesktop as n, isTrayHidden as r, cmdTray as t };
|
|
100
|
-
//# sourceMappingURL=trayApp-
|
|
100
|
+
//# sourceMappingURL=trayApp-BRw8f0mT.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { i as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { i as getInstalledPackage } from "./versionChecker-CWPGASjD.js";
|
|
4
4
|
import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
|
|
5
5
|
import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
|
|
6
6
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-BOIPD_Vs.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as PidStore } from "./pidStore-
|
|
9
|
-
import { r as recordInbox } from "./messageLog-
|
|
7
|
+
import { a as readGlobalPids } from "./globalPidIndex-CRH9L9tn.js";
|
|
8
|
+
import { t as PidStore } from "./pidStore-DXWqzTSz.js";
|
|
9
|
+
import { r as recordInbox } from "./messageLog-Brx3w6zT.js";
|
|
10
10
|
import { n as register, r as sweep } from "./reaper-UimuuTfO.js";
|
|
11
11
|
import { a as LIFECYCLES, r as openStore } from "./todoStore-DF6vxHgV.js";
|
|
12
12
|
import { arch, platform } from "process";
|
|
@@ -1613,7 +1613,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
1613
1613
|
})();
|
|
1614
1614
|
const originalPrompt = prompt;
|
|
1615
1615
|
if (prompt && inheritedParentPid) try {
|
|
1616
|
-
const { resolveSpawner } = await import("./parentLink-
|
|
1616
|
+
const { resolveSpawner } = await import("./parentLink-BILJ32nA.js");
|
|
1617
1617
|
const spawner = await resolveSpawner(inheritedParentPid);
|
|
1618
1618
|
if (spawner) {
|
|
1619
1619
|
const { buildInitMsg } = await import("./initMsg-DoltWTZj.js");
|
|
@@ -2086,7 +2086,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
|
|
|
2086
2086
|
}, 100);
|
|
2087
2087
|
const cleanupHeartbeat = () => clearInterval(heartbeatInterval);
|
|
2088
2088
|
shell.onExit(cleanupHeartbeat);
|
|
2089
|
-
const { startParentPingLoop } = await import("./parentPingLoop-
|
|
2089
|
+
const { startParentPingLoop } = await import("./parentPingLoop-CVOCiQp2.js");
|
|
2090
2090
|
const parentPingLoop = startParentPingLoop({
|
|
2091
2091
|
parentPid,
|
|
2092
2092
|
selfWrapperPid: process.pid,
|
|
@@ -2349,4 +2349,4 @@ function sleep(ms) {
|
|
|
2349
2349
|
|
|
2350
2350
|
//#endregion
|
|
2351
2351
|
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 };
|
|
2352
|
-
//# sourceMappingURL=ts-
|
|
2352
|
+
//# sourceMappingURL=ts-C8PxhJZM.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.291.0";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ts/versionChecker.ts
|
|
@@ -285,4 +285,4 @@ async function displayVersion() {
|
|
|
285
285
|
|
|
286
286
|
//#endregion
|
|
287
287
|
export { versionString as a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
|
|
288
|
-
//# sourceMappingURL=versionChecker-
|
|
288
|
+
//# sourceMappingURL=versionChecker-CWPGASjD.js.map
|