@integrity-labs/agt-cli 0.28.825 → 0.28.827
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 +5 -5
- package/dist/{chunk-2DT4VGWU.js → chunk-6HTCP6D5.js} +21 -7
- package/dist/{chunk-2DT4VGWU.js.map → chunk-6HTCP6D5.js.map} +1 -1
- package/dist/{chunk-PVPLNARY.js → chunk-GJY3KZG6.js} +39 -1
- package/dist/chunk-GJY3KZG6.js.map +1 -0
- package/dist/{chunk-QICBWFRI.js → chunk-VOQ25S2E.js} +19 -48
- package/dist/chunk-VOQ25S2E.js.map +1 -0
- package/dist/{claude-pair-runtime-5QM5OTAZ.js → claude-pair-runtime-UTDZXJKO.js} +2 -2
- package/dist/lib/manager-worker.js +56 -20
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-2Y4O3COI.js → persistent-session-6YTEDS3H.js} +3 -3
- package/dist/{responsiveness-probe-OGFPDMFN.js → responsiveness-probe-TIEZW3XP.js} +3 -3
- package/dist/{session-auth-dead-UDG6GY3U.js → session-auth-dead-LFNU6AUU.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-PVPLNARY.js.map +0 -1
- package/dist/chunk-QICBWFRI.js.map +0 -1
- /package/dist/{claude-pair-runtime-5QM5OTAZ.js.map → claude-pair-runtime-UTDZXJKO.js.map} +0 -0
- /package/dist/{persistent-session-2Y4O3COI.js.map → persistent-session-6YTEDS3H.js.map} +0 -0
- /package/dist/{responsiveness-probe-OGFPDMFN.js.map → responsiveness-probe-TIEZW3XP.js.map} +0 -0
- /package/dist/{session-auth-dead-UDG6GY3U.js.map → session-auth-dead-LFNU6AUU.js.map} +0 -0
|
@@ -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-6YTEDS3H.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-UTDZXJKO.js.map
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
safeWriteJsonAtomic,
|
|
60
60
|
setConfigHash,
|
|
61
61
|
tripClass
|
|
62
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-VOQ25S2E.js";
|
|
63
63
|
import {
|
|
64
64
|
getProjectDir as getProjectDir2,
|
|
65
65
|
getReadyTasks,
|
|
@@ -100,6 +100,7 @@ import {
|
|
|
100
100
|
paneLogPath,
|
|
101
101
|
parseEnvIntegrations,
|
|
102
102
|
parseModelPolicy,
|
|
103
|
+
policyResolvedModel,
|
|
103
104
|
prepareForRespawn,
|
|
104
105
|
readChannelServerEnv,
|
|
105
106
|
readDirectChatSessionState,
|
|
@@ -124,7 +125,7 @@ import {
|
|
|
124
125
|
takeZombieDetection,
|
|
125
126
|
toOpencodeModel,
|
|
126
127
|
writeEgressAllowlist
|
|
127
|
-
} from "../chunk-
|
|
128
|
+
} from "../chunk-6HTCP6D5.js";
|
|
128
129
|
import {
|
|
129
130
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
130
131
|
AnchorSessionClient,
|
|
@@ -154,6 +155,7 @@ import {
|
|
|
154
155
|
buildFailureCategoryPromptLines,
|
|
155
156
|
buildHostUsageReading,
|
|
156
157
|
buildScheduledTaskContextBlocks,
|
|
158
|
+
buildSlackThirdPartyBotsEnvValue,
|
|
157
159
|
classifyActor,
|
|
158
160
|
classifyCursorAdvance,
|
|
159
161
|
classifyOutput,
|
|
@@ -195,6 +197,8 @@ import {
|
|
|
195
197
|
isVacuousDeliverReason,
|
|
196
198
|
laneTagFragment,
|
|
197
199
|
minutesSinceLocalMidnight,
|
|
200
|
+
normaliseSlackPeerAgentMode,
|
|
201
|
+
normaliseSlackPeerGroupIds,
|
|
198
202
|
pairToolCallBrackets,
|
|
199
203
|
parseDeliverAssertion,
|
|
200
204
|
parseDeliveryTarget,
|
|
@@ -216,7 +220,7 @@ import {
|
|
|
216
220
|
subagentActivityAgeSeconds,
|
|
217
221
|
sumTranscriptUsageInWindow,
|
|
218
222
|
transcriptActivityAgeSeconds
|
|
219
|
-
} from "../chunk-
|
|
223
|
+
} from "../chunk-GJY3KZG6.js";
|
|
220
224
|
import {
|
|
221
225
|
reapOrphanChannelMcps
|
|
222
226
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -837,7 +841,11 @@ function extractSlackBehaviourSubset(config2) {
|
|
|
837
841
|
skip_reaction: (config2?.["skip_reaction"] ?? "").trim(),
|
|
838
842
|
// Mirror the adapter's defensive filter exactly — a malformed entry the
|
|
839
843
|
// adapter would drop must not count as an env change.
|
|
840
|
-
allowed_users: Array.isArray(rawAllowed) ? rawAllowed.filter((v) => typeof v === "string" && v.trim().length > 0).map((v) => v.trim()) : []
|
|
844
|
+
allowed_users: Array.isArray(rawAllowed) ? rawAllowed.filter((v) => typeof v === "string" && v.trim().length > 0).map((v) => v.trim()) : [],
|
|
845
|
+
// ENG-10028: the adapter's own functions, not a copy of them.
|
|
846
|
+
peer_agent_mode: normaliseSlackPeerAgentMode(config2?.["peer_agent_mode"]),
|
|
847
|
+
peer_group_ids: normaliseSlackPeerGroupIds(config2?.["peer_group_ids"]),
|
|
848
|
+
third_party_bots: buildSlackThirdPartyBotsEnvValue(config2?.["third_party_bots"]) ?? ""
|
|
841
849
|
};
|
|
842
850
|
}
|
|
843
851
|
function isSlackBehaviourRestrictive(subset) {
|
|
@@ -12919,7 +12927,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12919
12927
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12920
12928
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12921
12929
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12922
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12930
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-TIEZW3XP.js");
|
|
12923
12931
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12924
12932
|
if (newest === null) return null;
|
|
12925
12933
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13587,7 +13595,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13587
13595
|
var lastVersionCheckAt = 0;
|
|
13588
13596
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13589
13597
|
var lastResponsivenessProbeAt = 0;
|
|
13590
|
-
var agtCliVersion = true ? "0.28.
|
|
13598
|
+
var agtCliVersion = true ? "0.28.827" : "dev";
|
|
13591
13599
|
function resolveBrewPath(execFileSync2) {
|
|
13592
13600
|
try {
|
|
13593
13601
|
const out = execFileSync2("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -15177,7 +15185,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
15177
15185
|
if (codeNames.length === 0) return;
|
|
15178
15186
|
void (async () => {
|
|
15179
15187
|
try {
|
|
15180
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15188
|
+
const { collectDiagnostics } = await import("../persistent-session-6YTEDS3H.js");
|
|
15181
15189
|
await api.post("/host/heartbeat", {
|
|
15182
15190
|
host_id: hostId,
|
|
15183
15191
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -15232,6 +15240,7 @@ async function pollCycleInner() {
|
|
|
15232
15240
|
stopPersistentSessionAndForgetMcpBaseline(codeName, breakerReason);
|
|
15233
15241
|
agentState.persistentSessionAgents.delete(codeName);
|
|
15234
15242
|
claudeAuthTupleBySession.delete(codeName);
|
|
15243
|
+
modelPolicyModelBySession.delete(codeName);
|
|
15235
15244
|
},
|
|
15236
15245
|
getTelegramTokens: (codeName) => {
|
|
15237
15246
|
const t = agentChannelTokens.get(codeName);
|
|
@@ -15318,7 +15327,7 @@ async function pollCycleInner() {
|
|
|
15318
15327
|
}
|
|
15319
15328
|
try {
|
|
15320
15329
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
15321
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
15330
|
+
const { collectDiagnostics } = await import("../persistent-session-6YTEDS3H.js");
|
|
15322
15331
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
15323
15332
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
15324
15333
|
let tailscaleHostname;
|
|
@@ -15487,7 +15496,7 @@ async function pollCycleInner() {
|
|
|
15487
15496
|
collectPanelessActivityProbes,
|
|
15488
15497
|
getResponsivenessIntervalMs,
|
|
15489
15498
|
occupancyQualificationClassifications
|
|
15490
|
-
} = await import("../responsiveness-probe-
|
|
15499
|
+
} = await import("../responsiveness-probe-TIEZW3XP.js");
|
|
15491
15500
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
15492
15501
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
15493
15502
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15604,7 +15613,7 @@ async function pollCycleInner() {
|
|
|
15604
15613
|
collectResponsivenessProbes,
|
|
15605
15614
|
livePendingInboundOldestAgeSeconds,
|
|
15606
15615
|
parkPendingInbound
|
|
15607
|
-
} = await import("../responsiveness-probe-
|
|
15616
|
+
} = await import("../responsiveness-probe-TIEZW3XP.js");
|
|
15608
15617
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15609
15618
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15610
15619
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15760,7 +15769,7 @@ async function pollCycleInner() {
|
|
|
15760
15769
|
}
|
|
15761
15770
|
try {
|
|
15762
15771
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15763
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15772
|
+
const { probeSessionAuth } = await import("../session-auth-dead-LFNU6AUU.js");
|
|
15764
15773
|
const observations = [];
|
|
15765
15774
|
const pendingCacheCommits = [];
|
|
15766
15775
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -19047,6 +19056,7 @@ var DAY_ROLLOVER_INBOUND_GRACE_SEC = 60;
|
|
|
19047
19056
|
var DAY_ROLLOVER_INBOUND_DEFER_MAX_MIN = 10;
|
|
19048
19057
|
var persistentSessionStuckTracker = new PersistentSessionStuckTracker();
|
|
19049
19058
|
var claudeAuthTupleBySession = /* @__PURE__ */ new Map();
|
|
19059
|
+
var modelPolicyModelBySession = /* @__PURE__ */ new Map();
|
|
19050
19060
|
var opencodeCredentialFingerprintBySession = /* @__PURE__ */ new Map();
|
|
19051
19061
|
var egressAllowlistBySession = /* @__PURE__ */ new Map();
|
|
19052
19062
|
function deriveEgressAllowlist(toolsRaw, policy) {
|
|
@@ -19257,6 +19267,7 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
|
|
|
19257
19267
|
});
|
|
19258
19268
|
agentState.persistentSessionAgents.delete(codeName);
|
|
19259
19269
|
claudeAuthTupleBySession.delete(codeName);
|
|
19270
|
+
modelPolicyModelBySession.delete(codeName);
|
|
19260
19271
|
}
|
|
19261
19272
|
return {
|
|
19262
19273
|
decision: "skipped-auth-resolve-failed",
|
|
@@ -19308,28 +19319,49 @@ async function ensurePersistentSession(agent, tasks, boardItems, refreshData) {
|
|
|
19308
19319
|
claudeAccountFingerprint,
|
|
19309
19320
|
modelPolicyComponent: modelPolicyAuthComponent(modelPolicy)
|
|
19310
19321
|
});
|
|
19322
|
+
const currentPolicyModel = policyResolvedModel({
|
|
19323
|
+
policy: modelPolicy,
|
|
19324
|
+
openRouterMode: Boolean(openRouterForAgent),
|
|
19325
|
+
// The same null the launcher config carries — see `modelPolicyGatewayToken`
|
|
19326
|
+
// at the spawn call site below, where its absence is deliberate until
|
|
19327
|
+
// ENG-9481 decides what a gateway credential is. Both sites must move
|
|
19328
|
+
// together: a token here and not there (or the reverse) resolves a gateway
|
|
19329
|
+
// binding `blocked` for one and honoured for the other, and the recorded
|
|
19330
|
+
// baseline would then describe an agent that does not exist.
|
|
19331
|
+
gatewayToken: null,
|
|
19332
|
+
codeName
|
|
19333
|
+
});
|
|
19311
19334
|
const recordedAuthTuple = claudeAuthTupleBySession.get(codeName);
|
|
19335
|
+
const recordedPolicyModel = modelPolicyModelBySession.get(codeName);
|
|
19312
19336
|
if (recordedAuthTuple && recordedAuthTuple !== currentAuthTuple && isSessionHealthy(codeName)) {
|
|
19313
19337
|
const authTupleDiff = diffAuthTuples(recordedAuthTuple, currentAuthTuple);
|
|
19314
19338
|
log(
|
|
19315
19339
|
`[persistent-session] Auth config changed for '${codeName}' (${recordedAuthTuple} \u2192 ${currentAuthTuple}) \u2014 ${authTupleDiff.summary} \u2014 restarting session`
|
|
19316
19340
|
);
|
|
19317
|
-
const
|
|
19341
|
+
const policyNotice = failoverRestartNotice({
|
|
19318
19342
|
components: authTupleDiff.components,
|
|
19319
|
-
policy: modelPolicy
|
|
19343
|
+
policy: modelPolicy,
|
|
19344
|
+
previousModel: recordedPolicyModel,
|
|
19345
|
+
currentModel: currentPolicyModel
|
|
19320
19346
|
});
|
|
19321
|
-
if (
|
|
19347
|
+
if (policyNotice && isSessionHealthy(codeName)) {
|
|
19322
19348
|
const status = await injectMessageWithStatus(
|
|
19323
19349
|
codeName,
|
|
19324
19350
|
"system",
|
|
19325
|
-
|
|
19326
|
-
|
|
19351
|
+
policyNotice.text + BACK_ONLINE_GREETING_GUIDANCE,
|
|
19352
|
+
// ENG-10113: the label follows the DECISION, not the call site. One
|
|
19353
|
+
// function now produces two events, and filing a model change under
|
|
19354
|
+
// `model-policy-failover` would put a wrong word in a record an operator
|
|
19355
|
+
// later reads back as evidence of a failover that never happened.
|
|
19356
|
+
{ task_name: `model-policy-${policyNotice.reason}` },
|
|
19327
19357
|
log
|
|
19328
19358
|
).catch(() => ({ delivered: false, fallbackUsed: false }));
|
|
19329
19359
|
if (status.fallbackUsed) {
|
|
19330
19360
|
await new Promise((r) => setTimeout(r, 3e3));
|
|
19331
19361
|
} else {
|
|
19332
|
-
log(
|
|
19362
|
+
log(
|
|
19363
|
+
`[model-policy] ${policyNotice.reason} notice not delivered to '${codeName}' \u2014 restarting anyway`
|
|
19364
|
+
);
|
|
19333
19365
|
}
|
|
19334
19366
|
}
|
|
19335
19367
|
stopPersistentSessionAndForgetMcpBaseline(codeName, "auth-tuple-change", void 0, void 0, {
|
|
@@ -19600,6 +19632,8 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash20("sha256")
|
|
|
19600
19632
|
});
|
|
19601
19633
|
agentState.persistentSessionAgents.add(codeName);
|
|
19602
19634
|
claudeAuthTupleBySession.set(codeName, currentAuthTuple);
|
|
19635
|
+
if (currentPolicyModel) modelPolicyModelBySession.set(codeName, currentPolicyModel);
|
|
19636
|
+
else modelPolicyModelBySession.delete(codeName);
|
|
19603
19637
|
seedSessionLaunchBaselines(codeName, projectDir);
|
|
19604
19638
|
return {
|
|
19605
19639
|
decision: "spawn",
|
|
@@ -19639,6 +19673,8 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash20("sha256")
|
|
|
19639
19673
|
}
|
|
19640
19674
|
if (!claudeAuthTupleBySession.has(codeName)) {
|
|
19641
19675
|
claudeAuthTupleBySession.set(codeName, currentAuthTuple);
|
|
19676
|
+
if (currentPolicyModel) modelPolicyModelBySession.set(codeName, currentPolicyModel);
|
|
19677
|
+
else modelPolicyModelBySession.delete(codeName);
|
|
19642
19678
|
}
|
|
19643
19679
|
const stableTasksHash = createHash20("sha256").update(JSON.stringify(tasks)).digest("hex").slice(0, 16);
|
|
19644
19680
|
const prevHash = agentState.knownTasksHashes.get(agent.agent_id);
|
|
@@ -19962,7 +19998,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
19962
19998
|
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}`));
|
|
19963
19999
|
void (async () => {
|
|
19964
20000
|
try {
|
|
19965
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20001
|
+
const { collectDiagnostics } = await import("../persistent-session-6YTEDS3H.js");
|
|
19966
20002
|
await api.post("/host/heartbeat", {
|
|
19967
20003
|
host_id: hostId,
|
|
19968
20004
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20008,7 +20044,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
20008
20044
|
}
|
|
20009
20045
|
try {
|
|
20010
20046
|
const hostId = await getHostId();
|
|
20011
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
20047
|
+
const { collectDiagnostics } = await import("../persistent-session-6YTEDS3H.js");
|
|
20012
20048
|
await api.post("/host/heartbeat", {
|
|
20013
20049
|
host_id: hostId,
|
|
20014
20050
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -20644,7 +20680,7 @@ async function processClaudePairSessions(agents) {
|
|
|
20644
20680
|
killPairSession,
|
|
20645
20681
|
pairTmuxSession,
|
|
20646
20682
|
finalizeClaudePairOnboarding
|
|
20647
|
-
} = await import("../claude-pair-runtime-
|
|
20683
|
+
} = await import("../claude-pair-runtime-UTDZXJKO.js");
|
|
20648
20684
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
20649
20685
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
20650
20686
|
const killed = await killPairSession(pairTmuxSession(pairId));
|