@integrity-labs/agt-cli 0.28.670 → 0.28.672
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 +6 -6
- package/dist/bin/agt.js.map +1 -1
- package/dist/{chunk-Z4O42VGJ.js → chunk-EX6INJDG.js} +20 -76
- package/dist/chunk-EX6INJDG.js.map +1 -0
- package/dist/{chunk-5GDKWIB3.js → chunk-YAVWYI5S.js} +126 -15
- package/dist/chunk-YAVWYI5S.js.map +1 -0
- package/dist/{chunk-HGVJVYKW.js → chunk-YOID6KOQ.js} +43 -1
- package/dist/chunk-YOID6KOQ.js.map +1 -0
- package/dist/{claude-pair-runtime-W6KBVHK4.js → claude-pair-runtime-UZ2JB2KY.js} +2 -2
- package/dist/lib/manager-worker.js +52 -20
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +42 -0
- package/dist/mcp/index.js +42 -0
- package/dist/mcp/origami.js +42 -0
- package/dist/mcp/slack-channel.js +42 -0
- package/dist/mcp/telegram-channel.js +42 -0
- package/dist/{persistent-session-RZH67PNC.js → persistent-session-PYAJ4VJW.js} +3 -3
- package/dist/{responsiveness-probe-NPNMNOFF.js → responsiveness-probe-5I2LIVCA.js} +3 -3
- package/dist/{session-auth-dead-CFAYSZ43.js → session-auth-dead-NUX643UJ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-5GDKWIB3.js.map +0 -1
- package/dist/chunk-HGVJVYKW.js.map +0 -1
- package/dist/chunk-Z4O42VGJ.js.map +0 -1
- /package/dist/{claude-pair-runtime-W6KBVHK4.js.map → claude-pair-runtime-UZ2JB2KY.js.map} +0 -0
- /package/dist/{persistent-session-RZH67PNC.js.map → persistent-session-PYAJ4VJW.js.map} +0 -0
- /package/dist/{responsiveness-probe-NPNMNOFF.js.map → responsiveness-probe-5I2LIVCA.js.map} +0 -0
- /package/dist/{session-auth-dead-CFAYSZ43.js.map → session-auth-dead-NUX643UJ.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-PYAJ4VJW.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-UZ2JB2KY.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError,
|
|
3
|
-
CHANNEL_SECRET_ENV_KEYS,
|
|
4
3
|
FIRST_CONNECT_WINDOW_MS,
|
|
5
4
|
HostFlagStore,
|
|
6
5
|
RestartBreaker,
|
|
@@ -55,7 +54,7 @@ import {
|
|
|
55
54
|
safeWriteJsonAtomic,
|
|
56
55
|
setConfigHash,
|
|
57
56
|
tripClass
|
|
58
|
-
} from "../chunk-
|
|
57
|
+
} from "../chunk-EX6INJDG.js";
|
|
59
58
|
import {
|
|
60
59
|
getProjectDir as getProjectDir2,
|
|
61
60
|
getReadyTasks,
|
|
@@ -64,10 +63,12 @@ import {
|
|
|
64
63
|
syncTasksToScheduler
|
|
65
64
|
} from "../chunk-3HLECXMI.js";
|
|
66
65
|
import {
|
|
66
|
+
CHANNEL_SECRET_ENV_KEYS,
|
|
67
67
|
ChildProcessError,
|
|
68
68
|
agentRuntimeKey,
|
|
69
69
|
buildEgressAllowlist,
|
|
70
70
|
checkChannelInputs,
|
|
71
|
+
collectChannelSpawnSecrets,
|
|
71
72
|
creditWatchdogGiveUpCount,
|
|
72
73
|
egressMode,
|
|
73
74
|
execFilePromiseLong,
|
|
@@ -111,7 +112,7 @@ import {
|
|
|
111
112
|
takeZombieDetection,
|
|
112
113
|
toOpencodeModel,
|
|
113
114
|
writeEgressAllowlist
|
|
114
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-YAVWYI5S.js";
|
|
115
116
|
import {
|
|
116
117
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
117
118
|
AnchorSessionClient,
|
|
@@ -192,7 +193,7 @@ import {
|
|
|
192
193
|
subagentActivityAgeSeconds,
|
|
193
194
|
sumTranscriptUsageInWindow,
|
|
194
195
|
transcriptActivityAgeSeconds
|
|
195
|
-
} from "../chunk-
|
|
196
|
+
} from "../chunk-YOID6KOQ.js";
|
|
196
197
|
import {
|
|
197
198
|
reapOrphanChannelMcps
|
|
198
199
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -4996,7 +4997,12 @@ function computeChannelConfigHash(input) {
|
|
|
4996
4997
|
sessionMode: input.sessionMode ?? null,
|
|
4997
4998
|
// ENG-7435: value-blind on the team_principals id SETS so a reorder of
|
|
4998
4999
|
// the same principals can't oscillate this hash into a false rewrite.
|
|
4999
|
-
senderPolicy: normalizeSenderPolicyForHash(input.senderPolicy)
|
|
5000
|
+
senderPolicy: normalizeSenderPolicyForHash(input.senderPolicy),
|
|
5001
|
+
// ENG-9350: a `spawn-inject-channel-secrets` flip must invalidate the
|
|
5002
|
+
// cache so writeChannelCredentials re-runs (evict on enable / restore on
|
|
5003
|
+
// disable). Absent folds to 'file', so pre-ENG-9350 callers and the
|
|
5004
|
+
// file-delivery default keep a stable digest relative to each other.
|
|
5005
|
+
channelSecretDelivery: input.channelSecretDelivery ?? "file"
|
|
5000
5006
|
})
|
|
5001
5007
|
).digest("hex");
|
|
5002
5008
|
}
|
|
@@ -11611,7 +11617,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
11611
11617
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
11612
11618
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
11613
11619
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
11614
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
11620
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-5I2LIVCA.js");
|
|
11615
11621
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
11616
11622
|
if (newest === null) return null;
|
|
11617
11623
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -12155,6 +12161,9 @@ function checkMcpConfigDriftAndScheduleRestart(codeName, projectDir) {
|
|
|
12155
12161
|
}
|
|
12156
12162
|
}
|
|
12157
12163
|
}
|
|
12164
|
+
function shouldInjectChannelSecrets(agentId) {
|
|
12165
|
+
return hostFlagStore().getBooleanForAgent("spawn-inject-channel-secrets", agentId);
|
|
12166
|
+
}
|
|
12158
12167
|
function projectChannelSecretHash(projectDir) {
|
|
12159
12168
|
try {
|
|
12160
12169
|
const entries = parseEnvIntegrations(
|
|
@@ -12165,8 +12174,8 @@ function projectChannelSecretHash(projectDir) {
|
|
|
12165
12174
|
return null;
|
|
12166
12175
|
}
|
|
12167
12176
|
}
|
|
12168
|
-
function checkChannelSecretDriftAndScheduleRestart(codeName, projectDir) {
|
|
12169
|
-
const currentHash = projectChannelSecretHash(projectDir);
|
|
12177
|
+
function checkChannelSecretDriftAndScheduleRestart(codeName, projectDir, spawnEnvSecrets) {
|
|
12178
|
+
const currentHash = spawnEnvSecrets !== void 0 ? channelSecretValueHash(spawnEnvSecrets, CHANNEL_SECRET_ENV_KEYS) : projectChannelSecretHash(projectDir);
|
|
12170
12179
|
const action = decideMcpDriftAction(currentHash, runningChannelSecretHashes.get(codeName));
|
|
12171
12180
|
switch (action.kind) {
|
|
12172
12181
|
case "no-config":
|
|
@@ -12256,7 +12265,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
12256
12265
|
var lastVersionCheckAt = 0;
|
|
12257
12266
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
12258
12267
|
var lastResponsivenessProbeAt = 0;
|
|
12259
|
-
var agtCliVersion = true ? "0.28.
|
|
12268
|
+
var agtCliVersion = true ? "0.28.672" : "dev";
|
|
12260
12269
|
function resolveBrewPath(execFileSync3) {
|
|
12261
12270
|
try {
|
|
12262
12271
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -13620,7 +13629,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
13620
13629
|
if (codeNames.length === 0) return;
|
|
13621
13630
|
void (async () => {
|
|
13622
13631
|
try {
|
|
13623
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13632
|
+
const { collectDiagnostics } = await import("../persistent-session-PYAJ4VJW.js");
|
|
13624
13633
|
await api.post("/host/heartbeat", {
|
|
13625
13634
|
host_id: hostId,
|
|
13626
13635
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -13736,7 +13745,7 @@ async function pollCycleInner() {
|
|
|
13736
13745
|
}
|
|
13737
13746
|
try {
|
|
13738
13747
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
13739
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
13748
|
+
const { collectDiagnostics } = await import("../persistent-session-PYAJ4VJW.js");
|
|
13740
13749
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
13741
13750
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor) : void 0;
|
|
13742
13751
|
let tailscaleHostname;
|
|
@@ -13888,7 +13897,7 @@ async function pollCycleInner() {
|
|
|
13888
13897
|
collectPanelessActivityProbes,
|
|
13889
13898
|
getResponsivenessIntervalMs,
|
|
13890
13899
|
occupancyQualificationClassifications
|
|
13891
|
-
} = await import("../responsiveness-probe-
|
|
13900
|
+
} = await import("../responsiveness-probe-5I2LIVCA.js");
|
|
13892
13901
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
13893
13902
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
13894
13903
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -13998,7 +14007,7 @@ async function pollCycleInner() {
|
|
|
13998
14007
|
collectResponsivenessProbes,
|
|
13999
14008
|
livePendingInboundOldestAgeSeconds,
|
|
14000
14009
|
parkPendingInbound
|
|
14001
|
-
} = await import("../responsiveness-probe-
|
|
14010
|
+
} = await import("../responsiveness-probe-5I2LIVCA.js");
|
|
14002
14011
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
14003
14012
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
14004
14013
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -14154,7 +14163,7 @@ async function pollCycleInner() {
|
|
|
14154
14163
|
}
|
|
14155
14164
|
try {
|
|
14156
14165
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
14157
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
14166
|
+
const { probeSessionAuth } = await import("../session-auth-dead-NUX643UJ.js");
|
|
14158
14167
|
const observations = [];
|
|
14159
14168
|
const pendingCacheCommits = [];
|
|
14160
14169
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -15301,7 +15310,12 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
15301
15310
|
team: slackTeamPeerUserIds !== void 0 ? { ...teamSettingsForHash, slack_team_peer_user_ids: slackTeamPeerUserIds } : teamSettingsForHash,
|
|
15302
15311
|
peers: peersForHash,
|
|
15303
15312
|
sessionMode: sessionModeForHash,
|
|
15304
|
-
senderPolicy: senderPolicyForHash
|
|
15313
|
+
senderPolicy: senderPolicyForHash,
|
|
15314
|
+
// ENG-9350: fold the delivery mode in so a `spawn-inject-channel-
|
|
15315
|
+
// secrets` flip invalidates the cache and re-runs the writer (evict
|
|
15316
|
+
// on enable / restore on disable). Same per-agent value the writer
|
|
15317
|
+
// call below passes as channelSecretDelivery.
|
|
15318
|
+
channelSecretDelivery: shouldInjectChannelSecrets(agent.agent_id) ? "spawn-env" : "file"
|
|
15305
15319
|
});
|
|
15306
15320
|
const cacheKey = `${agent.agent_id}:${channelId}`;
|
|
15307
15321
|
let onDiskPresent = true;
|
|
@@ -15353,7 +15367,14 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
15353
15367
|
slackTeamPeerUserIds,
|
|
15354
15368
|
agentTimezone,
|
|
15355
15369
|
senderPolicy: senderPolicyForCall,
|
|
15356
|
-
agentAvatarUrl
|
|
15370
|
+
agentAvatarUrl,
|
|
15371
|
+
// ENG-9350 (epic ENG-9347): in spawn-env mode the writer null-
|
|
15372
|
+
// deletes the channel token from `.env.integrations` (evicting any
|
|
15373
|
+
// stale copy) and leaves the `.mcp.json` `${VAR}` template — the
|
|
15374
|
+
// manager injects the value at spawn via `tmux -e` instead. The
|
|
15375
|
+
// `.mcp.json` server entry is still written, so the landed check
|
|
15376
|
+
// below (which reads `.mcp.json`, not the file) is unaffected.
|
|
15377
|
+
channelSecretDelivery: shouldInjectChannelSecrets(agent.agent_id) ? "spawn-env" : "file"
|
|
15357
15378
|
}
|
|
15358
15379
|
);
|
|
15359
15380
|
const landed = frameworkAdapter.hasChannelCredentials?.(agent.code_name, channelId) ?? true;
|
|
@@ -16506,7 +16527,11 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
16506
16527
|
}
|
|
16507
16528
|
if (channelConfigConvergedThisTick) {
|
|
16508
16529
|
try {
|
|
16509
|
-
checkChannelSecretDriftAndScheduleRestart(
|
|
16530
|
+
checkChannelSecretDriftAndScheduleRestart(
|
|
16531
|
+
agent.code_name,
|
|
16532
|
+
getProjectDir(agent.code_name),
|
|
16533
|
+
shouldInjectChannelSecrets(agent.agent_id) ? collectChannelSpawnSecrets(refreshData.channel_configs) : void 0
|
|
16534
|
+
);
|
|
16510
16535
|
} catch (err) {
|
|
16511
16536
|
log(`[hot-reload] channel-secret drift check failed for '${agent.code_name}': ${err.message}`);
|
|
16512
16537
|
}
|
|
@@ -17533,6 +17558,13 @@ ${truncateForLog(ctx.tail)}` : `; pane_tail_hash=sha256:${createHash17("sha256")
|
|
|
17533
17558
|
// ADR-0042 pt3b (ENG-7607 / ENG-8992): this agent's own org-scoped key
|
|
17534
17559
|
// (null when unarmed). The spawn env carries it as this agent's AGT_API_KEY.
|
|
17535
17560
|
perAgentApiKey,
|
|
17561
|
+
// ENG-9350 (epic ENG-9347): when `spawn-inject-channel-secrets` is ON for
|
|
17562
|
+
// this agent, deliver its channel bot tokens through the spawn env (`tmux
|
|
17563
|
+
// -e`) instead of the on-disk `.env.integrations` file (which the writer
|
|
17564
|
+
// above evicted). Undefined ⇒ file-sourced delivery, unchanged. Derived
|
|
17565
|
+
// from the same channel_configs the writer used, via the shared core helper
|
|
17566
|
+
// so the KEYS/VALUES can't diverge from what would have been persisted.
|
|
17567
|
+
channelSpawnSecrets: shouldInjectChannelSecrets(agent.agent_id) ? collectChannelSpawnSecrets(channelConfigs) : void 0,
|
|
17536
17568
|
log
|
|
17537
17569
|
});
|
|
17538
17570
|
agentState.persistentSessionAgents.add(codeName);
|
|
@@ -17891,7 +17923,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
17891
17923
|
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}`));
|
|
17892
17924
|
void (async () => {
|
|
17893
17925
|
try {
|
|
17894
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
17926
|
+
const { collectDiagnostics } = await import("../persistent-session-PYAJ4VJW.js");
|
|
17895
17927
|
await api.post("/host/heartbeat", {
|
|
17896
17928
|
host_id: hostId,
|
|
17897
17929
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -17942,7 +17974,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
17942
17974
|
}
|
|
17943
17975
|
try {
|
|
17944
17976
|
const hostId = await getHostId();
|
|
17945
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
17977
|
+
const { collectDiagnostics } = await import("../persistent-session-PYAJ4VJW.js");
|
|
17946
17978
|
await api.post("/host/heartbeat", {
|
|
17947
17979
|
host_id: hostId,
|
|
17948
17980
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor)
|
|
@@ -18573,7 +18605,7 @@ async function processClaudePairSessions(agents) {
|
|
|
18573
18605
|
killPairSession,
|
|
18574
18606
|
pairTmuxSession,
|
|
18575
18607
|
finalizeClaudePairOnboarding
|
|
18576
|
-
} = await import("../claude-pair-runtime-
|
|
18608
|
+
} = await import("../claude-pair-runtime-UZ2JB2KY.js");
|
|
18577
18609
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
18578
18610
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
18579
18611
|
const killed = await killPairSession(pairTmuxSession(pairId));
|