@basou/cli 0.56.0 → 0.57.1
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 +12 -4
- package/dist/index.js.map +1 -1
- package/dist/program.js +12 -4
- package/dist/program.js.map +1 -1
- package/package.json +2 -2
package/dist/program.js
CHANGED
|
@@ -12055,6 +12055,13 @@ import {
|
|
|
12055
12055
|
resolveSessionId as resolveSessionId5,
|
|
12056
12056
|
verifyEventsChain
|
|
12057
12057
|
} from "@basou/core";
|
|
12058
|
+
var PASSING_STATUSES = /* @__PURE__ */ new Set([
|
|
12059
|
+
"verified",
|
|
12060
|
+
"unchained",
|
|
12061
|
+
"empty",
|
|
12062
|
+
"incomplete",
|
|
12063
|
+
"in_progress"
|
|
12064
|
+
]);
|
|
12058
12065
|
function registerVerifyCommand(program) {
|
|
12059
12066
|
program.command("verify").description("Verify the tamper-evidence hash chain of sessions' event logs (read-only)").option("--session <id>", "Verify a single session (unique id prefix accepted)").option("--all", "Verify every session (the default when --session is omitted)").option("--json", "Output the verdicts as JSON").option("-v, --verbose", "Show error causes").action(async (opts) => {
|
|
12060
12067
|
await runVerify(opts);
|
|
@@ -12089,7 +12096,6 @@ async function doRunVerify(options, ctx) {
|
|
|
12089
12096
|
...verdict.sessionYamlInvalid === true ? { session_yaml_invalid: true } : {}
|
|
12090
12097
|
});
|
|
12091
12098
|
}
|
|
12092
|
-
const tamperedCount = rows.filter((r) => r.status === "tampered").length;
|
|
12093
12099
|
if (options.json === true) {
|
|
12094
12100
|
console.log(JSON.stringify(rows, null, 2));
|
|
12095
12101
|
} else {
|
|
@@ -12099,10 +12105,10 @@ async function doRunVerify(options, ctx) {
|
|
|
12099
12105
|
}
|
|
12100
12106
|
const tally = (status) => rows.filter((r) => r.status === status).length;
|
|
12101
12107
|
console.log(
|
|
12102
|
-
`Sessions: ${rows.length} total \u2014 ${tally("verified")} verified, ${tally("unchained")} unchained, ${tally("empty")} empty, ${tally("incomplete")} incomplete, ${tally("in_progress")} in_progress, ${
|
|
12108
|
+
`Sessions: ${rows.length} total \u2014 ${tally("verified")} verified, ${tally("unchained")} unchained, ${tally("empty")} empty, ${tally("incomplete")} incomplete, ${tally("in_progress")} in_progress, ${tally("unsupported")} unsupported, ${tally("tampered")} tampered`
|
|
12103
12109
|
);
|
|
12104
12110
|
}
|
|
12105
|
-
if (
|
|
12111
|
+
if (rows.some((r) => !PASSING_STATUSES.has(r.status))) {
|
|
12106
12112
|
process.exitCode = 1;
|
|
12107
12113
|
}
|
|
12108
12114
|
}
|
|
@@ -12116,6 +12122,8 @@ function renderVerdict(row) {
|
|
|
12116
12122
|
return "incomplete (session.yaml missing; re-import to repair)";
|
|
12117
12123
|
case "in_progress":
|
|
12118
12124
|
return `in_progress (${row.event_count} events; live session, anchor written at finalize)`;
|
|
12125
|
+
case "unsupported":
|
|
12126
|
+
return "unsupported (session.yaml written by a newer basou; upgrade basou to verify it)";
|
|
12119
12127
|
case "unchained":
|
|
12120
12128
|
return "unchained (session created before event-log chaining)";
|
|
12121
12129
|
case "empty":
|
|
@@ -14115,7 +14123,7 @@ async function assertWorkspaceInitialized15(basouRoot) {
|
|
|
14115
14123
|
function readBuildStamp() {
|
|
14116
14124
|
if (false) return void 0;
|
|
14117
14125
|
try {
|
|
14118
|
-
return JSON.parse('{"version":"0.
|
|
14126
|
+
return JSON.parse('{"version":"0.57.1","commit":"0b14831","committedAt":"2026-10-01T11:07:24+09:00"}');
|
|
14119
14127
|
} catch {
|
|
14120
14128
|
return void 0;
|
|
14121
14129
|
}
|