@integrity-labs/agt-cli 0.28.1269 → 0.28.1271
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/{api-client-54VZB3MY.js → api-client-QQQVVBVV.js} +3 -3
- package/dist/bin/agt.js +7 -7
- package/dist/{chunk-RNA2BFCX.js → chunk-53EZZXH7.js} +2 -2
- package/dist/{chunk-LTQTHV7E.js → chunk-BRAGHYEI.js} +78 -2
- package/dist/chunk-BRAGHYEI.js.map +1 -0
- package/dist/{chunk-GLIROXKE.js → chunk-GYXG7TDM.js} +2 -2
- package/dist/{chunk-ES3U3RIS.js → chunk-KOIQP6O7.js} +3 -3
- package/dist/{chunk-BM4Q7VW6.js → chunk-L52PEFTL.js} +3 -3
- package/dist/{chunk-YB4W3NF3.js → chunk-YLKRTJLF.js} +5 -5
- package/dist/{claude-code-updater-OHXLB7WR.js → claude-code-updater-RGOXKW5P.js} +3 -3
- package/dist/{claude-pair-runtime-XTRWHN5Q.js → claude-pair-runtime-AMSKEBCU.js} +3 -3
- package/dist/lib/manager-worker.js +68 -29
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +77 -1
- package/dist/mcp/index.js +77 -1
- package/dist/mcp/origami.js +77 -1
- package/dist/mcp/slack-channel.js +193 -3
- package/dist/mcp/telegram-channel.js +77 -1
- package/dist/{persistent-session-MX6UHWLR.js → persistent-session-UONCY6TG.js} +4 -4
- package/dist/{responsiveness-probe-GXI34QDS.js → responsiveness-probe-NWKSHBG6.js} +4 -4
- package/dist/{session-auth-dead-UM6LYQ2W.js → session-auth-dead-ELTKKKEH.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-LTQTHV7E.js.map +0 -1
- /package/dist/{api-client-54VZB3MY.js.map → api-client-QQQVVBVV.js.map} +0 -0
- /package/dist/{chunk-RNA2BFCX.js.map → chunk-53EZZXH7.js.map} +0 -0
- /package/dist/{chunk-GLIROXKE.js.map → chunk-GYXG7TDM.js.map} +0 -0
- /package/dist/{chunk-ES3U3RIS.js.map → chunk-KOIQP6O7.js.map} +0 -0
- /package/dist/{chunk-BM4Q7VW6.js.map → chunk-L52PEFTL.js.map} +0 -0
- /package/dist/{chunk-YB4W3NF3.js.map → chunk-YLKRTJLF.js.map} +0 -0
- /package/dist/{claude-code-updater-OHXLB7WR.js.map → claude-code-updater-RGOXKW5P.js.map} +0 -0
- /package/dist/{claude-pair-runtime-XTRWHN5Q.js.map → claude-pair-runtime-AMSKEBCU.js.map} +0 -0
- /package/dist/{persistent-session-MX6UHWLR.js.map → persistent-session-UONCY6TG.js.map} +0 -0
- /package/dist/{responsiveness-probe-GXI34QDS.js.map → responsiveness-probe-NWKSHBG6.js.map} +0 -0
- /package/dist/{session-auth-dead-UM6LYQ2W.js.map → session-auth-dead-ELTKKKEH.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XWVM4KPK.js";
|
|
5
5
|
import {
|
|
6
6
|
FORCED_UPDATE_HARD_DEADLINE_MS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BRAGHYEI.js";
|
|
8
8
|
import {
|
|
9
9
|
effectiveClaudeJsonPath
|
|
10
10
|
} from "./chunk-AIUIMEUS.js";
|
|
@@ -722,4 +722,4 @@ export {
|
|
|
722
722
|
probeClaudeInstalls,
|
|
723
723
|
maybeUpdateClaudeCode
|
|
724
724
|
};
|
|
725
|
-
//# sourceMappingURL=chunk-
|
|
725
|
+
//# sourceMappingURL=chunk-GYXG7TDM.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_ROTATE_KEY_CONFLICT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BRAGHYEI.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/config.ts
|
|
6
6
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "fs";
|
|
@@ -103,7 +103,7 @@ function exchangeFailureKind(err) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/lib/api-client.ts
|
|
106
|
-
var agtCliVersion = true ? "0.28.
|
|
106
|
+
var agtCliVersion = true ? "0.28.1271" : "dev";
|
|
107
107
|
var lastConfigHash = null;
|
|
108
108
|
function setConfigHash(hash) {
|
|
109
109
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -468,4 +468,4 @@ export {
|
|
|
468
468
|
api,
|
|
469
469
|
getHostId
|
|
470
470
|
};
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
471
|
+
//# sourceMappingURL=chunk-KOIQP6O7.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
rotateDailySession,
|
|
5
5
|
sessionFileExists,
|
|
6
6
|
todayLocalIso
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-53EZZXH7.js";
|
|
8
8
|
import {
|
|
9
9
|
classifyUnanswerablePane,
|
|
10
10
|
customApiKeyDialogKeys,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
remoteMcpConnectionEnvInfix,
|
|
55
55
|
remoteMcpConnectionLabel,
|
|
56
56
|
remoteMcpConnectionScopedEnvVar
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-BRAGHYEI.js";
|
|
58
58
|
import {
|
|
59
59
|
CLAUDE_CONFIG_DIR_ENV,
|
|
60
60
|
approveApiKeyInClaudeConfig,
|
|
@@ -6496,4 +6496,4 @@ export {
|
|
|
6496
6496
|
stopAllSessionsAndWait,
|
|
6497
6497
|
getProjectDir
|
|
6498
6498
|
};
|
|
6499
|
-
//# sourceMappingURL=chunk-
|
|
6499
|
+
//# sourceMappingURL=chunk-L52PEFTL.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
exchangeApiKey,
|
|
3
3
|
getApiKey,
|
|
4
4
|
getHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KOIQP6O7.js";
|
|
6
6
|
import {
|
|
7
7
|
LATE_BOUND_VARS,
|
|
8
8
|
PLATFORM_DENY_PERMISSIONS,
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
shellQuote,
|
|
26
26
|
withheldRemoteMcpMessage,
|
|
27
27
|
withheldRemoteMcpReasonFor
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-L52PEFTL.js";
|
|
29
29
|
import {
|
|
30
30
|
readDailySessionPin,
|
|
31
31
|
sessionTranscriptDir
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-53EZZXH7.js";
|
|
33
33
|
import {
|
|
34
34
|
classifyUnanswerablePane,
|
|
35
35
|
isConsumerTermsDialogVisible,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
scanConfigForLiteralSecrets,
|
|
102
102
|
worseConnectivityOutcome,
|
|
103
103
|
wrapScheduledTaskPrompt
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-BRAGHYEI.js";
|
|
105
105
|
import {
|
|
106
106
|
claudeJsonPathFor,
|
|
107
107
|
effectiveClaudeJsonPath,
|
|
@@ -13808,4 +13808,4 @@ export {
|
|
|
13808
13808
|
managerInstallSystemUnitCommand,
|
|
13809
13809
|
managerUninstallSystemUnitCommand
|
|
13810
13810
|
};
|
|
13811
|
-
//# sourceMappingURL=chunk-
|
|
13811
|
+
//# sourceMappingURL=chunk-YLKRTJLF.js.map
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
probeClaudeInstalls,
|
|
14
14
|
readsAsNativeInstall,
|
|
15
15
|
shouldRunClaudeCodeUpdater
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GYXG7TDM.js";
|
|
17
17
|
import "./chunk-XWVM4KPK.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-BRAGHYEI.js";
|
|
19
19
|
import "./chunk-AIUIMEUS.js";
|
|
20
20
|
import "./chunk-DGUM43GV.js";
|
|
21
21
|
export {
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
readsAsNativeInstall,
|
|
35
35
|
shouldRunClaudeCodeUpdater
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=claude-code-updater-
|
|
37
|
+
//# sourceMappingURL=claude-code-updater-RGOXKW5P.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
redactPaneFrame,
|
|
12
12
|
sanitizeTerminalFrame
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BRAGHYEI.js";
|
|
14
14
|
import {
|
|
15
15
|
CLAUDE_CONFIG_DIR_ENV,
|
|
16
16
|
claudeConfigDirFor,
|
|
@@ -323,7 +323,7 @@ async function spawnPairSession(session) {
|
|
|
323
323
|
return { ok: true };
|
|
324
324
|
} catch {
|
|
325
325
|
}
|
|
326
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
326
|
+
const { resolveClaudeBinary } = await import("./persistent-session-UONCY6TG.js");
|
|
327
327
|
const claudeBin = resolveClaudeBinary();
|
|
328
328
|
const pairEnv = {
|
|
329
329
|
...process.env,
|
|
@@ -838,4 +838,4 @@ export {
|
|
|
838
838
|
startClaudePair,
|
|
839
839
|
submitClaudePairCode
|
|
840
840
|
};
|
|
841
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
841
|
+
//# sourceMappingURL=claude-pair-runtime-AMSKEBCU.js.map
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
tripClass,
|
|
71
71
|
writeEtcEnvironment,
|
|
72
72
|
writeProfileDScript
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-YLKRTJLF.js";
|
|
74
74
|
import {
|
|
75
75
|
ApiError,
|
|
76
76
|
adoptHostKeyInProcess,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
probeHostKey,
|
|
89
89
|
requireHost,
|
|
90
90
|
setConfigHash
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-KOIQP6O7.js";
|
|
92
92
|
import {
|
|
93
93
|
BLOCKED_ON_PROMPT_DECISION,
|
|
94
94
|
CHANNEL_SECRET_ENV_KEYS,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
webFetchBaselineValue,
|
|
179
179
|
webFetchRestartNeeded,
|
|
180
180
|
writeEgressAllowlist
|
|
181
|
-
} from "../chunk-
|
|
181
|
+
} from "../chunk-L52PEFTL.js";
|
|
182
182
|
import {
|
|
183
183
|
isAgentIdle,
|
|
184
184
|
isStaleForToday,
|
|
@@ -189,7 +189,7 @@ import {
|
|
|
189
189
|
subagentActivityAgeSeconds,
|
|
190
190
|
subagentTranscriptDir,
|
|
191
191
|
transcriptActivityAgeSeconds
|
|
192
|
-
} from "../chunk-
|
|
192
|
+
} from "../chunk-53EZZXH7.js";
|
|
193
193
|
import {
|
|
194
194
|
classifyUnanswerablePane,
|
|
195
195
|
focusedConfirmDialogBlock,
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
runSafeCleanup,
|
|
216
216
|
tightestDiskStat,
|
|
217
217
|
withPackageCacheLock
|
|
218
|
-
} from "../chunk-
|
|
218
|
+
} from "../chunk-GYXG7TDM.js";
|
|
219
219
|
import {
|
|
220
220
|
parsePsRows,
|
|
221
221
|
reapOrphanChannelMcps
|
|
@@ -302,6 +302,7 @@ import {
|
|
|
302
302
|
isControlPlaneOnlyConfigKey,
|
|
303
303
|
isControlPlaneOnlyEnvVar,
|
|
304
304
|
isConversationFailureCategory,
|
|
305
|
+
isDefaultRemoteMcpConnection,
|
|
305
306
|
isEmptyTotals,
|
|
306
307
|
isForcedUpdatePastDeadline,
|
|
307
308
|
isOnboardingArea,
|
|
@@ -343,7 +344,7 @@ import {
|
|
|
343
344
|
stabiliseResetInstant,
|
|
344
345
|
sumTranscriptUsageInWindow,
|
|
345
346
|
summarizeTranscriptActivity
|
|
346
|
-
} from "../chunk-
|
|
347
|
+
} from "../chunk-BRAGHYEI.js";
|
|
347
348
|
import {
|
|
348
349
|
CLAUDE_CONFIG_DIR_ENV,
|
|
349
350
|
claudeConfigDirFor,
|
|
@@ -1632,6 +1633,11 @@ function remoteMcpAllowlistOf(i) {
|
|
|
1632
1633
|
if (!Array.isArray(raw)) return null;
|
|
1633
1634
|
return JSON.stringify(raw);
|
|
1634
1635
|
}
|
|
1636
|
+
function connectionKeyOf(i) {
|
|
1637
|
+
const key = i.connection_key;
|
|
1638
|
+
if (typeof key !== "string" || isDefaultRemoteMcpConnection(key)) return null;
|
|
1639
|
+
return key;
|
|
1640
|
+
}
|
|
1635
1641
|
function canonicalize(value) {
|
|
1636
1642
|
if (Array.isArray(value)) return value.map(canonicalize);
|
|
1637
1643
|
if (value && typeof value === "object") {
|
|
@@ -1659,7 +1665,9 @@ function computeIntegrationsHash(integrations) {
|
|
|
1659
1665
|
const url = remoteMcpUrlOf(i);
|
|
1660
1666
|
const withUrl = url ? `${base}:remote=${url}` : base;
|
|
1661
1667
|
const allow = remoteMcpAllowlistOf(i);
|
|
1662
|
-
|
|
1668
|
+
const withAllow = allow ? `${withUrl}:allow=${allow}` : withUrl;
|
|
1669
|
+
const key = connectionKeyOf(i);
|
|
1670
|
+
return key ? JSON.stringify(["named", key, withAllow]) : withAllow;
|
|
1663
1671
|
}).sort();
|
|
1664
1672
|
return createHash2("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 16);
|
|
1665
1673
|
}
|
|
@@ -14838,7 +14846,7 @@ function createFileMigrationReportIO(codeName, log2) {
|
|
|
14838
14846
|
};
|
|
14839
14847
|
}
|
|
14840
14848
|
var managerHostPost = async (path, body) => {
|
|
14841
|
-
const { api: api2, ApiError: ApiError3 } = await import("../api-client-
|
|
14849
|
+
const { api: api2, ApiError: ApiError3 } = await import("../api-client-QQQVVBVV.js");
|
|
14842
14850
|
try {
|
|
14843
14851
|
const json = await api2.post(path, body);
|
|
14844
14852
|
return { status: 200, json };
|
|
@@ -16886,7 +16894,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
16886
16894
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
16887
16895
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
16888
16896
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
16889
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
16897
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-NWKSHBG6.js");
|
|
16890
16898
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
16891
16899
|
if (newest === null) return null;
|
|
16892
16900
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -17767,7 +17775,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
17767
17775
|
var lastVersionCheckAt = 0;
|
|
17768
17776
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
17769
17777
|
var lastResponsivenessProbeAt = 0;
|
|
17770
|
-
var agtCliVersion = true ? "0.28.
|
|
17778
|
+
var agtCliVersion = true ? "0.28.1271" : "dev";
|
|
17771
17779
|
function resolveBrewPath(execFileSync4) {
|
|
17772
17780
|
try {
|
|
17773
17781
|
const out = execFileSync4("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -19776,7 +19784,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
19776
19784
|
if (codeNames.length === 0) return;
|
|
19777
19785
|
void (async () => {
|
|
19778
19786
|
try {
|
|
19779
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19787
|
+
const { collectDiagnostics } = await import("../persistent-session-UONCY6TG.js");
|
|
19780
19788
|
await api.post("/host/heartbeat", {
|
|
19781
19789
|
host_id: hostId,
|
|
19782
19790
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -19919,7 +19927,7 @@ async function pollCycleInner() {
|
|
|
19919
19927
|
}
|
|
19920
19928
|
try {
|
|
19921
19929
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
19922
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19930
|
+
const { collectDiagnostics } = await import("../persistent-session-UONCY6TG.js");
|
|
19923
19931
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
19924
19932
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor) : void 0;
|
|
19925
19933
|
let tailscaleHostname;
|
|
@@ -20190,7 +20198,7 @@ async function pollCycleInner() {
|
|
|
20190
20198
|
}
|
|
20191
20199
|
try {
|
|
20192
20200
|
const desiredClaudeCodeVersion = hbResp?.desired_claude_code_version?.trim();
|
|
20193
|
-
const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-
|
|
20201
|
+
const { maybeUpdateClaudeCode, shouldRunClaudeCodeUpdater } = await import("../claude-code-updater-RGOXKW5P.js");
|
|
20194
20202
|
const securityFloor = currentSecurityFloor();
|
|
20195
20203
|
claudeUpdaterInFlight = true;
|
|
20196
20204
|
if (desiredClaudeCodeVersion && (claudePairLoop.busy || claudePairingInProgress())) {
|
|
@@ -20225,7 +20233,7 @@ async function pollCycleInner() {
|
|
|
20225
20233
|
collectPanelessActivityProbes,
|
|
20226
20234
|
getResponsivenessIntervalMs,
|
|
20227
20235
|
occupancyQualificationClassifications
|
|
20228
|
-
} = await import("../responsiveness-probe-
|
|
20236
|
+
} = await import("../responsiveness-probe-NWKSHBG6.js");
|
|
20229
20237
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
20230
20238
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
20231
20239
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -20342,7 +20350,7 @@ async function pollCycleInner() {
|
|
|
20342
20350
|
collectResponsivenessProbes,
|
|
20343
20351
|
livePendingInboundOldestAgeSeconds,
|
|
20344
20352
|
parkPendingInbound
|
|
20345
|
-
} = await import("../responsiveness-probe-
|
|
20353
|
+
} = await import("../responsiveness-probe-NWKSHBG6.js");
|
|
20346
20354
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-5PCBGRNY.js");
|
|
20347
20355
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
20348
20356
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -20628,7 +20636,7 @@ async function pollCycleInner() {
|
|
|
20628
20636
|
}
|
|
20629
20637
|
}
|
|
20630
20638
|
);
|
|
20631
|
-
const { parkPendingInbound } = await import("../responsiveness-probe-
|
|
20639
|
+
const { parkPendingInbound } = await import("../responsiveness-probe-NWKSHBG6.js");
|
|
20632
20640
|
const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
|
|
20633
20641
|
paneFatalStreak.delete(codeName);
|
|
20634
20642
|
paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
|
|
@@ -20659,7 +20667,7 @@ async function pollCycleInner() {
|
|
|
20659
20667
|
TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
|
|
20660
20668
|
bindSourceEscalations
|
|
20661
20669
|
} = await import("../transcript-mount-health-OHE6IVJV.js");
|
|
20662
|
-
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-
|
|
20670
|
+
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-UONCY6TG.js");
|
|
20663
20671
|
const mountConfig = resolveTranscriptMountConfig();
|
|
20664
20672
|
const liveAgents = agentState.persistentSessionAgents;
|
|
20665
20673
|
for (const tracked of [
|
|
@@ -20824,7 +20832,7 @@ async function pollCycleInner() {
|
|
|
20824
20832
|
}
|
|
20825
20833
|
try {
|
|
20826
20834
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
20827
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
20835
|
+
const { probeSessionAuth } = await import("../session-auth-dead-ELTKKKEH.js");
|
|
20828
20836
|
const observations = [];
|
|
20829
20837
|
const pendingCacheCommits = [];
|
|
20830
20838
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -25726,12 +25734,16 @@ function ensureRealtimeStarted(agentStates) {
|
|
|
25726
25734
|
if (!agent) return;
|
|
25727
25735
|
if (directChatInFlight.has(msg.id)) return;
|
|
25728
25736
|
directChatInFlight.add(msg.id);
|
|
25729
|
-
|
|
25737
|
+
void dispatchDirectChatMessage({
|
|
25730
25738
|
id: msg.id,
|
|
25731
|
-
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
|
|
25739
|
+
codeName: agent.codeName,
|
|
25740
|
+
process: () => processDirectChatMessage(agent, {
|
|
25741
|
+
id: msg.id,
|
|
25742
|
+
session_id: msg.session_id,
|
|
25743
|
+
content: msg.content
|
|
25744
|
+
}),
|
|
25745
|
+
inFlight: directChatInFlight,
|
|
25746
|
+
log
|
|
25735
25747
|
});
|
|
25736
25748
|
},
|
|
25737
25749
|
onError: (err) => {
|
|
@@ -25871,7 +25883,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
25871
25883
|
if (!refreshData) return;
|
|
25872
25884
|
const framework = refreshData.agent?.framework ?? agentFrameworkCache.get(codeName) ?? DEFAULT_FRAMEWORK;
|
|
25873
25885
|
const hostId = await getHostId();
|
|
25874
|
-
const parkForRestart = await import("../responsiveness-probe-
|
|
25886
|
+
const parkForRestart = await import("../responsiveness-probe-NWKSHBG6.js").then(
|
|
25875
25887
|
(m) => m.parkPendingInbound,
|
|
25876
25888
|
(err) => err
|
|
25877
25889
|
);
|
|
@@ -25948,7 +25960,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
25948
25960
|
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}`));
|
|
25949
25961
|
void (async () => {
|
|
25950
25962
|
try {
|
|
25951
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
25963
|
+
const { collectDiagnostics } = await import("../persistent-session-UONCY6TG.js");
|
|
25952
25964
|
await api.post("/host/heartbeat", {
|
|
25953
25965
|
host_id: hostId,
|
|
25954
25966
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -26001,7 +26013,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
26001
26013
|
}
|
|
26002
26014
|
try {
|
|
26003
26015
|
const hostId = await getHostId();
|
|
26004
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
26016
|
+
const { collectDiagnostics } = await import("../persistent-session-UONCY6TG.js");
|
|
26005
26017
|
await api.post("/host/heartbeat", {
|
|
26006
26018
|
host_id: hostId,
|
|
26007
26019
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor, sessionActivityFor)
|
|
@@ -26256,6 +26268,27 @@ function triggerEarlyPoll(reason, agentId) {
|
|
|
26256
26268
|
}, 0);
|
|
26257
26269
|
}
|
|
26258
26270
|
var directChatInFlight = /* @__PURE__ */ new Set();
|
|
26271
|
+
function describeRejection(err) {
|
|
26272
|
+
try {
|
|
26273
|
+
if (err instanceof Error) return typeof err.message === "string" ? err.message : "Error with no message";
|
|
26274
|
+
if (typeof err === "string") return err;
|
|
26275
|
+
return `non-Error rejection (${err === null ? "null" : typeof err})`;
|
|
26276
|
+
} catch {
|
|
26277
|
+
return "unreadable rejection";
|
|
26278
|
+
}
|
|
26279
|
+
}
|
|
26280
|
+
async function dispatchDirectChatMessage(args) {
|
|
26281
|
+
try {
|
|
26282
|
+
await args.process();
|
|
26283
|
+
} catch (err) {
|
|
26284
|
+
const message = describeRejection(err);
|
|
26285
|
+
args.log(
|
|
26286
|
+
`[direct-chat] ENG-12155: processing failed for '${args.codeName}' (msg=${args.id}): ${message} - left for retry (the row is reclaimed by the poll after the processing reaper requeues it)`
|
|
26287
|
+
);
|
|
26288
|
+
} finally {
|
|
26289
|
+
args.inFlight.delete(args.id);
|
|
26290
|
+
}
|
|
26291
|
+
}
|
|
26259
26292
|
async function pollDirectChatMessages(agentStates) {
|
|
26260
26293
|
for (const agent of agentStates) {
|
|
26261
26294
|
if (agent.status !== "active") continue;
|
|
@@ -26264,8 +26297,12 @@ async function pollDirectChatMessages(agentStates) {
|
|
|
26264
26297
|
for (const msg of data.messages) {
|
|
26265
26298
|
if (directChatInFlight.has(msg.id)) continue;
|
|
26266
26299
|
directChatInFlight.add(msg.id);
|
|
26267
|
-
|
|
26268
|
-
|
|
26300
|
+
void dispatchDirectChatMessage({
|
|
26301
|
+
id: msg.id,
|
|
26302
|
+
codeName: agent.codeName,
|
|
26303
|
+
process: () => processDirectChatMessage(agent, msg),
|
|
26304
|
+
inFlight: directChatInFlight,
|
|
26305
|
+
log
|
|
26269
26306
|
});
|
|
26270
26307
|
}
|
|
26271
26308
|
} catch (err) {
|
|
@@ -26703,7 +26740,7 @@ async function processClaudePairSessions(agents) {
|
|
|
26703
26740
|
snapshotPairConfig,
|
|
26704
26741
|
// ENG-11659: result -> report body + the manager.log line that records it.
|
|
26705
26742
|
planPairStartReport
|
|
26706
|
-
} = await import("../claude-pair-runtime-
|
|
26743
|
+
} = await import("../claude-pair-runtime-AMSKEBCU.js");
|
|
26707
26744
|
const { resetClaudeSignin, describeSigninResetForLog, describeSigninResetFailure } = await import("../claude-signin-reset-6IJMMVYG.js");
|
|
26708
26745
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
26709
26746
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
@@ -28174,6 +28211,8 @@ export {
|
|
|
28174
28211
|
crossSessionBlockReport,
|
|
28175
28212
|
dashboardRestartBreakerReason,
|
|
28176
28213
|
decideDayRolloverAction,
|
|
28214
|
+
describeRejection,
|
|
28215
|
+
dispatchDirectChatMessage,
|
|
28177
28216
|
ensureClaudeManagedSettings,
|
|
28178
28217
|
extractCharterSlackPeers,
|
|
28179
28218
|
extractCharterTelegramPeers,
|