UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

22 lines (21 loc) • 1.07 kB
import { R as resolveTimerTimeoutMs, n as MAX_TIMER_TIMEOUT_MS } from "./number-coercion-D6u-4YD8.mjs"; import { t as BROWSER_STARTUP_TIMEOUT_MS } from "./constants-ClfCwK7f.mjs"; import "./number-runtime-W4chuk8B.mjs"; //#region extensions/browser/src/browser-proxy-timeouts.ts const DEFAULT_BROWSER_PROXY_TIMEOUT_MS = 2e4; const BROWSER_PROXY_GATEWAY_TIMEOUT_SLACK_MS = 5e3; function resolveBrowserProxyTimeoutMs(e) { return resolveTimerTimeoutMs(e, DEFAULT_BROWSER_PROXY_TIMEOUT_MS); } /** Leave time for browser diagnostics to cross the node and Gateway watchdogs. */ function resolveBrowserProxyTimeouts(e) { const t = Math.min(resolveBrowserProxyTimeoutMs(e), MAX_TIMER_TIMEOUT_MS - BROWSER_STARTUP_TIMEOUT_MS - 2 * BROWSER_PROXY_GATEWAY_TIMEOUT_SLACK_MS); const n = t + BROWSER_STARTUP_TIMEOUT_MS + BROWSER_PROXY_GATEWAY_TIMEOUT_SLACK_MS; return { proxyTimeoutMs: t, nodeInvokeTimeoutMs: n, gatewayTimeoutMs: n + BROWSER_PROXY_GATEWAY_TIMEOUT_SLACK_MS }; } //#endregion export { resolveBrowserProxyTimeouts as n, resolveBrowserProxyTimeoutMs as t };