@basou/cli 0.57.1 → 0.58.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/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/program.js +16 -3
- package/dist/program.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -95,6 +95,8 @@ function printSessionSkip(sid, reason) {
|
|
|
95
95
|
const short = shortSessionId(sid);
|
|
96
96
|
if (reason === "events_jsonl_unreadable") {
|
|
97
97
|
console.error(`Warning: skipped suspect check for ${short}: events.jsonl unreadable`);
|
|
98
|
+
} else if (reason === "session_dir_not_directory") {
|
|
99
|
+
console.error(`Skipped ${sid}: ${reason}`);
|
|
98
100
|
} else {
|
|
99
101
|
console.error(`Skipped ${short}: ${reason}`);
|
|
100
102
|
}
|
|
@@ -111,6 +113,9 @@ function printSessionListSkip(sid, reason) {
|
|
|
111
113
|
case "events_jsonl_unreadable":
|
|
112
114
|
console.error(`Warning: skipped suspect check for ${short}: events.jsonl unreadable`);
|
|
113
115
|
break;
|
|
116
|
+
case "session_dir_not_directory":
|
|
117
|
+
console.error(`Skipped ${sid}: not a directory (a symlink or a file is not followed)`);
|
|
118
|
+
break;
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
121
|
function printTaskSkip(taskId, reason) {
|
|
@@ -12049,7 +12054,7 @@ function maxLen3(values, floor) {
|
|
|
12049
12054
|
import {
|
|
12050
12055
|
assertBasouRootSafe as assertBasouRootSafe17,
|
|
12051
12056
|
basouPaths as basouPaths22,
|
|
12052
|
-
|
|
12057
|
+
enumerateSessionEntries,
|
|
12053
12058
|
findErrorCode as findErrorCode16,
|
|
12054
12059
|
resolveRepositoryRoot as resolveRepositoryRoot12,
|
|
12055
12060
|
resolveSessionId as resolveSessionId5,
|
|
@@ -12083,7 +12088,7 @@ async function doRunVerify(options, ctx) {
|
|
|
12083
12088
|
const repositoryRoot = await resolveRepositoryRootForVerify(cwd);
|
|
12084
12089
|
const paths = basouPaths22(repositoryRoot);
|
|
12085
12090
|
await assertWorkspaceInitialized14(paths.root);
|
|
12086
|
-
const sessionIds = options.session !== void 0 ? [await resolveSessionId5(paths, options.session)] : await
|
|
12091
|
+
const sessionIds = options.session !== void 0 ? [await resolveSessionId5(paths, options.session, { allowNotDirectory: true })] : await enumerateAllSessionNames(paths);
|
|
12087
12092
|
const rows = [];
|
|
12088
12093
|
for (const sessionId of sessionIds) {
|
|
12089
12094
|
const verdict = await verifyEventsChain(paths, sessionId);
|
|
@@ -12130,6 +12135,10 @@ function renderVerdict(row) {
|
|
|
12130
12135
|
return "empty";
|
|
12131
12136
|
}
|
|
12132
12137
|
}
|
|
12138
|
+
async function enumerateAllSessionNames(paths) {
|
|
12139
|
+
const { dirs, notDirectories } = await enumerateSessionEntries(paths);
|
|
12140
|
+
return [...dirs, ...notDirectories].sort();
|
|
12141
|
+
}
|
|
12133
12142
|
async function resolveRepositoryRootForVerify(cwd) {
|
|
12134
12143
|
try {
|
|
12135
12144
|
return await resolveRepositoryRoot12(cwd);
|
|
@@ -12678,6 +12687,7 @@ import {
|
|
|
12678
12687
|
readTaskFile as readTaskFile2,
|
|
12679
12688
|
renderDecisions as renderDecisions3,
|
|
12680
12689
|
renderHandoff as renderHandoff3,
|
|
12690
|
+
SessionIdSchema,
|
|
12681
12691
|
summarizeOrientation,
|
|
12682
12692
|
tryRemoteUrl
|
|
12683
12693
|
} from "@basou/core";
|
|
@@ -13741,6 +13751,9 @@ async function sessionsList(ws, nowProvider) {
|
|
|
13741
13751
|
return { sessions };
|
|
13742
13752
|
}
|
|
13743
13753
|
async function sessionDetail(ws, sessionId) {
|
|
13754
|
+
if (!SessionIdSchema.safeParse(sessionId).success) {
|
|
13755
|
+
throw new HttpError(404, "Session not found");
|
|
13756
|
+
}
|
|
13744
13757
|
let session;
|
|
13745
13758
|
try {
|
|
13746
13759
|
session = await readSessionYaml3(ws.paths, sessionId);
|
|
@@ -14123,7 +14136,7 @@ async function assertWorkspaceInitialized15(basouRoot) {
|
|
|
14123
14136
|
function readBuildStamp() {
|
|
14124
14137
|
if (false) return void 0;
|
|
14125
14138
|
try {
|
|
14126
|
-
return JSON.parse('{"version":"0.
|
|
14139
|
+
return JSON.parse('{"version":"0.58.0","commit":"4026254","committedAt":"2026-10-01T14:04:07+09:00"}');
|
|
14127
14140
|
} catch {
|
|
14128
14141
|
return void 0;
|
|
14129
14142
|
}
|