hacklab 0.10.4 → 0.11.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.
Files changed (42) hide show
  1. package/README.md +54 -12
  2. package/dist/cli.js +1 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/config.d.ts.map +1 -1
  5. package/dist/commands/config.js +27 -2
  6. package/dist/commands/config.js.map +1 -1
  7. package/dist/commands/daemon.d.ts +6 -2
  8. package/dist/commands/daemon.d.ts.map +1 -1
  9. package/dist/commands/daemon.js +12 -8
  10. package/dist/commands/daemon.js.map +1 -1
  11. package/dist/commands/sync.d.ts +1 -0
  12. package/dist/commands/sync.d.ts.map +1 -1
  13. package/dist/commands/sync.js +158 -7
  14. package/dist/commands/sync.js.map +1 -1
  15. package/dist/config.d.ts +6 -0
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/config.js.map +1 -1
  18. package/dist/daily-sync.d.ts +20 -3
  19. package/dist/daily-sync.d.ts.map +1 -1
  20. package/dist/daily-sync.js +154 -44
  21. package/dist/daily-sync.js.map +1 -1
  22. package/dist/prompt-consent.d.ts +61 -0
  23. package/dist/prompt-consent.d.ts.map +1 -0
  24. package/dist/prompt-consent.js +167 -0
  25. package/dist/prompt-consent.js.map +1 -0
  26. package/dist/prompt-stats.d.ts +72 -0
  27. package/dist/prompt-stats.d.ts.map +1 -0
  28. package/dist/prompt-stats.js +244 -0
  29. package/dist/prompt-stats.js.map +1 -0
  30. package/dist/scanners/incremental.d.ts +144 -0
  31. package/dist/scanners/incremental.d.ts.map +1 -0
  32. package/dist/scanners/incremental.js +519 -0
  33. package/dist/scanners/incremental.js.map +1 -0
  34. package/dist/scanners/index.d.ts +44 -0
  35. package/dist/scanners/index.d.ts.map +1 -1
  36. package/dist/scanners/index.js +160 -126
  37. package/dist/scanners/index.js.map +1 -1
  38. package/dist/sync.d.ts +25 -0
  39. package/dist/sync.d.ts.map +1 -1
  40. package/dist/sync.js +52 -5
  41. package/dist/sync.js.map +1 -1
  42. package/package.json +1 -1
