api / interfaces / RuntimeLimits
Interface: RuntimeLimits
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
cpuTimeSliceMs | readonly | number | CPU 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. |
maxOpenFiles | readonly | number | Max concurrent in-flight VFS operations. The InMemoryVfs has no fd table, so this gates parallelism rather than file-descriptor exhaustion. |
maxOpenPorts | readonly | number | - |
maxProcesses | readonly | number | - |
memoryLimitMB | readonly | number | Soft 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. |
networkRequestLimitPerMinute | readonly | number | Maximum 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 relay — fetch() 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. |
packageInstallTimeoutMs | readonly | number | Maximum 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. |
storageLimitMB | readonly | number | Maximum 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. |