@mikeargento/bitgraph-player 0.13.0 → 0.15.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/LICENSE +1 -1
- package/README.md +8 -5
- package/dist/__tests__/cast-order.test.js +1 -1
- package/dist/__tests__/cast-order.test.js.map +1 -1
- package/dist/__tests__/check.test.js +2 -2
- package/dist/__tests__/check.test.js.map +1 -1
- package/dist/__tests__/evaluate-verdict.test.js +1 -1
- package/dist/__tests__/evaluate-verdict.test.js.map +1 -1
- package/dist/__tests__/fixtures.js +1 -1
- package/dist/__tests__/fixtures.js.map +1 -1
- package/dist/__tests__/fuse-check.test.js +2 -2
- package/dist/__tests__/fuse-check.test.js.map +1 -1
- package/dist/__tests__/init-play.test.js +1 -1
- package/dist/__tests__/init-play.test.js.map +1 -1
- package/dist/__tests__/logic-rule.test.js +1 -1
- package/dist/__tests__/logic-rule.test.js.map +1 -1
- package/dist/__tests__/sig-v2.test.js +1 -1
- package/dist/__tests__/sig-v2.test.js.map +1 -1
- package/dist/cast.js +1 -1
- package/dist/cast.js.map +1 -1
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +17 -7
- package/dist/check.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/evaluate.js +1 -1
- package/dist/evaluate.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init.js +1 -1
- package/dist/init.js.map +1 -1
- package/dist/logic.js +1 -1
- package/dist/logic.js.map +1 -1
- package/dist/order.js +1 -1
- package/dist/order.js.map +1 -1
- package/dist/play.js +1 -1
- package/dist/play.js.map +1 -1
- package/dist/rule.js +1 -1
- package/dist/rule.js.map +1 -1
- package/dist/sig.js +1 -1
- package/dist/sig.js.map +1 -1
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -1
- package/dist/verdict.d.ts +1 -1
- package/dist/verdict.js +2 -2
- package/dist/verdict.js.map +1 -1
- package/dist-web/verify.html +4165 -5
- package/package.json +14 -6
- package/src/__tests__/cast-order.test.ts +1 -1
- package/src/__tests__/check.test.ts +2 -2
- package/src/__tests__/evaluate-verdict.test.ts +1 -1
- package/src/__tests__/fixtures.ts +1 -1
- package/src/__tests__/fuse-check.test.ts +2 -2
- package/src/__tests__/init-play.test.ts +1 -1
- package/src/__tests__/logic-rule.test.ts +1 -1
- package/src/__tests__/sig-v2.test.ts +1 -1
- package/src/cast.ts +1 -1
- package/src/check.ts +17 -7
- package/src/cli.ts +1 -1
- package/src/evaluate.ts +1 -1
- package/src/index.ts +1 -1
- package/src/init.ts +1 -1
- package/src/logic.ts +1 -1
- package/src/order.ts +1 -1
- package/src/play.ts +1 -1
- package/src/rule.ts +1 -1
- package/src/sig.ts +1 -1
- package/src/types.ts +1 -1
- package/src/verdict.ts +2 -2
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikeargento/bitgraph-player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Deterministic evaluation of causal rules over BitGraph proof bundles: a pure function from (rule, verified evidence) to a reproducible verdict.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bitgraph",
|
|
7
|
+
"rules",
|
|
8
|
+
"deterministic",
|
|
9
|
+
"evidence",
|
|
10
|
+
"ai-audit",
|
|
11
|
+
"verification"
|
|
12
|
+
],
|
|
5
13
|
"license": "MIT",
|
|
6
14
|
"type": "module",
|
|
7
15
|
"main": "./dist/index.js",
|
|
8
16
|
"types": "./dist/index.d.ts",
|
|
9
17
|
"bin": {
|
|
10
|
-
"bitgraph-play": "
|
|
18
|
+
"bitgraph-play": "dist/cli.js"
|
|
11
19
|
},
|
|
12
20
|
"exports": {
|
|
13
21
|
".": {
|
|
@@ -20,22 +28,22 @@
|
|
|
20
28
|
"dist-web",
|
|
21
29
|
"src",
|
|
22
30
|
"SPEC.md",
|
|
23
|
-
|
|
31
|
+
"README.md",
|
|
24
32
|
"LICENSE"
|
|
25
33
|
],
|
|
26
34
|
"scripts": {
|
|
27
35
|
"build": "tsc",
|
|
28
36
|
"prepack": "tsc && npm run build:web",
|
|
29
37
|
"typecheck": "tsc --noEmit",
|
|
30
|
-
"test": "tsc && node --test
|
|
31
|
-
"build:web": "node scripts/build-verify-html.mjs
|
|
38
|
+
"test": "tsc && node --test dist/__tests__/*.test.js",
|
|
39
|
+
"build:web": "node scripts/build-verify-html.mjs",
|
|
32
40
|
"typecheck:web": "tsc -p web/tsconfig.json"
|
|
33
41
|
},
|
|
34
42
|
"engines": {
|
|
35
43
|
"node": ">=20"
|
|
36
44
|
},
|
|
37
45
|
"dependencies": {
|
|
38
|
-
"@mikeargento/bitgraph-audit": "^0.
|
|
46
|
+
"@mikeargento/bitgraph-audit": "^0.7.0",
|
|
39
47
|
"@mikeargento/bitgraph-verify": "^1.7.0"
|
|
40
48
|
},
|
|
41
49
|
"devDependencies": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2024-2026
|
|
1
|
+
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `check` tests.
|
|
@@ -147,7 +147,7 @@ describe("check: real export fixture (disk)", () => {
|
|
|
147
147
|
it("recognizes the enclave v5 measurement from PINS.md", () => {
|
|
148
148
|
const enclave = report.recordings[0]!.lines.find((l) => l.name === "enclave")!;
|
|
149
149
|
assert.match(enclave.detail, /enclave v5/);
|
|
150
|
-
assert.equal(KNOWN_ENCLAVE_MEASUREMENTS.length,
|
|
150
|
+
assert.equal(KNOWN_ENCLAVE_MEASUREMENTS.length, 8);
|
|
151
151
|
});
|
|
152
152
|
|
|
153
153
|
it("serializes deterministically: no timestamps, no machine paths", async () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2024-2026
|
|
1
|
+
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `check` over fused recordings (profile bitgraph-fuse/1, working name).
|
|
@@ -55,7 +55,7 @@ describe("fused recordings in check", () => {
|
|
|
55
55
|
assert.equal(rec.fused!.floor, null);
|
|
56
56
|
assert.match(rec.fused!.floorDetail, /floor undetermined: no anchor precedes this slot in its epoch/);
|
|
57
57
|
assert.equal(rec.fused!.statements.length, 2);
|
|
58
|
-
assert.match(rec.fused!.statements[1]!, /
|
|
58
|
+
assert.match(rec.fused!.statements[1]!, /position \d+ was reserved and signed for them, and were committed no later than position \d+/);
|
|
59
59
|
assert.ok(rec.fused!.span && BigInt(rec.fused!.span.positions) >= 1n);
|
|
60
60
|
// The harness attests with a fake document, so the attestation line is FALSE
|
|
61
61
|
// here; that is the harness, not the fused check, and it is reported on its
|
package/src/cast.ts
CHANGED
package/src/check.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2024-2026
|
|
1
|
+
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `check`: what a bundle establishes about the recordings it holds, said
|
|
@@ -109,7 +109,17 @@ export const KNOWN_ENCLAVE_MEASUREMENTS: ReadonlyArray<{ pcr0: string; label: st
|
|
|
109
109
|
{
|
|
110
110
|
pcr0: "394c3cf515651dc27187d85e4716c12dfeb99c1227f1fe0eacfaa427d80018e1a28ebba9469e99c7936601f901d74e1d",
|
|
111
111
|
label: "enclave v7 (reproducible, authenticated anchors)",
|
|
112
|
-
period: "2026-09-06
|
|
112
|
+
period: "2026-09-06 to 2026-09-07",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
pcr0: "eccfc1c78006f4b74f929c992785575c908a0f60eca08ff638cd6c0842f993f182ebb002457b8ef3e732a6a10805c72b",
|
|
116
|
+
label: "enclave v8 (reproducible, authenticated anchors and the floor gate)",
|
|
117
|
+
period: "2026-09-07 to 2026-09-30",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
pcr0: "934feb8bb6f4f7e2d2f85d902a7d5edd0981f706d9d2385638988ac096a05ea0583c3d00eef2a7947865ec66efc1fcf8",
|
|
121
|
+
label: "enclave v9 (reproducible; the allocation returns the floor anchor, for bitgraph-fuse/2)",
|
|
122
|
+
period: "2026-09-30 onward",
|
|
113
123
|
},
|
|
114
124
|
];
|
|
115
125
|
|
|
@@ -752,7 +762,7 @@ function boundsPhrase(
|
|
|
752
762
|
case "lower-bounded":
|
|
753
763
|
return `after Ethereum block ${blockRef(notBefore as CheckBound)} (header verified in this bundle); no verified upper bound here` + weakerSuffix((notBefore as CheckBound).weaker);
|
|
754
764
|
case "upper-bounded":
|
|
755
|
-
return `
|
|
765
|
+
return `with no verified lower bound in this bundle; an anchor that consumed block ${blockRef(notAfter as CheckBound)} followed (header verified), which is not an upper bound` + weakerSuffix((notAfter as CheckBound).weaker);
|
|
756
766
|
default:
|
|
757
767
|
return "with no verified Ethereum bound in this bundle";
|
|
758
768
|
}
|
|
@@ -795,7 +805,7 @@ function shortBoundsPhrase(b: CheckBounds): string {
|
|
|
795
805
|
case "lower-bounded":
|
|
796
806
|
return `after Ethereum block ${blockRef(b.notBefore as CheckBound)}`;
|
|
797
807
|
case "upper-bounded":
|
|
798
|
-
return `
|
|
808
|
+
return `with no lower bound in this bundle, then an anchor at block ${blockRef(b.notAfter as CheckBound)} (not an upper bound)`;
|
|
799
809
|
default:
|
|
800
810
|
return "with no Ethereum bound in this bundle";
|
|
801
811
|
}
|
|
@@ -932,7 +942,7 @@ function collectNotes(audit: AuditResult, recordings: CheckRecording[], anchors:
|
|
|
932
942
|
}
|
|
933
943
|
if (missingPositions > 0n) {
|
|
934
944
|
notes.push(
|
|
935
|
-
`${missingPositions} causal position${missingPositions === 1n ? "" : "s"} between the earliest and latest recording here ${missingPositions === 1n ? "is" : "are"} not in this bundle: normal for an export, which is an excerpt of the chain;
|
|
945
|
+
`${missingPositions} causal position${missingPositions === 1n ? "" : "s"} between the earliest and latest recording here ${missingPositions === 1n ? "is" : "are"} not in this bundle: normal for an export, which is an excerpt of the chain; the positions between belong to whoever holds those recordings`
|
|
936
946
|
);
|
|
937
947
|
}
|
|
938
948
|
if (predecessorsAbsent > 0) {
|
|
@@ -946,7 +956,7 @@ function collectNotes(audit: AuditResult, recordings: CheckRecording[], anchors:
|
|
|
946
956
|
const originals = audit.ingest.artifacts.filter((a) => a.matchedProofHashes.length === 0 && fuseOriginHexes?.has(a.sha256Hex) === true);
|
|
947
957
|
if (originals.length > 0) {
|
|
948
958
|
notes.push(
|
|
949
|
-
`${originals.length} file${originals.length === 1 ? "" : "s"} in this bundle ${originals.length === 1 ? "is" : "are"} the original of a fused recording: ${originals.slice(0, 5).map((a) => a.paths[0] ?? "(unnamed)").join(", ")}${originals.length > 5 ? ", …" : ""}. The original
|
|
959
|
+
`${originals.length} file${originals.length === 1 ? "" : "s"} in this bundle ${originals.length === 1 ? "is" : "are"} the original of a fused recording: ${originals.slice(0, 5).map((a) => a.paths[0] ?? "(unnamed)").join(", ")}${originals.length > 5 ? ", …" : ""}. The original carries no floor of its own: the commit that consumed its digest shows it existed by that position, an order, not a time ceiling. The fused bytes carry the floor`
|
|
950
960
|
);
|
|
951
961
|
}
|
|
952
962
|
const unmatched = audit.ingest.artifacts.filter((a) => a.matchedProofHashes.length === 0 && fuseOriginHexes?.has(a.sha256Hex) !== true);
|
|
@@ -998,7 +1008,7 @@ function collectNotChecked(hasAnchors: boolean): string[] {
|
|
|
998
1008
|
);
|
|
999
1009
|
}
|
|
1000
1010
|
out.push(
|
|
1001
|
-
"whether the
|
|
1011
|
+
"whether the anchors in this bundle are the ones BitGraph published: this is an offline check; the published anchors are listed at bitgraph.ing/ledger"
|
|
1002
1012
|
);
|
|
1003
1013
|
out.push("whether an epoch key was later quarantined: that is published outside any bundle");
|
|
1004
1014
|
return out;
|
package/src/cli.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright (c) 2024-2026
|
|
2
|
+
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* bitgraph-play <rule.json> <bundle> [--out <file>] [--summary]
|
package/src/evaluate.ts
CHANGED
package/src/index.ts
CHANGED
package/src/init.ts
CHANGED
package/src/logic.ts
CHANGED
package/src/order.ts
CHANGED
package/src/play.ts
CHANGED
package/src/rule.ts
CHANGED
package/src/sig.ts
CHANGED
package/src/types.ts
CHANGED
package/src/verdict.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2024-2026
|
|
1
|
+
// Copyright (c) 2024-2026 Argento Computing Inc. Licensed under the MIT License. See LICENSE.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Verdict construction and serialization.
|
|
@@ -31,7 +31,7 @@ import type { DeclaredEntry, Resolution, Rule, Verdict } from "./types.js";
|
|
|
31
31
|
* A unit test asserts this equals package.json's version, so the
|
|
32
32
|
* constant cannot drift silently across releases.
|
|
33
33
|
*/
|
|
34
|
-
export const PLAYER_VERSION = "0.
|
|
34
|
+
export const PLAYER_VERSION = "0.15.0";
|
|
35
35
|
|
|
36
36
|
/** The player package's own version. */
|
|
37
37
|
export function playerVersion(): string {
|