/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ /** * Single source of truth for default numeric limits used across the * `libs` packages (task-graph, job-queue, storage, ai, tasks). Every one * of these defaults remains overridable at its call site (constructor or * function option); this module only centralizes the fallback value so it * is not duplicated and drifted across packages. * * See {@link SECURITY_LIMITS} for hard ceilings that are NOT caller * overridable because they exist to defend against resource-exhaustion / * injection attacks (ReDoS, decompression bombs, SSRF). */ export declare const DEFAULT_LIMITS: { /** Max nesting depth for subgraph task-event re-emission before bridging becomes a no-op. */ readonly bridgeMaxDepth: 16; /** Default max attempts before a job is considered permanently failed. */ readonly jobMaxAttempts: 10; /** Default interval (ms) between JobQueueWorker poll iterations. */ readonly jobQueuePollIntervalMs: 100; /** Floor (ms) applied when deriving a worker's lease duration from its poll interval. */ readonly jobQueueLeaseFloorMs: 30000; /** Upper bound (ms) on how long JobQueueWorker will sleep before re-checking a rate limiter. */ readonly jobQueueLimiterMaxWakeMs: 30000; /** Size of the rolling window of recent job-processing-time samples JobQueueWorker retains. */ readonly jobQueueMaxProcessingTimeSamples: 1000; /** Max rows the in-memory/IndexedDB fingerprint-dedup fallback will scan before giving up. */ readonly jobQueueMaxFingerprintScan: 10000; /** Max characters kept when formatting a job error's `.cause` chain for diagnostics. */ readonly jobErrorMaxDiagnosticsChars: 48000; /** Max levels of `.cause` walked when formatting error diagnostics. */ readonly jobErrorMaxCauseChainDepth: 8; /** Max buffered cross-tab change-notification messages before older ones are dropped. */ readonly storageMaxPendingMessages: 1000; /** Max redirect hops followed by the loopback-only AI provider fetch helper. */ readonly aiLocalFetchMaxRedirects: 5; /** Max tool-calling turns for AiChatTask / AiChatWithKbTask. */ readonly aiChatMaxIterations: 100; /** Max validation-error retries for StructuredGenerationTask. */ readonly structuredGenMaxRetries: 2; /** Default absolute TTL (ms) for OtpPassphraseCache. */ readonly otpCacheHardTtlMs: number; }; /** * Hard ceilings that defend against resource-exhaustion or injection * attacks (ReDoS, decompression/pixel bombs, SSRF via redirects, cursor * tampering). Unlike {@link DEFAULT_LIMITS}, these are NOT exposed as * caller-overridable options — a caller weakening one of these would * reopen the vulnerability the constant defends against. */ export declare const SECURITY_LIMITS: { /** Max '[' characters allowed in a RegexTask pattern before rejecting (ReDoS guard). */ readonly regexMaxBracketCount: 100; /** Max decoded pixels (width * height) accepted by the image raster codec. */ readonly imageMaxDecodedPixels: 100000000; /** Max raw (base64-decoded) byte size of an incoming data URI on the Node image codec. */ readonly imageMaxInputBytesNode: number; /** Max raw byte size of an incoming data URI on the browser image codec. */ readonly imageMaxInputBytesBrowser: number; /** Max redirect hops followed by the SSRF-aware `safeFetch` wrapper. */ readonly safeFetchMaxRedirectHops: 20; /** Max accepted length (characters) of an encoded tabular storage pagination cursor. */ readonly tabularMaxCursorLength: number; }; //# sourceMappingURL=limits.d.ts.map