@aarmos/bridge 0.1.11 → 0.1.12
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/index.js
CHANGED
|
@@ -1506,7 +1506,7 @@ attest.command("verify").description("Verify an attestation bundle offline \u201
|
|
|
1506
1506
|
await runAttestVerify({ file: opts.file, trustedPubkey: opts.trustedPubkey });
|
|
1507
1507
|
});
|
|
1508
1508
|
program.command("verify").description("Verify an AVAR bundle offline (.avar.zip)").argument("<bundle>", "Path to a .avar.zip bundle").option("--json", "Emit the VerificationReport as JSON on stdout").option("--quiet", "Suppress all human-readable output").option("--strict", "Exit non-zero on 'valid-with-warnings'").action(async (bundle, opts) => {
|
|
1509
|
-
const { runVerify } = await import("./verify-
|
|
1509
|
+
const { runVerify } = await import("./verify-SP35SK2G.js");
|
|
1510
1510
|
const code = await runVerify({
|
|
1511
1511
|
file: bundle,
|
|
1512
1512
|
json: !!opts.json(),
|
|
@@ -132,9 +132,19 @@ async function computeDeviceFingerprint(publicKeyB64u) {
|
|
|
132
132
|
return hex.slice(0, 12);
|
|
133
133
|
}
|
|
134
134
|
function signedBodyOf(entry) {
|
|
135
|
-
const {
|
|
135
|
+
const {
|
|
136
|
+
signature: _sig,
|
|
137
|
+
devicePubKey: _pk,
|
|
138
|
+
deviceFingerprint: _fp,
|
|
139
|
+
prevHash: _prev,
|
|
140
|
+
entryHash: _eh,
|
|
141
|
+
...rest
|
|
142
|
+
} = entry;
|
|
136
143
|
void _sig;
|
|
137
144
|
void _pk;
|
|
145
|
+
void _fp;
|
|
146
|
+
void _prev;
|
|
147
|
+
void _eh;
|
|
138
148
|
return rest;
|
|
139
149
|
}
|
|
140
150
|
var SPEC_VERSION = "avar/1";
|
|
@@ -201,14 +211,20 @@ async function verifyBundle(bundle) {
|
|
|
201
211
|
let chainOk = true;
|
|
202
212
|
let unchainedCount = 0;
|
|
203
213
|
let expectedPrev = GENESIS_PREV_HASH;
|
|
214
|
+
let seededPrev = false;
|
|
204
215
|
for (let i = 0; i < entries.length; i++) {
|
|
205
216
|
const e = entries[i];
|
|
206
217
|
const isLegacyUnchained = !e.entryHash || !e.prevHash;
|
|
207
218
|
if (isLegacyUnchained) {
|
|
208
219
|
unchainedCount++;
|
|
209
220
|
expectedPrev = GENESIS_PREV_HASH;
|
|
221
|
+
seededPrev = false;
|
|
210
222
|
continue;
|
|
211
223
|
}
|
|
224
|
+
if (!seededPrev) {
|
|
225
|
+
expectedPrev = e.prevHash;
|
|
226
|
+
seededPrev = true;
|
|
227
|
+
}
|
|
212
228
|
if (e.prevHash !== expectedPrev) {
|
|
213
229
|
chainOk = false;
|
|
214
230
|
issues.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aarmos/bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Aarmos CLI bridge — local WebSocket host that gives the Aarmos PWA scoped, deny-by-default access to files, shell, git, and read-only Postgres on the developer's machine. The PWA stays the brain; this is the arms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aarmos",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"dev": "tsx src/index.ts dev",
|
|
22
22
|
"start": "node dist/index.js",
|
|
23
23
|
"test": "tsx test/e2e.ts && tsx test/sample-smoke.ts && tsx test/daemon-e2e.ts && node test/crash-handling.mjs && tsx --test test/llm-test.test.mjs",
|
|
24
|
+
"prepack": "node ../../scripts/scrub-private-devdeps.mjs",
|
|
25
|
+
"postpack": "node ../../scripts/scrub-private-devdeps.mjs --restore",
|
|
24
26
|
"prepublishOnly": "npm run build && npm test && node ../../scripts/check-npm-tarball.mjs"
|
|
25
27
|
},
|
|
26
28
|
"files": [
|
|
@@ -49,7 +51,6 @@
|
|
|
49
51
|
"zod": "^3.23.8"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
|
-
"@aarmos/runtime-core": "workspace:*",
|
|
53
54
|
"@types/node": "^22.5.0",
|
|
54
55
|
"@types/ws": "^8.5.12",
|
|
55
56
|
"tsup": "^8.5.1",
|