@integrity-labs/agt-cli 0.28.1053 → 0.28.1055
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-4ZH75WMF.js → chunk-A7HDJW23.js} +2 -2
- package/dist/{chunk-MQ4COFCI.js → chunk-P544KDE3.js} +139 -36
- package/dist/chunk-P544KDE3.js.map +1 -0
- package/dist/{chunk-Z45XEW4H.js → chunk-TBHLHBXJ.js} +15 -5
- package/dist/{chunk-Z45XEW4H.js.map → chunk-TBHLHBXJ.js.map} +1 -1
- package/dist/{claude-pair-runtime-KMPRE2ZJ.js → claude-pair-runtime-TSRRFBNJ.js} +2 -2
- package/dist/lib/manager-worker.js +81 -14
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +41 -33
- package/dist/mcp/index.js +41 -33
- package/dist/mcp/origami.js +41 -33
- package/dist/mcp/slack-channel.js +41 -33
- package/dist/mcp/telegram-channel.js +41 -33
- package/dist/{persistent-session-5RX4P7GP.js → persistent-session-WSJVCGEO.js} +3 -3
- package/dist/{responsiveness-probe-C75AUK6I.js → responsiveness-probe-7MQI6SUF.js} +3 -3
- package/dist/{session-auth-dead-VFRUHVTF.js → session-auth-dead-NFVTUFPI.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-MQ4COFCI.js.map +0 -1
- /package/dist/{chunk-4ZH75WMF.js.map → chunk-A7HDJW23.js.map} +0 -0
- /package/dist/{claude-pair-runtime-KMPRE2ZJ.js.map → claude-pair-runtime-TSRRFBNJ.js.map} +0 -0
- /package/dist/{persistent-session-5RX4P7GP.js.map → persistent-session-WSJVCGEO.js.map} +0 -0
- /package/dist/{responsiveness-probe-C75AUK6I.js.map → responsiveness-probe-7MQI6SUF.js.map} +0 -0
- /package/dist/{session-auth-dead-VFRUHVTF.js.map → session-auth-dead-NFVTUFPI.js.map} +0 -0
|
@@ -266,7 +266,7 @@ async function spawnPairSession(session) {
|
|
|
266
266
|
return { ok: true };
|
|
267
267
|
} catch {
|
|
268
268
|
}
|
|
269
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
269
|
+
const { resolveClaudeBinary } = await import("./persistent-session-WSJVCGEO.js");
|
|
270
270
|
const claudeBin = resolveClaudeBinary();
|
|
271
271
|
const pairEnv = {
|
|
272
272
|
...process.env,
|
|
@@ -734,4 +734,4 @@ export {
|
|
|
734
734
|
startClaudePair,
|
|
735
735
|
submitClaudePairCode
|
|
736
736
|
};
|
|
737
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
737
|
+
//# sourceMappingURL=claude-pair-runtime-TSRRFBNJ.js.map
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
gatherSessionToolBindProbe,
|
|
35
35
|
getApiKey,
|
|
36
36
|
getCachedClaudeAuthMode,
|
|
37
|
+
getCachedClaudeAuthModeRaw,
|
|
37
38
|
getHostId,
|
|
38
39
|
givenUpMcpServerKeys,
|
|
39
40
|
isIntegrationBucketedReason,
|
|
@@ -66,7 +67,7 @@ import {
|
|
|
66
67
|
safeWriteJsonAtomic,
|
|
67
68
|
setConfigHash,
|
|
68
69
|
tripClass
|
|
69
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-TBHLHBXJ.js";
|
|
70
71
|
import {
|
|
71
72
|
getProjectDir as getProjectDir2,
|
|
72
73
|
getReadyTasks,
|
|
@@ -153,7 +154,7 @@ import {
|
|
|
153
154
|
webFetchBaselineValue,
|
|
154
155
|
webFetchRestartNeeded,
|
|
155
156
|
writeEgressAllowlist
|
|
156
|
-
} from "../chunk-
|
|
157
|
+
} from "../chunk-A7HDJW23.js";
|
|
157
158
|
import {
|
|
158
159
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
159
160
|
AnchorSessionClient,
|
|
@@ -262,7 +263,7 @@ import {
|
|
|
262
263
|
subagentActivityAgeSeconds,
|
|
263
264
|
sumTranscriptUsageInWindow,
|
|
264
265
|
transcriptActivityAgeSeconds
|
|
265
|
-
} from "../chunk-
|
|
266
|
+
} from "../chunk-P544KDE3.js";
|
|
266
267
|
import {
|
|
267
268
|
classifyUnanswerablePane,
|
|
268
269
|
paneRemedy
|
|
@@ -2019,6 +2020,7 @@ async function runConnectivityProbes(integrations, options = {}) {
|
|
|
2019
2020
|
sourceType: integ.source_type ?? null,
|
|
2020
2021
|
authType: integ.auth_type ?? null,
|
|
2021
2022
|
credentials: integ.credentials ?? {},
|
|
2023
|
+
config: integ.config ?? void 0,
|
|
2022
2024
|
cliBinary: integ.cli_binary,
|
|
2023
2025
|
mcpServerKey: integ.mcp_server_key,
|
|
2024
2026
|
connectivityTest: integ.connectivity_test ?? null,
|
|
@@ -2789,6 +2791,15 @@ function maybeMigrateAgentToIdKeyedLayout(agent, deps) {
|
|
|
2789
2791
|
}
|
|
2790
2792
|
}
|
|
2791
2793
|
|
|
2794
|
+
// src/lib/heartbeat-account-email.ts
|
|
2795
|
+
function mayReportAccountEmail(rawMode) {
|
|
2796
|
+
return rawMode === "subscription";
|
|
2797
|
+
}
|
|
2798
|
+
function heartbeatAccountEmailField(rawMode, detected) {
|
|
2799
|
+
if (!mayReportAccountEmail(rawMode)) return void 0;
|
|
2800
|
+
return detected ?? void 0;
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2792
2803
|
// src/lib/manager/auth-resolve-decision.ts
|
|
2793
2804
|
function decideAuthResolveFailureAction(args) {
|
|
2794
2805
|
const transient = isTransientAuthFailure(args.error);
|
|
@@ -3443,7 +3454,42 @@ async function detectClaudeAccountFingerprint(paths) {
|
|
|
3443
3454
|
}
|
|
3444
3455
|
var lastKnownFingerprint = null;
|
|
3445
3456
|
var lastDetectAtMs = 0;
|
|
3457
|
+
var lastEmailResult = null;
|
|
3458
|
+
var lastEmailDetectAtMs = 0;
|
|
3446
3459
|
var DETECT_TTL_MS = 6e4;
|
|
3460
|
+
async function detectClaudeAccountEmail(paths) {
|
|
3461
|
+
const candidates = paths ?? await claudeConfigCandidatePaths();
|
|
3462
|
+
for (const path of candidates) {
|
|
3463
|
+
let parsed;
|
|
3464
|
+
try {
|
|
3465
|
+
parsed = JSON.parse(await readFile3(path, "utf-8"));
|
|
3466
|
+
} catch {
|
|
3467
|
+
continue;
|
|
3468
|
+
}
|
|
3469
|
+
if (typeof parsed !== "object" || parsed === null) continue;
|
|
3470
|
+
const account = parsed.oauthAccount;
|
|
3471
|
+
if (typeof account !== "object" || account === null) continue;
|
|
3472
|
+
const accountUuid = account.accountUuid;
|
|
3473
|
+
if (typeof accountUuid !== "string" || accountUuid.trim().length === 0) continue;
|
|
3474
|
+
const email = account.emailAddress;
|
|
3475
|
+
if (typeof email !== "string") return null;
|
|
3476
|
+
const trimmed = email.trim().toLowerCase();
|
|
3477
|
+
if (trimmed.length === 0) return null;
|
|
3478
|
+
return trimmed;
|
|
3479
|
+
}
|
|
3480
|
+
return null;
|
|
3481
|
+
}
|
|
3482
|
+
async function getClaudeAccountEmail(paths, nowMs = Date.now()) {
|
|
3483
|
+
if (!paths && nowMs - lastEmailDetectAtMs < DETECT_TTL_MS) {
|
|
3484
|
+
return lastEmailResult;
|
|
3485
|
+
}
|
|
3486
|
+
const detected = await detectClaudeAccountEmail(paths);
|
|
3487
|
+
if (!paths) {
|
|
3488
|
+
lastEmailDetectAtMs = nowMs;
|
|
3489
|
+
lastEmailResult = detected;
|
|
3490
|
+
}
|
|
3491
|
+
return detected;
|
|
3492
|
+
}
|
|
3447
3493
|
async function getClaudeAccountFingerprint(paths, nowMs = Date.now()) {
|
|
3448
3494
|
if (!paths && lastKnownFingerprint !== null && nowMs - lastDetectAtMs < DETECT_TTL_MS) {
|
|
3449
3495
|
return lastKnownFingerprint;
|
|
@@ -14053,7 +14099,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
14053
14099
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
14054
14100
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
14055
14101
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
14056
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
14102
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-7MQI6SUF.js");
|
|
14057
14103
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
14058
14104
|
if (newest === null) return null;
|
|
14059
14105
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -14432,6 +14478,8 @@ async function runAgentConnectivityProbes(agent, integrations, projectDir) {
|
|
|
14432
14478
|
auth_type: i.auth_type,
|
|
14433
14479
|
source_type: sourceType,
|
|
14434
14480
|
credentials: i.credentials,
|
|
14481
|
+
// CS-1863: a per-install host (Storrito) is built from the install config.
|
|
14482
|
+
config: i.config ?? null,
|
|
14435
14483
|
last_connectivity_check_at: i.last_connectivity_check_at ?? null,
|
|
14436
14484
|
// ENG-5665 / ENG-6396: for any integration whose probe is an MCP
|
|
14437
14485
|
// `tools/list` against the agent's wired server (managed/Composio,
|
|
@@ -14799,7 +14847,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
14799
14847
|
var lastVersionCheckAt = 0;
|
|
14800
14848
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
14801
14849
|
var lastResponsivenessProbeAt = 0;
|
|
14802
|
-
var agtCliVersion = true ? "0.28.
|
|
14850
|
+
var agtCliVersion = true ? "0.28.1055" : "dev";
|
|
14803
14851
|
function resolveBrewPath(execFileSync3) {
|
|
14804
14852
|
try {
|
|
14805
14853
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -16434,7 +16482,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
16434
16482
|
if (codeNames.length === 0) return;
|
|
16435
16483
|
void (async () => {
|
|
16436
16484
|
try {
|
|
16437
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16485
|
+
const { collectDiagnostics } = await import("../persistent-session-WSJVCGEO.js");
|
|
16438
16486
|
await api.post("/host/heartbeat", {
|
|
16439
16487
|
host_id: hostId,
|
|
16440
16488
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -16576,7 +16624,7 @@ async function pollCycleInner() {
|
|
|
16576
16624
|
}
|
|
16577
16625
|
try {
|
|
16578
16626
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
16579
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16627
|
+
const { collectDiagnostics } = await import("../persistent-session-WSJVCGEO.js");
|
|
16580
16628
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
16581
16629
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
|
|
16582
16630
|
let tailscaleHostname;
|
|
@@ -16609,6 +16657,15 @@ async function pollCycleInner() {
|
|
|
16609
16657
|
const errId = createHash20("sha256").update(errText).digest("hex").slice(0, 12);
|
|
16610
16658
|
log(`Claude auth detection failed (error_id=${errId})`);
|
|
16611
16659
|
}
|
|
16660
|
+
let claudeAccountEmail = null;
|
|
16661
|
+
const claudeAuthModeRaw = getCachedClaudeAuthModeRaw();
|
|
16662
|
+
if (mayReportAccountEmail(claudeAuthModeRaw)) {
|
|
16663
|
+
try {
|
|
16664
|
+
claudeAccountEmail = await getClaudeAccountEmail();
|
|
16665
|
+
} catch {
|
|
16666
|
+
claudeAccountEmail = null;
|
|
16667
|
+
}
|
|
16668
|
+
}
|
|
16612
16669
|
const hostHasClaudeCode = state9.agents.some(
|
|
16613
16670
|
(a) => agentFrameworkCache.get(a.codeName) === "claude-code"
|
|
16614
16671
|
);
|
|
@@ -16634,6 +16691,16 @@ async function pollCycleInner() {
|
|
|
16634
16691
|
hostname: tailscaleHostname,
|
|
16635
16692
|
os_username: osUsername,
|
|
16636
16693
|
claude_auth: claudeAuth ?? void 0,
|
|
16694
|
+
// OMITTED rather than sent as null when it cannot be read. The API
|
|
16695
|
+
// treats absence as "no observation" and leaves the stored label
|
|
16696
|
+
// alone; sending null would let a transient unreadable config WIPE a
|
|
16697
|
+
// good address, which is worse than the staleness this fixes. Same
|
|
16698
|
+
// sticky reasoning as the account fingerprint.
|
|
16699
|
+
// Built by the pure helper so the OMIT-rather-than-null shape is tested
|
|
16700
|
+
// rather than asserted. `undefined` is dropped by JSON.stringify, and the
|
|
16701
|
+
// route reads an omitted field as no observation and leaves the stored
|
|
16702
|
+
// label alone; a null would be a value it had to interpret.
|
|
16703
|
+
claude_account_email: heartbeatAccountEmailField(claudeAuthModeRaw, claudeAccountEmail),
|
|
16637
16704
|
// ENG-5614: inbound-loop liveness. The actual phoenix socket state
|
|
16638
16705
|
// behind the direct-chat Realtime subscription. When this is false
|
|
16639
16706
|
// but the manager keeps heartbeating, inbound is being served by the
|
|
@@ -16761,7 +16828,7 @@ async function pollCycleInner() {
|
|
|
16761
16828
|
collectPanelessActivityProbes,
|
|
16762
16829
|
getResponsivenessIntervalMs,
|
|
16763
16830
|
occupancyQualificationClassifications
|
|
16764
|
-
} = await import("../responsiveness-probe-
|
|
16831
|
+
} = await import("../responsiveness-probe-7MQI6SUF.js");
|
|
16765
16832
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
16766
16833
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
16767
16834
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -16878,7 +16945,7 @@ async function pollCycleInner() {
|
|
|
16878
16945
|
collectResponsivenessProbes,
|
|
16879
16946
|
livePendingInboundOldestAgeSeconds,
|
|
16880
16947
|
parkPendingInbound
|
|
16881
|
-
} = await import("../responsiveness-probe-
|
|
16948
|
+
} = await import("../responsiveness-probe-7MQI6SUF.js");
|
|
16882
16949
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
|
|
16883
16950
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
16884
16951
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -17034,7 +17101,7 @@ async function pollCycleInner() {
|
|
|
17034
17101
|
}
|
|
17035
17102
|
try {
|
|
17036
17103
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
17037
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
17104
|
+
const { probeSessionAuth } = await import("../session-auth-dead-NFVTUFPI.js");
|
|
17038
17105
|
const observations = [];
|
|
17039
17106
|
const pendingCacheCommits = [];
|
|
17040
17107
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -21599,7 +21666,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
21599
21666
|
try {
|
|
21600
21667
|
const freshId = rotateSessionForWedge(codeName);
|
|
21601
21668
|
consecutiveWedgeCycles.delete(codeName);
|
|
21602
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
21669
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-7MQI6SUF.js");
|
|
21603
21670
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
21604
21671
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
21605
21672
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -21642,7 +21709,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
21642
21709
|
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}`));
|
|
21643
21710
|
void (async () => {
|
|
21644
21711
|
try {
|
|
21645
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
21712
|
+
const { collectDiagnostics } = await import("../persistent-session-WSJVCGEO.js");
|
|
21646
21713
|
await api.post("/host/heartbeat", {
|
|
21647
21714
|
host_id: hostId,
|
|
21648
21715
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -21693,7 +21760,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
21693
21760
|
}
|
|
21694
21761
|
try {
|
|
21695
21762
|
const hostId = await getHostId();
|
|
21696
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
21763
|
+
const { collectDiagnostics } = await import("../persistent-session-WSJVCGEO.js");
|
|
21697
21764
|
await api.post("/host/heartbeat", {
|
|
21698
21765
|
host_id: hostId,
|
|
21699
21766
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -22365,7 +22432,7 @@ async function processClaudePairSessions(agents) {
|
|
|
22365
22432
|
// cannot take it for itself — by the time it runs, the write it is looking
|
|
22366
22433
|
// for may already have happened.
|
|
22367
22434
|
snapshotPairConfig
|
|
22368
|
-
} = await import("../claude-pair-runtime-
|
|
22435
|
+
} = await import("../claude-pair-runtime-TSRRFBNJ.js");
|
|
22369
22436
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
22370
22437
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
22371
22438
|
const killed = await killPairSession(pairTmuxSession(pairId));
|