mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-23 05:51:15 +00:00
* refactor(deadcode): trim auto-reply and CLI exports * refactor(deadcode): trim cron and task exports * refactor(deadcode): trim fleet and process exports * test(deadcode): exercise live task and process seams * test(fleet): cover stream redaction through owner module * refactor(security): trim dead internal exports * refactor(secrets): trim dead internal exports * refactor(deadcode): trim remaining src exports * refactor(deadcode): remove test-only runtime exports * refactor(deadcode): trim pairing test exports * refactor(deadcode): reconcile refreshed baseline * test(auto-reply): deduplicate queue state imports
18 lines
608 B
TypeScript
18 lines
608 B
TypeScript
// Timer delay helpers clamp delays to runtime-safe timeout values.
|
|
import { resolveSafeTimeoutDelayMs } from "../../packages/gateway-client/src/timeouts.js";
|
|
|
|
export {
|
|
addSafeTimeoutDelayGraceMs,
|
|
MAX_SAFE_TIMEOUT_DELAY_MS,
|
|
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));
|
|
}
|