@integrity-labs/agt-cli 0.28.460 → 0.28.462
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-BWH5XTDU.js → chunk-QZUECTC7.js} +7 -1
- package/dist/{chunk-BWH5XTDU.js.map → chunk-QZUECTC7.js.map} +1 -1
- package/dist/{chunk-EBSFYBRI.js → chunk-UNDFX52P.js} +156 -10
- package/dist/{chunk-EBSFYBRI.js.map → chunk-UNDFX52P.js.map} +1 -1
- package/dist/{claude-pair-runtime-YNOY2ATX.js → claude-pair-runtime-VTW57E4U.js} +2 -2
- package/dist/lib/manager-worker.js +71 -10
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +6 -0
- package/dist/mcp/origami.js +6 -0
- package/dist/mcp/slack-channel.js +93 -8
- package/dist/mcp/telegram-channel.js +95 -6
- package/dist/{persistent-session-KGRCIIS5.js → persistent-session-HRVZVAIL.js} +2 -2
- package/dist/{responsiveness-probe-4FVGB6NY.js → responsiveness-probe-UUVXQIQ4.js} +110 -42
- package/dist/responsiveness-probe-UUVXQIQ4.js.map +1 -0
- package/package.json +1 -1
- package/dist/responsiveness-probe-4FVGB6NY.js.map +0 -1
- /package/dist/{claude-pair-runtime-YNOY2ATX.js.map → claude-pair-runtime-VTW57E4U.js.map} +0 -0
- /package/dist/{persistent-session-KGRCIIS5.js.map → persistent-session-HRVZVAIL.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-HRVZVAIL.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-VTW57E4U.js.map
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
resolveEffectivePinRaw,
|
|
43
43
|
safeWriteJsonAtomic,
|
|
44
44
|
setConfigHash
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-UNDFX52P.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir as getProjectDir2,
|
|
48
48
|
getReadyTasks,
|
|
@@ -164,7 +164,7 @@ import {
|
|
|
164
164
|
toOpencodeModel,
|
|
165
165
|
transcriptActivityAgeSeconds,
|
|
166
166
|
writeEgressAllowlist
|
|
167
|
-
} from "../chunk-
|
|
167
|
+
} from "../chunk-QZUECTC7.js";
|
|
168
168
|
import {
|
|
169
169
|
reapOrphanChannelMcps
|
|
170
170
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -9976,7 +9976,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9976
9976
|
var lastVersionCheckAt = 0;
|
|
9977
9977
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9978
9978
|
var lastResponsivenessProbeAt = 0;
|
|
9979
|
-
var agtCliVersion = true ? "0.28.
|
|
9979
|
+
var agtCliVersion = true ? "0.28.462" : "dev";
|
|
9980
9980
|
function resolveBrewPath(execFileSync2) {
|
|
9981
9981
|
try {
|
|
9982
9982
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -11137,7 +11137,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
11137
11137
|
if (codeNames.length === 0) return;
|
|
11138
11138
|
void (async () => {
|
|
11139
11139
|
try {
|
|
11140
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11140
|
+
const { collectDiagnostics } = await import("../persistent-session-HRVZVAIL.js");
|
|
11141
11141
|
await api.post("/host/heartbeat", {
|
|
11142
11142
|
host_id: hostId,
|
|
11143
11143
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -11244,7 +11244,7 @@ async function pollCycle() {
|
|
|
11244
11244
|
}
|
|
11245
11245
|
try {
|
|
11246
11246
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
11247
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11247
|
+
const { collectDiagnostics } = await import("../persistent-session-HRVZVAIL.js");
|
|
11248
11248
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
11249
11249
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
|
|
11250
11250
|
let tailscaleHostname;
|
|
@@ -11358,7 +11358,7 @@ async function pollCycle() {
|
|
|
11358
11358
|
collectResponsivenessProbes,
|
|
11359
11359
|
collectPanelessActivityProbes,
|
|
11360
11360
|
getResponsivenessIntervalMs
|
|
11361
|
-
} = await import("../responsiveness-probe-
|
|
11361
|
+
} = await import("../responsiveness-probe-UUVXQIQ4.js");
|
|
11362
11362
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
11363
11363
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
11364
11364
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -11422,7 +11422,7 @@ async function pollCycle() {
|
|
|
11422
11422
|
collectResponsivenessProbes,
|
|
11423
11423
|
livePendingInboundOldestAgeSeconds,
|
|
11424
11424
|
parkPendingInbound
|
|
11425
|
-
} = await import("../responsiveness-probe-
|
|
11425
|
+
} = await import("../responsiveness-probe-UUVXQIQ4.js");
|
|
11426
11426
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
11427
11427
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
11428
11428
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -13792,6 +13792,67 @@ async function processAgent(agent, agentStates) {
|
|
|
13792
13792
|
);
|
|
13793
13793
|
});
|
|
13794
13794
|
},
|
|
13795
|
+
// ENG-8225: a stale-mcp-reaper rotation's grace window expired with the
|
|
13796
|
+
// child still absent — nothing made the tool call ENG-5344 was banking on
|
|
13797
|
+
// (dwight's `anchor-browser`, dead from 16:00:05, never called again all
|
|
13798
|
+
// evening). Arm ENG-7429's prompt bind-probe budget so the next tool call
|
|
13799
|
+
// is MANUFACTURED, which is the only lever that exists: a stdio MCP child
|
|
13800
|
+
// belongs to Claude Code on the session's stdio pipes, so a
|
|
13801
|
+
// manager-spawned one would be invisible to findMcpChildrenForAgent's
|
|
13802
|
+
// ppid-to-`claude` walk AND unreachable by any tool call.
|
|
13803
|
+
//
|
|
13804
|
+
// Returns whether the probe was actually armed. Gated on the same
|
|
13805
|
+
// `session-tool-probe` flag as every other arming site (2014, 6780) — when
|
|
13806
|
+
// it's off, arming is inert, so we report false and the reaper falls back
|
|
13807
|
+
// to its pre-ENG-8225 restart rather than suppressing a restart with no
|
|
13808
|
+
// repair behind it.
|
|
13809
|
+
onRotationRespawnStalled: (codeName, serverKey, { attempt, maxAttempts }) => {
|
|
13810
|
+
if (!hostFlagStore().getBoolean("session-tool-probe")) {
|
|
13811
|
+
log(
|
|
13812
|
+
`[mcp-presence-reaper] '${codeName}:${serverKey}' rotation respawn stalled but the 'session-tool-probe' flag is off \u2014 cannot arm the ENG-7429 prompt probe; falling back to the session restart (ENG-8225)`
|
|
13813
|
+
);
|
|
13814
|
+
return false;
|
|
13815
|
+
}
|
|
13816
|
+
promptBindProbeAttempts.set(codeName, PROMPT_BIND_PROBE_ATTEMPTS);
|
|
13817
|
+
log(
|
|
13818
|
+
`[mcp-presence-reaper] '${codeName}:${serverKey}' armed force-due prompt bind-probe budget (${PROMPT_BIND_PROBE_ATTEMPTS}) to force a tool call, attempt ${attempt}/${maxAttempts} (ENG-8225)`
|
|
13819
|
+
);
|
|
13820
|
+
return true;
|
|
13821
|
+
},
|
|
13822
|
+
// ENG-8225 (AC3): the prompt-probe budget is spent and the rotated child
|
|
13823
|
+
// never came back. Escalate down the two paths this area already uses —
|
|
13824
|
+
// mark the integration unhealthy (`/host/integration-health`, the ENG-5292
|
|
13825
|
+
// onGiveUp path) and open a `reaper_action` alert (`/host/reaper-event`,
|
|
13826
|
+
// the ENG-6184 onRestart path). No new alerting channel.
|
|
13827
|
+
onRotationRespawnGaveUp: (codeName, serverKey, { attempts }) => {
|
|
13828
|
+
const reason = `rotation respawn never happened: stale-mcp-reaper SIGTERM'd '${serverKey}' and the child never returned after ${attempts} prompt bind-probe(s) (ENG-8225)`;
|
|
13829
|
+
const mapping = managedToolkitIdByAgentAndServerId.get(
|
|
13830
|
+
managedToolkitMapKey(agent.agent_id, serverKey)
|
|
13831
|
+
);
|
|
13832
|
+
if (mapping) {
|
|
13833
|
+
const { toolkitId, connectionKey } = mapping;
|
|
13834
|
+
api.post("/host/integration-health", {
|
|
13835
|
+
agent_id: agent.agent_id,
|
|
13836
|
+
toolkit_id: toolkitId,
|
|
13837
|
+
connection_key: connectionKey,
|
|
13838
|
+
action: "mark_unhealthy",
|
|
13839
|
+
reason
|
|
13840
|
+
}).then(() => {
|
|
13841
|
+
log(
|
|
13842
|
+
`[mcp-presence-reaper] marked integration unhealthy for '${codeName}' toolkit '${toolkitId}' after a never-respawned rotation (ENG-8225)`
|
|
13843
|
+
);
|
|
13844
|
+
}).catch((err) => {
|
|
13845
|
+
log(
|
|
13846
|
+
`[mcp-presence-reaper] failed to mark integration unhealthy for '${codeName}' toolkit '${toolkitId}' after a never-respawned rotation (ENG-8225): ${err.message} \u2014 local escalation state still recorded`
|
|
13847
|
+
);
|
|
13848
|
+
});
|
|
13849
|
+
} else {
|
|
13850
|
+
log(
|
|
13851
|
+
`[mcp-presence-reaper] never-respawned rotation on '${codeName}:${serverKey}' \u2014 not a managed toolkit (no toolkit_id mapping), skipping integration-health API call (ENG-8225)`
|
|
13852
|
+
);
|
|
13853
|
+
}
|
|
13854
|
+
void reportReaperEvent(agent.agent_id, "mcp-presence-reaper", "kill", reason);
|
|
13855
|
+
},
|
|
13795
13856
|
// ENG-5286: record the restart event with the API so the
|
|
13796
13857
|
// agent-heartbeat-monitor cron can aggregate per-agent counts
|
|
13797
13858
|
// into the McpReaperRestartsHourly CloudWatch metric. Fire-and-
|
|
@@ -14800,7 +14861,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
14800
14861
|
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}`));
|
|
14801
14862
|
void (async () => {
|
|
14802
14863
|
try {
|
|
14803
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14864
|
+
const { collectDiagnostics } = await import("../persistent-session-HRVZVAIL.js");
|
|
14804
14865
|
await api.post("/host/heartbeat", {
|
|
14805
14866
|
host_id: hostId,
|
|
14806
14867
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -14850,7 +14911,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
14850
14911
|
}
|
|
14851
14912
|
try {
|
|
14852
14913
|
const hostId = await getHostId();
|
|
14853
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14914
|
+
const { collectDiagnostics } = await import("../persistent-session-HRVZVAIL.js");
|
|
14854
14915
|
await api.post("/host/heartbeat", {
|
|
14855
14916
|
host_id: hostId,
|
|
14856
14917
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -15303,7 +15364,7 @@ async function processClaudePairSessions(agents) {
|
|
|
15303
15364
|
killPairSession,
|
|
15304
15365
|
pairTmuxSession,
|
|
15305
15366
|
finalizeClaudePairOnboarding
|
|
15306
|
-
} = await import("../claude-pair-runtime-
|
|
15367
|
+
} = await import("../claude-pair-runtime-VTW57E4U.js");
|
|
15307
15368
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
15308
15369
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
15309
15370
|
const killed = await killPairSession(pairTmuxSession(pairId));
|