@agentcontextdistributionprotocol/acdp-wasm 0.14.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # acdp-wasm — ACDP WebAssembly verification core
2
2
 
3
- The **browser / edge / WASI** member of the ACDP binding family
3
+ The **browser / edge** member of the ACDP binding family
4
4
  (`bindings/acdp-py`, `bindings/acdp-node`). A pure, **offline**
5
5
  cryptographic verifier: it lets a consumer render an ACDP context and
6
6
  independently reach a real verification **verdict** — the producer
@@ -15,7 +15,12 @@ verdicts consume.
15
15
  It is a standalone Cargo package (its own `[workspace]`) that depends on
16
16
  the umbrella `acdp` crate with `default-features = false`, so
17
17
  `reqwest` / `tokio` / `rustls` never enter the `.wasm` binary. See
18
- `docs/research/wasm-target.md` for the design rationale.
18
+ `docs/research/wasm-target.md` for the (historical) design rationale. The
19
+ package is released at the same version as the `acdp` crate; which protocol
20
+ lines each release implements is recorded in the spec's
21
+ [version matrix](https://github.com/agentcontextdistributionprotocol/agentcontextdistributionprotocol/blob/main/docs/version-matrix.md).
22
+ Only `wasm32-unknown-unknown` (browser / bundler / Node via wasm-pack) is
23
+ built and tested; WASI targets are untested.
19
24
 
20
25
  ## Design (same rules as the Python / Node bindings)
21
26
 
@@ -170,27 +175,31 @@ wasm-pack test --node
170
175
  need **no `getrandom` backend** on any wasm target. That holds at
171
176
  *runtime* — no exported verification (nor the deterministic Ed25519
172
177
  witness mint) draws randomness. It does **not** hold at *compile time*
173
- for `wasm32-unknown-unknown`: the core crates pull two randomness sources
174
- **unconditionally**, and each emits a hard `compile_error!` on that
175
- target unless a backend is wired:
176
-
177
- 1. **`getrandom 0.2`** via `rand_core 0.6` / `OsRng` (a non-optional
178
- dependency of `acdp-crypto`) → enabled with the getrandom **`js`
179
- feature**.
180
- 2. **`getrandom 0.4`** via **`uuid` v4** (a non-optional dependency of
181
- `acdp-primitives`) → enabled with the getrandom **`wasm_js` feature**
182
- *plus* `--cfg getrandom_backend="wasm_js"` (set in
183
- `.cargo/config.toml`). `uuid` additionally needs its own **`js`
184
- feature** for its v4 RNG shim.
185
-
186
- All three are wired here, **target-gated to `wasm32` only** (see
178
+ for `wasm32-unknown-unknown`: the core crates pull **`getrandom 0.4`**
179
+ **unconditionally**, from two places, and it emits a hard
180
+ `compile_error!` on that target unless a backend is wired:
181
+
182
+ - `acdp-crypto` key generation (`getrandom::SysRng`, used with
183
+ `rand_core` 0.10, which has no `OsRng`); and
184
+ - **`uuid` v4** (a non-optional dependency of `acdp-primitives`).
185
+
186
+ The backend is the getrandom **`wasm_js` feature** (on the
187
+ `getrandom_wasm` alias in `Cargo.toml`), plus
188
+ `--cfg getrandom_backend="wasm_js"` in `.cargo/config.toml`, which is
189
+ inert at 0.4.3 and kept for forward compatibility. `uuid` additionally
190
+ needs its own **`js` feature** for its v4 RNG shim. (An older direct
191
+ `getrandom 0.2` dependency with the `js` feature, for the former
192
+ `rand_core 0.6` / `OsRng` path, has been removed; nothing in this
193
+ binding's graph uses 0.2 any more.)
194
+
195
+ Both are wired here, **target-gated to `wasm32` only** (see
187
196
  `Cargo.toml` and `.cargo/config.toml`), so a native `cargo test` is
188
- untouched. `crypto.getRandomValues` (the `js` backend) is the CSPRNG
197
+ untouched. `crypto.getRandomValues` (the `wasm_js` backend) is the CSPRNG
189
198
  RFC-ACDP-0001 §5.10 names for the browser, so the choice is spec-blessed
190
199
  — but it is never invoked on the verify path; it is present only to link.
191
200
 
192
201
  A future `producer` feature (reserved, not yet wired) would expose fresh
193
- key generation (`SigningKey::generate`, the only `OsRng` caller) and is
202
+ key generation (`SigningKey::generate`, the only `SysRng` caller) and is
194
203
  where a runtime randomness draw would actually occur.
195
204
 
196
205
  ## Security notes
package/acdp_wasm_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@agentcontextdistributionprotocol/acdp-wasm",
3
3
  "type": "module",
4
4
  "description": "Agent Context Distribution Protocol — WebAssembly verification core",
5
- "version": "0.14.4",
5
+ "version": "0.15.0",
6
6
  "license": "MIT OR Apache-2.0",
7
7
  "files": [
8
8
  "acdp_wasm_bg.wasm",