Expand description
Capability Allocator — WASM sandbox runner with CPU fuel metering.
Replaces coreason_runtime/execution_plane/capability_allocator.py.
Provides zero-trust WASM plugin loading with:
- SHA-256 attestation before execution (supply-chain attack prevention)
- CPU fuel metering (configurable instruction budget per invocation)
- Memory limits (10MB WASM page cap)
- Execution telemetry (fuel consumed, memory pages, wall-clock time)
Zero Waste: WASM execution is delegated to extism (MIT/Apache-2.0,
already in Cargo.toml). SHA-256 attestation uses the sha2 crate.
We only write the domain-specific attestation, fuel metering, and
Merkle bundle verification logic.
Structs§
- Execution
Telemetry - Telemetry from a WASM execution.
Functions§
- call_
with_ telemetry - Execute a WASM plugin via
extismwith telemetry collection. - compute_
merkle_ directory_ cid - Merkle-style SHA-256 CID computation for a directory of files.
- sync_
active_ inference_ priors - Sync manager for intermittent active inference prior reconciliation.
- verify_
bundle_ integrity - Zero-trust Merkle verification: recompute the CID and compare to the registry.
- verify_
wasm_ attestation - Verify a WASM binary’s SHA-256 hash before loading (constant-time comparison).
- wasm_
hash - Compute the SHA-256 hash of WASM bytes.