enclave-vm@2.7.0
·
34 commits
to main
since this release
enclave-vm v2.7.0
📦 npm: enclave-vm@2.7.0
Added
- Introduced a JSON-based tool bridge with configurable modes and payload limits, exposed via the new
toolBridgeoption onEnclaveConfig. - Added serialized size estimators (
estimateSerializedSize/checkSerializedSize) and enforce them before returning sandbox values when a memory limit is configured.
Changed
- Enclave construction now normalizes
toolBridgesettings and requires explicit acknowledgement before enabling insecure direct bridging.
Security
Array.prototype.fillis now memory-tracked inside both VM adapters to block sparse-array exhaustion attacks.- Return paths reject values whose serialized size would exceed the configured memory limit, preventing Vector 340 serialization amplification.
- All host-generated errors now go through centralized
createSafeError, severing prototype chains and stripping host stack details. - String-mode tool bridge validates JSON payloads, enforces payload caps, sanitizes arguments/results, and updates tool-call stats before invoking host handlers.