vibeusage 0.6.1 → 0.6.2
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/package.json
CHANGED
|
@@ -11,14 +11,25 @@ module.exports = {
|
|
|
11
11
|
},
|
|
12
12
|
walkSessions({ root }) {
|
|
13
13
|
if (!fs.existsSync(root)) return [];
|
|
14
|
+
// Recurse: Claude Code writes the main thread under
|
|
15
|
+
// `projects/<project>/<session>.jsonl` AND subagent threads under
|
|
16
|
+
// `projects/<project>/<sessionId>/subagents/agent-*.jsonl`. Subagents
|
|
17
|
+
// burn real Anthropic tokens, so the audit must include them. Sync's
|
|
18
|
+
// walkClaudeProjects (rollout.js) already recurses; this mirrors it.
|
|
14
19
|
const out = [];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const dir =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const stack = [root];
|
|
21
|
+
while (stack.length) {
|
|
22
|
+
const dir = stack.pop();
|
|
23
|
+
let entries;
|
|
24
|
+
try {
|
|
25
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
26
|
+
} catch (_err) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
for (const entry of entries) {
|
|
30
|
+
const p = path.join(dir, entry.name);
|
|
31
|
+
if (entry.isDirectory()) stack.push(p);
|
|
32
|
+
else if (entry.isFile() && entry.name.endsWith(".jsonl")) out.push(p);
|
|
22
33
|
}
|
|
23
34
|
}
|
|
24
35
|
return out;
|