@cef-ai/cli 0.5.1 → 1.0.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/dist/lib/jcs.d.ts +10 -2
- package/dist/lib/jcs.d.ts.map +1 -1
- package/dist/lib/jcs.js +6 -43
- package/dist/lib/jcs.js.map +1 -1
- package/package.json +3 -3
package/dist/lib/jcs.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* RFC 8785 JSON Canonicalization Scheme (JCS).
|
|
3
|
+
*
|
|
4
|
+
* Re-exported from `@cef-ai/transport`, which wraps the same `canonicalize` npm
|
|
5
|
+
* package the marketplace API uses and is byte-compatible with the wallet-api
|
|
6
|
+
* Go `canonjson` oracle. Keeping one canonicalizer across the suite is what
|
|
7
|
+
* keeps `cef publish` signatures verifiable server-side; this module stays so
|
|
8
|
+
* existing `cef publish` call sites import `lib/jcs.js` unchanged.
|
|
9
|
+
*/
|
|
10
|
+
export { canonicalize, canonicalizeBytes } from "@cef-ai/transport";
|
|
3
11
|
//# sourceMappingURL=jcs.d.ts.map
|
package/dist/lib/jcs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jcs.d.ts","sourceRoot":"","sources":["../../src/lib/jcs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jcs.d.ts","sourceRoot":"","sources":["../../src/lib/jcs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/lib/jcs.js
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RFC 8785 JSON Canonicalization Scheme (JCS).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* marketplace API uses
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `lib/jcs.
|
|
9
|
-
*
|
|
10
|
-
* RFC 8785 leaves the encoding of non-finite numbers / BigInt undefined; we
|
|
11
|
-
* reject them up front rather than rely on the package's silent coercion,
|
|
12
|
-
* matching the marketplace's behaviour.
|
|
4
|
+
* Re-exported from `@cef-ai/transport`, which wraps the same `canonicalize` npm
|
|
5
|
+
* package the marketplace API uses and is byte-compatible with the wallet-api
|
|
6
|
+
* Go `canonjson` oracle. Keeping one canonicalizer across the suite is what
|
|
7
|
+
* keeps `cef publish` signatures verifiable server-side; this module stays so
|
|
8
|
+
* existing `cef publish` call sites import `lib/jcs.js` unchanged.
|
|
13
9
|
*/
|
|
14
|
-
|
|
15
|
-
export function canonicalize(value) {
|
|
16
|
-
assertJcsCompatible(value);
|
|
17
|
-
const out = canonicalizePkg(value);
|
|
18
|
-
if (out === undefined) {
|
|
19
|
-
throw new TypeError("JCS: canonicalize() returned undefined");
|
|
20
|
-
}
|
|
21
|
-
return out;
|
|
22
|
-
}
|
|
23
|
-
export function canonicalizeBytes(value) {
|
|
24
|
-
return new TextEncoder().encode(canonicalize(value));
|
|
25
|
-
}
|
|
26
|
-
function assertJcsCompatible(value) {
|
|
27
|
-
if (typeof value === "number") {
|
|
28
|
-
if (!Number.isFinite(value)) {
|
|
29
|
-
throw new TypeError(`JCS: non-finite number ${String(value)}`);
|
|
30
|
-
}
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (typeof value === "bigint") {
|
|
34
|
-
throw new TypeError("JCS: bigint not supported by RFC 8785");
|
|
35
|
-
}
|
|
36
|
-
if (Array.isArray(value)) {
|
|
37
|
-
for (const item of value)
|
|
38
|
-
assertJcsCompatible(item);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (value !== null && typeof value === "object") {
|
|
42
|
-
for (const v of Object.values(value)) {
|
|
43
|
-
if (v !== undefined)
|
|
44
|
-
assertJcsCompatible(v);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
10
|
+
export { canonicalize, canonicalizeBytes } from "@cef-ai/transport";
|
|
48
11
|
//# sourceMappingURL=jcs.js.map
|
package/dist/lib/jcs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jcs.js","sourceRoot":"","sources":["../../src/lib/jcs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"jcs.js","sourceRoot":"","sources":["../../src/lib/jcs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cef-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@noble/ed25519": "^2.1.0",
|
|
18
18
|
"@noble/hashes": "^2.2.0",
|
|
19
|
-
"canonicalize": "^3.0.0",
|
|
20
19
|
"commander": "^12.0.0",
|
|
21
20
|
"esbuild": "^0.21.0",
|
|
22
21
|
"json-schema-to-typescript": "^14.0.0",
|
|
23
22
|
"typescript": "^5.4.0",
|
|
24
|
-
"@cef-ai/agent-sdk": "
|
|
23
|
+
"@cef-ai/agent-sdk": "1.0.0",
|
|
24
|
+
"@cef-ai/transport": "1.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^20.11.0",
|