@@ -0,0 +1,519 @@
1
+ import { mkdir, open, readFile, stat, writeFile } from 'node:fs/promises';
2
+ import { dirname, join } from 'node:path';
3
+ import { getSessionPath } from '../session.js';
4
+ import { claudeCodeFiles, codexDateForFile, codexFiles, codexFileTotals, hermesDbPath, hourlyCutoff, openclawFiles, opencodeDbPath, parseClaudeCodeLine, parseOpenclawLine, scanHermes, scanOpenCode, toDateStr, } from './index.js';
5
+ // The incremental half of the scanners: what `hacklab sync --tick` runs every
6
+ // minute instead of the full stateless re-scan the daily job does.
7
+ //
8
+ // The idea is a tail-follow. Everything the last scan already accounted for is
9
+ // kept in scan-state.json — per-file read offsets plus the aggregates those
10
+ // bytes produced — so a tick only has to stat the log tree and parse the bytes
11
+ // that were appended since. Lines are parsed by the exact same functions the
12
+ // full scanners use (parseClaudeCodeLine / parseOpenclawLine / codexFileTotals),
13
+ // so the tail can be added to aggregates the full scan produced without drift.
14
+ //
15
+ // Anything that makes the tail-follow unsound (a file shrank, or one we were
16
+ // following disappeared) drops that harness back to a full re-read, because we
17
+ // don't track which file contributed which tokens. And the daily `sync --quiet`
18
+ // rebuilds the whole state from its full scan, so drift can never last a day.
19
+ export const SCAN_STATE_VERSION = 1;
20
+ /** Lives next to the session file, so it honors HACKLAB_SESSION_PATH. */
21
+ export function scanStatePath() {
22
+ return join(dirname(getSessionPath()), 'scan-state.json');
23
+ }
24
+ export function emptyHarness() {
25
+ return { files: {}, daily: {}, hourly: {}, models: {} };
26
+ }
27
+ export function emptyState() {
28
+ return {
29
+ version: SCAN_STATE_VERSION,
30
+ harnesses: {},
31
+ dirty: [],
32
+ uploaded: { toolTotals: {}, modelTotals: {} },
33
+ };
34
+ }
35
+ function harness(state, tool) {
36
+ const existing = state.harnesses[tool];
37
+ if (existing)
38
+ return existing;
39
+ const fresh = emptyHarness();
40
+ state.harnesses[tool] = fresh;
41
+ return fresh;
42
+ }
43
+ /**
44
+ * The saved state, or null when there isn't a usable one — missing, corrupt, or
45
+ * written by an older layout. Null means "re-read everything from scratch";
46
+ * callers must treat that rebuild as a baseline, not as new tokens.
47
+ */
48
+ export async function loadScanState() {
49
+ try {
50
+ const parsed = JSON.parse(await readFile(scanStatePath(), 'utf8'));
51
+ if (parsed?.version !== SCAN_STATE_VERSION)
52
+ return null;
53
+ if (!parsed.harnesses || typeof parsed.harnesses !== 'object')
54
+ return null;
55
+ parsed.dirty ??= [];
56
+ parsed.uploaded ??= { toolTotals: {}, modelTotals: {} };
57
+ return parsed;
58
+ }
59
+ catch {
60
+ return null;
61
+ }
62
+ }
63
+ /** Persist the state, pruning hourly buckets that fell out of the 90-day window
64
+ * the server keeps (they'd otherwise accumulate forever). Best-effort. */
65
+ export async function saveScanState(state) {
66
+ const cutoff = hourlyCutoff();
67
+ for (const h of Object.values(state.harnesses)) {
68
+ for (const key of Object.keys(h.hourly)) {
69
+ if ((key.split('|')[0] ?? '') < cutoff)
70
+ delete h.hourly[key];
71
+ }
72
+ }
73
+ try {
74
+ await mkdir(dirname(scanStatePath()), { recursive: true });
75
+ await writeFile(scanStatePath(), `${JSON.stringify(state)}\n`, 'utf8');
76
+ }
77
+ catch {
78
+ // a state we can't persist just means the next tick re-reads everything
79
+ }
80
+ }
81
+ // ---- aggregate bookkeeping -------------------------------------------------
82
+ function addDaily(h, date, model, tokens, messages, dirty) {
83
+ const key = `${date}|${model}`;
84
+ const existing = h.daily[key];
85
+ if (existing) {
86
+ existing.tokens += tokens;
87
+ existing.messages += messages;
88
+ }
89
+ else {
90
+ h.daily[key] = { tokens, messages };
91
+ }
92
+ if (model)
93
+ h.models[model] = (h.models[model] ?? 0) + tokens;
94
+ dirty.add(date);
95
+ }
96
+ function addHourly(h, date, hour, model, tokens, messages, dirty) {
97
+ if (date < hourlyCutoff())
98
+ return;
99
+ const key = `${date}|${hour}|${model}`;
100
+ const existing = h.hourly[key];
101
+ if (existing) {
102
+ existing.tokens += tokens;
103
+ existing.messages += messages;
104
+ }
105
+ else {
106
+ h.hourly[key] = { tokens, messages };
107
+ }
108
+ dirty.add(date);
109
+ }
110
+ /** A full scanner's result as the maps the state stores. */
111
+ export function aggregatesOfResult(result) {
112
+ const daily = {};
113
+ for (const entry of result.daily) {
114
+ daily[`${entry.date}|${entry.model ?? ''}`] = {
115
+ tokens: entry.tokens,
116
+ messages: entry.messages ?? 0,
117
+ };
118
+ }
119
+ const hourly = {};
120
+ for (const entry of result.hourly) {
121
+ hourly[`${entry.date}|${entry.hour}|${entry.model ?? ''}`] = {
122
+ tokens: entry.tokens,
123
+ messages: entry.messages ?? 0,
124
+ };
125
+ }
126
+ return { daily, hourly, models: { ...result.models } };
127
+ }
128
+ function aggregatesOf(h) {
129
+ return {
130
+ daily: structuredClone(h.daily),
131
+ hourly: structuredClone(h.hourly),
132
+ models: { ...h.models },
133
+ };
134
+ }
135
+ /**
136
+ * Mark every date whose rows moved between two versions of a harness's
137
+ * aggregates. Used whenever a harness is re-read rather than tailed (a SQLite
138
+ * requery, or a JSONL harness whose tail-follow was invalidated): most dates
139
+ * come back identical, so diffing keeps the upload down to what actually
140
+ * changed instead of re-sending the user's whole history.
141
+ */
142
+ function markMovedDates(before, after, dirty) {
143
+ const compare = (a, b) => {
144
+ for (const key of new Set([...Object.keys(a), ...Object.keys(b)])) {
145
+ const x = a[key];
146
+ const y = b[key];
147
+ if (!x || !y || x.tokens !== y.tokens || x.messages !== y.messages) {
148
+ dirty.add(key.split('|')[0] ?? '');
149
+ }
150
+ }
151
+ };
152
+ compare(before.daily, after.daily);
153
+ compare(before.hourly, after.hourly);
154
+ }
155
+ /** Swap in freshly scanned aggregates, dirtying the dates that moved. */
156
+ function replaceAggregates(h, next, dirty) {
157
+ markMovedDates({ daily: h.daily, hourly: h.hourly, models: h.models }, next, dirty);
158
+ h.daily = next.daily;
159
+ h.hourly = next.hourly;
160
+ h.models = next.models;
161
+ }
162
+ // ---- reading the tail ------------------------------------------------------
163
+ async function statOrNull(path) {
164
+ try {
165
+ return await stat(path);
166
+ }
167
+ catch {
168
+ return null;
169
+ }
170
+ }
171
+ /**
172
+ * Read `[from, to)` and hand back only whole lines. A harness may be mid-append
173
+ * when we look, so the trailing partial line is left for the next tick — that's
174
+ * what the returned offset points at.
175
+ */
176
+ export async function readCompleteLines(path, from, to) {
177
+ if (to <= from)
178
+ return { text: '', offset: from };
179
+ const handle = await open(path, 'r');
180
+ try {
181
+ const buf = Buffer.alloc(to - from);
182
+ const { bytesRead } = await handle.read(buf, 0, buf.length, from);
183
+ const chunk = buf.subarray(0, bytesRead);
184
+ // Byte-wise, not string-wise: the chunk can end mid-codepoint.
185
+ const lastNewline = chunk.lastIndexOf(0x0a);
186
+ if (lastNewline < 0)
187
+ return { text: '', offset: from };
188
+ return {
189
+ text: chunk.subarray(0, lastNewline).toString('utf8'),
190
+ offset: from + lastNewline + 1,
191
+ };
192
+ }
193
+ finally {
194
+ await handle.close();
195
+ }
196
+ }
197
+ /** The real harnesses. Injectable so the tick can be tested against a tmp dir. */
198
+ export function defaultSources() {
199
+ return {
200
+ jsonl: [
201
+ {
202
+ tool: 'claude_code',
203
+ files: claudeCodeFiles,
204
+ parse: parseClaudeCodeLine,
205
+ },
206
+ { tool: 'openclaw', files: openclawFiles, parse: parseOpenclawLine },
207
+ ],
208
+ codex: { files: codexFiles, dateFor: codexDateForFile },
209
+ sqlite: [
210
+ { tool: 'hermes', dbPath: hermesDbPath, scan: scanHermes },
211
+ { tool: 'opencode', dbPath: opencodeDbPath, scan: scanOpenCode },
212
+ ],
213
+ };
214
+ }
215
+ async function statFiles(paths) {
216
+ const out = [];
217
+ for (const path of paths) {
218
+ const s = await statOrNull(path);
219
+ if (s)
220
+ out.push({ path, size: s.size, mtimeMs: s.mtimeMs, mtime: s.mtime });
221
+ }
222
+ return out;
223
+ }
224
+ /**
225
+ * Can we still trust this harness's aggregates? Not if a file we were following
226
+ * lost bytes or vanished: we know what those files contributed in total but not
227
+ * per file, so there's nothing to subtract and the only repair is a re-read.
228
+ */
229
+ function tailInvalidated(h, files) {
230
+ const present = new Map(files.map((f) => [f.path, f]));
231
+ for (const [path, state] of Object.entries(h.files)) {
232
+ const now = present.get(path);
233
+ if (!now || now.size < state.offset)
234
+ return true;
235
+ }
236
+ return false;
237
+ }
238
+ function resetHarness(h) {
239
+ h.files = {};
240
+ if (h.codexTotals)
241
+ h.codexTotals = {};
242
+ h.daily = {};
243
+ h.hourly = {};
244
+ h.models = {};
245
+ }
246
+ async function tickJsonl(state, src, dirty) {
247
+ const h = harness(state, src.tool);
248
+ const files = await statFiles(await src.files());
249
+ const invalidated = tailInvalidated(h, files);
250
+ // On a re-read, collect into a throwaway set and diff at the end: most of the
251
+ // rebuilt aggregate is identical to what we had, and only the difference is
252
+ // worth re-uploading.
253
+ const before = invalidated ? aggregatesOf(h) : null;
254
+ const target = invalidated ? new Set() : dirty;
255
+ if (invalidated)
256
+ resetHarness(h);
257
+ let changed = invalidated;
258
+ for (const file of files) {
259
+ const prev = h.files[file.path];
260
+ if (prev && prev.size === file.size && prev.mtimeMs === file.mtimeMs) {
261
+ continue;
262
+ }
263
+ const from = prev?.offset ?? 0;
264
+ const { text, offset } = await readCompleteLines(file.path, from, file.size).catch(() => ({ text: '', offset: from }));
265
+ let fallbackDate = null;
266
+ for (const line of text.split('\n')) {
267
+ const usage = src.parse(line);
268
+ if (!usage)
269
+ continue;
270
+ let date = usage.date;
271
+ if (!date) {
272
+ fallbackDate ??= toDateStr(file.mtime);
273
+ date = fallbackDate;
274
+ }
275
+ addDaily(h, date, usage.model, usage.tokens, 1, target);
276
+ if (usage.hour !== null) {
277
+ addHourly(h, date, usage.hour, usage.model, usage.tokens, 1, target);
278
+ }
279
+ }
280
+ h.files[file.path] = { size: file.size, mtimeMs: file.mtimeMs, offset };
281
+ changed = true;
282
+ }
283
+ if (before)
284
+ markMovedDates(before, aggregatesOf(h), dirty);
285
+ return changed;
286
+ }
287
+ async function tickCodex(state, src, dirty) {
288
+ const h = harness(state, 'codex');
289
+ h.codexTotals ??= {};
290
+ const files = await statFiles(await src.files());
291
+ const invalidated = tailInvalidated(h, files);
292
+ const before = invalidated ? aggregatesOf(h) : null;
293
+ const target = invalidated ? new Set() : dirty;
294
+ if (invalidated) {
295
+ resetHarness(h);
296
+ h.codexTotals = {};
297
+ }
298
+ let changed = invalidated;
299
+ for (const file of files) {
300
+ const prev = h.files[file.path];
301
+ if (prev && prev.size === file.size && prev.mtimeMs === file.mtimeMs) {
302
+ continue;
303
+ }
304
+ const from = prev?.offset ?? 0;
305
+ const { text, offset } = await readCompleteLines(file.path, from, file.size).catch(() => ({ text: '', offset: from }));
306
+ const { maxTotal, model } = codexFileTotals(text);
307
+ const stored = h.codexTotals[file.path];
308
+ const date = stored?.date ?? src.dateFor(file.path) ?? toDateStr(file.mtime);
309
+ const storedMax = stored?.maxTotal ?? 0;
310
+ const nextMax = Math.max(storedMax, maxTotal);
311
+ // A session that switches model mid-file leaves the earlier tokens under the
312
+ // old model — the full scan credits them all to the last model seen. The
313
+ // daily repair pass reconciles that.
314
+ const nextModel = model || stored?.model || '';
315
+ if (nextMax > storedMax) {
316
+ // Running totals: only the growth is new. `messages` counts the session
317
+ // once, the way the full scan does (one addDaily per file).
318
+ addDaily(h, date, nextModel, nextMax - storedMax, storedMax === 0 ? 1 : 0, target);
319
+ }
320
+ h.codexTotals[file.path] = { maxTotal: nextMax, model: nextModel, date };
321
+ h.files[file.path] = { size: file.size, mtimeMs: file.mtimeMs, offset };
322
+ changed = true;
323
+ }
324
+ if (before)
325
+ markMovedDates(before, aggregatesOf(h), dirty);
326
+ return changed;
327
+ }
328
+ /**
329
+ * SQLite-backed harnesses can't be tailed — a write lands anywhere in the file —
330
+ * but their DBs are small, so the incremental strategy is to fingerprint the db
331
+ * and its -wal and re-run the harness's normal query only when one moved.
332
+ */
333
+ async function tickSqlite(state, src, dirty) {
334
+ const h = harness(state, src.tool);
335
+ const path = src.dbPath();
336
+ const db = await statOrNull(path);
337
+ const wal = await statOrNull(`${path}-wal`);
338
+ const dbMtimeMs = db?.mtimeMs ?? 0;
339
+ const walMtimeMs = wal?.mtimeMs ?? 0;
340
+ if (h.dbMtimeMs === dbMtimeMs && h.walMtimeMs === walMtimeMs)
341
+ return false;
342
+ replaceAggregates(h, aggregatesOfResult(await src.scan()), dirty);
343
+ h.dbMtimeMs = dbMtimeMs;
344
+ h.walMtimeMs = walMtimeMs;
345
+ return true;
346
+ }
347
+ /**
348
+ * One incremental pass over every harness. `prev` is the saved state, or null
349
+ * for a cold start — in which case this reads everything and marks nothing
350
+ * dirty: those tokens are already on the server (the daily job put them there),
351
+ * and re-uploading every date would only invite the reconcile to prune rows
352
+ * this scan can't see (Cursor's, above all).
353
+ */
354
+ export async function runTick(prev, sources = defaultSources()) {
355
+ const cold = prev === null;
356
+ const state = prev ?? emptyState();
357
+ const dirty = new Set(state.dirty);
358
+ let changed = cold;
359
+ for (const src of sources.jsonl) {
360
+ if (await tickJsonl(state, src, dirty))
361
+ changed = true;
362
+ }
363
+ if (await tickCodex(state, sources.codex, dirty))
364
+ changed = true;
365
+ for (const src of sources.sqlite) {
366
+ if (await tickSqlite(state, src, dirty))
367
+ changed = true;
368
+ }
369
+ state.dirty = cold ? [] : [...dirty].sort();
370
+ return { state, changed };
371
+ }
372
+ // ---- payload ---------------------------------------------------------------
373
+ /** Cumulative per-tool and per-model totals for this machine. */
374
+ export function cumulativeTotals(state) {
375
+ const toolTotals = {};
376
+ const modelTotals = {};
377
+ for (const [tool, h] of Object.entries(state.harnesses)) {
378
+ let sum = 0;
379
+ for (const value of Object.values(h.daily))
380
+ sum += value.tokens;
381
+ toolTotals[tool] = sum;
382
+ for (const [model, tokens] of Object.entries(h.models)) {
383
+ modelTotals[model] = (modelTotals[model] ?? 0) + tokens;
384
+ }
385
+ }
386
+ return { toolTotals, modelTotals };
387
+ }
388
+ export function sameTotals(a, b) {
389
+ const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
390
+ for (const key of keys)
391
+ if ((a[key] ?? 0) !== (b[key] ?? 0))
392
+ return false;
393
+ return true;
394
+ }
395
+ /**
396
+ * What a tick uploads: cumulative tool/model totals (the server diffs those
397
+ * against its own per-machine snapshot) plus the daily and hourly rows for the
398
+ * dirty dates only.
399
+ *
400
+ * Every harness's rows go out for a dirty date, including Cursor's — which the
401
+ * tick never scans, and carries over from the last full scan instead. The
402
+ * server reconciles a date by deleting this machine's rows for it that the
403
+ * payload didn't mention, so a date has to be reported complete or the harnesses
404
+ * left out of it lose that day.
405
+ */
406
+ export function tickPayload(state) {
407
+ const dirty = new Set(state.dirty);
408
+ const dailyTotals = [];
409
+ const hourlyTotals = [];
410
+ for (const [tool, h] of Object.entries(state.harnesses)) {
411
+ for (const [key, value] of Object.entries(h.daily)) {
412
+ const [date = '', model = ''] = key.split('|');
413
+ if (!dirty.has(date) || value.tokens <= 0)
414
+ continue;
415
+ dailyTotals.push({
416
+ date,
417
+ tool,
418
+ tokens: value.tokens,
419
+ messages: value.messages,
420
+ model: model || undefined,
421
+ });
422
+ }
423
+ for (const [key, value] of Object.entries(h.hourly)) {
424
+ const [date = '', hour = '0', model = ''] = key.split('|');
425
+ if (!dirty.has(date) || value.tokens <= 0)
426
+ continue;
427
+ hourlyTotals.push({
428
+ date,
429
+ hour: Number(hour),
430
+ tool,
431
+ model: model || undefined,
432
+ tokens: value.tokens,
433
+ messages: value.messages,
434
+ });
435
+ }
436
+ }
437
+ const { toolTotals, modelTotals } = cumulativeTotals(state);
438
+ return {
439
+ toolTotals,
440
+ dailyTotals,
441
+ hourlyTotals,
442
+ modelTotals,
443
+ grandTotal: Object.values(toolTotals).reduce((a, b) => a + b, 0),
444
+ cursorStats: null,
445
+ cursorScanStatus: { source: 'none' },
446
+ };
447
+ }
448
+ /** Called on a 200: the dirty dates are on the server now. */
449
+ export function markUploaded(state) {
450
+ state.dirty = [];
451
+ state.uploaded = cumulativeTotals(state);
452
+ state.lastError = undefined;
453
+ state.nextAllowedAt = undefined;
454
+ }
455
+ // ---- the daily repair pass -------------------------------------------------
456
+ async function snapshotFileCursors(h, paths) {
457
+ for (const file of await statFiles(paths)) {
458
+ // Offsets are set to EOF *after* the full scan read the file, so a file that
459
+ // grew mid-scan is re-read from the end rather than double-counted — the
460
+ // next repair picks up whatever slipped through.
461
+ h.files[file.path] = {
462
+ size: file.size,
463
+ mtimeMs: file.mtimeMs,
464
+ offset: file.size,
465
+ };
466
+ }
467
+ }
468
+ /**
469
+ * Rebuild the whole state from a full scan's results — the self-healing half of
470
+ * the design. Whatever the tick's tail-follow got wrong (a rotated log, a
471
+ * mid-file model switch, a Codex date guessed from an mtime) is corrected here,
472
+ * so incremental drift can never outlive a day. Best-effort: a state we failed
473
+ * to rebuild costs a tick, never the sync that just succeeded.
474
+ */
475
+ export async function rebuildScanState(results, sources = defaultSources()) {
476
+ try {
477
+ const state = emptyState();
478
+ for (const result of results) {
479
+ replaceAggregates(harness(state, result.tool), aggregatesOfResult(result), new Set());
480
+ }
481
+ for (const src of sources.jsonl) {
482
+ await snapshotFileCursors(harness(state, src.tool), await src.files());
483
+ }
484
+ // Codex has to be re-read: its per-file running totals aren't recoverable
485
+ // from the aggregate, and without them the next tick would count each file's
486
+ // whole total a second time.
487
+ const codex = harness(state, 'codex');
488
+ codex.codexTotals = {};
489
+ const codexPaths = await sources.codex.files();
490
+ await snapshotFileCursors(codex, codexPaths);
491
+ for (const path of codexPaths) {
492
+ const cursor = codex.files[path];
493
+ if (!cursor)
494
+ continue;
495
+ const content = await readFile(path, 'utf8').catch(() => '');
496
+ const { maxTotal, model } = codexFileTotals(content);
497
+ if (maxTotal <= 0)
498
+ continue;
499
+ codex.codexTotals[path] = {
500
+ maxTotal,
501
+ model,
502
+ date: sources.codex.dateFor(path) ?? toDateStr(new Date(cursor.mtimeMs)),
503
+ };
504
+ }
505
+ for (const src of sources.sqlite) {
506
+ const h = harness(state, src.tool);
507
+ const path = src.dbPath();
508
+ h.dbMtimeMs = (await statOrNull(path))?.mtimeMs ?? 0;
509
+ h.walMtimeMs = (await statOrNull(`${path}-wal`))?.mtimeMs ?? 0;
510
+ }
511
+ // The full payload just went out, so nothing is outstanding.
512
+ state.uploaded = cumulativeTotals(state);
513
+ await saveScanState(state);
514
+ }
515
+ catch {
516
+ // never fail the sync that called us
517
+ }
518
+ }
519
+ //# sourceMappingURL=incremental.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incremental.js","sourceRoot":"","sources":["../../src/scanners/incremental.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,EAGf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAGZ,SAAS,GAEV,MAAM,YAAY,CAAA;AAEnB,8EAA8E;AAC9E,mEAAmE;AACnE,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,iFAAiF;AACjF,+EAA+E;AAC/E,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,gFAAgF;AAChF,8EAA8E;AAE9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAA;AA8CnC,yEAAyE;AACzE,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;AACzD,CAAC;AAED,MAAM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,CAAA;YAC5D,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;YACpD,IAAI,QAAQ,IAAI,CAAC;gBAAE,SAAQ;YAC3B,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG;gBACxB,QAAQ;gBACR,KAAK;gBACL,IAAI,EACF,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;aACrE,CAAA;QACH,CAAC;QAED,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACjC,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;YAClC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,CAAA;YACzB,CAAC,CAAC,SAAS,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,CAAA;YACpD,CAAC,CAAC,UAAU,GAAG,CAAC,MAAM,UAAU,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,CAAA;QAChE,CAAC;QAED,6DAA6D;QAC7D,KAAK,CAAC,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;QACxC,MAAM,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,qCAAqC;IACvC,CAAC;AACH,CAAC"}
@@ -1,5 +1,31 @@
1
1
  import { type CursorScanStatus, type CursorStats, type DailyToolEntry, type HourlyEntry, type ScanResult } from './util.js';
