@integrity-labs/agt-cli 0.28.1125 → 0.28.1127
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-C5YNHEST.js → chunk-37PZYGGA.js} +2 -2
- package/dist/{chunk-JI2D2TA2.js → chunk-6J7WE4J4.js} +12 -2
- package/dist/chunk-6J7WE4J4.js.map +1 -0
- package/dist/{chunk-JHKH2EYM.js → chunk-7W5TLMFG.js} +4 -4
- package/dist/{claude-pair-runtime-5OBFRZWS.js → claude-pair-runtime-H55GPDDO.js} +2 -2
- package/dist/lib/manager-worker.js +16 -16
- package/dist/mcp/direct-chat-channel.js +62 -20
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/origami.js +2 -0
- package/dist/mcp/slack-channel.js +2 -0
- package/dist/mcp/telegram-channel.js +2 -0
- package/dist/{persistent-session-E5IR3RBF.js → persistent-session-D5O5MMNY.js} +3 -3
- package/dist/{responsiveness-probe-KCICZE6E.js → responsiveness-probe-JJQ3AC5E.js} +3 -3
- package/dist/{session-auth-dead-VYP4VCMX.js → session-auth-dead-WYJJYTQB.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-JI2D2TA2.js.map +0 -1
- /package/dist/{chunk-C5YNHEST.js.map → chunk-37PZYGGA.js.map} +0 -0
- /package/dist/{chunk-JHKH2EYM.js.map → chunk-7W5TLMFG.js.map} +0 -0
- /package/dist/{claude-pair-runtime-5OBFRZWS.js.map → claude-pair-runtime-H55GPDDO.js.map} +0 -0
- /package/dist/{persistent-session-E5IR3RBF.js.map → persistent-session-D5O5MMNY.js.map} +0 -0
- /package/dist/{responsiveness-probe-KCICZE6E.js.map → responsiveness-probe-JJQ3AC5E.js.map} +0 -0
- /package/dist/{session-auth-dead-VYP4VCMX.js.map → session-auth-dead-WYJJYTQB.js.map} +0 -0
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseEnvFileEntries,
|
|
17
17
|
parseEnvIntegrations,
|
|
18
18
|
shellQuote
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-37PZYGGA.js";
|
|
20
20
|
import {
|
|
21
21
|
BIND_FAILURE_QUARANTINE_THRESHOLD,
|
|
22
22
|
INTEGRATIONS_SECTION_END,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
sessionTranscriptDir,
|
|
80
80
|
worseConnectivityOutcome,
|
|
81
81
|
wrapScheduledTaskPrompt
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-6J7WE4J4.js";
|
|
83
83
|
import {
|
|
84
84
|
classifyUnanswerablePane,
|
|
85
85
|
isConsumerTermsDialogVisible,
|
|
@@ -7518,7 +7518,7 @@ function exchangeFailureKind(err) {
|
|
|
7518
7518
|
}
|
|
7519
7519
|
|
|
7520
7520
|
// src/lib/api-client.ts
|
|
7521
|
-
var agtCliVersion = true ? "0.28.
|
|
7521
|
+
var agtCliVersion = true ? "0.28.1127" : "dev";
|
|
7522
7522
|
var lastConfigHash = null;
|
|
7523
7523
|
function setConfigHash(hash) {
|
|
7524
7524
|
lastConfigHash = hash && hash.length > 0 ? hash : null;
|
|
@@ -12664,4 +12664,4 @@ export {
|
|
|
12664
12664
|
managerInstallSystemUnitCommand,
|
|
12665
12665
|
managerUninstallSystemUnitCommand
|
|
12666
12666
|
};
|
|
12667
|
-
//# sourceMappingURL=chunk-
|
|
12667
|
+
//# sourceMappingURL=chunk-7W5TLMFG.js.map
|
|
@@ -269,7 +269,7 @@ async function spawnPairSession(session) {
|
|
|
269
269
|
return { ok: true };
|
|
270
270
|
} catch {
|
|
271
271
|
}
|
|
272
|
-
const { resolveClaudeBinary } = await import("./persistent-session-
|
|
272
|
+
const { resolveClaudeBinary } = await import("./persistent-session-D5O5MMNY.js");
|
|
273
273
|
const claudeBin = resolveClaudeBinary();
|
|
274
274
|
const pairEnv = {
|
|
275
275
|
...process.env,
|
|
@@ -739,4 +739,4 @@ export {
|
|
|
739
739
|
startClaudePair,
|
|
740
740
|
submitClaudePairCode
|
|
741
741
|
};
|
|
742
|
-
//# sourceMappingURL=claude-pair-runtime-
|
|
742
|
+
//# sourceMappingURL=claude-pair-runtime-H55GPDDO.js.map
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
safeWriteJsonAtomic,
|
|
72
72
|
setConfigHash,
|
|
73
73
|
tripClass
|
|
74
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-7W5TLMFG.js";
|
|
75
75
|
import {
|
|
76
76
|
getProjectDir as getProjectDir2,
|
|
77
77
|
getReadyTasks,
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
webFetchBaselineValue,
|
|
159
159
|
webFetchRestartNeeded,
|
|
160
160
|
writeEgressAllowlist
|
|
161
|
-
} from "../chunk-
|
|
161
|
+
} from "../chunk-37PZYGGA.js";
|
|
162
162
|
import {
|
|
163
163
|
ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
|
|
164
164
|
AnchorSessionClient,
|
|
@@ -268,7 +268,7 @@ import {
|
|
|
268
268
|
subagentActivityAgeSeconds,
|
|
269
269
|
sumTranscriptUsageInWindow,
|
|
270
270
|
transcriptActivityAgeSeconds
|
|
271
|
-
} from "../chunk-
|
|
271
|
+
} from "../chunk-6J7WE4J4.js";
|
|
272
272
|
import {
|
|
273
273
|
classifyUnanswerablePane,
|
|
274
274
|
paneRemedy
|
|
@@ -14192,7 +14192,7 @@ var pendingDayRolloverReset = /* @__PURE__ */ new Set();
|
|
|
14192
14192
|
var dayRolloverInboundHold = /* @__PURE__ */ new Map();
|
|
14193
14193
|
var INBOUND_HOLD_EPISODE_GAP_MS = 12e4;
|
|
14194
14194
|
async function channelInboundActivityAgeSecondsFor(codeName) {
|
|
14195
|
-
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-
|
|
14195
|
+
const { newestPendingInboundActivityMtimeMs } = await import("../responsiveness-probe-JJQ3AC5E.js");
|
|
14196
14196
|
const newest = newestPendingInboundActivityMtimeMs(dirname11(paneLogPath(codeName)));
|
|
14197
14197
|
if (newest === null) return null;
|
|
14198
14198
|
return Math.max(0, Math.floor((Date.now() - newest) / 1e3));
|
|
@@ -14950,7 +14950,7 @@ var agentRestartTimezoneInputs = /* @__PURE__ */ new Map();
|
|
|
14950
14950
|
var lastVersionCheckAt = 0;
|
|
14951
14951
|
var VERSION_CHECK_INTERVAL_MS = 5 * 60 * 1e3;
|
|
14952
14952
|
var lastResponsivenessProbeAt = 0;
|
|
14953
|
-
var agtCliVersion = true ? "0.28.
|
|
14953
|
+
var agtCliVersion = true ? "0.28.1127" : "dev";
|
|
14954
14954
|
function resolveBrewPath(execFileSync3) {
|
|
14955
14955
|
try {
|
|
14956
14956
|
const out = execFileSync3("which", ["brew"], { timeout: 5e3 }).toString().trim();
|
|
@@ -16580,7 +16580,7 @@ function flushRestartedAgentDiagnostics(hostId, codeNames) {
|
|
|
16580
16580
|
if (codeNames.length === 0) return;
|
|
16581
16581
|
void (async () => {
|
|
16582
16582
|
try {
|
|
16583
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16583
|
+
const { collectDiagnostics } = await import("../persistent-session-D5O5MMNY.js");
|
|
16584
16584
|
await api.post("/host/heartbeat", {
|
|
16585
16585
|
host_id: hostId,
|
|
16586
16586
|
agent_diagnostics: collectDiagnostics(codeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -16722,7 +16722,7 @@ async function pollCycleInner() {
|
|
|
16722
16722
|
}
|
|
16723
16723
|
try {
|
|
16724
16724
|
const { detectHostSecurity } = await import("../host-security-KQYYZZVW.js");
|
|
16725
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
16725
|
+
const { collectDiagnostics } = await import("../persistent-session-D5O5MMNY.js");
|
|
16726
16726
|
const diagCodeNames = [...agentState.persistentSessionAgents];
|
|
16727
16727
|
const agentDiagnostics = diagCodeNames.length > 0 ? collectDiagnostics(diagCodeNames, quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor) : void 0;
|
|
16728
16728
|
let tailscaleHostname;
|
|
@@ -16930,7 +16930,7 @@ async function pollCycleInner() {
|
|
|
16930
16930
|
collectPanelessActivityProbes,
|
|
16931
16931
|
getResponsivenessIntervalMs,
|
|
16932
16932
|
occupancyQualificationClassifications
|
|
16933
|
-
} = await import("../responsiveness-probe-
|
|
16933
|
+
} = await import("../responsiveness-probe-JJQ3AC5E.js");
|
|
16934
16934
|
const probeIntervalMs = getResponsivenessIntervalMs();
|
|
16935
16935
|
if (now - lastResponsivenessProbeAt > probeIntervalMs) {
|
|
16936
16936
|
const probeCodeNames = [...agentState.persistentSessionAgents];
|
|
@@ -17047,7 +17047,7 @@ async function pollCycleInner() {
|
|
|
17047
17047
|
collectResponsivenessProbes,
|
|
17048
17048
|
livePendingInboundOldestAgeSeconds,
|
|
17049
17049
|
parkPendingInbound
|
|
17050
|
-
} = await import("../responsiveness-probe-
|
|
17050
|
+
} = await import("../responsiveness-probe-JJQ3AC5E.js");
|
|
17051
17051
|
const { getProjectDir: wedgeProjectDir } = await import("../scheduler-engine-M6AFZWNU.js");
|
|
17052
17052
|
const wedgeNow = /* @__PURE__ */ new Date();
|
|
17053
17053
|
const liveAgents = agentState.persistentSessionAgents;
|
|
@@ -17333,7 +17333,7 @@ async function pollCycleInner() {
|
|
|
17333
17333
|
}
|
|
17334
17334
|
}
|
|
17335
17335
|
);
|
|
17336
|
-
const { parkPendingInbound } = await import("../responsiveness-probe-
|
|
17336
|
+
const { parkPendingInbound } = await import("../responsiveness-probe-JJQ3AC5E.js");
|
|
17337
17337
|
const { parked, deadLettered } = parkPendingInbound(codeName, new Date(fatalNowMs));
|
|
17338
17338
|
paneFatalStreak.delete(codeName);
|
|
17339
17339
|
paneFatalRestarts.set(codeName, [...history, fatalNowMs]);
|
|
@@ -17364,7 +17364,7 @@ async function pollCycleInner() {
|
|
|
17364
17364
|
TRANSCRIPT_MOUNT_ESCALATION_REFRESH_MS,
|
|
17365
17365
|
bindSourceEscalations
|
|
17366
17366
|
} = await import("../transcript-mount-health-OHE6IVJV.js");
|
|
17367
|
-
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-
|
|
17367
|
+
const { transcriptBindSourcesFor, ensureTranscriptBindSources } = await import("../persistent-session-D5O5MMNY.js");
|
|
17368
17368
|
const mountConfig = resolveTranscriptMountConfig();
|
|
17369
17369
|
const liveAgents = agentState.persistentSessionAgents;
|
|
17370
17370
|
for (const tracked of [
|
|
@@ -17529,7 +17529,7 @@ async function pollCycleInner() {
|
|
|
17529
17529
|
}
|
|
17530
17530
|
try {
|
|
17531
17531
|
const { scrapeMcpFailedBannerCount } = await import("../pane-mcp-banner-scraper-VR5QGP3J.js");
|
|
17532
|
-
const { probeSessionAuth } = await import("../session-auth-dead-
|
|
17532
|
+
const { probeSessionAuth } = await import("../session-auth-dead-WYJJYTQB.js");
|
|
17533
17533
|
const observations = [];
|
|
17534
17534
|
const pendingCacheCommits = [];
|
|
17535
17535
|
const modelApiErrorReportingOn = hostFlagStore().getBoolean("model-api-error-reporting");
|
|
@@ -22116,7 +22116,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
22116
22116
|
try {
|
|
22117
22117
|
const freshId = rotateSessionForWedge(codeName);
|
|
22118
22118
|
consecutiveWedgeCycles.delete(codeName);
|
|
22119
|
-
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-
|
|
22119
|
+
const { parkPendingInbound: parkForRestart } = await import("../responsiveness-probe-JJQ3AC5E.js");
|
|
22120
22120
|
const { parked, deadLettered } = parkForRestart(codeName, /* @__PURE__ */ new Date());
|
|
22121
22121
|
const parkNote = parked > 0 ? `, ${parked} inbound parked` : "";
|
|
22122
22122
|
const deadNote = deadLettered > 0 ? `, ${deadLettered} undeliverable dead-lettered` : "";
|
|
@@ -22159,7 +22159,7 @@ async function handleRestartDoorbell(agentId, requestedAt, restartReason) {
|
|
|
22159
22159
|
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}`));
|
|
22160
22160
|
void (async () => {
|
|
22161
22161
|
try {
|
|
22162
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
22162
|
+
const { collectDiagnostics } = await import("../persistent-session-D5O5MMNY.js");
|
|
22163
22163
|
await api.post("/host/heartbeat", {
|
|
22164
22164
|
host_id: hostId,
|
|
22165
22165
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -22210,7 +22210,7 @@ async function respawnAgentAfterMcpStop(codeName, reason) {
|
|
|
22210
22210
|
}
|
|
22211
22211
|
try {
|
|
22212
22212
|
const hostId = await getHostId();
|
|
22213
|
-
const { collectDiagnostics } = await import("../persistent-session-
|
|
22213
|
+
const { collectDiagnostics } = await import("../persistent-session-D5O5MMNY.js");
|
|
22214
22214
|
await api.post("/host/heartbeat", {
|
|
22215
22215
|
host_id: hostId,
|
|
22216
22216
|
agent_diagnostics: collectDiagnostics([codeName], quarantineEntriesFor, claudeMdSizeFor, spawnOutcomeForDiagnostics, pidPressureFor, forwardedToolsFor, runtimeVersionFor)
|
|
@@ -22883,7 +22883,7 @@ async function processClaudePairSessions(agents) {
|
|
|
22883
22883
|
// cannot take it for itself — by the time it runs, the write it is looking
|
|
22884
22884
|
// for may already have happened.
|
|
22885
22885
|
snapshotPairConfig
|
|
22886
|
-
} = await import("../claude-pair-runtime-
|
|
22886
|
+
} = await import("../claude-pair-runtime-H55GPDDO.js");
|
|
22887
22887
|
for (const pairId of pendingResp.cancelled_pair_ids ?? []) {
|
|
22888
22888
|
log(`[claude-pair] sweeping orphan tmux session for pair ${pairId.slice(0, 8)}`);
|
|
22889
22889
|
const killed = await killPairSession(pairTmuxSession(pairId));
|
|
@@ -35740,6 +35740,8 @@ var NOTICE_KIND_AUDIENCE = {
|
|
|
35740
35740
|
aws_grant_denied: "agent",
|
|
35741
35741
|
gcp_grant_resolved: "agent",
|
|
35742
35742
|
gcp_grant_denied: "agent",
|
|
35743
|
+
azure_grant_resolved: "agent",
|
|
35744
|
+
azure_grant_denied: "agent",
|
|
35743
35745
|
// HITL tool-call approvals: "Do NOT call this tool again, do NOT claim the
|
|
35744
35746
|
// action happened, and do NOT poll".
|
|
35745
35747
|
integration_invoke_resolved: "agent",
|
|
@@ -40797,11 +40799,22 @@ function probeAgentSessionCached(codeName, ttlMs = SESSION_PROBE_TTL_MS, now = D
|
|
|
40797
40799
|
// src/direct-chat-poll-guard.ts
|
|
40798
40800
|
function evaluatePollGuard(state, nowMs, stuckMs) {
|
|
40799
40801
|
if (!state.inFlight) return { run: true, stuck: false };
|
|
40802
|
+
if (state.leaseUntilMs != null && nowMs < state.leaseUntilMs) return { run: false, stuck: false };
|
|
40800
40803
|
if (state.inFlightSinceMs != null && nowMs - state.inFlightSinceMs >= stuckMs) {
|
|
40801
40804
|
return { run: true, stuck: true };
|
|
40802
40805
|
}
|
|
40803
40806
|
return { run: false, stuck: false };
|
|
40804
40807
|
}
|
|
40808
|
+
async function withPollGuardLease(state, leaseUntilMs, work, nowMs = Date.now) {
|
|
40809
|
+
const previous = state.leaseUntilMs ?? null;
|
|
40810
|
+
state.leaseUntilMs = Math.max(previous ?? 0, leaseUntilMs);
|
|
40811
|
+
try {
|
|
40812
|
+
return await work();
|
|
40813
|
+
} finally {
|
|
40814
|
+
state.leaseUntilMs = previous;
|
|
40815
|
+
if (state.inFlight) state.inFlightSinceMs = nowMs();
|
|
40816
|
+
}
|
|
40817
|
+
}
|
|
40805
40818
|
async function fetchWithTimeout(input, init, timeoutMs, fetchImpl = fetch) {
|
|
40806
40819
|
const controller = new AbortController();
|
|
40807
40820
|
const timer = setTimeout(() => {
|
|
@@ -40945,7 +40958,44 @@ import {
|
|
|
40945
40958
|
|
|
40946
40959
|
// src/direct-chat-inbound-attachments.ts
|
|
40947
40960
|
import { join as join14 } from "path";
|
|
40948
|
-
var MAX_INBOUND_ATTACHMENT_BYTES =
|
|
40961
|
+
var MAX_INBOUND_ATTACHMENT_BYTES = DIRECT_CHAT_UPLOAD_MAX_BYTES;
|
|
40962
|
+
var INBOUND_DOWNLOAD_FLOOR_MS = 2e4;
|
|
40963
|
+
var INBOUND_DOWNLOAD_MIN_BYTES_PER_SEC = 512 * 1024;
|
|
40964
|
+
function inboundDownloadTimeoutMs(expectedBytes) {
|
|
40965
|
+
const bytes = typeof expectedBytes === "number" && Number.isFinite(expectedBytes) && expectedBytes > 0 ? Math.min(expectedBytes, MAX_INBOUND_ATTACHMENT_BYTES) : MAX_INBOUND_ATTACHMENT_BYTES;
|
|
40966
|
+
return INBOUND_DOWNLOAD_FLOOR_MS + Math.ceil(bytes / INBOUND_DOWNLOAD_MIN_BYTES_PER_SEC * 1e3);
|
|
40967
|
+
}
|
|
40968
|
+
function attachmentsDownloadBudgetMs(attachments) {
|
|
40969
|
+
return attachments.reduce((sum, a) => sum + inboundDownloadTimeoutMs(a.byte_size), 0);
|
|
40970
|
+
}
|
|
40971
|
+
async function fetchWithTransferDeadline(url, budgetMs, fetchImpl = fetch) {
|
|
40972
|
+
const controller = new AbortController();
|
|
40973
|
+
const timer = setTimeout(() => {
|
|
40974
|
+
controller.abort(new Error(`inbound attachment download timed out after ${budgetMs}ms`));
|
|
40975
|
+
}, budgetMs);
|
|
40976
|
+
timer.unref?.();
|
|
40977
|
+
let res;
|
|
40978
|
+
try {
|
|
40979
|
+
res = await fetchImpl(url, { method: "GET", signal: controller.signal });
|
|
40980
|
+
} catch (err) {
|
|
40981
|
+
clearTimeout(timer);
|
|
40982
|
+
throw err;
|
|
40983
|
+
}
|
|
40984
|
+
const len = res.headers.get("content-length");
|
|
40985
|
+
return {
|
|
40986
|
+
ok: res.ok,
|
|
40987
|
+
status: res.status,
|
|
40988
|
+
contentLength: len != null ? Number(len) : null,
|
|
40989
|
+
bytes: async () => {
|
|
40990
|
+
try {
|
|
40991
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
40992
|
+
} finally {
|
|
40993
|
+
clearTimeout(timer);
|
|
40994
|
+
}
|
|
40995
|
+
}
|
|
40996
|
+
};
|
|
40997
|
+
}
|
|
40998
|
+
var OVER_CAP_ERROR = `exceeds the ${formatUploadSize(MAX_INBOUND_ATTACHMENT_BYTES)} inbound limit`;
|
|
40949
40999
|
var INBOUND_ATTACHMENTS_SUBDIR = "direct-chat-inbound";
|
|
40950
41000
|
function resolveInboundAttachmentsDir(input) {
|
|
40951
41001
|
const alias = resolveAgentDirAlias(input);
|
|
@@ -41017,10 +41067,10 @@ async function downloadInboundAttachment(att, dir, deps) {
|
|
|
41017
41067
|
isImage: isImageContentType(att.content_type)
|
|
41018
41068
|
};
|
|
41019
41069
|
if (att.byte_size > MAX_INBOUND_ATTACHMENT_BYTES) {
|
|
41020
|
-
return { ...base, error:
|
|
41070
|
+
return { ...base, error: OVER_CAP_ERROR };
|
|
41021
41071
|
}
|
|
41022
41072
|
try {
|
|
41023
|
-
const res = await deps.fetchUrl(att.download_url);
|
|
41073
|
+
const res = await deps.fetchUrl(att.download_url, att.byte_size);
|
|
41024
41074
|
if (!res.ok) {
|
|
41025
41075
|
let s3Body = "";
|
|
41026
41076
|
try {
|
|
@@ -41034,11 +41084,11 @@ async function downloadInboundAttachment(att, dir, deps) {
|
|
|
41034
41084
|
return { ...base, error: `download HTTP ${res.status}` };
|
|
41035
41085
|
}
|
|
41036
41086
|
if (res.contentLength != null && res.contentLength > MAX_INBOUND_ATTACHMENT_BYTES) {
|
|
41037
|
-
return { ...base, error:
|
|
41087
|
+
return { ...base, error: OVER_CAP_ERROR };
|
|
41038
41088
|
}
|
|
41039
41089
|
const bytes = await res.bytes();
|
|
41040
41090
|
if (bytes.byteLength > MAX_INBOUND_ATTACHMENT_BYTES) {
|
|
41041
|
-
return { ...base, error:
|
|
41091
|
+
return { ...base, error: OVER_CAP_ERROR };
|
|
41042
41092
|
}
|
|
41043
41093
|
deps.ensureDir(dir);
|
|
41044
41094
|
const path = deps.joinPath(dir, safeInboundFilename(att.upload_id, att.filename));
|
|
@@ -42233,16 +42283,7 @@ async function maybeSendDirectChatAccountWarn(sessionId) {
|
|
|
42233
42283
|
}
|
|
42234
42284
|
}
|
|
42235
42285
|
var inboundAttachmentDeps = {
|
|
42236
|
-
fetchUrl:
|
|
42237
|
-
const res = await fetchWithTimeout(url, { method: "GET" }, HTTP_TIMEOUT_MS);
|
|
42238
|
-
const len = res.headers.get("content-length");
|
|
42239
|
-
return {
|
|
42240
|
-
ok: res.ok,
|
|
42241
|
-
status: res.status,
|
|
42242
|
-
contentLength: len != null ? Number(len) : null,
|
|
42243
|
-
bytes: async () => new Uint8Array(await res.arrayBuffer())
|
|
42244
|
-
};
|
|
42245
|
-
},
|
|
42286
|
+
fetchUrl: (url, expectedBytes) => fetchWithTransferDeadline(url, inboundDownloadTimeoutMs(expectedBytes)),
|
|
42246
42287
|
ensureDir: (dir) => mkdirSync7(dir, { recursive: true }),
|
|
42247
42288
|
writeFile: (path, bytes) => writeFileSync8(path, bytes, { mode: 384 }),
|
|
42248
42289
|
joinPath: (...parts) => join17(...parts),
|
|
@@ -43110,10 +43151,10 @@ async function pollForMessages(sinceMs) {
|
|
|
43110
43151
|
}
|
|
43111
43152
|
const inboundAttachments = msg.attachments ?? [];
|
|
43112
43153
|
if (!isNotice && inboundAttachments.length > 0 && INBOUND_ATTACHMENTS_DIR) {
|
|
43113
|
-
const processed = await
|
|
43114
|
-
|
|
43115
|
-
|
|
43116
|
-
inboundAttachmentDeps
|
|
43154
|
+
const processed = await withPollGuardLease(
|
|
43155
|
+
pollGuard,
|
|
43156
|
+
Date.now() + attachmentsDownloadBudgetMs(inboundAttachments) + POLL_STUCK_MS,
|
|
43157
|
+
() => downloadInboundAttachments(inboundAttachments, INBOUND_ATTACHMENTS_DIR, inboundAttachmentDeps)
|
|
43117
43158
|
);
|
|
43118
43159
|
const annotation = buildAttachmentAnnotation(processed);
|
|
43119
43160
|
if (annotation) injectContent = `${injectContent}${annotation}`;
|
|
@@ -43273,7 +43314,7 @@ var DOORBELL_ENABLED = resolveHostBooleanFlag({
|
|
|
43273
43314
|
var DOORBELL_FILE = "direct-chat-doorbell";
|
|
43274
43315
|
var SAFETY_NET_POLL_MS = 3e4;
|
|
43275
43316
|
var POLL_STUCK_MS = 9e4;
|
|
43276
|
-
var pollGuard = { inFlight: false, inFlightSinceMs: null };
|
|
43317
|
+
var pollGuard = { inFlight: false, inFlightSinceMs: null, leaseUntilMs: null };
|
|
43277
43318
|
async function pollOnce(sinceMs) {
|
|
43278
43319
|
const decision = evaluatePollGuard(pollGuard, Date.now(), POLL_STUCK_MS);
|
|
43279
43320
|
if (!decision.run) return { ran: false, ok: false };
|
|
@@ -43291,6 +43332,7 @@ async function pollOnce(sinceMs) {
|
|
|
43291
43332
|
} finally {
|
|
43292
43333
|
pollGuard.inFlight = false;
|
|
43293
43334
|
pollGuard.inFlightSinceMs = null;
|
|
43335
|
+
pollGuard.leaseUntilMs = null;
|
|
43294
43336
|
}
|
|
43295
43337
|
}
|
|
43296
43338
|
var doorbellWatcher = null;
|
package/dist/mcp/index.js
CHANGED
|
@@ -28108,6 +28108,8 @@ var NOTICE_KIND_AUDIENCE = {
|
|
|
28108
28108
|
aws_grant_denied: "agent",
|
|
28109
28109
|
gcp_grant_resolved: "agent",
|
|
28110
28110
|
gcp_grant_denied: "agent",
|
|
28111
|
+
azure_grant_resolved: "agent",
|
|
28112
|
+
azure_grant_denied: "agent",
|
|
28111
28113
|
// HITL tool-call approvals: "Do NOT call this tool again, do NOT claim the
|
|
28112
28114
|
// action happened, and do NOT poll".
|
|
28113
28115
|
integration_invoke_resolved: "agent",
|
package/dist/mcp/origami.js
CHANGED
|
@@ -42240,6 +42240,8 @@ var NOTICE_KIND_AUDIENCE = {
|
|
|
42240
42240
|
aws_grant_denied: "agent",
|
|
42241
42241
|
gcp_grant_resolved: "agent",
|
|
42242
42242
|
gcp_grant_denied: "agent",
|
|
42243
|
+
azure_grant_resolved: "agent",
|
|
42244
|
+
azure_grant_denied: "agent",
|
|
42243
42245
|
// HITL tool-call approvals: "Do NOT call this tool again, do NOT claim the
|
|
42244
42246
|
// action happened, and do NOT poll".
|
|
42245
42247
|
integration_invoke_resolved: "agent",
|
|
@@ -36636,6 +36636,8 @@ var NOTICE_KIND_AUDIENCE = {
|
|
|
36636
36636
|
aws_grant_denied: "agent",
|
|
36637
36637
|
gcp_grant_resolved: "agent",
|
|
36638
36638
|
gcp_grant_denied: "agent",
|
|
36639
|
+
azure_grant_resolved: "agent",
|
|
36640
|
+
azure_grant_denied: "agent",
|
|
36639
36641
|
// HITL tool-call approvals: "Do NOT call this tool again, do NOT claim the
|
|
36640
36642
|
// action happened, and do NOT poll".
|
|
36641
36643
|
integration_invoke_resolved: "agent",
|
|
@@ -36864,6 +36864,8 @@ var NOTICE_KIND_AUDIENCE = {
|
|
|
36864
36864
|
aws_grant_denied: "agent",
|
|
36865
36865
|
gcp_grant_resolved: "agent",
|
|
36866
36866
|
gcp_grant_denied: "agent",
|
|
36867
|
+
azure_grant_resolved: "agent",
|
|
36868
|
+
azure_grant_denied: "agent",
|
|
36867
36869
|
// HITL tool-call approvals: "Do NOT call this tool again, do NOT claim the
|
|
36868
36870
|
// action happened, and do NOT poll".
|
|
36869
36871
|
integration_invoke_resolved: "agent",
|
|
@@ -68,8 +68,8 @@ import {
|
|
|
68
68
|
writeDirectChatSessionState,
|
|
69
69
|
writeEgressAllowlist,
|
|
70
70
|
writePersistentClaudeWrapper
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import "./chunk-
|
|
71
|
+
} from "./chunk-37PZYGGA.js";
|
|
72
|
+
import "./chunk-6J7WE4J4.js";
|
|
73
73
|
import "./chunk-OCMJ5E6J.js";
|
|
74
74
|
import "./chunk-XWVM4KPK.js";
|
|
75
75
|
import "./chunk-EL5MWGGH.js";
|
|
@@ -145,4 +145,4 @@ export {
|
|
|
145
145
|
writeEgressAllowlist,
|
|
146
146
|
writePersistentClaudeWrapper
|
|
147
147
|
};
|
|
148
|
-
//# sourceMappingURL=persistent-session-
|
|
148
|
+
//# sourceMappingURL=persistent-session-D5O5MMNY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-37PZYGGA.js";
|
|
4
|
+
import "./chunk-6J7WE4J4.js";
|
|
5
5
|
import "./chunk-OCMJ5E6J.js";
|
|
6
6
|
import "./chunk-XWVM4KPK.js";
|
|
7
7
|
import "./chunk-EL5MWGGH.js";
|
|
@@ -802,4 +802,4 @@ export {
|
|
|
802
802
|
readAndResetSlackReplyBindingClassifications,
|
|
803
803
|
readAndResetSlackReplyTargetClassifications
|
|
804
804
|
};
|
|
805
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
805
|
+
//# sourceMappingURL=responsiveness-probe-JJQ3AC5E.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6J7WE4J4.js";
|
|
4
4
|
import "./chunk-DGUM43GV.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/session-auth-dead.ts
|
|
@@ -204,4 +204,4 @@ export {
|
|
|
204
204
|
decideSessionAuthState,
|
|
205
205
|
probeSessionAuth
|
|
206
206
|
};
|
|
207
|
-
//# sourceMappingURL=session-auth-dead-
|
|
207
|
+
//# sourceMappingURL=session-auth-dead-WYJJYTQB.js.map
|