@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"rule": "case-file-index",
|
|
3
3
|
"ruleVersion": 2,
|
|
4
|
-
"statement": "How a reader compares a case file's index, contents.json, with the folder it sits at the root of (evidence-bundle.md §5.6.3
|
|
4
|
+
"statement": "How a reader compares a case file's index, contents.json, with the folder it sits at the root of (evidence-bundle.md §5.6.3). The index is never an input to the case reading, and no finding here moves a verdict, a note, a contribution or an exit code. Findings come in this order: case_index_unreadable (and nothing else), case_index_pack_missing, case_index_pack_unlisted, case_index_file_missing, case_index_file_unlisted, case_index_file_differs, case_index_file_too_large, case_index_names_absent; within a kind by the UTF-8 bytes of the ref or path, and names_absent in the index's own order. Only files under a listed pack's folder or under report/ are reported as unlisted.",
|
|
5
5
|
"howToUse": "Call readCaseFileIndex / read_case_file_index with the bytes of index_hex (null: no index in the folder) and `files`, and compare the result with `expected`. A finding lists only the fields it carries.",
|
|
6
6
|
"rows": [
|
|
7
7
|
{
|
package/vectors/case-split.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "How `case` reads folders into packs: the verify page's splitting rule (
|
|
2
|
+
"description": "How `case` reads folders into packs: the verify page's splitting rule (splitCase, assemble) over a walk whose rules are the command's own, and the bundle.json reader that verify and case share. Restated in both kernels and pinned here. Written by tools/gen-vectors/gen_case_split_vectors.py, whose expectations are literals, not kernel output. A tree row lists what to create under an empty folder <root>: a file (path, hex), a folder (dir), a symbolic link (symlink, its target as written), a file whose path is bytes (path_hex), or `files` empty files in a folder (fill). `args` are paths under <root>, and <root> in an expected error stands for that folder. File contents are lowercase hex.",
|
|
3
3
|
"limits": {
|
|
4
4
|
"max_json_depth": 512,
|
|
5
5
|
"max_walk_depth": 32,
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
"args": [
|
|
231
231
|
"pack.zip"
|
|
232
232
|
],
|
|
233
|
-
"description": "A .zip named on the command line is read as a case file (evidence-bundle §5.6
|
|
233
|
+
"description": "A .zip named on the command line is read as a case file (evidence-bundle §5.6): <name>.zip is read at <name>/<entry>, the folder unzip <name>.zip -d <name> makes, so the archive and its unpacked folder give one reading.",
|
|
234
234
|
"expected": {
|
|
235
235
|
"not_regular": [],
|
|
236
236
|
"outside": [],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"null": "In prev_event_id: this record claims to begin its adapter chain.",
|
|
12
12
|
"publicKey": "An alias, not a real Ed25519 key. The reader treats it as an opaque grouping token — a chain is one head per (public_key, chain_key), profile section 3.2 — so only its distinctness is load-bearing."
|
|
13
13
|
},
|
|
14
|
-
"adapterNamespaces": "
|
|
14
|
+
"adapterNamespaces": "As written by the @sanning/anchor SDK: `run` (LangChain callbacks, TS and Python), `vercel_ai` (Vercel AI SDK middleware), `interchange` (Interchange adapter). All three carry `prev_event_id` and `seq`; their chain key is `root_run_id`, `chain_key` and `session_id` respectively. These are read ONLY where the record carries no chain of its own, and they are transitional: once every adapter sets the record's own previous_hash, a reader needs no adapter knowledge at all.",
|
|
15
15
|
"recordScaffold": {
|
|
16
16
|
"payload_version": 1,
|
|
17
17
|
"spec_version": "sanning.events/v2",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"id": "intact-adapter-chain-run",
|
|
168
|
-
"why": "the batched LangChain path writes its linkage only in metadata; its records all say GENESIS and carry no chain_key. Three of them must read as ONE chain with nothing to report — not as three roots of a fictional one. The namespace is `run`, not `langchain`:
|
|
168
|
+
"why": "the batched LangChain path writes its linkage only in metadata; its records all say GENESIS and carry no chain_key. Three of them must read as ONE chain with nothing to report — not as three roots of a fictional one. The namespace is `run`, not `langchain`: a reader pinned on the name `langchain` would find no chain here and report nothing, which is indistinguishable from a clean bundle.",
|
|
169
169
|
"events": [
|
|
170
170
|
{ "id": "e1", "publicKey": "kA", "previous_hash": "GENESIS", "context": {}, "metadata": { "run": { "run_id": "r1", "parent_run_id": null, "root_run_id": "root-1", "seq": 0, "prev_event_id": null } } },
|
|
171
171
|
{ "id": "e2", "publicKey": "kA", "previous_hash": "GENESIS", "context": {}, "metadata": { "run": { "run_id": "r2", "parent_run_id": "r1", "root_run_id": "root-1", "seq": 1, "prev_event_id": "@e1" } } },
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
"id": "adapter-chain-one-event-dropped-run",
|
|
183
|
-
"why": "a deletion on the adapter path shows twice, and both are worth saying: the pointer dangles AND the sequence has a hole.
|
|
183
|
+
"why": "a deletion on the adapter path shows twice, and both are worth saying: the pointer dangles AND the sequence has a hole. the adapter burns the slot BEFORE the hash, so a dropped event consumed a seq number and leaves a permanent gap.",
|
|
184
184
|
"events": [
|
|
185
185
|
{ "id": "e1", "publicKey": "kA", "previous_hash": "GENESIS", "context": {}, "metadata": { "run": { "run_id": "r1", "parent_run_id": null, "root_run_id": "root-1", "seq": 0, "prev_event_id": null } } },
|
|
186
186
|
{ "id": "e2", "publicKey": "kA", "previous_hash": "GENESIS", "context": {}, "metadata": { "run": { "run_id": "r2", "parent_run_id": "r1", "root_run_id": "root-1", "seq": 1, "prev_event_id": "@e1" } } },
|