2
2
  export * from './util.js';
3
+ export declare function claudeProjectsDir(): string;
4
+ export declare function codexSessionsDir(): string;
5
+ export declare function openclawAgentsDir(): string;
6
+ export declare function hermesDbPath(): string;
7
+ export declare function opencodeDir(): string;
8
+ export declare function opencodeDbPath(): string;
9
+ /**
10
+ * One usage-bearing line from a JSONL harness log, as the per-line parsers
11
+ * return it. `date === null` means the line carried no usable timestamp — the
12
+ * caller falls back to the file's mtime day, which it (unlike a pure parser)
13
+ * can cheaply resolve and memoize per file.
14
+ *
15
+ * These parsers exist so the full scan and the incremental tick
16
+ * (scanners/incremental.ts) read a line exactly the same way: the tick appends
17
+ * to aggregates the full scan produced, so any divergence would show up as
18
+ * drift in a user's numbers.
19
+ */
20
+ export type UsageLine = {
21
+ tokens: number;
22
+ model: string;
23
+ date: string | null;
24
+ hour: number | null;
25
+ };
26
+ export declare function parseClaudeCodeLine(line: string): UsageLine | null;
27
+ /** Every Claude Code transcript on this machine. */
28
+ export declare function claudeCodeFiles(): Promise<string[]>;
3
29
  export declare function scanClaudeCode(): Promise<ScanResult>;
