@integrity-labs/agt-cli 0.28.461 → 0.28.463
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 +3 -3
- package/dist/{chunk-WCYGJANF.js → chunk-VCZNGC6J.js} +155 -9
- package/dist/{chunk-WCYGJANF.js.map → chunk-VCZNGC6J.js.map} +1 -1
- package/dist/lib/manager-worker.js +69 -3
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +14 -6
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
resolveEffectivePinRaw,
|
|
43
43
|
safeWriteJsonAtomic,
|
|
44
44
|
setConfigHash
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-VCZNGC6J.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectDir as getProjectDir2,
|
|
48
48
|
getReadyTasks,
|
|
@@ -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.463" : "dev";
|
|
9980
9980
|
function resolveBrewPath(execFileSync2) {
|
|
9981
9981
|
try {
|
|
9982
9982
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -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-
|
|
@@ -15121,7 +15182,12 @@ async function processDirectChatMessage(agent, msg) {
|
|
|
15121
15182
|
await api.post("/host/direct-chat/reply", {
|
|
15122
15183
|
agent_id: agent.agentId,
|
|
15123
15184
|
session_id: msg.session_id,
|
|
15124
|
-
content: "[Expired] This message timed out before it could be processed. Please resend it."
|
|
15185
|
+
content: "[Expired] This message timed out before it could be processed. Please resend it.",
|
|
15186
|
+
// ENG-8274: kind:'notice' — the manager is draining a stale backlog
|
|
15187
|
+
// message. That is the system reporting a delivery outcome, not the agent
|
|
15188
|
+
// answering, and it owes no reply. Without this it rendered as an agent
|
|
15189
|
+
// bubble, so a timeout the agent never even saw read as the agent's words.
|
|
15190
|
+
kind: "notice"
|
|
15125
15191
|
});
|
|
15126
15192
|
} catch {
|
|
15127
15193
|
}
|