@integrity-labs/agt-cli 0.28.388 → 0.28.390
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.
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
resolveEffectivePinRaw,
|
|
44
44
|
safeWriteJsonAtomic,
|
|
45
45
|
setConfigHash
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-OIVIZ7Z3.js";
|
|
47
47
|
import {
|
|
48
48
|
getProjectDir as getProjectDir2,
|
|
49
49
|
getReadyTasks,
|
|
@@ -679,6 +679,9 @@ var OPTIONAL_CHANNEL_KEYS = /* @__PURE__ */ new Set([
|
|
|
679
679
|
"irc",
|
|
680
680
|
"nostr"
|
|
681
681
|
]);
|
|
682
|
+
function isKnownChannelKey(serverKey) {
|
|
683
|
+
return ESSENTIAL_CHANNEL_KEYS.has(serverKey) || OPTIONAL_CHANNEL_KEYS.has(serverKey);
|
|
684
|
+
}
|
|
682
685
|
function readDeclaredCriticality(entry) {
|
|
683
686
|
if (!entry || typeof entry !== "object") return void 0;
|
|
684
687
|
const meta = entry._augmented;
|
|
@@ -1602,14 +1605,18 @@ var GATEABLE_RESTART_REASONS = /* @__PURE__ */ new Set([
|
|
|
1602
1605
|
"channel-set-change",
|
|
1603
1606
|
"sender-policy-change",
|
|
1604
1607
|
"channel-behaviour-change",
|
|
1605
|
-
"mcp-presence-reaper"
|
|
1608
|
+
"mcp-presence-reaper",
|
|
1609
|
+
// ENG-7949: same gate-but-window-exempt shape as 'mcp-presence-reaper' — see
|
|
1610
|
+
// WINDOW_EXEMPT_RESTART_REASONS below for why this one skips the window too.
|
|
1611
|
+
"channel-mcp-down"
|
|
1606
1612
|
]);
|
|
1607
1613
|
function isGateableRestartReason(reason) {
|
|
1608
1614
|
return reason != null && GATEABLE_RESTART_REASONS.has(reason);
|
|
1609
1615
|
}
|
|
1610
1616
|
var WINDOW_EXEMPT_RESTART_REASONS = /* @__PURE__ */ new Set([
|
|
1611
1617
|
"channel-set-change",
|
|
1612
|
-
"sender-policy-change"
|
|
1618
|
+
"sender-policy-change",
|
|
1619
|
+
"channel-mcp-down"
|
|
1613
1620
|
]);
|
|
1614
1621
|
function isWindowExemptRestartReason(reason) {
|
|
1615
1622
|
return reason != null && WINDOW_EXEMPT_RESTART_REASONS.has(reason);
|
|
@@ -9113,7 +9120,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
9113
9120
|
var lastVersionCheckAt = 0;
|
|
9114
9121
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
9115
9122
|
var lastResponsivenessProbeAt = 0;
|
|
9116
|
-
var agtCliVersion = true ? "0.28.
|
|
9123
|
+
var agtCliVersion = true ? "0.28.390" : "dev";
|
|
9117
9124
|
function resolveBrewPath(execFileSync2) {
|
|
9118
9125
|
try {
|
|
9119
9126
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -12769,13 +12776,24 @@ async function processAgent(agent, agentStates) {
|
|
|
12769
12776
|
// MCP) is decoupled from the GATE reason. Pre-6264 an undefined breaker
|
|
12770
12777
|
// reason also made the restart non-gateable → 'bypass' → the session was
|
|
12771
12778
|
// torn down mid-turn (the common single-MCP case interrupted busy
|
|
12772
|
-
// agents).
|
|
12773
|
-
//
|
|
12774
|
-
//
|
|
12779
|
+
// agents). Pass 'mcp-presence-reaper' as the gate reason so the restart
|
|
12780
|
+
// defers-until-idle, while breakerReason still governs whether it counts
|
|
12781
|
+
// against the breaker.
|
|
12782
|
+
//
|
|
12783
|
+
// ENG-7949: EXCEPT when at least one dead MCP (ctx.activeKeys, already
|
|
12784
|
+
// confirmed to have no live children) is a recognised CHANNEL server —
|
|
12785
|
+
// then the gate reason promotes to 'channel-mcp-down', which is
|
|
12786
|
+
// window-exempt (still defer-until-idle, never interrupts a live turn,
|
|
12787
|
+
// but skips the up-to-~14h off-peak window wait). A dead channel MCP
|
|
12788
|
+
// means the agent is unreachable on that channel right now; sitting
|
|
12789
|
+
// silently deferred until the window opens is a worse outcome than a
|
|
12790
|
+
// gated restart. A routine tool-MCP-only reaper restart (xero,
|
|
12791
|
+
// composio_*, unrecognised keys) keeps the original 'mcp-presence-
|
|
12792
|
+
// reaper' gate reason and still waits for the window as before.
|
|
12775
12793
|
stopSession: (codeName, ctx) => stopPersistentSessionAndForgetMcpBaseline(
|
|
12776
12794
|
codeName,
|
|
12777
12795
|
reaperRestartBreakerReason(ctx.activeKeys),
|
|
12778
|
-
"mcp-presence-reaper"
|
|
12796
|
+
ctx.activeKeys.some(isKnownChannelKey) ? "channel-mcp-down" : "mcp-presence-reaper"
|
|
12779
12797
|
),
|
|
12780
12798
|
// ENG-5292: when the reaper gives up on a managed MCP (cap from
|
|
12781
12799
|
// ENG-5279 + state-preservation from ENG-5285 both said "this
|