@integrity-labs/agt-cli 0.28.736 → 0.28.737
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-F5UORP7D.js → chunk-7LRKRRC5.js} +4 -4
- package/dist/{chunk-6J6G4HOG.js → chunk-MV3QBGO4.js} +2 -2
- package/dist/{chunk-IBBBIE4K.js → chunk-WB2E236K.js} +24 -15
- package/dist/chunk-WB2E236K.js.map +1 -0
- package/dist/{claude-pair-runtime-R2F4HRID.js → claude-pair-runtime-57FICYWW.js} +2 -2
- package/dist/lib/manager-worker.js +62 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +23 -14
- package/dist/mcp/index.js +23 -14
- package/dist/mcp/origami.js +23 -14
- package/dist/mcp/slack-channel.js +23 -14
- package/dist/mcp/telegram-channel.js +23 -14
- package/dist/{persistent-session-GJMGXFF2.js → persistent-session-NE6DCBFD.js} +3 -3
- package/dist/{responsiveness-probe-34ECZDWQ.js → responsiveness-probe-VN4OPV56.js} +3 -3
- package/dist/{session-auth-dead-TK3KNAH4.js → session-auth-dead-TI6JWW4G.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-IBBBIE4K.js.map +0 -1
- /package/dist/{chunk-F5UORP7D.js.map → chunk-7LRKRRC5.js.map} +0 -0
- /package/dist/{chunk-6J6G4HOG.js.map → chunk-MV3QBGO4.js.map} +0 -0
- /package/dist/{claude-pair-runtime-R2F4HRID.js.map → claude-pair-runtime-57FICYWW.js.map} +0 -0
- /package/dist/{persistent-session-GJMGXFF2.js.map → persistent-session-NE6DCBFD.js.map} +0 -0
- /package/dist/{responsiveness-probe-34ECZDWQ.js.map → responsiveness-probe-VN4OPV56.js.map} +0 -0
- /package/dist/{session-auth-dead-TK3KNAH4.js.map → session-auth-dead-TI6JWW4G.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-NE6DCBFD.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-57FICYWW.js.map
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
safeWriteJsonAtomic,
|
|
58
58
|
setConfigHash,
|
|
59
59
|
tripClass
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-7LRKRRC5.js";
|
|
61
61
|
import {
|
|
62
62
|
getProjectDir as getProjectDir2,
|
|
63
63
|
getReadyTasks,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
takeZombieDetection,
|
|
119
119
|
toOpencodeModel,
|
|
120
120
|
writeEgressAllowlist
|
|
121
|
-
} from "../chunk-
|
|
121
|
+
} from "../chunk-MV3QBGO4.js";
|
|
122
122
|
import {
|
|
123
123
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
124
124
|
AnchorSessionClient,
|
|
@@ -203,7 +203,7 @@ import {
|
|
|
203
203
|
subagentActivityAgeSeconds,
|
|
204
204
|
sumTranscriptUsageInWindow,
|
|
205
205
|
transcriptActivityAgeSeconds
|
|
206
|
-
} from "../chunk-
|
|
206
|
+
} from "../chunk-WB2E236K.js";
|
|
207
207
|
import {
|
|
208
208
|
reapOrphanChannelMcps
|
|
209
209
|
} from "../chunk-XWVM4KPK.js";
|
|
@@ -655,6 +655,35 @@ function resolveChannelLaunchFlags(channelConfigs, quarantinedChannels) {
|
|
|
655
655
|
return { devChannels, pluginChannels };
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
+
// src/lib/channel-sync-precondition.ts
|
|
659
|
+
var CHANNEL_BACKING_INTEGRATION = Object.freeze({
|
|
660
|
+
slack: "slack",
|
|
661
|
+
telegram: "telegram",
|
|
662
|
+
msteams: "msteams",
|
|
663
|
+
whatsapp: "whatsapp",
|
|
664
|
+
discord: "discord"
|
|
665
|
+
});
|
|
666
|
+
function createEffectiveIntegrationObservations() {
|
|
667
|
+
return /* @__PURE__ */ new Map();
|
|
668
|
+
}
|
|
669
|
+
function recordEffectiveIntegrationIds(observations, agentId, definitionIds) {
|
|
670
|
+
observations.set(agentId, new Set(definitionIds));
|
|
671
|
+
}
|
|
672
|
+
function forgetEffectiveIntegrations(observations, agentId) {
|
|
673
|
+
observations.delete(agentId);
|
|
674
|
+
}
|
|
675
|
+
function checkChannelIntegrationPrecondition(observations, agentId, channelId) {
|
|
676
|
+
const definitionId = Object.prototype.hasOwnProperty.call(CHANNEL_BACKING_INTEGRATION, channelId) ? CHANNEL_BACKING_INTEGRATION[channelId] : void 0;
|
|
677
|
+
if (!definitionId) return { status: "unknown" };
|
|
678
|
+
const observed = observations.get(agentId);
|
|
679
|
+
if (!observed) return { status: "unknown" };
|
|
680
|
+
if (observed.has(definitionId)) return { status: "ok" };
|
|
681
|
+
return { status: "integration-missing", definitionId };
|
|
682
|
+
}
|
|
683
|
+
function channelIntegrationMissingReason(channelId, definitionId) {
|
|
684
|
+
return `the '${definitionId}' integration is not installed on this agent in any scope, so ${channelId} credentials cannot converge \u2014 not retrying until it is installed (ENG-9652)`;
|
|
685
|
+
}
|
|
686
|
+
|
|
658
687
|
// src/lib/sender-policy-restart-decision.ts
|
|
659
688
|
function decideSenderPolicyRestart(input) {
|
|
660
689
|
const {
|
|
@@ -12401,7 +12430,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
12401
12430
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
12402
12431
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
12403
12432
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
12404
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
12433
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-VN4OPV56.js");
|
|
12405
12434
|
const newest = newestPendingInboundActivityMtimeMs(dirname10(paneLogPath(codeName)));
|
|
12406
12435
|
if (newest === null) return null;
|
|
12407
12436
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -13052,7 +13081,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
13052
13081
|
var lastVersionCheckAt = 0;
|
|
13053
13082
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
13054
13083
|
var lastResponsivenessProbeAt = 0;
|
|
13055
|
-
var agtCliVersion = true ? "0.28.
|
|
13084
|
+
var agtCliVersion = true ? "0.28.737" : "dev";
|
|
13056
13085
|
function resolveBrewPath(execFileSync3) {
|
|
13057
13086
|
try {
|
|
13058
13087
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -14218,6 +14247,7 @@ function saveChannelHashCache2() {
|
|
|
14218
14247
|
var channelWriteFailureCounts = /* @__PURE__ */ new Map();
|
|
14219
14248
|
var CHANNEL_WRITE_FAILURE_ESCALATE_EVERY = 90;
|
|
14220
14249
|
var channelSyncFailures = /* @__PURE__ */ new Map();
|
|
14250
|
+
var effectiveIntegrationObservations = createEffectiveIntegrationObservations();
|
|
14221
14251
|
var channelSyncAttemptedSets = /* @__PURE__ */ new Map();
|
|
14222
14252
|
var channelCredentialVerdicts = /* @__PURE__ */ new Map();
|
|
14223
14253
|
function sameChannelSet(a, b) {
|
|
@@ -14230,6 +14260,7 @@ function forgetChannelSyncState(agentId) {
|
|
|
14230
14260
|
channelSyncFailures.delete(agentId);
|
|
14231
14261
|
channelSyncAttemptedSets.delete(agentId);
|
|
14232
14262
|
channelCredentialVerdicts.delete(agentId);
|
|
14263
|
+
forgetEffectiveIntegrations(effectiveIntegrationObservations, agentId);
|
|
14233
14264
|
}
|
|
14234
14265
|
var CHANNEL_SYNC_FREE_ATTEMPTS = 3;
|
|
14235
14266
|
var CHANNEL_SYNC_MAX_BACKOFF_MS = 5 * 6e4;
|
|
@@ -14589,7 +14620,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
14589
14620
|
if (codeNames.length === 0) return;
|
|
14590
14621
|
void (async () => {
|
|
14591
14622
|
try {
|
|
14592
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14623
|
+
const { collectDiagnostics } = await import("../persistent-session-NE6DCBFD.js");
|
|
14593
14624
|
await api.post("/host/heartbeat", {
|
|
14594
14625
|
host_id: hostId,
|
|
14595
14626
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -14730,7 +14761,7 @@ async function pollCycleInner() {
|
|
|
14730
14761
|
}
|
|
14731
14762
|
try {
|
|
14732
14763
|
const { detectHostSecurity } = await import("../host-security-6PDFG7F5.js");
|
|
14733
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
14764
|
+
const { collectDiagnostics } = await import("../persistent-session-NE6DCBFD.js");
|
|
14734
14765
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
14735
14766
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor) : void 0;
|
|
14736
14767
|
let tailscaleHostname;
|
|
@@ -14899,7 +14930,7 @@ async function pollCycleInner() {
|
|
|
14899
14930
|
collectPanelessActivityProbes,
|
|
14900
14931
|
getResponsivenessIntervalMs,
|
|
14901
14932
|
occupancyQualificationClassifications
|
|
14902
|
-
} = await import("../responsiveness-probe-
|
|
14933
|
+
} = await import("../responsiveness-probe-VN4OPV56.js");
|
|
14903
14934
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
14904
14935
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
14905
14936
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -15009,7 +15040,7 @@ async function pollCycleInner() {
|
|
|
15009
15040
|
collectResponsivenessProbes,
|
|
15010
15041
|
livePendingInboundOldestAgeSeconds,
|
|
15011
15042
|
parkPendingInbound
|
|
15012
|
-
} = await import("../responsiveness-probe-
|
|
15043
|
+
} = await import("../responsiveness-probe-VN4OPV56.js");
|
|
15013
15044
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-NDP36U7O.js");
|
|
15014
15045
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
15015
15046
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -15165,7 +15196,7 @@ async function pollCycleInner() {
|
|
|
15165
15196
|
}
|
|
15166
15197
|
try {
|
|
15167
15198
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-JA437JIB.js");
|
|
15168
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
15199
|
+
const { probeSessionAuth } = await import("../session-auth-dead-TI6JWW4G.js");
|
|
15169
15200
|
const observations = [];
|
|
15170
15201
|
const pendingCacheCommits = [];
|
|
15171
15202
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -16448,6 +16479,19 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
16448
16479
|
);
|
|
16449
16480
|
}
|
|
16450
16481
|
}
|
|
16482
|
+
const precondition = checkChannelIntegrationPrecondition(
|
|
16483
|
+
effectiveIntegrationObservations,
|
|
16484
|
+
agent.agent_id,
|
|
16485
|
+
channelId
|
|
16486
|
+
);
|
|
16487
|
+
if (precondition.status === "integration-missing") {
|
|
16488
|
+
channelConfigConverged = false;
|
|
16489
|
+
channelConfigFailureReason = channelIntegrationMissingReason(
|
|
16490
|
+
channelId,
|
|
16491
|
+
precondition.definitionId
|
|
16492
|
+
);
|
|
16493
|
+
continue;
|
|
16494
|
+
}
|
|
16451
16495
|
frameworkAdapter.writeChannelCredentials(
|
|
16452
16496
|
agent.code_name,
|
|
16453
16497
|
channelId,
|
|
@@ -16878,6 +16922,11 @@ async function processAgent(agent, agentStates, managedToolkits) {
|
|
|
16878
16922
|
try {
|
|
16879
16923
|
const integrationsData = await api.post("/host/agent-integrations", { agent_id: agent.agent_id });
|
|
16880
16924
|
const integrations = (integrationsData.integrations ?? []).map(withResolvedRemoteMcp);
|
|
16925
|
+
recordEffectiveIntegrationIds(
|
|
16926
|
+
effectiveIntegrationObservations,
|
|
16927
|
+
agent.agent_id,
|
|
16928
|
+
integrations.map((i) => i.definition_id)
|
|
16929
|
+
);
|
|
16881
16930
|
firstConnectUnsettledByAgent.set(
|
|
16882
16931
|
agent.code_name,
|
|
16883
16932
|
computeFirstConnectUnsettled(integrations, Date.now(), BIND_REMEDIATION_FIRST_CONNECT_WINDOW_MS)
|
|
@@ -19101,7 +19150,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
19101
19150
|
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}`));
|
|
19102
19151
|
void (async () => {
|
|
19103
19152
|
try {
|
|
19104
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19153
|
+
const { collectDiagnostics } = await import("../persistent-session-NE6DCBFD.js");
|
|
19105
19154
|
await api.post("/host/heartbeat", {
|
|
19106
19155
|
host_id: hostId,
|
|
19107
19156
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19147,7 +19196,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
19147
19196
|
}
|
|
19148
19197
|
try {
|
|
19149
19198
|
const hostId = await getHostId();
|
|
19150
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
19199
|
+
const { collectDiagnostics } = await import("../persistent-session-NE6DCBFD.js");
|
|
19151
19200
|
await api.post("/host/heartbeat", {
|
|
19152
19201
|
host_id: hostId,
|
|
19153
19202
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor)
|
|
@@ -19782,7 +19831,7 @@ async function processClaudePairSessions(agents) {
|
|
|
19782
19831
|
killPairSession,
|
|
19783
19832
|
pairTmuxSession,
|
|
19784
19833
|
finalizeClaudePairOnboarding
|
|
19785
|
-
} = await import("../claude-pair-runtime-
|
|
19834
|
+
} = await import("../claude-pair-runtime-57FICYWW.js");
|
|
19786
19835
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
19787
19836
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
19788
19837
|
const killed = await killPairSession(pairTmuxSession(pairId));
|