4
30
  /**
5
31
  * Extract the session date from a Codex session path laid out as
@@ -7,8 +33,26 @@ export declare function scanClaudeCode(): Promise<ScanResult>;
7
33
  * either separator so it works on Windows (backslashes) too.
8
34
  */
9
35
  export declare function codexDateFromRelPath(relPath: string): string | null;
36
+ /** Session date for a Codex log path (.codex/sessions/YYYY/MM/DD/file.jsonl). */
37
+ export declare function codexDateForFile(filePath: string): string | null;
38
+ /** Every Codex session log on this machine. */
39
+ export declare function codexFiles(): Promise<string[]>;
40
+ /**
41
+ * The running token total (and last model) a chunk of a Codex session log
42
+ * reports. Codex writes cumulative totals rather than per-message deltas, so a
43
+ * file's contribution is the max it ever reports — which also means an appended
44
+ * chunk can only ever raise that max, and the incremental tick can take the
45
+ * difference without re-reading the whole file.
46
+ */
47
+ export declare function codexFileTotals(content: string): {
48
+ maxTotal: number;
49
+ model: string;
50
+ };
10
51
  export declare function scanCodex(): Promise<ScanResult>;
11
52
  export declare function scanHermes(): Promise<ScanResult>;
53
+ export declare function parseOpenclawLine(line: string): UsageLine | null;
54
+ /** Every OpenClaw session log, across all of its agents. */
55
+ export declare function openclawFiles(): Promise<string[]>;
12
56
  export declare function scanOpenclaw(): Promise<ScanResult>;
13
57
  export declare function scanOpenCode(): Promise<ScanResult>;
14
58
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scanners/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EAGnB,KAAK,WAAW,EAChB,KAAK,UAAU,EAGhB,MAAM,WAAW,CAAA;AAElB,cAAc,WAAW,CAAA;AAKzB,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,CAuD1D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnE;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,CA4CrD;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC,CAkDtD;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC,CAgFxD;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC,CAyFxD;AAsCD;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAU1D;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,UAAU,CAAC,CA8D3D;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CAkHzD;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,WAAW,EAAE,cAAc,EAAE,CAAA;IAC7B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;IAC/B,gBAAgB,EAAE,gBAAgB,CAAA;CACnC,CAAA;AAsBD,6EAA6E;AAC7E,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