@integrity-labs/agt-cli 0.28.484 → 0.28.486
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-DNC5JGOV.js → chunk-SRR5XVWJ.js} +18 -9
- package/dist/{chunk-DNC5JGOV.js.map → chunk-SRR5XVWJ.js.map} +1 -1
- package/dist/{chunk-I63LLKQJ.js → chunk-XP53UXQR.js} +3 -3
- package/dist/{claude-pair-runtime-2XPTEGQR.js → claude-pair-runtime-STSHUESG.js} +2 -2
- package/dist/lib/manager-worker.js +49 -27
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +17 -8
- package/dist/mcp/origami.js +17 -8
- package/dist/mcp/slack-channel.js +17 -8
- package/dist/mcp/telegram-channel.js +17 -8
- package/dist/{persistent-session-IBMUPQZ2.js → persistent-session-CEGPLUHO.js} +2 -2
- package/dist/{responsiveness-probe-QBLQIMZR.js → responsiveness-probe-RBLOTOHD.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-I63LLKQJ.js.map → chunk-XP53UXQR.js.map} +0 -0
- /package/dist/{claude-pair-runtime-2XPTEGQR.js.map → claude-pair-runtime-STSHUESG.js.map} +0 -0
- /package/dist/{persistent-session-IBMUPQZ2.js.map → persistent-session-CEGPLUHO.js.map} +0 -0
- /package/dist/{responsiveness-probe-QBLQIMZR.js.map → responsiveness-probe-RBLOTOHD.js.map} +0 -0
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
resolveConnectivityProbe,
|
|
31
31
|
worseConnectivityOutcome,
|
|
32
32
|
wrapScheduledTaskPrompt
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SRR5XVWJ.js";
|
|
34
34
|
import {
|
|
35
35
|
parsePsRows
|
|
36
36
|
} from "./chunk-XWVM4KPK.js";
|
|
@@ -4938,7 +4938,7 @@ function exchangeFailureKind(err) {
|
|
|
4938
4938
|
}
|
|
4939
4939
|
|
|
4940
4940
|
// src/lib/api-client.ts
|
|
4941
|
-
var agtCliVersion = true ? "0.28.
|
|
4941
|
+
var agtCliVersion = true ? "0.28.486" : "dev";
|
|
4942
4942
|
var lastConfigHash = null;
|
|
4943
4943
|
function setConfigHash(hash) {
|
|
4944
4944
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -7667,4 +7667,4 @@ export {
|
|
|
7667
7667
|
managerInstallSystemUnitCommand,
|
|
7668
7668
|
managerUninstallSystemUnitCommand
|
|
7669
7669
|
};
|
|
7670
|
-
//# sourceMappingURL=chunk-
|
|
7670
|
+
//# sourceMappingURL=chunk-XP53UXQR.js.map
|
|
@@ -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-CEGPLUHO.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-STSHUESG.js.map
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
resolveEffectivePinRaw,
|
|
45
45
|
safeWriteJsonAtomic,
|
|
46
46
|
setConfigHash
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-XP53UXQR.js";
|
|
48
48
|
import {
|
|
49
49
|
getProjectDir as getProjectDir2,
|
|
50
50
|
getReadyTasks,
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
toOpencodeModel,
|
|
163
163
|
transcriptActivityAgeSeconds,
|
|
164
164
|
writeEgressAllowlist
|
|
165
|
-
} from "../chunk-
|
|
165
|
+
} from "../chunk-SRR5XVWJ.js";
|
|
166
166
|
import {
|
|
167
167
|
reapOrphanChannelMcps
|
|
168
168
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -9355,7 +9355,23 @@ function restartReasonBindsNewMcp(breakerReason) {
|
|
|
9355
9355
|
function dashboardRestartBreakerReason(restartReason) {
|
|
9356
9356
|
return restartReason === "integration-change" ? "integration-change" : void 0;
|
|
9357
9357
|
}
|
|
9358
|
-
function
|
|
9358
|
+
function shouldReportRestartToAudit(breakerReason) {
|
|
9359
|
+
return !!breakerReason && breakerReason !== "agent-requested" && breakerReason !== "channel-restart-flag" && breakerReason !== "integration-change";
|
|
9360
|
+
}
|
|
9361
|
+
function reportRestartEvent(codeName, breakerReason, auditDetail) {
|
|
9362
|
+
if (!shouldReportRestartToAudit(breakerReason)) return;
|
|
9363
|
+
const restartAgentId = agentState.codeNameToAgentId.get(codeName);
|
|
9364
|
+
if (!restartAgentId) return;
|
|
9365
|
+
void api.post("/host/restart-event", {
|
|
9366
|
+
agent_id: restartAgentId,
|
|
9367
|
+
source: breakerReason,
|
|
9368
|
+
// ENG-8293: fall back to the source string (the pre-ENG-8293 shape)
|
|
9369
|
+
// only when the caller supplied nothing better.
|
|
9370
|
+
reason: auditDetail?.reason ?? breakerReason,
|
|
9371
|
+
...auditDetail?.detail ? { detail: auditDetail.detail } : {}
|
|
9372
|
+
}).catch((err) => log(`[restart-event] report failed for '${codeName}': ${err.message}`));
|
|
9373
|
+
}
|
|
9374
|
+
function scheduleSessionRestart(codeName, delayMs, reason, breakerReason = "hot-reload-mcp", beforeStop, auditDetail) {
|
|
9359
9375
|
const existing = pendingSessionRestarts.get(codeName);
|
|
9360
9376
|
if (existing) {
|
|
9361
9377
|
const keepExistingWindowExempt = isWindowExemptRestartReason(existing.breakerReason) && !isWindowExemptRestartReason(breakerReason);
|
|
@@ -9379,7 +9395,17 @@ function scheduleSessionRestart(codeName, delayMs, reason, breakerReason = "hot-
|
|
|
9379
9395
|
);
|
|
9380
9396
|
deferLogThrottle.set(codeName, Date.now());
|
|
9381
9397
|
}
|
|
9382
|
-
scheduleSessionRestart(
|
|
9398
|
+
scheduleSessionRestart(
|
|
9399
|
+
codeName,
|
|
9400
|
+
RESTART_DEFER_RECHECK_MS,
|
|
9401
|
+
reason,
|
|
9402
|
+
breakerReason,
|
|
9403
|
+
beforeStop,
|
|
9404
|
+
// Carry the audit detail across the re-arm: a restart held for the
|
|
9405
|
+
// maintenance window must still be able to say what changed when it
|
|
9406
|
+
// finally fires.
|
|
9407
|
+
auditDetail
|
|
9408
|
+
);
|
|
9383
9409
|
return;
|
|
9384
9410
|
}
|
|
9385
9411
|
deferLogThrottle.delete(codeName);
|
|
@@ -9422,6 +9448,7 @@ function scheduleSessionRestart(codeName, delayMs, reason, breakerReason = "hot-
|
|
|
9422
9448
|
sessionLaunchManagedStructure.delete(codeName);
|
|
9423
9449
|
recordRestartForBreaker(codeName, breakerReason);
|
|
9424
9450
|
log(`[hot-reload] Session stopped for '${codeName}' \u2014 will respawn with ${reason}`);
|
|
9451
|
+
reportRestartEvent(codeName, breakerReason, { reason, detail: auditDetail });
|
|
9425
9452
|
const bindsNewMcp = restartReasonBindsNewMcp(breakerReason);
|
|
9426
9453
|
if (bindsNewMcp) {
|
|
9427
9454
|
const prior = pendingRestartVerifications.get(codeName);
|
|
@@ -9435,7 +9462,7 @@ function scheduleSessionRestart(codeName, delayMs, reason, breakerReason = "hot-
|
|
|
9435
9462
|
}
|
|
9436
9463
|
}, delayMs);
|
|
9437
9464
|
timer2.unref?.();
|
|
9438
|
-
pendingSessionRestarts.set(codeName, { timer: timer2, reason, breakerReason, beforeStop });
|
|
9465
|
+
pendingSessionRestarts.set(codeName, { timer: timer2, reason, breakerReason, beforeStop, auditDetail });
|
|
9439
9466
|
}
|
|
9440
9467
|
function cancelPendingSessionRestart(codeName) {
|
|
9441
9468
|
pendingRestartVerifications.delete(codeName);
|
|
@@ -9861,19 +9888,7 @@ function stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason, gate
|
|
|
9861
9888
|
if (breakerReason) {
|
|
9862
9889
|
recordRestartForBreaker(codeName, breakerReason);
|
|
9863
9890
|
}
|
|
9864
|
-
|
|
9865
|
-
const restartAgentId = agentState.codeNameToAgentId.get(codeName);
|
|
9866
|
-
if (restartAgentId) {
|
|
9867
|
-
void api.post("/host/restart-event", {
|
|
9868
|
-
agent_id: restartAgentId,
|
|
9869
|
-
source: breakerReason,
|
|
9870
|
-
// ENG-8293: fall back to the source string (the pre-ENG-8293 shape)
|
|
9871
|
-
// only when the caller supplied nothing better.
|
|
9872
|
-
reason: auditDetail?.reason ?? breakerReason,
|
|
9873
|
-
...auditDetail?.detail ? { detail: auditDetail.detail } : {}
|
|
9874
|
-
}).catch((err) => log(`[restart-event] report failed for '${codeName}': ${err.message}`));
|
|
9875
|
-
}
|
|
9876
|
-
}
|
|
9891
|
+
reportRestartEvent(codeName, breakerReason, auditDetail);
|
|
9877
9892
|
}
|
|
9878
9893
|
var agentRuntimeTeardownDeps = {
|
|
9879
9894
|
stopOpencodeServe: (codeName, teardownLog) => stopOpencodeSession(codeName, teardownLog),
|
|
@@ -10064,7 +10079,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
10064
10079
|
var lastVersionCheckAt = 0;
|
|
10065
10080
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
10066
10081
|
var lastResponsivenessProbeAt = 0;
|
|
10067
|
-
var agtCliVersion = true ? "0.28.
|
|
10082
|
+
var agtCliVersion = true ? "0.28.486" : "dev";
|
|
10068
10083
|
function resolveBrewPath(execFileSync2) {
|
|
10069
10084
|
try {
|
|
10070
10085
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -11227,7 +11242,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
11227
11242
|
if (codeNames.length === 0) return;
|
|
11228
11243
|
void (async () => {
|
|
11229
11244
|
try {
|
|
11230
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11245
|
+
const { collectDiagnostics } = await import("../persistent-session-CEGPLUHO.js");
|
|
11231
11246
|
await api.post("/host/heartbeat", {
|
|
11232
11247
|
host_id: hostId,
|
|
11233
11248
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -11334,7 +11349,7 @@ async function pollCycle() {
|
|
|
11334
11349
|
}
|
|
11335
11350
|
try {
|
|
11336
11351
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
11337
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
11352
|
+
const { collectDiagnostics } = await import("../persistent-session-CEGPLUHO.js");
|
|
11338
11353
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
11339
11354
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor) : void 0;
|
|
11340
11355
|
let tailscaleHostname;
|
|
@@ -11448,7 +11463,7 @@ async function pollCycle() {
|
|
|
11448
11463
|
collectResponsivenessProbes,
|
|
11449
11464
|
collectPanelessActivityProbes,
|
|
11450
11465
|
getResponsivenessIntervalMs
|
|
11451
|
-
} = await import("../responsiveness-probe-
|
|
11466
|
+
} = await import("../responsiveness-probe-RBLOTOHD.js");
|
|
11452
11467
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
11453
11468
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
11454
11469
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -11512,7 +11527,7 @@ async function pollCycle() {
|
|
|
11512
11527
|
collectResponsivenessProbes,
|
|
11513
11528
|
livePendingInboundOldestAgeSeconds,
|
|
11514
11529
|
parkPendingInbound
|
|
11515
|
-
} = await import("../responsiveness-probe-
|
|
11530
|
+
} = await import("../responsiveness-probe-RBLOTOHD.js");
|
|
11516
11531
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
11517
11532
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
11518
11533
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -13283,7 +13298,13 @@ async function processAgent(agent, agentStates) {
|
|
|
13283
13298
|
agent.code_name,
|
|
13284
13299
|
0,
|
|
13285
13300
|
`env-only integration change (${respawnVars.join(", ")})`,
|
|
13286
|
-
envRespawnReason
|
|
13301
|
+
envRespawnReason,
|
|
13302
|
+
void 0,
|
|
13303
|
+
// Structured "what changed" for the audit row. Var NAMES only —
|
|
13304
|
+
// never values — and carried as string values under neutral
|
|
13305
|
+
// keys, because the audit scrubber redacts by key name and
|
|
13306
|
+
// would blank a key like `github_access_token` (ENG-8293).
|
|
13307
|
+
{ env_only_change: { vars: respawnVars, kind: envRespawnReason } }
|
|
13287
13308
|
);
|
|
13288
13309
|
log(
|
|
13289
13310
|
`[hot-reload] Scheduled respawn for '${agent.code_name}' to apply env-only integration change (no MCP child to reap): ${respawnVars.join(", ")} [reason=${envRespawnReason}] (ENG-7510/ENG-7541)`
|
|
@@ -14988,7 +15009,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
14988
15009
|
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}`));
|
|
14989
15010
|
void (async () => {
|
|
14990
15011
|
try {
|
|
14991
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15012
|
+
const { collectDiagnostics } = await import("../persistent-session-CEGPLUHO.js");
|
|
14992
15013
|
await api.post("/host/heartbeat", {
|
|
14993
15014
|
host_id: hostId,
|
|
14994
15015
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -15038,7 +15059,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
15038
15059
|
}
|
|
15039
15060
|
try {
|
|
15040
15061
|
const hostId = await getHostId();
|
|
15041
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15062
|
+
const { collectDiagnostics } = await import("../persistent-session-CEGPLUHO.js");
|
|
15042
15063
|
await api.post("/host/heartbeat", {
|
|
15043
15064
|
host_id: hostId,
|
|
15044
15065
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor)
|
|
@@ -15496,7 +15517,7 @@ async function processClaudePairSessions(agents) {
|
|
|
15496
15517
|
killPairSession,
|
|
15497
15518
|
pairTmuxSession,
|
|
15498
15519
|
finalizeClaudePairOnboarding
|
|
15499
|
-
} = await import("../claude-pair-runtime-
|
|
15520
|
+
} = await import("../claude-pair-runtime-STSHUESG.js");
|
|
15500
15521
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
15501
15522
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
15502
15523
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -16436,6 +16457,7 @@ export {
|
|
|
16436
16457
|
reorderRestartedFirst,
|
|
16437
16458
|
resolveManagedMcpServerId,
|
|
16438
16459
|
restartReasonBindsNewMcp,
|
|
16460
|
+
shouldReportRestartToAudit,
|
|
16439
16461
|
shouldSkipRevokedCleanup,
|
|
16440
16462
|
shouldUpdateOnLatest,
|
|
16441
16463
|
stampClaudeCodeUpgradeMarker,
|