@integrity-labs/agt-cli 0.28.266 → 0.28.267
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.
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
defaultFlagsCachePath,
|
|
15
15
|
deriveMcpServerKey,
|
|
16
16
|
diffEnvIntegrations,
|
|
17
|
+
envOnlyRespawnVars,
|
|
17
18
|
estimateActiveTasksTokens,
|
|
18
19
|
exchangeApiKey,
|
|
19
20
|
executeConnectivityProbe,
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
requireHost,
|
|
38
39
|
safeWriteJsonAtomic,
|
|
39
40
|
setConfigHash
|
|
40
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-OTXH3YLU.js";
|
|
41
42
|
import {
|
|
42
43
|
getProjectDir as getProjectDir2,
|
|
43
44
|
getReadyTasks,
|
|
@@ -6699,7 +6700,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
6699
6700
|
var lastVersionCheckAt = 0;
|
|
6700
6701
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
6701
6702
|
var lastResponsivenessProbeAt = 0;
|
|
6702
|
-
var agtCliVersion = true ? "0.28.
|
|
6703
|
+
var agtCliVersion = true ? "0.28.267" : "dev";
|
|
6703
6704
|
function resolveBrewPath(execFileSync2) {
|
|
6704
6705
|
try {
|
|
6705
6706
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -9350,8 +9351,12 @@ async function processAgent(agent, agentStates) {
|
|
|
9350
9351
|
isolated: isolationMode(agent.code_name) === "docker"
|
|
9351
9352
|
});
|
|
9352
9353
|
}
|
|
9354
|
+
const respawnVars = envOnlyRespawnVars(changedVars, mcpJsonForReap, CHANNEL_SECRET_ENV_KEYS);
|
|
9355
|
+
const needsRespawn = respawnVars.length > 0 && !intFlap.flapping;
|
|
9353
9356
|
const names = integrations.map((i) => i.display_name || i.definition_id).join(", ");
|
|
9354
|
-
const
|
|
9357
|
+
const reconnectNote = affectedServerKeys.length > 0 ? ` The MCP servers that depend on rotating credentials (${affectedServerKeys.join(", ")}) have been signalled to reconnect.` : "";
|
|
9358
|
+
const restartNote = needsRespawn ? " Your session will restart shortly to apply the change (ENG-7510)." : "";
|
|
9359
|
+
const reapNote = `${reconnectNote}${restartNote}`;
|
|
9355
9360
|
if (intFlap.flapping) {
|
|
9356
9361
|
log(`[mcp-flap-dampener] suppressed integration-update notice for '${agent.code_name}' (set flapping, ENG-6123): ${names}`);
|
|
9357
9362
|
} else {
|
|
@@ -9361,6 +9366,16 @@ async function processAgent(agent, agentStates) {
|
|
|
9361
9366
|
});
|
|
9362
9367
|
log(`[hot-reload] Notified '${agent.code_name}' about integration update: ${names} (reaped ${affectedServerKeys.length} stale MCP server(s))`);
|
|
9363
9368
|
}
|
|
9369
|
+
if (needsRespawn) {
|
|
9370
|
+
scheduleSessionRestart(
|
|
9371
|
+
agent.code_name,
|
|
9372
|
+
0,
|
|
9373
|
+
`env-only integration change (${respawnVars.join(", ")})`
|
|
9374
|
+
);
|
|
9375
|
+
log(
|
|
9376
|
+
`[hot-reload] Scheduled respawn for '${agent.code_name}' to apply env-only integration change (no MCP child to reap): ${respawnVars.join(", ")} (ENG-7510)`
|
|
9377
|
+
);
|
|
9378
|
+
}
|
|
9364
9379
|
} catch (err) {
|
|
9365
9380
|
rotationHandled = false;
|
|
9366
9381
|
log(`[hot-reload] Failed to compute / reap affected MCP servers for '${agent.code_name}': ${err.message} \u2014 will retry next tick`);
|