@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 +27 -18
- package/acdp_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# acdp-wasm — ACDP WebAssembly verification core
|
|
2
2
|
|
|
3
|
-
The **browser / edge
|
|
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
|
|
174
|
-
**unconditionally**, and
|
|
175
|
-
target unless a backend is wired:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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 `
|
|
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 `
|
|
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.
|
|
5
|
+
"version": "0.15.0",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"acdp_wasm_bg.wasm",
|