@agentcontextdistributionprotocol/acdp 0.14.5 → 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 +19 -30
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Thin NAPI-rs binding over the [`acdp`](https://crates.io/crates/acdp)
|
|
4
4
|
Rust library. Implements the producer- and consumer-side crypto for the
|
|
5
|
-
Agent Context Distribution Protocol —
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Agent Context Distribution Protocol — the 0.1.0–0.4.0 Final lines plus
|
|
6
|
+
RFC-ACDP-0016 external anchors; see the spec's
|
|
7
|
+
[version matrix](https://github.com/agentcontextdistributionprotocol/agentcontextdistributionprotocol/blob/main/docs/version-matrix.md) for exactly
|
|
8
|
+
which protocol lines each release implements. HTTP is intentionally left to
|
|
9
|
+
the caller — pair this with `fetch` / `undici` for transport.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
The package is released at the same version as the
|
|
12
|
+
[`acdp`](https://crates.io/crates/acdp) crate.
|
|
10
13
|
|
|
11
14
|
## Install
|
|
12
15
|
|
|
@@ -19,12 +22,12 @@ Prebuilt native binaries are published for macOS (x64/arm64) and Linux
|
|
|
19
22
|
|
|
20
23
|
## Install (development)
|
|
21
24
|
|
|
22
|
-
`package-lock.json` is committed
|
|
23
|
-
|
|
24
|
-
re-resolving
|
|
25
|
+
`package-lock.json` is committed; use `npm ci` (as CI does) to install exactly
|
|
26
|
+
that pinned graph, including the exact `@napi-rs/cli` version — it fails
|
|
27
|
+
instead of silently re-resolving if `package.json` and the lockfile disagree.
|
|
25
28
|
|
|
26
29
|
```bash
|
|
27
|
-
npm
|
|
30
|
+
npm ci # installs @napi-rs/cli from the lockfile
|
|
28
31
|
npm run build:debug # produces index.js + acdp.<platform>.node
|
|
29
32
|
node --test tests/*.mjs # in-process unit tests, no HTTP
|
|
30
33
|
```
|
|
@@ -51,7 +54,8 @@ const raw = producer.buildPublishRequest({
|
|
|
51
54
|
summary: 'Quarter-end inventory',
|
|
52
55
|
});
|
|
53
56
|
|
|
54
|
-
// POST `raw` (the JSON string) to your registry
|
|
57
|
+
// POST `raw` (the JSON string) to your registry's /contexts endpoint.
|
|
58
|
+
// On retrieve:
|
|
55
59
|
const body = (await response.json()).body;
|
|
56
60
|
AcdpVerifier.verifyContentHash(JSON.stringify(body), body.content_hash);
|
|
57
61
|
AcdpVerifier.verifySignature(
|
|
@@ -109,7 +113,7 @@ fetched from) and recomputing (never trusting) the body hash you pass in.
|
|
|
109
113
|
|
|
110
114
|
## Verification surface
|
|
111
115
|
|
|
112
|
-
`AcdpVerifier` covers the full
|
|
116
|
+
`AcdpVerifier` covers the full verification surface in addition to the basics
|
|
113
117
|
above: identity binding (`verifyCtxIdBinding`, see
|
|
114
118
|
[Verifying a retrieved body](#verifying-a-retrieved-body) above),
|
|
115
119
|
offline `did:key` verification (`verifyBodyOffline`,
|
|
@@ -129,8 +133,7 @@ are also exported.
|
|
|
129
133
|
|
|
130
134
|
* **JSON across the FFI boundary.** Every method accepts and returns
|
|
131
135
|
JSON strings — never a Rust type, never a JS class instance you'd
|
|
132
|
-
have to serialize before sending.
|
|
133
|
-
glue.
|
|
136
|
+
have to serialize before sending.
|
|
134
137
|
* **Crypto in Rust, HTTP in JS.** Key generation, JCS + SHA-256 hashing,
|
|
135
138
|
Ed25519 signing, and signature verification happen in the underlying
|
|
136
139
|
`acdp` crate. Transport, retries, and observability are yours.
|
|
@@ -142,22 +145,8 @@ are also exported.
|
|
|
142
145
|
against the spec's `sig-001` fixture — the same constants the Rust
|
|
143
146
|
suite asserts. A drift on either side is a protocol break.
|
|
144
147
|
|
|
145
|
-
##
|
|
148
|
+
## Public surface
|
|
146
149
|
|
|
147
|
-
|
|
148
|
-
bindings/acdp-
|
|
149
|
-
|
|
150
|
-
├── build.rs # napi-build setup
|
|
151
|
-
├── package.json
|
|
152
|
-
├── README.md # this file
|
|
153
|
-
├── index.js # generated by `napi build`
|
|
154
|
-
├── index.d.ts # generated by `napi build`
|
|
155
|
-
├── acdp.<platform>.node # native binary
|
|
156
|
-
├── src/
|
|
157
|
-
│ ├── lib.rs # module entry — re-exports the napi classes
|
|
158
|
-
│ ├── producer.rs # AcdpProducer: build/sign publish requests
|
|
159
|
-
│ ├── verifier.rs # AcdpVerifier: content_hash + signature verify
|
|
160
|
-
│ └── helpers.rs # visibility / contextType parsers
|
|
161
|
-
└── tests/
|
|
162
|
-
└── test.mjs
|
|
163
|
-
```
|
|
150
|
+
The canonical list of exported classes and methods (and their arity) is
|
|
151
|
+
[`bindings/interop/expected_surface.json`](https://github.com/agentcontextdistributionprotocol/acdp-rs/blob/main/bindings/interop/expected_surface.json),
|
|
152
|
+
enforced against this package by the interop parity tests.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentcontextdistributionprotocol/acdp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Agent Context Distribution Protocol — Node.js SDK",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@agentcontextdistributionprotocol/acdp-darwin-x64": "0.
|
|
51
|
-
"@agentcontextdistributionprotocol/acdp-darwin-arm64": "0.
|
|
52
|
-
"@agentcontextdistributionprotocol/acdp-linux-x64-gnu": "0.
|
|
53
|
-
"@agentcontextdistributionprotocol/acdp-linux-arm64-gnu": "0.
|
|
50
|
+
"@agentcontextdistributionprotocol/acdp-darwin-x64": "0.15.0",
|
|
51
|
+
"@agentcontextdistributionprotocol/acdp-darwin-arm64": "0.15.0",
|
|
52
|
+
"@agentcontextdistributionprotocol/acdp-linux-x64-gnu": "0.15.0",
|
|
53
|
+
"@agentcontextdistributionprotocol/acdp-linux-arm64-gnu": "0.15.0"
|
|
54
54
|
}
|
|
55
55
|
}
|