@agentcontextdistributionprotocol/acdp 0.8.5 → 0.14.1
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 +56 -2
- package/index.d.ts +29 -8
- package/index.js +54 -54
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -19,6 +19,10 @@ Prebuilt native binaries are published for macOS (x64/arm64) and Linux
|
|
|
19
19
|
|
|
20
20
|
## Install (development)
|
|
21
21
|
|
|
22
|
+
`package-lock.json` is committed, so `npm install` here resolves the pinned
|
|
23
|
+
dependency graph (including an exact `@napi-rs/cli` version) rather than
|
|
24
|
+
re-resolving fresh.
|
|
25
|
+
|
|
22
26
|
```bash
|
|
23
27
|
npm install # installs @napi-rs/cli
|
|
24
28
|
npm run build:debug # produces index.js + acdp.<platform>.node
|
|
@@ -57,11 +61,61 @@ AcdpVerifier.verifySignature(
|
|
|
57
61
|
);
|
|
58
62
|
```
|
|
59
63
|
|
|
64
|
+
### Verifying a retrieved body
|
|
65
|
+
|
|
66
|
+
`ctx_id` is registry-assigned and sits in the RFC-ACDP-0001 §5.7 exclusion
|
|
67
|
+
set, so it is stripped before `content_hash` is computed — neither the hash
|
|
68
|
+
recompute above nor the producer's signature covers it. Without an
|
|
69
|
+
explicit comparison, a registry could serve any other validly-signed body
|
|
70
|
+
from the same producer under the `ctx_id` URL you asked for, and every
|
|
71
|
+
check above would still pass. Call `verifyCtxIdBinding` to close that gap
|
|
72
|
+
(RFC-ACDP-0006 §4.1 step 7, NORMATIVE):
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
// Argument order matters: `bodyJson` carries the *served* ctx_id,
|
|
76
|
+
// `expectedCtxId` is the one you requested.
|
|
77
|
+
AcdpVerifier.verifyCtxIdBinding(JSON.stringify(body), requestedCtxId);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Like the rest of the `AcdpVerifier` bool surface, this returns `true` on
|
|
81
|
+
success and throws on failure — never `false` — so
|
|
82
|
+
`if (AcdpVerifier.verifyCtxIdBinding(...))` guards a branch that can't be
|
|
83
|
+
reached.
|
|
84
|
+
|
|
85
|
+
### Verifying a registry receipt
|
|
86
|
+
|
|
87
|
+
`verifyReceipt` (RFC-ACDP-0010 §8) takes the accompanying `bodyJson` as a
|
|
88
|
+
**required** second argument — it binds the receipt's `lineage_id`,
|
|
89
|
+
`origin_registry`, and `created_at` to the served body's own fields (§8
|
|
90
|
+
step 3):
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
AcdpVerifier.verifyReceipt(
|
|
94
|
+
receiptJson, // the `registry_receipt` object, as received
|
|
95
|
+
bodyJson, // the accompanying `body`, same retrieval
|
|
96
|
+
registryPublicKeyB64, // resolved via AcdpDid.webToUrl + fetch
|
|
97
|
+
expectedCtxId, // the ctx_id you actually requested
|
|
98
|
+
recomputedBodyHash, // YOUR OWN verifyContentHash result — never
|
|
99
|
+
// the body's echoed content_hash field
|
|
100
|
+
producerKeyFingerprint, // fingerprint of the resolved producer key
|
|
101
|
+
);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Throws on a malformed `bodyJson` (host input) or a body/receipt mismatch
|
|
105
|
+
(verification failure) alike — never `false`. Two checks still stay the
|
|
106
|
+
HOST's obligation, because neither needs the body: the serving-authority
|
|
107
|
+
binding (`receipt.registry_did` must equal the authority you actually
|
|
108
|
+
fetched from) and recomputing (never trusting) the body hash you pass in.
|
|
109
|
+
|
|
60
110
|
## Verification surface
|
|
61
111
|
|
|
62
112
|
`AcdpVerifier` covers the full 0.2.0 surface in addition to the basics
|
|
63
|
-
above:
|
|
64
|
-
|
|
113
|
+
above: identity binding (`verifyCtxIdBinding`, see
|
|
114
|
+
[Verifying a retrieved body](#verifying-a-retrieved-body) above),
|
|
115
|
+
offline `did:key` verification (`verifyBodyOffline`,
|
|
116
|
+
`verifyPublishRequestOffline`), registry receipts
|
|
117
|
+
(`verifyReceipt(receiptJson, bodyJson, registryPublicKeyB64, expectedCtxId, recomputedBodyHash, producerKeyFingerprint)`,
|
|
118
|
+
see [Verifying a registry receipt](#verifying-a-registry-receipt) above;
|
|
65
119
|
`verifyLineageHeadReceipt`), the transparency log (`verifyLogCheckpoint`,
|
|
66
120
|
`verifyLogInclusion`, `verifyLogConsistency`), lifecycle events
|
|
67
121
|
(`verifyLifecycleEvent`), key revocation (`parseKeyRevocation`,
|
package/index.d.ts
CHANGED
|
@@ -377,6 +377,25 @@ export declare class AcdpVerifier {
|
|
|
377
377
|
* Returns `true` on success; throws on mismatch or bad JSON.
|
|
378
378
|
*/
|
|
379
379
|
static verifyContentHash(bodyJson: string, expectedHash: string): boolean
|
|
380
|
+
/**
|
|
381
|
+
* Verify that a body's *served* `ctx_id` matches the `ctx_id` the
|
|
382
|
+
* caller *expected* (RFC-ACDP-0006 §4.1 step 7, NORMATIVE) — the
|
|
383
|
+
* context-identity binding check for the receipt-less retrieval
|
|
384
|
+
* path, since `ctx_id` is registry-assigned and outside
|
|
385
|
+
* `content_hash`/signature coverage.
|
|
386
|
+
*
|
|
387
|
+
* Argument order is `(bodyJson, expectedCtxId)`: the body's own
|
|
388
|
+
* `ctx_id` is the *served* identity, `expectedCtxId` is what the
|
|
389
|
+
* caller requested — the same `(served, expected)` order as
|
|
390
|
+
* `verify_ctx_id_binding` and `RegistryReceipt::cross_check`.
|
|
391
|
+
*
|
|
392
|
+
* * `bodyJson` — the `body` object from a `FullContext` retrieval.
|
|
393
|
+
* * `expectedCtxId` — the `ctx_id` the caller requested.
|
|
394
|
+
*
|
|
395
|
+
* Returns `true` on success; throws on malformed JSON, a malformed
|
|
396
|
+
* `ctx_id` on either side, or a mismatch.
|
|
397
|
+
*/
|
|
398
|
+
static verifyCtxIdBinding(bodyJson: string, expectedCtxId: string): boolean
|
|
380
399
|
/**
|
|
381
400
|
* Verify an Ed25519 signature over a `content_hash` string.
|
|
382
401
|
*
|
|
@@ -487,21 +506,23 @@ export declare class AcdpVerifier {
|
|
|
487
506
|
* with `AcdpDidDocument.keyForAlgorithm`).
|
|
488
507
|
*
|
|
489
508
|
* **Two checks remain the HOST's obligation** — this binding makes
|
|
490
|
-
* no HTTP calls
|
|
509
|
+
* no HTTP calls, so it cannot perform them:
|
|
491
510
|
*
|
|
492
511
|
* 1. **Serving-authority binding** — `receipt.registry_did` MUST
|
|
493
512
|
* equal `"did:web:" + <authority>` where `<authority>` is the
|
|
494
513
|
* authority the response was *actually fetched from*, not
|
|
495
514
|
* whatever the receipt claims.
|
|
496
|
-
* 2. **
|
|
497
|
-
* `
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
* body's echoed `content_hash` field.
|
|
515
|
+
* 2. **Recompute, don't trust, the body hash** —
|
|
516
|
+
* `recomputedBodyHash` MUST be the body hash you independently
|
|
517
|
+
* RECOMPUTED (run `AcdpVerifier.verifyContentHash` on the body
|
|
518
|
+
* first and pass that verified hash) — never the body's echoed
|
|
519
|
+
* `content_hash` field taken on faith.
|
|
502
520
|
*
|
|
503
521
|
* * `receiptJson` — the `registry_receipt` object from a
|
|
504
522
|
* `FullContext` retrieval.
|
|
523
|
+
* * `bodyJson` — the accompanying `body` object from the same
|
|
524
|
+
* `FullContext` retrieval, used for the §8 step 3 body bindings
|
|
525
|
+
* (`lineage_id` / `origin_registry` / `created_at`).
|
|
505
526
|
* * `registryPublicKeyB64` — standard base64 of the registry's
|
|
506
527
|
* 32-byte raw Ed25519 receipt key.
|
|
507
528
|
* * `expectedCtxId` — the ctx_id the caller actually requested.
|
|
@@ -513,7 +534,7 @@ export declare class AcdpVerifier {
|
|
|
513
534
|
* Returns `true` on success; throws with the failing check's
|
|
514
535
|
* message otherwise.
|
|
515
536
|
*/
|
|
516
|
-
static verifyReceipt(receiptJson: string, registryPublicKeyB64: string, expectedCtxId: string, recomputedBodyHash: string, producerKeyFingerprint: string): boolean
|
|
537
|
+
static verifyReceipt(receiptJson: string, bodyJson: string, registryPublicKeyB64: string, expectedCtxId: string, recomputedBodyHash: string, producerKeyFingerprint: string): boolean
|
|
517
538
|
/**
|
|
518
539
|
* Verify a lineage-head receipt offline per RFC-ACDP-0011 §7:
|
|
519
540
|
* closed parse, registry/lineage/head bindings, `as_of` clock
|
package/index.js
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@agentcontextdistributionprotocol/acdp-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
80
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@agentcontextdistributionprotocol/acdp-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
96
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@agentcontextdistributionprotocol/acdp-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
117
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@agentcontextdistributionprotocol/acdp-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
133
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@agentcontextdistributionprotocol/acdp-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
150
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@agentcontextdistributionprotocol/acdp-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
166
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@agentcontextdistributionprotocol/acdp-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
185
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@agentcontextdistributionprotocol/acdp-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
201
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@agentcontextdistributionprotocol/acdp-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
217
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@agentcontextdistributionprotocol/acdp-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
237
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@agentcontextdistributionprotocol/acdp-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
253
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
274
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
290
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
308
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
324
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
342
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
358
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
376
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
392
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
410
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
426
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
443
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@agentcontextdistributionprotocol/acdp-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
459
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@agentcontextdistributionprotocol/acdp-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
479
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@agentcontextdistributionprotocol/acdp-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
495
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@agentcontextdistributionprotocol/acdp-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
511
|
+
if (bindingPackageVersion !== '0.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -648,8 +648,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
648
648
|
if (!candidateFailed) {
|
|
649
649
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
650
650
|
const bindingPackageVersion = require('@agentcontextdistributionprotocol/acdp-wasm32-wasi/package.json').version
|
|
651
|
-
if (bindingPackageVersion !== '0.
|
|
652
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
651
|
+
if (bindingPackageVersion !== '0.10.0') {
|
|
652
|
+
throw new Error(`WASI binding package version mismatch, expected 0.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
wasiBinding = require('@agentcontextdistributionprotocol/acdp-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentcontextdistributionprotocol/acdp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "Agent Context Distribution Protocol — Node.js SDK",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test": "node --test tests/*.mjs"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@napi-rs/cli": "
|
|
40
|
+
"@napi-rs/cli": "3.8.6"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=20"
|
|
@@ -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.14.1",
|
|
51
|
+
"@agentcontextdistributionprotocol/acdp-darwin-arm64": "0.14.1",
|
|
52
|
+
"@agentcontextdistributionprotocol/acdp-linux-x64-gnu": "0.14.1",
|
|
53
|
+
"@agentcontextdistributionprotocol/acdp-linux-arm64-gnu": "0.14.1"
|
|
54
54
|
}
|
|
55
55
|
}
|