mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-04 23:32:56 +00:00
Comment-only follow-up documenting reusable gateway, auth, proxy, device, Talk, session, and agent helper contracts.\n\nVerification: git diff --check plus targeted tests recorded in PR body.
18 lines
571 B
TypeScript
18 lines
571 B
TypeScript
import { resolveSafeTimeoutDelayMs } from "../../packages/gateway-client/src/timeouts.js";
|
|
|
|
export {
|
|
addSafeTimeoutDelayGraceMs,
|
|
MAX_SAFE_TIMEOUT_DELAY_MS,
|
|
resolveFiniteTimeoutDelayMs,
|
|
resolveSafeTimeoutDelayMs,
|
|
} from "../../packages/gateway-client/src/timeouts.js";
|
|
|
|
/** Wrapper around setTimeout that clamps unsafe or invalid delays before arming the timer. */
|
|
export function setSafeTimeout(
|
|
callback: () => void,
|
|
delayMs: number,
|
|
opts?: { minMs?: number },
|
|
): NodeJS.Timeout {
|
|
return setTimeout(callback, resolveSafeTimeoutDelayMs(delayMs, opts));
|
|
}
|