@integrity-labs/agt-cli 0.28.762 → 0.28.764
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/bin/agt.js +5 -5
- package/dist/{chunk-L4KDOGHB.js → chunk-23KTLVYX.js} +15 -1
- package/dist/{chunk-L4KDOGHB.js.map → chunk-23KTLVYX.js.map} +1 -1
- package/dist/{chunk-EU6RSU5V.js → chunk-LVBINNTQ.js} +157 -40
- package/dist/chunk-LVBINNTQ.js.map +1 -0
- package/dist/{chunk-BTED7TYA.js → chunk-SMY25FCN.js} +70 -27
- package/dist/{chunk-BTED7TYA.js.map → chunk-SMY25FCN.js.map} +1 -1
- package/dist/{claude-pair-runtime-5CKIB2IM.js → claude-pair-runtime-U6WDTNK3.js} +2 -2
- package/dist/lib/manager-worker.js +65 -65
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +14 -0
- package/dist/mcp/index.js +14 -0
- package/dist/mcp/origami.js +14 -0
- package/dist/mcp/slack-channel.js +14 -0
- package/dist/mcp/telegram-channel.js +14 -0
- package/dist/{persistent-session-VS44QKVB.js → persistent-session-3OBDKYWF.js} +3 -3
- package/dist/{responsiveness-probe-CNSUJALX.js → responsiveness-probe-ULIAXSCT.js} +3 -3
- package/dist/{session-auth-dead-3AK3MDNT.js → session-auth-dead-67XFJWMA.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-EU6RSU5V.js.map +0 -1
- /package/dist/{claude-pair-runtime-5CKIB2IM.js.map → claude-pair-runtime-U6WDTNK3.js.map} +0 -0
- /package/dist/{persistent-session-VS44QKVB.js.map → persistent-session-3OBDKYWF.js.map} +0 -0
- /package/dist/{responsiveness-probe-CNSUJALX.js.map → responsiveness-probe-ULIAXSCT.js.map} +0 -0
- /package/dist/{session-auth-dead-3AK3MDNT.js.map → session-auth-dead-67XFJWMA.js.map} +0 -0
|
@@ -100,7 +100,7 @@ async function spawnPairSession(session) {
|
|
|
100
100
|
return { ok: true };
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
103
|
+
const { resolveClaudeBinary } = await import("./persistent-session-3OBDKYWF.js");
|
|
104
104
|
const claudeBin = resolveClaudeBinary();
|
|
105
105
|
const pairEnv = {
|
|
106
106
|
...process.env,
|
|
@@ -373,4 +373,4 @@ export {
|
|
|
373
373
|
startClaudePair,
|
|
374
374
|
submitClaudePairCode
|
|
375
375
|
};
|
|
376
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
376
|
+
//# sourceMappingURL=claude-pair-runtime-U6WDTNK3.js.map
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
safeWriteJsonAtomic,
|
|
59
59
|
setConfigHash,
|
|
60
60
|
tripClass
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-SMY25FCN.js";
|
|
62
62
|
import {
|
|
63
63
|
getProjectDir as getProjectDir2,
|
|
64
64
|
getReadyTasks,
|
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
getOpencodeTurnHealth,
|
|
83
83
|
getProjectDir,
|
|
84
84
|
getSessionState,
|
|
85
|
+
hardBoundedCapture,
|
|
85
86
|
hashFile,
|
|
86
87
|
injectMessage,
|
|
87
88
|
injectMessageWithStatus,
|
|
@@ -119,7 +120,7 @@ import {
|
|
|
119
120
|
takeZombieDetection,
|
|
120
121
|
toOpencodeModel,
|
|
121
122
|
writeEgressAllowlist
|
|
122
|
-
} from "../chunk-
|
|
123
|
+
} from "../chunk-LVBINNTQ.js";
|
|
123
124
|
import {
|
|
124
125
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
125
126
|
AnchorSessionClient,
|
|
@@ -208,7 +209,7 @@ import {
|
|
|
208
209
|
subagentActivityAgeSeconds,
|
|
209
210
|
sumTranscriptUsageInWindow,
|
|
210
211
|
transcriptActivityAgeSeconds
|
|
211
|
-
} from "../chunk-
|
|
212
|
+
} from "../chunk-23KTLVYX.js";
|
|
212
213
|
import {
|
|
213
214
|
reapOrphanChannelMcps
|
|
214
215
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -1622,11 +1623,16 @@ function shouldRestartForCredentialChange(recorded, current) {
|
|
|
1622
1623
|
// src/lib/connectivity-probe-runner.ts
|
|
1623
1624
|
var DEFAULT_INTERVAL_MS = 60 * 60 * 1e3;
|
|
1624
1625
|
var DEFAULT_MAX_PER_RUN = 25;
|
|
1625
|
-
function isDue(lastCheck, now, intervalMs) {
|
|
1626
|
+
function isDue(lastCheck, now, intervalMs, reconnectQuiescedUntil) {
|
|
1626
1627
|
if (!lastCheck) return true;
|
|
1627
1628
|
const t = Date.parse(lastCheck);
|
|
1628
1629
|
if (Number.isNaN(t)) return true;
|
|
1629
|
-
|
|
1630
|
+
if (now - t >= intervalMs) return true;
|
|
1631
|
+
if (reconnectQuiescedUntil) {
|
|
1632
|
+
const q = Date.parse(reconnectQuiescedUntil);
|
|
1633
|
+
if (!Number.isNaN(q) && q <= now && t < q) return true;
|
|
1634
|
+
}
|
|
1635
|
+
return false;
|
|
1630
1636
|
}
|
|
1631
1637
|
async function runConnectivityProbes(integrations, options = {}) {
|
|
1632
1638
|
const now = (options.now?.() ?? /* @__PURE__ */ new Date()).getTime();
|
|
@@ -1634,7 +1640,7 @@ async function runConnectivityProbes(integrations, options = {}) {
|
|
|
1634
1640
|
const maxPerRun = options.maxPerRun ?? DEFAULT_MAX_PER_RUN;
|
|
1635
1641
|
const probeDeps = options.probeDeps ?? {};
|
|
1636
1642
|
const execute = options.executeProbe ?? executeConnectivityProbe;
|
|
1637
|
-
const due = integrations.filter((i) => isDue(i.last_connectivity_check_at, now, intervalMs)).sort((a, b) => {
|
|
1643
|
+
const due = integrations.filter((i) => isDue(i.last_connectivity_check_at, now, intervalMs, i.reconnect_quiesced_until)).sort((a, b) => {
|
|
1638
1644
|
const ta = a.last_connectivity_check_at ? Date.parse(a.last_connectivity_check_at) : 0;
|
|
1639
1645
|
const tb = b.last_connectivity_check_at ? Date.parse(b.last_connectivity_check_at) : 0;
|
|
1640
1646
|
return ta - tb;
|
|
@@ -8965,7 +8971,6 @@ function stopPaneOccupancySampler() {
|
|
|
8965
8971
|
}
|
|
8966
8972
|
|
|
8967
8973
|
// src/lib/pid-pressure-sampler.ts
|
|
8968
|
-
import { execFileSync as execFileSync2 } from "child_process";
|
|
8969
8974
|
import { existsSync as existsSync16, readFileSync as readFileSync28 } from "fs";
|
|
8970
8975
|
var SAMPLE_INTERVAL_MS2 = 3e4;
|
|
8971
8976
|
function warnFraction() {
|
|
@@ -9018,15 +9023,10 @@ function resolveCgroupDirReal(codeName, deps = {}) {
|
|
|
9018
9023
|
return null;
|
|
9019
9024
|
}
|
|
9020
9025
|
function inspectContainerId(codeName) {
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
9026
|
-
}).trim();
|
|
9027
|
-
} catch {
|
|
9028
|
-
return null;
|
|
9029
|
-
}
|
|
9026
|
+
const out = hardBoundedCapture("docker", ["inspect", "-f", "{{.Id}}", `agt-${codeName}`], {
|
|
9027
|
+
timeoutMs: 5e3
|
|
9028
|
+
});
|
|
9029
|
+
return out === null ? null : out.trim();
|
|
9030
9030
|
}
|
|
9031
9031
|
function countDefunct(cgroupDir, readText) {
|
|
9032
9032
|
const procs = readText(`${cgroupDir}/cgroup.procs`);
|
|
@@ -12808,7 +12808,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12808
12808
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12809
12809
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12810
12810
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12811
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12811
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-ULIAXSCT.js");
|
|
12812
12812
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12813
12813
|
if (newest === null) return null;
|
|
12814
12814
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13468,10 +13468,10 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13468
13468
|
var lastVersionCheckAt = 0;
|
|
13469
13469
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13470
13470
|
var lastResponsivenessProbeAt = 0;
|
|
13471
|
-
var agtCliVersion = true ? "0.28.
|
|
13472
|
-
function resolveBrewPath(
|
|
13471
|
+
var agtCliVersion = true ? "0.28.764" : "dev";
|
|
13472
|
+
function resolveBrewPath(execFileSync2) {
|
|
13473
13473
|
try {
|
|
13474
|
-
const out =
|
|
13474
|
+
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
13475
13475
|
if (out) return out;
|
|
13476
13476
|
} catch {
|
|
13477
13477
|
}
|
|
@@ -13485,7 +13485,7 @@ function resolveBrewPath(execFileSync3) {
|
|
|
13485
13485
|
}
|
|
13486
13486
|
return null;
|
|
13487
13487
|
}
|
|
13488
|
-
function claudeBinaryInstalled(
|
|
13488
|
+
function claudeBinaryInstalled(execFileSync2) {
|
|
13489
13489
|
const canonical = [
|
|
13490
13490
|
"/home/linuxbrew/.linuxbrew/bin/claude",
|
|
13491
13491
|
"/opt/homebrew/bin/claude",
|
|
@@ -13493,7 +13493,7 @@ function claudeBinaryInstalled(execFileSync3) {
|
|
|
13493
13493
|
];
|
|
13494
13494
|
if (canonical.some((path) => existsSync19(path))) return true;
|
|
13495
13495
|
try {
|
|
13496
|
-
|
|
13496
|
+
execFileSync2("which", ["claude"], { timeout: 5e3 });
|
|
13497
13497
|
return true;
|
|
13498
13498
|
} catch {
|
|
13499
13499
|
return false;
|
|
@@ -13527,9 +13527,9 @@ async function ensureToolkitCli(toolkitSlug) {
|
|
|
13527
13527
|
}
|
|
13528
13528
|
const { binary, installer, package: pkg, script } = integration.cli_tool;
|
|
13529
13529
|
const resolvedInstaller = installer ?? "manual";
|
|
13530
|
-
const { execFileSync:
|
|
13530
|
+
const { execFileSync: execFileSync2, execSync } = await import("child_process");
|
|
13531
13531
|
try {
|
|
13532
|
-
|
|
13532
|
+
execFileSync2("which", [binary], { timeout: 5e3, stdio: "pipe" });
|
|
13533
13533
|
toolkitCliEnsured.add(toolkitSlug);
|
|
13534
13534
|
toolkitCliRetryAfter.delete(toolkitSlug);
|
|
13535
13535
|
toolkitCliFailureCount.delete(toolkitSlug);
|
|
@@ -13550,14 +13550,14 @@ async function ensureToolkitCli(toolkitSlug) {
|
|
|
13550
13550
|
return;
|
|
13551
13551
|
}
|
|
13552
13552
|
log(`[toolkit-install] ${toolkitSlug}: installing via npm (${pkg})\u2026`);
|
|
13553
|
-
|
|
13553
|
+
execFileSync2("npm", ["install", "-g", pkg], { timeout: 18e4, stdio: "pipe" });
|
|
13554
13554
|
} else if (resolvedInstaller === "brew") {
|
|
13555
13555
|
if (!pkg) {
|
|
13556
13556
|
log(`[toolkit-install] ${toolkitSlug}: installer=brew but no package declared`);
|
|
13557
13557
|
toolkitCliEnsured.add(toolkitSlug);
|
|
13558
13558
|
return;
|
|
13559
13559
|
}
|
|
13560
|
-
const brewPath = resolveBrewPath(
|
|
13560
|
+
const brewPath = resolveBrewPath(execFileSync2);
|
|
13561
13561
|
if (!brewPath) {
|
|
13562
13562
|
log(`[toolkit-install] ${toolkitSlug}: installer=brew but Homebrew not available \u2014 install manually: brew install ${pkg}`);
|
|
13563
13563
|
toolkitCliEnsured.add(toolkitSlug);
|
|
@@ -13567,9 +13567,9 @@ async function ensureToolkitCli(toolkitSlug) {
|
|
|
13567
13567
|
const isRoot = typeof process.getuid === "function" && process.getuid() === 0;
|
|
13568
13568
|
log(`[toolkit-install] ${toolkitSlug}: installing via brew (${pkg})\u2026`);
|
|
13569
13569
|
if (isRoot) {
|
|
13570
|
-
|
|
13570
|
+
execFileSync2("sudo", ["-u", "ec2-user", "-H", brewPath, "install", pkg], { timeout: 18e4, stdio: "pipe", cwd: "/tmp" });
|
|
13571
13571
|
} else {
|
|
13572
|
-
|
|
13572
|
+
execFileSync2(brewPath, ["install", pkg], { timeout: 18e4, stdio: "pipe" });
|
|
13573
13573
|
}
|
|
13574
13574
|
} else if (resolvedInstaller === "script") {
|
|
13575
13575
|
if (!script) {
|
|
@@ -13591,7 +13591,7 @@ async function ensureToolkitCli(toolkitSlug) {
|
|
|
13591
13591
|
process.env.PATH = `${brewBinDir}:${process.env.PATH ?? ""}`;
|
|
13592
13592
|
}
|
|
13593
13593
|
try {
|
|
13594
|
-
|
|
13594
|
+
execFileSync2("which", [binary], { timeout: 5e3, stdio: "pipe" });
|
|
13595
13595
|
log(`[toolkit-install] ${toolkitSlug}: installed \u2014 ${binary} now on PATH`);
|
|
13596
13596
|
toolkitCliEnsured.add(toolkitSlug);
|
|
13597
13597
|
toolkitCliRetryAfter.delete(toolkitSlug);
|
|
@@ -13639,16 +13639,16 @@ async function ensureIsolationImage(imageUri) {
|
|
|
13639
13639
|
}
|
|
13640
13640
|
isolationImageInFlight.add(imageUri);
|
|
13641
13641
|
try {
|
|
13642
|
-
const { execFileSync:
|
|
13642
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
13643
13643
|
try {
|
|
13644
|
-
|
|
13644
|
+
execFileSync2("which", ["docker"], { timeout: 5e3, stdio: "pipe" });
|
|
13645
13645
|
} catch {
|
|
13646
13646
|
recordIsolationImageFailure(imageUri, `'docker' not found on host - required to pull the isolation image (install it, then the manager retries)`);
|
|
13647
13647
|
return;
|
|
13648
13648
|
}
|
|
13649
13649
|
const hasAws = (() => {
|
|
13650
13650
|
try {
|
|
13651
|
-
|
|
13651
|
+
execFileSync2("which", ["aws"], { timeout: 5e3, stdio: "pipe" });
|
|
13652
13652
|
return true;
|
|
13653
13653
|
} catch {
|
|
13654
13654
|
return false;
|
|
@@ -13657,11 +13657,11 @@ async function ensureIsolationImage(imageUri) {
|
|
|
13657
13657
|
if (isPublic) {
|
|
13658
13658
|
if (hasAws) {
|
|
13659
13659
|
try {
|
|
13660
|
-
const password =
|
|
13660
|
+
const password = execFileSync2("aws", ["ecr-public", "get-login-password", "--region", "us-east-1"], {
|
|
13661
13661
|
timeout: 3e4,
|
|
13662
13662
|
stdio: ["ignore", "pipe", "pipe"]
|
|
13663
13663
|
}).toString().trim();
|
|
13664
|
-
|
|
13664
|
+
execFileSync2("docker", ["login", "--username", "AWS", "--password-stdin", "public.ecr.aws"], {
|
|
13665
13665
|
input: password,
|
|
13666
13666
|
timeout: 3e4,
|
|
13667
13667
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -13676,11 +13676,11 @@ async function ensureIsolationImage(imageUri) {
|
|
|
13676
13676
|
return;
|
|
13677
13677
|
}
|
|
13678
13678
|
try {
|
|
13679
|
-
const password =
|
|
13679
|
+
const password = execFileSync2("aws", ["ecr", "get-login-password", "--region", privRegion], {
|
|
13680
13680
|
timeout: 3e4,
|
|
13681
13681
|
stdio: ["ignore", "pipe", "pipe"]
|
|
13682
13682
|
}).toString().trim();
|
|
13683
|
-
|
|
13683
|
+
execFileSync2("docker", ["login", "--username", "AWS", "--password-stdin", registry], {
|
|
13684
13684
|
input: password,
|
|
13685
13685
|
timeout: 3e4,
|
|
13686
13686
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -13831,11 +13831,11 @@ function ensureClaudeManagedSettings(path = claudeManagedSettingsPath()) {
|
|
|
13831
13831
|
}
|
|
13832
13832
|
var OPENCODE_NPM_VERSION = "1.18.3";
|
|
13833
13833
|
async function ensureOpencodeBinary() {
|
|
13834
|
-
const { execFileSync:
|
|
13834
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
13835
13835
|
const bin = process.env["AGT_OPENCODE_BIN"]?.trim() || "opencode";
|
|
13836
13836
|
const probe = () => {
|
|
13837
13837
|
try {
|
|
13838
|
-
|
|
13838
|
+
execFileSync2(bin, ["--version"], { stdio: "ignore", timeout: 1e4 });
|
|
13839
13839
|
return true;
|
|
13840
13840
|
} catch {
|
|
13841
13841
|
return false;
|
|
@@ -13856,7 +13856,7 @@ async function ensureOpencodeBinary() {
|
|
|
13856
13856
|
return false;
|
|
13857
13857
|
}
|
|
13858
13858
|
try {
|
|
13859
|
-
const prefix =
|
|
13859
|
+
const prefix = execFileSync2("npm", ["prefix", "-g"], { encoding: "utf-8", timeout: 1e4 }).trim();
|
|
13860
13860
|
if (prefix) {
|
|
13861
13861
|
const npmBin = join41(prefix, "bin");
|
|
13862
13862
|
const current = (process.env.PATH ?? "").split(pathDelimiter);
|
|
@@ -13888,8 +13888,8 @@ async function ensureFrameworkBinary(frameworkId) {
|
|
|
13888
13888
|
}
|
|
13889
13889
|
frameworkBinaryChecked.add(frameworkId);
|
|
13890
13890
|
lastManagedSettingsStatus = ensureClaudeManagedSettings();
|
|
13891
|
-
const { execFileSync:
|
|
13892
|
-
const brewPath = resolveBrewPath(
|
|
13891
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
13892
|
+
const brewPath = resolveBrewPath(execFileSync2);
|
|
13893
13893
|
if (!brewPath) {
|
|
13894
13894
|
log("Homebrew not found (no `brew` on PATH, no /home/linuxbrew/.linuxbrew/bin/brew). Cannot auto-install Claude Code. Install manually: https://claude.ai/download");
|
|
13895
13895
|
return;
|
|
@@ -13902,7 +13902,7 @@ async function ensureFrameworkBinary(frameworkId) {
|
|
|
13902
13902
|
}
|
|
13903
13903
|
return runAsync(brewPath, args, opts);
|
|
13904
13904
|
};
|
|
13905
|
-
const claudeExists = claudeBinaryInstalled(
|
|
13905
|
+
const claudeExists = claudeBinaryInstalled(execFileSync2);
|
|
13906
13906
|
if (!claudeExists) {
|
|
13907
13907
|
log(`Claude Code binary not found \u2014 installing via Homebrew${isRoot ? " (as ec2-user via sudo)" : ""}...`);
|
|
13908
13908
|
try {
|
|
@@ -13937,13 +13937,13 @@ async function maybeUpgradeClaudeCode() {
|
|
|
13937
13937
|
}
|
|
13938
13938
|
claudeCodeUpgradeInFlight = true;
|
|
13939
13939
|
stampClaudeCodeUpgradeMarker();
|
|
13940
|
-
const { execFileSync:
|
|
13941
|
-
const brewPath = resolveBrewPath(
|
|
13940
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
13941
|
+
const brewPath = resolveBrewPath(execFileSync2);
|
|
13942
13942
|
if (!brewPath) {
|
|
13943
13943
|
claudeCodeUpgradeInFlight = false;
|
|
13944
13944
|
return;
|
|
13945
13945
|
}
|
|
13946
|
-
if (!claudeBinaryInstalled(
|
|
13946
|
+
if (!claudeBinaryInstalled(execFileSync2)) {
|
|
13947
13947
|
claudeCodeUpgradeInFlight = false;
|
|
13948
13948
|
return;
|
|
13949
13949
|
}
|
|
@@ -14050,8 +14050,8 @@ async function checkAndUpdateCli(opts) {
|
|
|
14050
14050
|
}
|
|
14051
14051
|
}
|
|
14052
14052
|
async function checkAndUpdateCliViaBrew(force = false) {
|
|
14053
|
-
const { execFileSync:
|
|
14054
|
-
const brewPath = resolveBrewPath(
|
|
14053
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
14054
|
+
const brewPath = resolveBrewPath(execFileSync2);
|
|
14055
14055
|
if (!brewPath) return "noop";
|
|
14056
14056
|
{
|
|
14057
14057
|
const brewPinRaw = resolveAgtCliPinRaw();
|
|
@@ -14078,13 +14078,13 @@ async function checkAndUpdateCliViaBrew(force = false) {
|
|
|
14078
14078
|
}
|
|
14079
14079
|
let metadataFresh = true;
|
|
14080
14080
|
try {
|
|
14081
|
-
|
|
14081
|
+
execFileSync2(brewPath, ["update", "--quiet"], { timeout: 6e4, stdio: "pipe" });
|
|
14082
14082
|
} catch (err) {
|
|
14083
14083
|
metadataFresh = false;
|
|
14084
14084
|
log(`[self-update] brew update failed (continuing with stale cache): ${err.message}`);
|
|
14085
14085
|
}
|
|
14086
14086
|
try {
|
|
14087
|
-
const outdated =
|
|
14087
|
+
const outdated = execFileSync2(brewPath, ["outdated", "--json=v2"], {
|
|
14088
14088
|
timeout: 3e4,
|
|
14089
14089
|
encoding: "utf-8"
|
|
14090
14090
|
});
|
|
@@ -14117,7 +14117,7 @@ async function checkAndUpdateCliViaBrew(force = false) {
|
|
|
14117
14117
|
}
|
|
14118
14118
|
log(`[self-update] agt CLI update available: ${installed} \u2192 ${latest}. Upgrading via brew${force ? " (forced \u2014 Update CLI now)" : ""}...`);
|
|
14119
14119
|
try {
|
|
14120
|
-
|
|
14120
|
+
execFileSync2(brewPath, ["upgrade", "integrity-labs/tap/agt"], {
|
|
14121
14121
|
timeout: 12e4,
|
|
14122
14122
|
stdio: "pipe"
|
|
14123
14123
|
});
|
|
@@ -14294,7 +14294,7 @@ async function fetchUrgentDistTagVersion() {
|
|
|
14294
14294
|
}
|
|
14295
14295
|
}
|
|
14296
14296
|
async function installAgtCliViaNpm(version, reasonLabel) {
|
|
14297
|
-
const { execFileSync:
|
|
14297
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
14298
14298
|
const isRoot = typeof process.getuid === "function" && process.getuid() === 0;
|
|
14299
14299
|
const cmd = isRoot ? "npm" : "sudo";
|
|
14300
14300
|
const installArgs = [
|
|
@@ -14305,14 +14305,14 @@ async function installAgtCliViaNpm(version, reasonLabel) {
|
|
|
14305
14305
|
];
|
|
14306
14306
|
const args = isRoot ? installArgs : ["-n", "npm", ...installArgs];
|
|
14307
14307
|
try {
|
|
14308
|
-
|
|
14308
|
+
execFileSync2(cmd, args, { timeout: 18e4, stdio: "pipe" });
|
|
14309
14309
|
} catch (err) {
|
|
14310
14310
|
log(`[self-update] npm upgrade failed: ${err.message}`);
|
|
14311
14311
|
return "failed";
|
|
14312
14312
|
}
|
|
14313
14313
|
let smokeOk = false;
|
|
14314
14314
|
try {
|
|
14315
|
-
const out =
|
|
14315
|
+
const out = execFileSync2("agt", ["--version"], { timeout: 15e3, stdio: "pipe" }).toString();
|
|
14316
14316
|
smokeOk = isAgtVersionSmokeOk(out, version);
|
|
14317
14317
|
if (!smokeOk) {
|
|
14318
14318
|
log(
|
|
@@ -14377,8 +14377,8 @@ function effectiveRuntimeAuthenticated() {
|
|
|
14377
14377
|
async function maybeProbeClaudeRuntimeAuth() {
|
|
14378
14378
|
if (runtimeAuthProbeInFlight) return;
|
|
14379
14379
|
if (Date.now() - lastRuntimeAuthProbeAt < RUNTIME_AUTH_PROBE_INTERVAL_MS) return;
|
|
14380
|
-
const { execFileSync:
|
|
14381
|
-
if (!claudeBinaryInstalled(
|
|
14380
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
14381
|
+
if (!claudeBinaryInstalled(execFileSync2)) return;
|
|
14382
14382
|
runtimeAuthProbeInFlight = true;
|
|
14383
14383
|
lastRuntimeAuthProbeAt = Date.now();
|
|
14384
14384
|
try {
|
|
@@ -14487,8 +14487,8 @@ async function runHostUsageCommand() {
|
|
|
14487
14487
|
}
|
|
14488
14488
|
}
|
|
14489
14489
|
async function maybePollHostUsageFromCycle() {
|
|
14490
|
-
const { execFileSync:
|
|
14491
|
-
if (!claudeBinaryInstalled(
|
|
14490
|
+
const { execFileSync: execFileSync2 } = await import("child_process");
|
|
14491
|
+
if (!claudeBinaryInstalled(execFileSync2)) return;
|
|
14492
14492
|
await maybePollHostUsage({
|
|
14493
14493
|
api,
|
|
14494
14494
|
runUsageCommand: runHostUsageCommand,
|
|
@@ -15009,7 +15009,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
15009
15009
|
if (codeNames.length === 0) return;
|
|
15010
15010
|
void (async () => {
|
|
15011
15011
|
try {
|
|
15012
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15012
|
+
const { collectDiagnostics } = await import("../persistent-session-3OBDKYWF.js");
|
|
15013
15013
|
await api.post("/host/heartbeat", {
|
|
15014
15014
|
host_id: hostId,
|
|
15015
15015
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -15150,7 +15150,7 @@ async function pollCycleInner() {
|
|
|
15150
15150
|
}
|
|
15151
15151
|
try {
|
|
15152
15152
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
15153
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15153
|
+
const { collectDiagnostics } = await import("../persistent-session-3OBDKYWF.js");
|
|
15154
15154
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
15155
15155
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
15156
15156
|
let tailscaleHostname;
|
|
@@ -15319,7 +15319,7 @@ async function pollCycleInner() {
|
|
|
15319
15319
|
collectPanelessActivityProbes,
|
|
15320
15320
|
getResponsivenessIntervalMs,
|
|
15321
15321
|
occupancyQualificationClassifications
|
|
15322
|
-
} = await import("../responsiveness-probe-
|
|
15322
|
+
} = await import("../responsiveness-probe-ULIAXSCT.js");
|
|
15323
15323
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
15324
15324
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
15325
15325
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15429,7 +15429,7 @@ async function pollCycleInner() {
|
|
|
15429
15429
|
collectResponsivenessProbes,
|
|
15430
15430
|
livePendingInboundOldestAgeSeconds,
|
|
15431
15431
|
parkPendingInbound
|
|
15432
|
-
} = await import("../responsiveness-probe-
|
|
15432
|
+
} = await import("../responsiveness-probe-ULIAXSCT.js");
|
|
15433
15433
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15434
15434
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15435
15435
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15585,7 +15585,7 @@ async function pollCycleInner() {
|
|
|
15585
15585
|
}
|
|
15586
15586
|
try {
|
|
15587
15587
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15588
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15588
|
+
const { probeSessionAuth } = await import("../session-auth-dead-67XFJWMA.js");
|
|
15589
15589
|
const observations = [];
|
|
15590
15590
|
const pendingCacheCommits = [];
|
|
15591
15591
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -19563,7 +19563,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
19563
19563
|
void api.post("/host/restart-ack", { host_id: hostId, agent_id: agentId, restart_requested_at: requestedAt }).catch((err) => log(`[restart-lane] ack failed for '${codeName}': ${err.message}`));
|
|
19564
19564
|
void (async () => {
|
|
19565
19565
|
try {
|
|
19566
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19566
|
+
const { collectDiagnostics } = await import("../persistent-session-3OBDKYWF.js");
|
|
19567
19567
|
await api.post("/host/heartbeat", {
|
|
19568
19568
|
host_id: hostId,
|
|
19569
19569
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19609,7 +19609,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
19609
19609
|
}
|
|
19610
19610
|
try {
|
|
19611
19611
|
const hostId = await getHostId();
|
|
19612
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19612
|
+
const { collectDiagnostics } = await import("../persistent-session-3OBDKYWF.js");
|
|
19613
19613
|
await api.post("/host/heartbeat", {
|
|
19614
19614
|
host_id: hostId,
|
|
19615
19615
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20245,7 +20245,7 @@ async function processClaudePairSessions(agents) {
|
|
|
20245
20245
|
killPairSession,
|
|
20246
20246
|
pairTmuxSession,
|
|
20247
20247
|
finalizeClaudePairOnboarding
|
|
20248
|
-
} = await import("../claude-pair-runtime-
|
|
20248
|
+
} = await import("../claude-pair-runtime-U6WDTNK3.js");
|
|
20249
20249
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
20250
20250
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
20251
20251
|
const killed = await killPairSession(pairTmuxSession(pairId));
|