@integrity-labs/agt-cli 0.28.106 → 0.28.107
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
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
success,
|
|
38
38
|
table,
|
|
39
39
|
warn
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-WFMJOGRV.js";
|
|
41
41
|
import {
|
|
42
42
|
CHANNEL_REGISTRY,
|
|
43
43
|
DEPLOYMENT_TEMPLATES,
|
|
@@ -4777,7 +4777,7 @@ import { execFileSync, execSync } from "child_process";
|
|
|
4777
4777
|
import { existsSync as existsSync10, realpathSync as realpathSync2 } from "fs";
|
|
4778
4778
|
import chalk18 from "chalk";
|
|
4779
4779
|
import ora16 from "ora";
|
|
4780
|
-
var cliVersion = true ? "0.28.
|
|
4780
|
+
var cliVersion = true ? "0.28.107" : "dev";
|
|
4781
4781
|
async function fetchLatestVersion() {
|
|
4782
4782
|
const host2 = getHost();
|
|
4783
4783
|
if (!host2) return null;
|
|
@@ -5791,7 +5791,7 @@ function handleError(err) {
|
|
|
5791
5791
|
}
|
|
5792
5792
|
|
|
5793
5793
|
// src/bin/agt.ts
|
|
5794
|
-
var cliVersion2 = true ? "0.28.
|
|
5794
|
+
var cliVersion2 = true ? "0.28.107" : "dev";
|
|
5795
5795
|
var program = new Command();
|
|
5796
5796
|
program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
|
|
5797
5797
|
program.hook("preAction", async (thisCommand, actionCommand) => {
|
|
@@ -7600,7 +7600,7 @@ function requireHost() {
|
|
|
7600
7600
|
}
|
|
7601
7601
|
|
|
7602
7602
|
// src/lib/api-client.ts
|
|
7603
|
-
var agtCliVersion = true ? "0.28.
|
|
7603
|
+
var agtCliVersion = true ? "0.28.107" : "dev";
|
|
7604
7604
|
var lastConfigHash = null;
|
|
7605
7605
|
function setConfigHash(hash) {
|
|
7606
7606
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -8897,4 +8897,4 @@ export {
|
|
|
8897
8897
|
managerInstallSystemUnitCommand,
|
|
8898
8898
|
managerUninstallSystemUnitCommand
|
|
8899
8899
|
};
|
|
8900
|
-
//# sourceMappingURL=chunk-
|
|
8900
|
+
//# sourceMappingURL=chunk-WFMJOGRV.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireHost,
|
|
29
29
|
safeWriteJsonAtomic,
|
|
30
30
|
setConfigHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-WFMJOGRV.js";
|
|
32
32
|
import {
|
|
33
33
|
getProjectDir as getProjectDir2,
|
|
34
34
|
getReadyTasks,
|
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
isAgentPromptReady,
|
|
52
52
|
isSessionHealthy,
|
|
53
53
|
isStaleForToday,
|
|
54
|
+
isolationMode,
|
|
54
55
|
paneLogPath,
|
|
55
56
|
peekCurrentSession,
|
|
56
57
|
prepareForRespawn,
|
|
@@ -343,8 +344,9 @@ function buildClaudeAgentMatcher(codeName) {
|
|
|
343
344
|
function findMcpChildrenForAgent(args) {
|
|
344
345
|
const { rows, codeName, serverKeys, mcpJson } = args;
|
|
345
346
|
const maxDepth = args.maxDepth ?? 8;
|
|
347
|
+
const inContainer = args.inContainer ?? false;
|
|
346
348
|
if (serverKeys.length === 0 || rows.length === 0) return [];
|
|
347
|
-
const claudeMatcher = buildClaudeAgentMatcher(codeName);
|
|
349
|
+
const claudeMatcher = inContainer ? /\bclaude\b/ : buildClaudeAgentMatcher(codeName);
|
|
348
350
|
const argvMatchers = [];
|
|
349
351
|
for (const key of serverKeys) {
|
|
350
352
|
const entry = mcpJson?.mcpServers?.[key];
|
|
@@ -487,7 +489,7 @@ function givenUpMcpServerKeys(codeName) {
|
|
|
487
489
|
return out;
|
|
488
490
|
}
|
|
489
491
|
function findMissingMcpServers(args) {
|
|
490
|
-
const { rows, codeName, mcpJson } = args;
|
|
492
|
+
const { rows, codeName, mcpJson, inContainer } = args;
|
|
491
493
|
const servers = mcpJson?.mcpServers ?? {};
|
|
492
494
|
const declared = Object.keys(servers);
|
|
493
495
|
if (declared.length === 0) return [];
|
|
@@ -500,7 +502,8 @@ function findMissingMcpServers(args) {
|
|
|
500
502
|
rows,
|
|
501
503
|
codeName,
|
|
502
504
|
serverKeys: [key],
|
|
503
|
-
mcpJson
|
|
505
|
+
mcpJson,
|
|
506
|
+
inContainer
|
|
504
507
|
});
|
|
505
508
|
if (live.length === 0) missing.push(key);
|
|
506
509
|
}
|
|
@@ -523,10 +526,14 @@ function reapMissingMcpSessions(args) {
|
|
|
523
526
|
classifyKey = () => "essential",
|
|
524
527
|
quarantineDwellMs = 0,
|
|
525
528
|
quarantineMode = "off",
|
|
526
|
-
onQuarantine
|
|
529
|
+
onQuarantine,
|
|
530
|
+
isolated = false
|
|
527
531
|
} = args;
|
|
528
532
|
const now = args.now ?? Date.now;
|
|
529
|
-
const runPs = args.runPs ?? (() => execFileSync2("
|
|
533
|
+
const runPs = args.runPs ?? (isolated ? () => execFileSync2("docker", ["exec", `agt-${codeName}`, "ps", "-eo", "pid,ppid,args"], {
|
|
534
|
+
encoding: "utf-8",
|
|
535
|
+
timeout: 8e3
|
|
536
|
+
}) : () => execFileSync2("ps", ["-eo", "pid,ppid,args"], { encoding: "utf-8", timeout: 5e3 }));
|
|
530
537
|
if (!mcpJson?.mcpServers) {
|
|
531
538
|
return { missing: [], restarted: false, reason: "no-mcp-json" };
|
|
532
539
|
}
|
|
@@ -551,7 +558,7 @@ function reapMissingMcpSessions(args) {
|
|
|
551
558
|
return { missing: [], restarted: false, reason: "healthy" };
|
|
552
559
|
}
|
|
553
560
|
const rows = parsePsRows(psOutput);
|
|
554
|
-
const missingRaw = findMissingMcpServers({ rows, codeName, mcpJson });
|
|
561
|
+
const missingRaw = findMissingMcpServers({ rows, codeName, mcpJson, inContainer: isolated });
|
|
555
562
|
const rotationGraced = [];
|
|
556
563
|
const missing = [];
|
|
557
564
|
for (const key of missingRaw) {
|
|
@@ -6993,7 +7000,7 @@ var cachedMaintenanceWindow = null;
|
|
|
6993
7000
|
var lastVersionCheckAt = 0;
|
|
6994
7001
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6995
7002
|
var lastResponsivenessProbeAt = 0;
|
|
6996
|
-
var agtCliVersion = true ? "0.28.
|
|
7003
|
+
var agtCliVersion = true ? "0.28.107" : "dev";
|
|
6997
7004
|
function resolveBrewPath(execFileSync4) {
|
|
6998
7005
|
try {
|
|
6999
7006
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -10141,6 +10148,10 @@ async function processAgent(agent, agentStates) {
|
|
|
10141
10148
|
codeName: agent.code_name,
|
|
10142
10149
|
mcpJson: mcpJsonParsed,
|
|
10143
10150
|
sessionStartedAt: sess?.startedAt ?? null,
|
|
10151
|
+
// ENG-6660: under Docker the MCP children live in the agent's container
|
|
10152
|
+
// PID namespace - probe inside it (docker exec ps) instead of the host,
|
|
10153
|
+
// or every declared MCP looks "missing" -> restart loop -> flapping.
|
|
10154
|
+
isolated: isolationMode(agent.code_name) === "docker",
|
|
10144
10155
|
// ENG-6486: a restart is already scheduled/deferred for this agent (e.g.
|
|
10145
10156
|
// a freshly-added channel awaiting its convergence restart, deferred by
|
|
10146
10157
|
// the maintenance window). The pending restart will spawn the declared-
|