Interface: RuntimeLimits

Properties

PropertyModifierTypeDescription
cpuTimeSliceMsreadonlynumberCPU time-slice hint in milliseconds. Currently a no-op — JS workers cannot be preempted externally, so this limit is accepted but not enforced. A future implementation may use cooperative yielding or heartbeat-based heuristics. Documented here so consumers can supply the value without breakage.
maxOpenFilesreadonlynumberMax concurrent in-flight VFS operations. The InMemoryVfs has no fd table, so this gates parallelism rather than file-descriptor exhaustion.
maxOpenPortsreadonlynumber-
maxProcessesreadonlynumber-
memoryLimitMBreadonlynumberSoft memory ceiling in megabytes. Polled every 5 s via performance.memory?.usedJSHeapSize (Chromium-only). Emits a limit-hit diagnostic at warn level when exceeded but does NOT throw — JS workers cannot be preempted from the outside.
networkRequestLimitPerMinutereadonlynumberMaximum number of outbound network requests allowed per rolling 60-second window, enforced at two boundaries: 1. Registry client — npm/pnpm/yarn install fetches routed through ProxyBundleRegistryClient are gated in the coordinator via a sliding-window RequestLimiter. Exceeded requests throw a NetworkLimitError ({ code: 'VERKLET_NETWORK_LIMIT' }). 2. User-code HTTP relayfetch() calls and http/https requests issued by user code inside a spawned Node process are gated through the same limit. On the direct (non-Worker) execution path the coordinator injects a rate-limiting onFetch hook; on the Worker-backed browser path the numeric limit is forwarded to the worker, which constructs a local RequestLimiter and wraps globalThis.fetch before running user code. Exceeded requests reject with NetworkLimitError.
packageInstallTimeoutMsreadonlynumberMaximum wall-clock time in milliseconds to wait for a package install hydration step to complete. Enforced via AbortController; an exceeded timeout throws RuntimeLimitError('packageInstallTimeoutMs', …) and emits a package-install/aborted diagnostic.
storageLimitMBreadonlynumberMaximum OPFS storage used across all persisted snapshots, in megabytes. Checked before each persist() write via navigator.storage.estimate(). Throws RuntimeLimitError when the projected usage would exceed this value.