@integrity-labs/agt-cli 0.27.135 → 0.27.137
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 +4 -4
- package/dist/{chunk-KZGU4X3A.js → chunk-TDMOEMDM.js} +2 -2
- package/dist/chunk-TDMOEMDM.js.map +1 -0
- package/dist/{chunk-HC7B2OVZ.js → chunk-UIRCFCED.js} +8 -2
- package/dist/{chunk-HC7B2OVZ.js.map → chunk-UIRCFCED.js.map} +1 -1
- package/dist/{chunk-XKX2HEQY.js → chunk-YJOFVGD2.js} +17 -2
- package/dist/{chunk-XKX2HEQY.js.map → chunk-YJOFVGD2.js.map} +1 -1
- package/dist/{claude-pair-runtime-I7SKUE2Q.js → claude-pair-runtime-ZOHU673W.js} +2 -2
- package/dist/lib/manager-worker.js +47 -18
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/index.js +67 -1
- package/dist/{persistent-session-56AY3LH6.js → persistent-session-NSN62HZN.js} +3 -3
- package/dist/{responsiveness-probe-L6B7WINR.js → responsiveness-probe-RF5ZCTE7.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-KZGU4X3A.js.map +0 -1
- /package/dist/{claude-pair-runtime-I7SKUE2Q.js.map → claude-pair-runtime-ZOHU673W.js.map} +0 -0
- /package/dist/{persistent-session-56AY3LH6.js.map → persistent-session-NSN62HZN.js.map} +0 -0
- /package/dist/{responsiveness-probe-L6B7WINR.js.map → responsiveness-probe-RF5ZCTE7.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-NSN62HZN.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-ZOHU673W.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
provisionStopHook,
|
|
18
18
|
requireHost,
|
|
19
19
|
safeWriteJsonAtomic
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-UIRCFCED.js";
|
|
21
21
|
import {
|
|
22
22
|
getProjectDir as getProjectDir2,
|
|
23
23
|
getReadyTasks,
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
buildAllowedTools,
|
|
30
30
|
checkChannelInputs,
|
|
31
31
|
creditWatchdogGiveUpCount,
|
|
32
|
+
expandTemplateVars,
|
|
32
33
|
formatMissingVar,
|
|
33
34
|
getLastFailureContext,
|
|
34
35
|
getProjectDir,
|
|
@@ -56,7 +57,7 @@ import {
|
|
|
56
57
|
stopPersistentSession,
|
|
57
58
|
takeWatchdogGiveUpCount,
|
|
58
59
|
takeZombieDetection
|
|
59
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-YJOFVGD2.js";
|
|
60
61
|
import {
|
|
61
62
|
KANBAN_CHECK_COMMAND,
|
|
62
63
|
SUPPRESS_SENTINEL,
|
|
@@ -83,7 +84,7 @@ import {
|
|
|
83
84
|
resolveDmTarget,
|
|
84
85
|
worseConnectivityOutcome,
|
|
85
86
|
wrapScheduledTaskPrompt
|
|
86
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-TDMOEMDM.js";
|
|
87
88
|
import {
|
|
88
89
|
parsePsRows,
|
|
89
90
|
reapOrphanChannelMcps
|
|
@@ -3536,8 +3537,9 @@ async function processOne(flag, opts) {
|
|
|
3536
3537
|
await sendError(flag, opts, `\`/restart\` is only supported for Claude Code agents (this agent runs on \`${framework}\`).`);
|
|
3537
3538
|
return;
|
|
3538
3539
|
}
|
|
3539
|
-
|
|
3540
|
-
opts.
|
|
3540
|
+
const reasonSuffix = flag.source === "agent" && flag.reason ? ` reason="${flag.reason}"` : "";
|
|
3541
|
+
opts.log(`[restart-handler] Restarting tmux session for '${flag.codeName}' (source: ${flag.source})${reasonSuffix}`);
|
|
3542
|
+
opts.stopSession(flag.codeName, flag);
|
|
3541
3543
|
await sendAck(flag, opts, `\u{1F504} Restart initiated for \`${flag.codeName}\` \u2014 the replacement session is being created.`);
|
|
3542
3544
|
}
|
|
3543
3545
|
async function sendAck(flag, opts, text) {
|
|
@@ -4411,13 +4413,26 @@ function projectMcpKeys(_codeName, projectDir) {
|
|
|
4411
4413
|
return null;
|
|
4412
4414
|
}
|
|
4413
4415
|
}
|
|
4414
|
-
function readMcpHttpServerConfig(projectDir, serverKey) {
|
|
4416
|
+
function readMcpHttpServerConfig(projectDir, serverKey, env) {
|
|
4415
4417
|
try {
|
|
4416
4418
|
const raw = readFileSync9(join8(projectDir, ".mcp.json"), "utf-8");
|
|
4417
4419
|
const servers = JSON.parse(raw).mcpServers ?? {};
|
|
4418
4420
|
const entry = servers[serverKey];
|
|
4419
4421
|
if (entry && typeof entry.url === "string" && (entry.type === "http" || entry.type === void 0)) {
|
|
4420
|
-
|
|
4422
|
+
const unresolved = /* @__PURE__ */ new Set();
|
|
4423
|
+
const sub = (value) => {
|
|
4424
|
+
if (!env) return value;
|
|
4425
|
+
const r = expandTemplateVars(value, env);
|
|
4426
|
+
for (const name of r.unresolved) unresolved.add(name);
|
|
4427
|
+
return r.value;
|
|
4428
|
+
};
|
|
4429
|
+
const url = sub(entry.url);
|
|
4430
|
+
let headers;
|
|
4431
|
+
if (entry.headers) {
|
|
4432
|
+
headers = {};
|
|
4433
|
+
for (const [k, v] of Object.entries(entry.headers)) headers[k] = sub(v);
|
|
4434
|
+
}
|
|
4435
|
+
return { url, ...headers ? { headers } : {}, unresolved: [...unresolved] };
|
|
4421
4436
|
}
|
|
4422
4437
|
return null;
|
|
4423
4438
|
} catch {
|
|
@@ -4438,10 +4453,16 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
4438
4453
|
fetchImpl: fetch,
|
|
4439
4454
|
runCli: (binary, args) => runCliProbe(binary, args, { env: probeEnv }),
|
|
4440
4455
|
mcpProbe: async (target) => {
|
|
4441
|
-
const cfg = readMcpHttpServerConfig(projectDir, target.serverKey);
|
|
4456
|
+
const cfg = readMcpHttpServerConfig(projectDir, target.serverKey, probeEnv);
|
|
4442
4457
|
if (!cfg) {
|
|
4443
4458
|
return { status: "transient_error", message: `MCP server '${target.serverKey}' not resolvable from .mcp.json` };
|
|
4444
4459
|
}
|
|
4460
|
+
if (cfg.unresolved.length > 0) {
|
|
4461
|
+
return {
|
|
4462
|
+
status: "transient_error",
|
|
4463
|
+
message: `MCP '${target.serverKey}' auth unresolved: ${cfg.unresolved.join(", ")}`
|
|
4464
|
+
};
|
|
4465
|
+
}
|
|
4445
4466
|
return probeMcpHttp(cfg);
|
|
4446
4467
|
},
|
|
4447
4468
|
// ENG-6139: connected-account binding check for managed (Composio) toolkits.
|
|
@@ -4452,10 +4473,16 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
4452
4473
|
// authenticates with these), plus the recorded connected_account_id.
|
|
4453
4474
|
composioProbe: async (definitionId, credentials) => {
|
|
4454
4475
|
const serverKey = definitionId.replace(/[^a-z0-9]/gi, "_").toLowerCase();
|
|
4455
|
-
const cfg = readMcpHttpServerConfig(projectDir, serverKey);
|
|
4476
|
+
const cfg = readMcpHttpServerConfig(projectDir, serverKey, probeEnv);
|
|
4456
4477
|
if (!cfg) {
|
|
4457
4478
|
return { status: "transient_error", message: `MCP server '${serverKey}' not resolvable from .mcp.json` };
|
|
4458
4479
|
}
|
|
4480
|
+
if (cfg.unresolved.length > 0) {
|
|
4481
|
+
return {
|
|
4482
|
+
status: "transient_error",
|
|
4483
|
+
message: `MCP '${serverKey}' auth unresolved: ${cfg.unresolved.join(", ")}`
|
|
4484
|
+
};
|
|
4485
|
+
}
|
|
4459
4486
|
const apiKey = cfg.headers?.["x-api-key"] ?? cfg.headers?.["X-API-Key"] ?? "";
|
|
4460
4487
|
let expectedUserId = "";
|
|
4461
4488
|
let serverId;
|
|
@@ -4475,8 +4502,9 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
4475
4502
|
// linkage surfaces as a real `No connected account found` instead of a
|
|
4476
4503
|
// green handshake. Skips (`null`) when no safe read-only tool is callable.
|
|
4477
4504
|
composioToolCallProbe: async (target) => {
|
|
4478
|
-
const cfg = readMcpHttpServerConfig(projectDir, target.serverKey);
|
|
4505
|
+
const cfg = readMcpHttpServerConfig(projectDir, target.serverKey, probeEnv);
|
|
4479
4506
|
if (!cfg) return null;
|
|
4507
|
+
if (cfg.unresolved.length > 0) return null;
|
|
4480
4508
|
return probeComposioMcpToolCall({ url: cfg.url, headers: cfg.headers });
|
|
4481
4509
|
}
|
|
4482
4510
|
};
|
|
@@ -4690,7 +4718,7 @@ var cachedMaintenanceWindow = null;
|
|
|
4690
4718
|
var lastVersionCheckAt = 0;
|
|
4691
4719
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
4692
4720
|
var lastResponsivenessProbeAt = 0;
|
|
4693
|
-
var agtCliVersion = true ? "0.27.
|
|
4721
|
+
var agtCliVersion = true ? "0.27.137" : "dev";
|
|
4694
4722
|
function resolveBrewPath(execFileSync4) {
|
|
4695
4723
|
try {
|
|
4696
4724
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -5825,8 +5853,9 @@ async function pollCycle() {
|
|
|
5825
5853
|
await processRestartFlags({
|
|
5826
5854
|
log,
|
|
5827
5855
|
resolveFramework: (codeName) => agentFrameworkCache.get(codeName) ?? null,
|
|
5828
|
-
stopSession: (codeName) => {
|
|
5829
|
-
|
|
5856
|
+
stopSession: (codeName, flag) => {
|
|
5857
|
+
const breakerReason = flag.source === "agent" ? "agent-requested" : "channel-restart-flag";
|
|
5858
|
+
stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason);
|
|
5830
5859
|
agentState.persistentSessionAgents.delete(codeName);
|
|
5831
5860
|
claudeAuthTupleBySession.delete(codeName);
|
|
5832
5861
|
},
|
|
@@ -5887,7 +5916,7 @@ async function pollCycle() {
|
|
|
5887
5916
|
}
|
|
5888
5917
|
try {
|
|
5889
5918
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
5890
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
5919
|
+
const { collectDiagnostics } = await import("../persistent-session-NSN62HZN.js");
|
|
5891
5920
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
5892
5921
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames) : void 0;
|
|
5893
5922
|
let tailscaleHostname;
|
|
@@ -5974,12 +6003,12 @@ async function pollCycle() {
|
|
|
5974
6003
|
const {
|
|
5975
6004
|
collectResponsivenessProbes,
|
|
5976
6005
|
getResponsivenessIntervalMs
|
|
5977
|
-
} = await import("../responsiveness-probe-
|
|
6006
|
+
} = await import("../responsiveness-probe-RF5ZCTE7.js");
|
|
5978
6007
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
5979
6008
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
5980
6009
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
5981
6010
|
if (probeCodeNames.length > 0) {
|
|
5982
|
-
const { takeAcpxExecFailureCount, creditAcpxExecFailureCount } = await import("../persistent-session-
|
|
6011
|
+
const { takeAcpxExecFailureCount, creditAcpxExecFailureCount } = await import("../persistent-session-NSN62HZN.js");
|
|
5983
6012
|
const drainedGiveUps = /* @__PURE__ */ new Map();
|
|
5984
6013
|
const drainedAcpxFailures = /* @__PURE__ */ new Map();
|
|
5985
6014
|
const probes = collectResponsivenessProbes(probeCodeNames).map((p) => {
|
|
@@ -6013,7 +6042,7 @@ async function pollCycle() {
|
|
|
6013
6042
|
collectResponsivenessProbes,
|
|
6014
6043
|
livePendingInboundOldestAgeSeconds,
|
|
6015
6044
|
deadLetterPendingInbound
|
|
6016
|
-
} = await import("../responsiveness-probe-
|
|
6045
|
+
} = await import("../responsiveness-probe-RF5ZCTE7.js");
|
|
6017
6046
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
6018
6047
|
const liveAgents = agentState.persistentSessionAgents;
|
|
6019
6048
|
for (const tracked of consecutiveWedgeCycles.keys()) {
|
|
@@ -10519,7 +10548,7 @@ async function processClaudePairSessions(agents) {
|
|
|
10519
10548
|
killPairSession,
|
|
10520
10549
|
pairTmuxSession,
|
|
10521
10550
|
finalizeClaudePairOnboarding
|
|
10522
|
-
} = await import("../claude-pair-runtime-
|
|
10551
|
+
} = await import("../claude-pair-runtime-ZOHU673W.js");
|
|
10523
10552
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
10524
10553
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
10525
10554
|
const killed = await killPairSession(pairTmuxSession(pairId));
|