@charter-agreement-protocol/verifier 0.7.0 → 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/CHANGELOG.md +15 -0
- package/README.md +67 -13
- package/SECURITY.md +3 -2
- package/package.json +11 -7
- package/reference.json +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
All notable public changes to `@charter-agreement-protocol/verifier` are
|
|
4
4
|
documented here.
|
|
5
5
|
|
|
6
|
+
## [1.0.0] — 2026-11-09
|
|
7
|
+
|
|
8
|
+
- Lets the quickstart flush its complete canonical report before process exit.
|
|
9
|
+
- Updates the browser workshop to pass the current direct chain context to
|
|
10
|
+
the signer, fixing its stale wrapped acceptance context.
|
|
11
|
+
- Stabilizes the public API under Semantic Versioning; wire revisions 1–3 and
|
|
12
|
+
the certified corpus stay unchanged.
|
|
13
|
+
- Pins and checks the published Elixir 1.0 conformance reference. The release
|
|
14
|
+
gate verifies packed contents, reproducible bytes, installed README examples
|
|
15
|
+
and generated declarations.
|
|
16
|
+
- Refreshes documentation, security support, Node requirements and workshop
|
|
17
|
+
version labels. Updates development tools and adds the Node 24.8 CI floor.
|
|
18
|
+
- Stages verified archives with provenance through the existing npm trusted
|
|
19
|
+
publisher. Owner approval with 2FA is required to make them public.
|
|
20
|
+
|
|
6
21
|
## [0.7.0] — 2026-10-14
|
|
7
22
|
|
|
8
23
|
### Added
|
package/README.md
CHANGED
|
@@ -15,9 +15,14 @@ satisfaction, and more. Hosts read the evidence and decide.
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
17
17
|
```console
|
|
18
|
-
npm install @charter-agreement-protocol/verifier
|
|
18
|
+
npm install @charter-agreement-protocol/verifier@^1.0.0
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
Release submissions use npm's staged publishing workflow. A staged version
|
|
23
|
+
becomes publicly installable only after owner approval. During release review,
|
|
24
|
+
maintainers can use `npm stage download <stage-id>` and install that tarball.
|
|
25
|
+
|
|
21
26
|
Requires Node >= 24.8 (ML-DSA landed in the Node builtins across the
|
|
22
27
|
24.6–24.8 minors). Zero runtime dependencies — Node builtins only.
|
|
23
28
|
|
|
@@ -35,14 +40,14 @@ const require = createRequire(import.meta.url);
|
|
|
35
40
|
const corpusRoot = join(dirname(require.resolve("@charter-agreement-protocol/verifier/package.json")), "conformance");
|
|
36
41
|
const report = reportFor(corpusRoot);
|
|
37
42
|
console.log(report.bytes); // canonical JSON report
|
|
38
|
-
process.
|
|
43
|
+
process.exitCode = report.exitStatus; // 0 = all certified cases recomputed and agreed
|
|
39
44
|
```
|
|
40
45
|
|
|
41
46
|
Or from the shell:
|
|
42
47
|
|
|
43
48
|
```console
|
|
44
|
-
npx @charter-agreement-protocol/verifier # the vendored certified corpus
|
|
45
|
-
npx @charter-agreement-protocol/verifier --corpus DIR # any corpus directory
|
|
49
|
+
npx @charter-agreement-protocol/verifier@^1.0.0 # the vendored certified corpus
|
|
50
|
+
npx @charter-agreement-protocol/verifier@^1.0.0 --corpus DIR # any corpus directory
|
|
46
51
|
```
|
|
47
52
|
|
|
48
53
|
Exit `0` means every case recomputed and agreed with the certified
|
|
@@ -62,8 +67,10 @@ cannot verify green.
|
|
|
62
67
|
| `jsonProjection(value)` | The tagged projection used by reports; object members retain text order |
|
|
63
68
|
| `Limits`, `DEFAULT_LIMITS`, `MAXIMUM_LIMITS` | Closed limits type, reference defaults and compiled maximum values; overrides must be nonnegative integers within the maximums |
|
|
64
69
|
| `ChainInput` | A chain view with `revisions`, `acceptances`, `descriptors`, and `terminations` string arrays |
|
|
65
|
-
| `VerificationOptions` | Optional `{ limits?: Partial<Limits>, profile?: { algorithms
|
|
70
|
+
| `VerificationOptions` | Optional `{ limits?: Partial<Limits>, profile?: { algorithms?: string[]; revisions?: { min: number; max: number } } }` for public verification |
|
|
66
71
|
| `SigningOptions` | Verification options plus an optional `algorithm` for `prepareSigning` |
|
|
72
|
+
| `algorithmRegistry()` / `emissions()` / `defaultEmissionName()` | Signature registry rows, producer algorithm/revision pairs and the default emission name |
|
|
73
|
+
| `Profile` / `DescriptorPredecessor` | Optional capability axes and retained descriptor identity/lineage types |
|
|
67
74
|
| `capabilities()` / `algorithmRegistryDigest()` | Runtime known-answer results per signature registry row, and the signature registry digest |
|
|
68
75
|
| `CERTIFIED_INDEX_SHA256_BASE64URL`, `CERTIFIED_REGISTRY_DIGEST` | The certified identity pins this build carries |
|
|
69
76
|
| `verifyDescriptor(compact, predecessor?, options?)` / `verifyDescriptorChain(compacts, options?)` | Artifact-level verification: one party descriptor (with optional predecessor facts), or a full descriptor chain |
|
|
@@ -82,6 +89,12 @@ cannot verify green.
|
|
|
82
89
|
| `decodePartyDescriptor(compact)` / `descriptorDigest(compact)` | Decode one Party Descriptor's claims and digest without verifying its signature |
|
|
83
90
|
| `acceptanceRefusal(claims, chainInput)` / `terminationRefusal(claims, chainInput)` | The honest-signer refusal checks (R1–R3: claims-truth, no-equivocation, ancestry/governing coverage) over the caller's own view return `{ok: true}`, `signing_refused`, `signing_input_invalid`, or the set verification error. Holder-side signers run these before any key is used; the rule that fired is deliberately not surfaced |
|
|
84
91
|
|
|
92
|
+
Additional exported structural types are `CanonicalValue`, `Projection`,
|
|
93
|
+
`DecodeResult`, `CaseResult`, `CorpusFile`, `CorpusIndex`, `ConformanceCase`,
|
|
94
|
+
`LoadedCorpus`, `CaseOutcome`, `ConformanceReport`, `ReportOutput`,
|
|
95
|
+
`SigningInput`, `ProducerResult`, `AlgRow`, `VerifyResult`, and `RefusalResult`.
|
|
96
|
+
The installed declarations contain their complete shapes.
|
|
97
|
+
|
|
85
98
|
`prepareSigning` accepts a predecessor or `null` for a descriptor, a chain view
|
|
86
99
|
(`revisions`, `acceptances`, `descriptors`, `terminations` arrays) for acceptance
|
|
87
100
|
and termination, and a chain view or bare revision text for a receipt. Pass a
|
|
@@ -162,7 +175,7 @@ substrate cannot verify, keeping that local result outside verdict reports.
|
|
|
162
175
|
canonical reports must be byte-identical over the certified corpus — in
|
|
163
176
|
this repository and over the unpacked published package — enforced by the
|
|
164
177
|
reference repository's gates, together with a randomized differential
|
|
165
|
-
harness and
|
|
178
|
+
harness and its red-required mutation battery.
|
|
166
179
|
- **The certified corpus** ships in this package (`conformance/`), pinned by
|
|
167
180
|
a raw index SHA-256 asserted at load.
|
|
168
181
|
- **Ed25519 key and R admission.** After `npm run build`, run
|
|
@@ -190,16 +203,57 @@ cross-verifies TypeScript-signed artifacts from raw bytes):
|
|
|
190
203
|
calls `prepareSigning` before the key is used and `finishSigning` after,
|
|
191
204
|
so every protocol check stays in this package.
|
|
192
205
|
|
|
193
|
-
The
|
|
194
|
-
|
|
195
|
-
the
|
|
206
|
+
The 1.0 signer supports both the certified verifier 0.7 line and 1.x.
|
|
207
|
+
Its registry lock pins published 0.7.0 for the baseline compatibility check.
|
|
208
|
+
Its other check binds verifier 1.0 to the commit and exact archive integrity
|
|
209
|
+
recorded from staging. When promoting a paired release, approve the verifier
|
|
210
|
+
stage first, then the signer stage.
|
|
196
211
|
|
|
197
212
|
## SemVer
|
|
198
213
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
214
|
+
The 1.x public JavaScript exports, TypeScript contracts and documented option
|
|
215
|
+
and error shapes follow Semantic Versioning. Removing or renaming a public
|
|
216
|
+
surface, or making an incompatible change to valid-input behavior, requires a
|
|
217
|
+
major release. New exports and optional options or fields are minor additions. An incompatible
|
|
218
|
+
change to a closed TypeScript union requires a major release. Compatible bug and
|
|
219
|
+
security fixes can tighten malformed-input handling; they are recorded in the
|
|
220
|
+
changelog. Package versions do not change an artifact's `protocol_revision`.
|
|
221
|
+
|
|
222
|
+
## Conformance reference and development
|
|
223
|
+
|
|
224
|
+
`reference.json` pins the published Elixir CAP 1.0.0 archive and its checksum.
|
|
225
|
+
The unchanged corpus contains 541 cases in 16 case files. `npm run check:reference`
|
|
226
|
+
compares every corpus file with that archive. `npm run check:reference -- --report`
|
|
227
|
+
also runs the published Elixir package and requires byte-identical reports;
|
|
228
|
+
this needs Elixir 1.19/1.20 on OTP 28/29 linked to OpenSSL 3.5 or newer.
|
|
229
|
+
The Elixir release's historical TypeScript source pin remains immutable.
|
|
230
|
+
|
|
231
|
+
Use Node >= 24.8.0 and npm; `.tool-versions` pins the development Node.
|
|
232
|
+
The lockfile records TypeScript 7 and the current Node declarations. Run:
|
|
233
|
+
|
|
234
|
+
```console
|
|
235
|
+
npm ci
|
|
236
|
+
npm run check
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
`check` runs strict library and browser typechecks, the full native/browser and
|
|
240
|
+
resource-boundary suites, self-checks, both builds, corpus agreement, the
|
|
241
|
+
reference-byte check, and the packed-consumer documentation/declaration checks.
|
|
242
|
+
CI covers Node 24.8.0 and current Node 24; both lanes also require Bun
|
|
243
|
+
1.3.14 for its real substrate behavior. `npm run check:package` proves package
|
|
244
|
+
contents and reproducible bytes, executes this quickstart and the installed CLI,
|
|
245
|
+
and writes the verified tarball to `artifacts/package.tgz`.
|
|
246
|
+
|
|
247
|
+
## Release staging
|
|
248
|
+
|
|
249
|
+
Run the checks before pushing main and wait for CI. Tag that same commit
|
|
250
|
+
`v<package-version>` after confirming package and tag versions agree. The
|
|
251
|
+
[Release workflow](https://github.com/baselabs/charter_agreement_protocol_typescript/blob/main/.github/workflows/release.yml)
|
|
252
|
+
checks the source without publishing permissions, then stages the verified
|
|
253
|
+
archive using `npm stage publish --provenance --ignore-scripts` in a separate job.
|
|
254
|
+
Staging requires npm >= 11.15.0; the workflow pins its publishing CLI.
|
|
255
|
+
Only the owner can approve the staged package with npm 2FA. Record the stage ID
|
|
256
|
+
and archive integrity, and approve the verifier before the signer.
|
|
203
257
|
|
|
204
258
|
## License
|
|
205
259
|
|
package/SECURITY.md
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Version | Security fixes |
|
|
6
6
|
| --- | --- |
|
|
7
|
-
|
|
|
8
|
-
| 0.
|
|
7
|
+
| 1.x | supported after staged 1.0.0 is approved |
|
|
8
|
+
| 0.7.x | supported until 1.0.0 is approved |
|
|
9
|
+
| 0.6.x and earlier | no; upgrade to 0.7.x or approved 1.x |
|
|
9
10
|
|
|
10
11
|
The [changelog](CHANGELOG.md) describes verification changes between releases.
|
|
11
12
|
Keep the package version with stored verification results so you can check
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charter-agreement-protocol/verifier",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Independent TypeScript verifier for the Charter Agreement Protocol (CAP)
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Independent TypeScript verifier for the Charter Agreement Protocol (CAP) \u2014 byte-exact, offline re-verification of signed charter evidence. CAP verifies; it never authorizes.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"LICENSE",
|
|
25
25
|
"NOTICE",
|
|
26
26
|
"README.md",
|
|
27
|
-
"SECURITY.md"
|
|
27
|
+
"SECURITY.md",
|
|
28
|
+
"reference.json"
|
|
28
29
|
],
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=24.8.0"
|
|
@@ -39,16 +40,19 @@
|
|
|
39
40
|
"bench:ed25519": "node --experimental-strip-types --no-warnings bench-ed25519.ts",
|
|
40
41
|
"prepack": "npm run build",
|
|
41
42
|
"typecheck:web": "tsc -p tsconfig.web.json",
|
|
42
|
-
"build:site": "node web/build.mjs"
|
|
43
|
+
"build:site": "node web/build.mjs",
|
|
44
|
+
"check:reference": "node scripts/check-reference.mjs",
|
|
45
|
+
"check:package": "node scripts/check-package.mjs",
|
|
46
|
+
"check": "npm run typecheck && npm run typecheck:web && npm run test && npm run self-checks && npm run build:site && npm run check:reference && npm run check:package"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
45
|
-
"@charter-agreement-protocol/signer": "^0.
|
|
49
|
+
"@charter-agreement-protocol/signer": "^0.3.0",
|
|
46
50
|
"@noble/ed25519": "^3.2.0",
|
|
47
51
|
"@noble/hashes": "^2.4.0",
|
|
48
|
-
"@types/node": "^26.
|
|
52
|
+
"@types/node": "^26.6.6",
|
|
49
53
|
"buffer": "^6.0.3",
|
|
50
54
|
"esbuild": "^0.28.2",
|
|
51
|
-
"typescript": "^
|
|
55
|
+
"typescript": "^7.0.2"
|
|
52
56
|
},
|
|
53
57
|
"repository": {
|
|
54
58
|
"type": "git",
|