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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeusage",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Codex CLI token usage tracker (macOS-first, notify-driven).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -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
- for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
16
- if (!entry.isDirectory()) continue;
17
- const dir = path.join(root, entry.name);
18
- for (const f of fs.readdirSync(dir, { withFileTypes: true })) {
19
- if (!f.isFile()) continue;
20
- if (!f.name.endsWith(".jsonl")) continue;
21
- out.push(path.join(dir, f.name));
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;