@sanning/proof 0.19.0 → 0.20.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 +30 -29
- package/dist/agent-record.d.ts +62 -0
- package/dist/agent-record.js +527 -0
- package/dist/agent-schemas.generated.d.ts +15 -0
- package/dist/agent-schemas.generated.js +5759 -0
- package/dist/case-file.d.ts +32 -89
- package/dist/case-file.js +41 -93
- package/dist/case.d.ts +343 -810
- package/dist/case.js +693 -1151
- package/dist/chain.d.ts +19 -47
- package/dist/chain.js +78 -205
- package/dist/claims.d.ts +211 -0
- package/dist/claims.js +1081 -0
- package/dist/cli.d.ts +45 -68
- package/dist/cli.js +618 -1022
- package/dist/compose.js +23 -65
- package/dist/crypto.d.ts +7 -8
- package/dist/crypto.js +60 -147
- package/dist/declaration.d.ts +68 -194
- package/dist/declaration.js +175 -518
- package/dist/environment.d.ts +9 -30
- package/dist/environment.js +17 -66
- package/dist/evidence.d.ts +119 -160
- package/dist/evidence.js +744 -1103
- package/dist/exit-codes.d.ts +11 -27
- package/dist/exit-codes.js +24 -59
- package/dist/file-match.d.ts +33 -79
- package/dist/file-match.js +33 -69
- package/dist/grading.d.ts +98 -135
- package/dist/grading.js +224 -380
- package/dist/handoff.d.ts +62 -160
- package/dist/handoff.js +153 -393
- package/dist/index.d.ts +14 -10
- package/dist/index.js +60 -167
- package/dist/json-schema.d.ts +29 -0
- package/dist/json-schema.js +298 -0
- package/dist/merkle.js +16 -28
- package/dist/message-parts.d.ts +56 -212
- package/dist/message-parts.js +142 -502
- package/dist/side-content.d.ts +11 -22
- package/dist/side-content.js +22 -65
- package/dist/types.d.ts +17 -0
- package/dist/types.js +19 -5
- package/dist/verifier.d.ts +40 -114
- package/dist/verifier.js +196 -535
- package/dist/witness-cache.d.ts +24 -45
- package/dist/witness-cache.js +38 -81
- package/dist/witness-lookup.d.ts +36 -57
- package/dist/witness-lookup.js +89 -139
- package/dist/zip-reader.d.ts +18 -33
- package/dist/zip-reader.js +19 -34
- package/package.json +11 -3
- package/src/agent-record.ts +608 -0
- package/src/agent-schemas.generated.ts +5764 -0
- package/src/case-file.ts +45 -109
- package/src/case.ts +848 -1322
- package/src/chain.ts +85 -224
- package/src/claims.ts +1253 -0
- package/src/cli.ts +714 -1176
- package/src/compose.ts +33 -79
- package/src/crypto.ts +60 -147
- package/src/declaration.ts +219 -656
- package/src/environment.ts +17 -65
- package/src/evidence.ts +958 -1381
- package/src/exit-codes.ts +24 -63
- package/src/file-match.ts +40 -89
- package/src/grading.ts +287 -421
- package/src/handoff.ts +175 -427
- package/src/index.ts +132 -177
- package/src/json-schema.ts +295 -0
- package/src/merkle.ts +16 -28
- package/src/message-parts.ts +155 -533
- package/src/side-content.ts +25 -68
- package/src/types.ts +55 -36
- package/src/verifier.ts +202 -526
- package/src/witness-cache.ts +45 -94
- package/src/witness-lookup.ts +107 -177
- package/src/zip-reader.ts +20 -38
- package/vectors/README.md +52 -34
- package/vectors/agent-record.json +2175 -0
- package/vectors/case-file-index.json +1 -1
- package/vectors/case-split.json +2 -2
- package/vectors/chain-reading.json +3 -3
- package/vectors/file-match.json +285 -148
- package/vectors/jcs-reader.json +6 -6
- package/vectors/pack-grading.json +102 -25
- package/vectors/sandbox-evidence.json +597 -580
- package/vectors/stamp-on-chain.json +18 -18
- package/vectors/witness-cache.json +49 -49
- package/dist/agent-proof.d.ts +0 -28
- package/dist/agent-proof.js +0 -226
- package/dist/run-adapters.d.ts +0 -10
- package/dist/run-adapters.js +0 -35
- package/dist/run.d.ts +0 -209
- package/dist/run.js +0 -1405
- package/src/agent-proof.ts +0 -264
- package/src/run-adapters.ts +0 -44
- package/src/run.ts +0 -1598
package/src/index.ts
CHANGED
|
@@ -1,39 +1,23 @@
|
|
|
1
|
-
// @sanning/proof
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// canonicalization, SHA-256, Ed25519 envelope verification, and the
|
|
6
|
-
// content-hash extraction used for reverse provenance lookup. Sibling of the
|
|
7
|
-
// Python `sanning-proof` kernel and the Go `pkg/proof` reference; conformance
|
|
8
|
-
// is byte-for-byte against the shared `test-vectors/` corpus.
|
|
9
|
-
//
|
|
10
|
-
// Scope boundary (envelope-spec §10 #13): this package verifies a SINGLE
|
|
11
|
-
// envelope. Chain walking (previous_hash), checkpoint reconciliation, and
|
|
12
|
-
// gateway/transport concerns are consumer-layer logic composed above it.
|
|
1
|
+
// @sanning/proof: the TypeScript verification kernel for the Verifiable Event
|
|
2
|
+
// Envelope family (specs/envelope-spec.md): RFC 8785 (JCS), SHA-256, Ed25519
|
|
3
|
+
// envelope verification, and the bundle, pack and case readings built on them.
|
|
4
|
+
// Conformance is byte-for-byte against the shared `test-vectors/` corpus.
|
|
13
5
|
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// can see which profiles this build admits without inferring it from probe
|
|
17
|
-
// calls. It is frozen at its definition (`Object.freeze`, typed
|
|
18
|
-
// `readonly string[]`) because the verifier reads that same array — an exported
|
|
19
|
-
// mutable accept-set would be a runtime-widenable kernel. Additive — no
|
|
20
|
-
// existing export changes.
|
|
6
|
+
// The accept-set this build admits. Frozen at its definition, because the
|
|
7
|
+
// verifier reads the same array.
|
|
21
8
|
export {
|
|
22
9
|
ACCEPTED_SPEC_MAJORS,
|
|
23
10
|
contentHashes,
|
|
24
11
|
jcs,
|
|
25
12
|
specVersionSupported,
|
|
26
13
|
verifyEnvelope,
|
|
14
|
+
envelopeFault,
|
|
15
|
+
envelopeFaults,
|
|
27
16
|
} from "./verifier.js";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
//
|
|
17
|
+
export { ENVELOPE_FAULTS } from "./types.js";
|
|
18
|
+
export type { EnvelopeFault } from "./types.js";
|
|
19
|
+
// The strict reader of bytes that claim to be JCS (Python's `jcs_loads`).
|
|
31
20
|
export { jcsParse } from "./verifier.js";
|
|
32
|
-
// The same reader within the enclave readers' limits (enclave-attestation
|
|
33
|
-
// section 2.1): depth checked on the bytes first, every number finite. The
|
|
34
|
-
// adapters read a token's header and claims and the manifest through it.
|
|
35
|
-
// Additive.
|
|
36
|
-
export { exceedsTextDepth, hasNonFiniteNumber, jcsParseWithinLimits, MAX_READ_DEPTH } from "./verifier.js";
|
|
37
21
|
export {
|
|
38
22
|
bytesToHex,
|
|
39
23
|
deriveOperatorAddress,
|
|
@@ -55,20 +39,10 @@ export {
|
|
|
55
39
|
} from "./merkle.js";
|
|
56
40
|
export type { ContentRole, Envelope, Subject, VerificationResult, VerifyOptions } from "./types.js";
|
|
57
41
|
|
|
58
|
-
// Evidence-bundle verification (specs/evidence-bundle.md)
|
|
59
|
-
// sanning.evidence/
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
// verifyExportBody (embedded RSA-PSS operator attestations + a recomputed §4
|
|
63
|
-
// verdict object with per-gateway on-chain outcomes).
|
|
64
|
-
//
|
|
65
|
-
// `disclosedContent` is the INGEST half of the same path (evidence-bundle
|
|
66
|
-
// §5.1). A received bundle carries its disclosed raw bytes as lowercase hex, so
|
|
67
|
-
// materializing them was, until now, every consumer re-implementing the
|
|
68
|
-
// encoding convention — and a consumer that copied the field VERBATIM wrote
|
|
69
|
-
// files that failed verification on genuine evidence. This hands back DECODED
|
|
70
|
-
// bytes, and only for events whose verification bound them to the committed
|
|
71
|
-
// content_hash. Additive; verifyEvidenceBundle's behavior is unchanged.
|
|
42
|
+
// Evidence-bundle verification (specs/evidence-bundle.md), including the
|
|
43
|
+
// sanning.evidence.export/v2 body (specs/evidence-export.md).
|
|
44
|
+
// `disclosedContent` returns decoded disclosed bytes, only for events whose
|
|
45
|
+
// verification bound them to the committed content_hash.
|
|
72
46
|
export {
|
|
73
47
|
ACCEPTED_EVIDENCE_MAJORS,
|
|
74
48
|
ANCHOR_TRACE_BODY_TYPE,
|
|
@@ -96,7 +70,6 @@ export type {
|
|
|
96
70
|
EvidenceBundleResult,
|
|
97
71
|
EvidenceIssuer,
|
|
98
72
|
EvidenceStatus,
|
|
99
|
-
EvidenceVerdict,
|
|
100
73
|
EventResult,
|
|
101
74
|
ExportBody,
|
|
102
75
|
ExportResult,
|
|
@@ -125,21 +98,9 @@ export type {
|
|
|
125
98
|
VerifyEvidenceOptions,
|
|
126
99
|
} from "./evidence.js";
|
|
127
100
|
|
|
128
|
-
// Pack grading
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
// The rule is already normative in evidence-bundle.md §5.1 (absent disclosure is
|
|
132
|
-
// undetermined, not failed) and §6 (no status ever means "safe"); what the
|
|
133
|
-
// surfaces added on top was a sharper word for undetermined and an account of
|
|
134
|
-
// what the pack failed to disclose. It lived twice, in two repos and two
|
|
135
|
-
// languages, and the two derivations had already diverged once. It lives here.
|
|
136
|
-
//
|
|
137
|
-
// Pure — data in, data out, no I/O, so the kernel's scope boundary
|
|
138
|
-
// (specs/architecture.md §3) is unchanged. `vectors/pack-grading.json` is the
|
|
139
|
-
// conformance statement of the rule and ships in the published tarball, so a
|
|
140
|
-
// consumer that cannot yet import `gradePack` can vendor the table, hold its own
|
|
141
|
-
// derivation to it, and diff its copy against ours. Additive — no existing
|
|
142
|
-
// export changes.
|
|
101
|
+
// Pack grading: what a verification surface may claim about a pack and the
|
|
102
|
+
// disclosed bytes beside it (evidence-bundle.md §5.1, §6). Pure.
|
|
103
|
+
// `vectors/pack-grading.json` states the rule for consumers to test against.
|
|
143
104
|
export {
|
|
144
105
|
PACK_GRADE_CAUSE_KINDS,
|
|
145
106
|
PACK_VERDICTS,
|
|
@@ -160,22 +121,9 @@ export type {
|
|
|
160
121
|
PackVerdict,
|
|
161
122
|
} from "./grading.js";
|
|
162
123
|
|
|
163
|
-
// The declaration
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
// Every other check in this kernel checks a record that is PRESENT, so a pack
|
|
167
|
-
// with half its records dropped verifies perfectly and an auditor cannot tell
|
|
168
|
-
// a full hand-over from a trimmed one. The declaration is the pack's own
|
|
169
|
-
// statement of what it was meant to contain, inside `body` and therefore under
|
|
170
|
-
// the bundle's signature. Any deviation FAILS and every deviation is NAMED; a
|
|
171
|
-
// pack that carries no declaration is `partial`, never `verified`; and a
|
|
172
|
-
// reading that rests on the UNSIGNED content handed in beside the pack is
|
|
173
|
-
// named on its own and carries the weaker word, because whoever assembles a
|
|
174
|
-
// case chose those bytes (proof#147).
|
|
175
|
-
//
|
|
176
|
-
// Pure: data in, data out, no I/O. `gradePack` takes the result as an
|
|
177
|
-
// optional fourth argument, so a surface gets one verdict; omitting it is the
|
|
178
|
-
// pre-§5.4 behavior, unchanged. Additive: no existing export changes.
|
|
124
|
+
// The declaration: what a pack says it holds, checked against what it does
|
|
125
|
+
// (evidence-bundle.md §5.4). Pure. `gradePack` takes the result as an optional
|
|
126
|
+
// fourth argument.
|
|
179
127
|
export {
|
|
180
128
|
DECLARATION_CONTENT_KINDS,
|
|
181
129
|
DECLARATION_DEVIATION_KINDS,
|
|
@@ -208,23 +156,10 @@ export type {
|
|
|
208
156
|
PackRecord,
|
|
209
157
|
} from "./declaration.js";
|
|
210
158
|
|
|
211
|
-
// The case
|
|
212
|
-
//
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
// A pack a party assembles about itself is not self-proving about what that
|
|
216
|
-
// party LEFT OUT (envelope-spec.md §4.1 A15, evidence-bundle.md §5.4.2 rule 7),
|
|
217
|
-
// because the omission happens before any reader runs. Reading several parties'
|
|
218
|
-
// packs at once is what closes it: a `handoff.sent` with no counterpart is
|
|
219
|
-
// always named, and where a pack signed by the key it names is in the case, the
|
|
220
|
-
// reading says that pack holds no counterpart (unless every candidate was
|
|
221
|
-
// accounted for under A20, which reads as no counterpart and names no pack). Whether a party that presented
|
|
222
|
-
// no such pack recorded anything is not established (proof#143). `readCase`
|
|
223
|
-
// verifies every pack itself, offline, so it is async. Matching is on keys and hashes alone and NEVER on tenancy, so a pair from two
|
|
224
|
-
// organizations verifies (DL-60).
|
|
225
|
-
//
|
|
226
|
-
// Pure: data in, data out, no I/O. Additive: a new module, no existing export
|
|
227
|
-
// changes, and no new verdict word anywhere.
|
|
159
|
+
// The case: one verdict over several parties' packs, closing what a single
|
|
160
|
+
// pack cannot prove about its own omissions (evidence-bundle.md §5.5).
|
|
161
|
+
// Matching is on keys and hashes alone, never tenancy, so a pair across two
|
|
162
|
+
// organizations verifies. `readCase` verifies every pack itself, offline.
|
|
228
163
|
export {
|
|
229
164
|
CASE_BODY_TYPES,
|
|
230
165
|
CASE_EXCEPTION_KINDS,
|
|
@@ -234,6 +169,7 @@ export {
|
|
|
234
169
|
CASE_NOTE_KINDS,
|
|
235
170
|
CASE_RELIANCE,
|
|
236
171
|
CASE_RELIANCE_HANDOFF_CLAUSE,
|
|
172
|
+
CASE_RELIANCE_SANDBOX,
|
|
237
173
|
CASE_VERDICTS,
|
|
238
174
|
CONTENT_WITHHELD_BY_DECLARATION,
|
|
239
175
|
CO_SIGNATURES_PRESENT,
|
|
@@ -242,6 +178,7 @@ export {
|
|
|
242
178
|
WITNESS_STATES,
|
|
243
179
|
WITNESS_TIME_CACHED,
|
|
244
180
|
WITNESS_TIME_RECORDED,
|
|
181
|
+
caseProblems,
|
|
245
182
|
caseReliance,
|
|
246
183
|
readCase,
|
|
247
184
|
renderCaseNote,
|
|
@@ -249,8 +186,8 @@ export {
|
|
|
249
186
|
renderException,
|
|
250
187
|
renderWitnessLine,
|
|
251
188
|
} from "./case.js";
|
|
252
|
-
// The witnessed-time cache (evidence-bundle 5.6.6
|
|
253
|
-
//
|
|
189
|
+
// The witnessed-time cache (evidence-bundle.md §5.6.6). Never an input to a
|
|
190
|
+
// verdict.
|
|
254
191
|
export {
|
|
255
192
|
MAX_BLOCK_TIME,
|
|
256
193
|
MAX_WITNESS_CACHE_DEPTH,
|
|
@@ -264,21 +201,73 @@ export {
|
|
|
264
201
|
} from "./witness-cache.js";
|
|
265
202
|
export type { CachedWitnessTime, WitnessTimeAnswer, WitnessTimeCheck } from "./witness-cache.js";
|
|
266
203
|
|
|
267
|
-
// The public-record
|
|
268
|
-
//
|
|
269
|
-
//
|
|
270
|
-
//
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
//
|
|
280
|
-
//
|
|
281
|
-
export {
|
|
204
|
+
// The public-record lookup behind `--gateways`. The only network call runs when
|
|
205
|
+
// a caller hands in a gateway, through `options.fetchImpl` or the global
|
|
206
|
+
// `fetch`, so it runs in a browser. `confirmed` is a claim about the bytes
|
|
207
|
+
// only: never show it apart from the pack's own verdict.
|
|
208
|
+
export {
|
|
209
|
+
lookupPublicRecord,
|
|
210
|
+
onChainHalf,
|
|
211
|
+
onChainOutcome,
|
|
212
|
+
onChainRow,
|
|
213
|
+
witnessLine,
|
|
214
|
+
} from "./witness-lookup.js";
|
|
215
|
+
|
|
216
|
+
// Six claims, three verdicts, and the person layer (evidence-bundle.md section 3): every
|
|
217
|
+
// detailed kind maps to one claim and one state, and the verdict is read off the claims.
|
|
218
|
+
export {
|
|
219
|
+
CLAIMS,
|
|
220
|
+
CLAIM_LABELS,
|
|
221
|
+
CLAIM_QUESTIONS,
|
|
222
|
+
CLAIM_STATES,
|
|
223
|
+
ENVELOPE_FAULT_KINDS,
|
|
224
|
+
KIND_CLAIMS,
|
|
225
|
+
NOTE_FINDINGS,
|
|
226
|
+
NOTE_ORDER,
|
|
227
|
+
NOT_IN_SCOPE_REASONS,
|
|
228
|
+
NOT_PROVEN_REASONS,
|
|
229
|
+
PERSON_TITLES,
|
|
230
|
+
PERSON_TITLE_PARTS,
|
|
231
|
+
REASON_KINDS,
|
|
232
|
+
RECORD_REASON_CLAIMS,
|
|
233
|
+
RECORD_REASON_LINES,
|
|
234
|
+
SANDBOX_PERSON_LINE,
|
|
235
|
+
VERDICTS,
|
|
236
|
+
VERDICT_COLOURS,
|
|
237
|
+
VERDICT_TITLES,
|
|
238
|
+
bundleProblems,
|
|
239
|
+
claimsOf,
|
|
240
|
+
downgraded,
|
|
241
|
+
note,
|
|
242
|
+
orderedNotes,
|
|
243
|
+
restOnSigned,
|
|
244
|
+
personText,
|
|
245
|
+
problem,
|
|
246
|
+
problemToJson,
|
|
247
|
+
renderFindingNote,
|
|
248
|
+
renderPerson,
|
|
249
|
+
verdictOf,
|
|
250
|
+
withItems,
|
|
251
|
+
} from "./claims.js";
|
|
252
|
+
export type {
|
|
253
|
+
Claim,
|
|
254
|
+
ClaimEntry,
|
|
255
|
+
ClaimItem,
|
|
256
|
+
ClaimState,
|
|
257
|
+
Labels,
|
|
258
|
+
LinePart,
|
|
259
|
+
NoteEntry,
|
|
260
|
+
NotInScopeReason,
|
|
261
|
+
NotProvenReason,
|
|
262
|
+
Person,
|
|
263
|
+
Problem,
|
|
264
|
+
ProblemItem,
|
|
265
|
+
ProblemJson,
|
|
266
|
+
ProblemValues,
|
|
267
|
+
ReasonKind,
|
|
268
|
+
Verdict,
|
|
269
|
+
VerdictJson,
|
|
270
|
+
} from "./claims.js";
|
|
282
271
|
export type {
|
|
283
272
|
OnChainHalf,
|
|
284
273
|
OnChainRow,
|
|
@@ -303,9 +292,8 @@ export type {
|
|
|
303
292
|
WitnessState,
|
|
304
293
|
} from "./case.js";
|
|
305
294
|
|
|
306
|
-
// The case file's index (
|
|
307
|
-
//
|
|
308
|
-
// is never an input to `readCase`. Pure: bytes and a file list in.
|
|
295
|
+
// The case file's index (evidence-bundle.md §5.6), compared with the drop it
|
|
296
|
+
// describes. Never an input to `readCase` or any verdict.
|
|
309
297
|
export {
|
|
310
298
|
CASE_FILE_FINDING_KINDS,
|
|
311
299
|
CASE_FILE_INDEX_NAME,
|
|
@@ -323,9 +311,8 @@ export type {
|
|
|
323
311
|
CaseFileIndexReading,
|
|
324
312
|
} from "./case-file.js";
|
|
325
313
|
|
|
326
|
-
// Files handed in beside a pack (
|
|
327
|
-
//
|
|
328
|
-
// pack's SIGNED records make, by hash alone. Never moves a verdict.
|
|
314
|
+
// Files handed in beside a pack (evidence-bundle.md §5.7), matched by SHA-256
|
|
315
|
+
// against the pack's signed commitments. Never moves a verdict.
|
|
329
316
|
export {
|
|
330
317
|
FILE_MATCH_SCOPE,
|
|
331
318
|
NOT_READ_REASONS,
|
|
@@ -349,29 +336,11 @@ export type {
|
|
|
349
336
|
UnmatchedFile,
|
|
350
337
|
} from "./file-match.js";
|
|
351
338
|
|
|
352
|
-
// Chain reading
|
|
353
|
-
//
|
|
354
|
-
//
|
|
355
|
-
//
|
|
356
|
-
//
|
|
357
|
-
// chain that restarted after a crash and now asserts two beginnings — passed
|
|
358
|
-
// every check we had (proof#43). The verifier was right not to do this: it
|
|
359
|
-
// verifies a single envelope and says so. Nothing above it did it either.
|
|
360
|
-
//
|
|
361
|
-
// Pure — data in, data out, no I/O — so the kernel's scope boundary
|
|
362
|
-
// (specs/architecture.md §3) is unchanged, and the rule ships as
|
|
363
|
-
// `vectors/chain-reading.json` beside the pack-grading table for the same
|
|
364
|
-
// reason: a rule consumers must agree with needs a statement they can fetch.
|
|
365
|
-
//
|
|
366
|
-
// It returns FINDINGS, never a verdict, and it feeds no status on its own: a
|
|
367
|
-
// pack's signed v3 declaration can claim a chain complete and in order, and
|
|
368
|
-
// `checkDeclaration` holds that claim to the links `readChainLinks` reads
|
|
369
|
-
// (evidence-bundle.md 5.4.2 rule 11). Chain links are
|
|
370
|
-
// deletion/reorder-evidence for the events present and NOT a completeness proof
|
|
371
|
-
// (`anchor/docs/profile-sanning.events-v2.md` §5), drop the last N events of a
|
|
372
|
-
// chain and nothing dangles. `CHAIN_READING_SCOPE` is that sentence, exported so
|
|
373
|
-
// every surface prints the same limit rather than paraphrasing it into a claim.
|
|
374
|
-
// Additive — no existing export changes.
|
|
339
|
+
// Chain reading: findings over the `previous_hash` links one bundle presents,
|
|
340
|
+
// never a verdict and never a completeness proof. `CHAIN_READING_SCOPE` is the
|
|
341
|
+
// sentence every surface prints beside them. `vectors/chain-reading.json`
|
|
342
|
+
// states the rule; a v3 declaration's chain claim is checked against
|
|
343
|
+
// `readChainLinks` (evidence-bundle.md §5.4.2 rule 11).
|
|
375
344
|
export {
|
|
376
345
|
ADAPTER_CHAIN_NAMESPACES,
|
|
377
346
|
CHAIN_READING_SCOPE,
|
|
@@ -388,55 +357,31 @@ export type {
|
|
|
388
357
|
ChainSummary,
|
|
389
358
|
} from "./chain.js";
|
|
390
359
|
|
|
391
|
-
// The `proof export` composer (specs/evidence-export.md §5
|
|
392
|
-
//
|
|
393
|
-
//
|
|
394
|
-
// inverse of verifyEvidenceBundle's verifyExportBody dispatch.
|
|
395
|
-
// One exit-code table for every verb (0.13.0): the verdict word to the exit
|
|
396
|
-
// code, and the help text every verb prints. Additive.
|
|
360
|
+
// The `proof export` composer (specs/evidence-export.md §5): a signed,
|
|
361
|
+
// offline-verifiable sanning.evidence.export/v2 artifact. Also the one
|
|
362
|
+
// exit-code table and help text every verb uses.
|
|
397
363
|
export {
|
|
398
364
|
EXIT_CODES,
|
|
399
365
|
EXIT_CODES_HELP,
|
|
366
|
+
EXIT_COULD_NOT_RUN,
|
|
400
367
|
EXIT_FAILED,
|
|
401
|
-
|
|
402
|
-
EXIT_MIXED,
|
|
368
|
+
EXIT_INCOMPLETE,
|
|
403
369
|
EXIT_SANDBOX,
|
|
404
|
-
EXIT_UNDETERMINED,
|
|
405
370
|
EXIT_VERIFIED,
|
|
406
371
|
exitCodeFor,
|
|
407
|
-
sandboxExit,
|
|
408
372
|
} from "./exit-codes.js";
|
|
409
|
-
// Sandbox evidence: the environment marker over
|
|
410
|
-
//
|
|
411
|
-
// line both commands print for it. Additive.
|
|
373
|
+
// Sandbox evidence: the environment marker over a pack's or case's envelopes
|
|
374
|
+
// (envelope-spec section 2).
|
|
412
375
|
export {
|
|
413
|
-
SANDBOX_HEADLINE,
|
|
414
|
-
SANDBOX_LINE,
|
|
415
|
-
SANDBOX_TITLE,
|
|
416
376
|
environmentMarker,
|
|
417
|
-
onlySimulatedUnsettled,
|
|
418
377
|
packEnvelopes,
|
|
419
378
|
} from "./environment.js";
|
|
420
379
|
export type { EnvironmentMarker } from "./environment.js";
|
|
421
380
|
export { attestationSignatureToHex, composeExport } from "./compose.js";
|
|
422
381
|
export type { ComposeExportOptions, ComposeExportResult, ExporterKey } from "./compose.js";
|
|
423
382
|
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
// one verifier covers both agent and anchor bundles.
|
|
427
|
-
export { AGENT_PROOF_SPEC_VERSION, isAgentProofSpec, verifyAgentProof } from "./agent-proof.js";
|
|
428
|
-
export type {
|
|
429
|
-
AgentProofBundle,
|
|
430
|
-
AgentProofResult,
|
|
431
|
-
VerifyAgentProofOptions,
|
|
432
|
-
} from "./agent-proof.js";
|
|
433
|
-
|
|
434
|
-
// The hand-off pairing rule (src/handoff.ts): which records are candidates to
|
|
435
|
-
// be the counterpart of a hand-off record, how a candidate set of more than one
|
|
436
|
-
// is ordered, and what a formed pair grades to (specs/envelope-spec.md §4.1
|
|
437
|
-
// v1.9, proof#132 and proof#136). The Python half is src/sanning_proof/handoff.py and the two
|
|
438
|
-
// answer identically on identical bytes. Additive: a new module, and no
|
|
439
|
-
// existing export changes.
|
|
383
|
+
// The hand-off pairing rule (envelope-spec.md §4.1). The Python half answers
|
|
384
|
+
// identically on identical bytes.
|
|
440
385
|
export {
|
|
441
386
|
CANDIDATE_NAMESPACE,
|
|
442
387
|
DEFINED_EVENT_TYPES,
|
|
@@ -444,7 +389,9 @@ export {
|
|
|
444
389
|
isConformantHandoffRecord,
|
|
445
390
|
readHandoff,
|
|
446
391
|
readHandoffs,
|
|
392
|
+
recordDefect,
|
|
447
393
|
recordIsMalformed,
|
|
394
|
+
recordIsNonconforming,
|
|
448
395
|
} from "./handoff.js";
|
|
449
396
|
export type {
|
|
450
397
|
CandidateReading,
|
|
@@ -454,14 +401,9 @@ export type {
|
|
|
454
401
|
HeldRecord,
|
|
455
402
|
} from "./handoff.js";
|
|
456
403
|
|
|
457
|
-
//
|
|
458
|
-
//
|
|
459
|
-
//
|
|
460
|
-
// mismatch, commits to the message AS IT HELD IT, so the pair fails on
|
|
461
|
-
// `message_hash` rather than verifying over bytes nobody checked. The Python
|
|
462
|
-
// half is src/sanning_proof/message_parts.py and the two are held together by
|
|
463
|
-
// cross-kernel/run_parts.sh. Pure: it neither canonicalizes nor hashes the
|
|
464
|
-
// message.
|
|
404
|
+
// File parts (envelope-spec.md §4.1): a receiver holding a part's bytes
|
|
405
|
+
// commits to the message as it held it, so a mismatch fails on `message_hash`
|
|
406
|
+
// rather than verifying over unchecked bytes.
|
|
465
407
|
export {
|
|
466
408
|
BYTES_FOR_UNKNOWN_PART,
|
|
467
409
|
CONFLICTING_PART_BYTES,
|
|
@@ -483,3 +425,16 @@ export {
|
|
|
483
425
|
uncheckedHeldParts,
|
|
484
426
|
} from "./message-parts.js";
|
|
485
427
|
export type { HeldMessage, Note, PartReading, Refusal, SuppliedPart } from "./message-parts.js";
|
|
428
|
+
|
|
429
|
+
// Reading a sanning.agent record (vendor/specs/agent-events.md §10) against
|
|
430
|
+
// the schemas bundled from the pinned specs release: no file read, no fetch.
|
|
431
|
+
export {
|
|
432
|
+
AGENT_EVENT_TYPES,
|
|
433
|
+
RECORD_TYPES_OUTSIDE_AGENT,
|
|
434
|
+
readAgentRecord,
|
|
435
|
+
readAgentRecordWithHeld,
|
|
436
|
+
readAgentRecords,
|
|
437
|
+
renderAgentReading,
|
|
438
|
+
} from "./agent-record.js";
|
|
439
|
+
export type { AgentHeldRecord, AgentReason, AgentRecordReading, AgentVerdict } from "./agent-record.js";
|
|
440
|
+
export { AGENT_SCHEMA_PIN, AGENT_SCHEMA_VERSIONS } from "./agent-schemas.generated.js";
|