enclave-vm@2.2.0
·
49 commits
to main
since this release
enclave-vm v2.2.0
📦 npm: enclave-vm@2.2.0
Added
- Integrated the new
MemoryTrackeracross the VM and double-VM adapters so executions that opt intomemoryLimitreportstats.memoryUsageand raiseMemoryLimitErrorresponses withMEMORY_LIMIT_EXCEEDEDmetadata. - Re-exported
MemoryTracker,MemoryLimitError, and estimation helpers for host code, and injected memory-aware String/Array proxies plus__safe_*console/Error globals into the sandbox for AST transformer compatibility.
Changed
- STRICT/SECURE/STANDARD security levels now throw a
SecurityErrorwhenever blocked properties such asconstructoror__proto__are accessed; overridesecureProxyConfig.throwOnBlockedto restore silentundefinedreturns. - Worker pool slots only set
--max-old-space-sizewhen a memory budget is configured and resolve the compiled worker script path when running from TS sources, keeping the adapter compatible with Node 24 and ts-jest. - Safe runtime concatenation and template literal helpers now distinguish numeric addition from string composites, track allocations, and route reference IDs through the resolver for accurate memory accounting.
Fixed
- Worker scripts automatically invoke the transformed
__ag_main()entrypoint and expose bothconsoleand__safe_console, ensuring AgentScript-transformed bundles run under the worker adapter.