hacklab 0.19.0 → 0.20.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 (44) hide show
  1. package/README.md +33 -25
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/config.d.ts.map +1 -1
  5. package/dist/commands/config.js +18 -19
  6. package/dist/commands/config.js.map +1 -1
  7. package/dist/commands/scan.d.ts.map +1 -1
  8. package/dist/commands/scan.js +5 -2
  9. package/dist/commands/scan.js.map +1 -1
  10. package/dist/commands/setup.d.ts.map +1 -1
  11. package/dist/commands/setup.js +32 -26
  12. package/dist/commands/setup.js.map +1 -1
  13. package/dist/commands/sync.d.ts.map +1 -1
  14. package/dist/commands/sync.js +32 -17
  15. package/dist/commands/sync.js.map +1 -1
  16. package/dist/config.d.ts +8 -2
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +1 -1
  19. package/dist/config.js.map +1 -1
  20. package/dist/prompt-consent.d.ts +37 -23
  21. package/dist/prompt-consent.d.ts.map +1 -1
  22. package/dist/prompt-consent.js +75 -58
  23. package/dist/prompt-consent.js.map +1 -1
  24. package/dist/prompt-stats.d.ts +116 -7
  25. package/dist/prompt-stats.d.ts.map +1 -1
  26. package/dist/prompt-stats.js +205 -25
  27. package/dist/prompt-stats.js.map +1 -1
  28. package/dist/scanners/incremental.d.ts +114 -17
  29. package/dist/scanners/incremental.d.ts.map +1 -1
  30. package/dist/scanners/incremental.js +235 -74
  31. package/dist/scanners/incremental.js.map +1 -1
  32. package/dist/scanners/index.d.ts +7 -3
  33. package/dist/scanners/index.d.ts.map +1 -1
  34. package/dist/scanners/index.js +8 -40
  35. package/dist/scanners/index.js.map +1 -1
  36. package/dist/scanners/util.d.ts +32 -15
  37. package/dist/scanners/util.d.ts.map +1 -1
  38. package/dist/scanners/util.js +10 -34
  39. package/dist/scanners/util.js.map +1 -1
  40. package/dist/sync.d.ts +3 -3
  41. package/dist/sync.d.ts.map +1 -1
  42. package/dist/sync.js +27 -14
  43. package/dist/sync.js.map +1 -1
  44. package/package.json +1 -1
@@ -1,5 +1,10 @@
1
- import { type AggregateScan, type ScanResult, type TokensMessages, type Tool, type UsageLine } from './index.js';
2
- export declare const SCAN_STATE_VERSION = 1;
1
+ import { type PromptActivityAggregate, type PromptLine } from '../prompt-stats.js';
2
+ import { type AggregateScan, type PromptActivity, type ScanResult, type TokensMessages, type Tool, type UsageLine } from './index.js';
3
+ export declare const SCAN_STATE_VERSION = 2;
4
+ /** How long a session is kept in the state after its last prompt. */
5
+ export declare const PROMPT_SESSION_RETENTION_DAYS = 45;
6
+ /** How long a per-day prompt tally is kept. Matches the wire's date cap. */
7
+ export declare const PROMPT_DAILY_RETENTION_DAYS = 400;
3
8
  /** Where a file's tail-follow stands: what we saw, and how far we read. */
4
9
  export type FileState = {
5
10
  size: number;
@@ -22,11 +27,33 @@ export type HarnessState = {
22
27
  walMtimeMs?: number;
23
28
  /** "date|model" -> tokens/messages */
24
29
  daily: Record<string, TokensMessages>;
25
- /** "date|hour|model" -> tokens/messages */
26
- hourly: Record<string, TokensMessages>;
27
30
  /** model -> cumulative tokens */
28
31
  models: Record<string, number>;
29
32
  };
33
+ /**
34
+ * The prompt half of the state: the same tail-read that counts tokens also
35
+ * counts the user's own prompts, so `promptActivity` can ride out on the tick
36
+ * instead of waiting a day.
37
+ *
38
+ * Unlike the token rows, prompt rows are upserted with GREATEST semantics per
39
+ * (machine, session) and (machine, date), so a resend is free and a date never
40
+ * has to go out "complete". That's why the dirty sets here are per-session and
41
+ * per-date and can be drained a capped batch at a time.
42
+ */
43
+ export type PromptState = PromptActivityAggregate & {
44
+ /** Session ids changed since the last accepted upload. */
45
+ dirtySessions: string[];
46
+ /** Dates whose tally changed since the last accepted upload. */
47
+ dirtyDates: string[];
48
+ /**
49
+ * Exactly what the last `tickPayload` put on the wire. `markUploaded` clears
50
+ * this and nothing else, so anything a cap held back stays dirty.
51
+ */
52
+ sent?: {
53
+ sessions: string[];
54
+ dates: string[];
55
+ };
56
+ };
30
57
  export type ScanState = {
31
58
  version: number;
32
59
  harnesses: Record<string, HarnessState>;
@@ -38,6 +65,8 @@ export type ScanState = {
38
65
  * rows for it. Cleared only on a 200, so a failed POST retries next tick.
39
66
  */
40
67
  dirty: string[];
68
+ /** Prompt sessions and per-day counts, plus what's outstanding. */
69
+ prompts: PromptState;
41
70
  /** Cumulative totals as of the last accepted upload. */
42
71
  uploaded: {
43
72
  toolTotals: Record<string, number>;
@@ -51,6 +80,7 @@ export type ScanState = {
51
80
  /** Lives next to the session file, so it honors HACKLAB_SESSION_PATH. */
52
81
  export declare function scanStatePath(): string;
53
82
  export declare function emptyHarness(): HarnessState;
83
+ export declare function emptyPromptState(): PromptState;
54
84
  export declare function emptyState(): ScanState;
55
85
  /**
56
86
  * The saved state, or null when there isn't a usable one — missing, corrupt, or
@@ -58,12 +88,11 @@ export declare function emptyState(): ScanState;
58
88
  * callers must treat that rebuild as a baseline, not as new tokens.
59
89
  */
60
90
  export declare function loadScanState(): Promise<ScanState | null>;
61
- /** Persist the state, pruning hourly buckets that fell out of the 90-day window
62
- * the server keeps (they'd otherwise accumulate forever). Best-effort. */
91
+ /** Persist the state, pruning prompt rows that aged out of their retention
92
+ * window (they'd otherwise accumulate forever). Best-effort. */
63
93
  export declare function saveScanState(state: ScanState): Promise<void>;
64
94
  type Aggregates = {
65
95
  daily: Record<string, TokensMessages>;
66
- hourly: Record<string, TokensMessages>;
67
96
  models: Record<string, number>;
68
97
  };
69
98
  /** A full scanner's result as the maps the state stores. */
@@ -81,6 +110,12 @@ export type JsonlSource = {
81
110
  tool: Tool;
82
111
  files: () => Promise<string[]>;
83
112
  parse: (line: string) => UsageLine | null;
113
+ /**
114
+ * Claude Code only: the same line read as prompt activity. Set here rather
115
+ * than branching on `tool` so the tail-read stays one pass and a test can
116
+ * point a prompt-bearing harness at a tmp dir.
117
+ */
118
+ parsePrompt?: (line: string) => PromptLine | null;
84
119
  };
85
120
  export type CodexSource = {
86
121
  files: () => Promise<string[]>;
@@ -106,10 +141,15 @@ export type TickOutcome = {
106
141
  };
107
142
  /**
108
143
  * One incremental pass over every harness. `prev` is the saved state, or null
109
- * for a cold start — in which case this reads everything and marks nothing
110
- * dirty: those tokens are already on the server (the daily job put them there),
111
- * and re-uploading every date would only invite the reconcile to prune rows
112
- * this scan can't see (Cursor's, above all).
144
+ * for a cold start — in which case this reads everything and marks no *token*
145
+ * date dirty: those tokens are already on the server (the daily job put them
146
+ * there), and re-uploading every date would only invite the reconcile to prune
147
+ * rows this scan can't see (Cursor's, above all).
148
+ *
149
+ * Prompt rows go the other way on a cold start: everything found is marked
150
+ * dirty. They're idempotent GREATEST upserts, so a resend costs nothing, and a
151
+ * cold start (fresh install, or a state file this version can't read) is
152
+ * exactly the case where we have no evidence any of it ever reached the server.
113
153
  */
114
154
  export declare function runTick(prev: ScanState | null, sources?: TickSources): Promise<TickOutcome>;
115
155
  /** Cumulative per-tool and per-model totals for this machine. */
@@ -118,10 +158,19 @@ export declare function cumulativeTotals(state: ScanState): {
118
158
  modelTotals: Record<string, number>;
119
159
  };
120
160
  export declare function sameTotals(a: Record<string, number>, b: Record<string, number>): boolean;
161
+ /**
162
+ * Is there prompt activity waiting to go out?
163
+ *
164
+ * A dirty id whose row is gone (pruned between the mark and the send) doesn't
165
+ * count: it would have the tick POST an empty block every minute forever, since
166
+ * there'd be nothing for `markUploaded` to clear.
167
+ */
168
+ export declare function hasPromptActivity(state: ScanState): boolean;
121
169
  /**
122
170
  * What a tick uploads: cumulative tool/model totals (the server diffs those
123
- * against its own per-machine snapshot) plus the daily and hourly rows for the
124
- * dirty dates only.
171
+ * against its own per-machine snapshot) plus the daily rows for the dirty dates
172
+ * only, and — under the `stats` or `full` tier — the outstanding prompt
173
+ * activity.
125
174
  *
126
175
  * Every harness's rows go out for a dirty date, including Cursor's — which the
127
176
  * tick never scans, and carries over from the last full scan instead. The
@@ -129,16 +178,64 @@ export declare function sameTotals(a: Record<string, number>, b: Record<string,
129
178
  * payload didn't mention, so a date has to be reported complete or the harnesses
130
179
  * left out of it lose that day.
131
180
  */
132
- export declare function tickPayload(state: ScanState): AggregateScan;
133
- /** Called on a 200: the dirty dates are on the server now. */
181
+ export declare function tickPayload(state: ScanState, opts?: {
182
+ promptActivity?: boolean;
183
+ }): AggregateScan;
184
+ /** Called on a 200: whatever that payload carried is on the server now. */
134
185
  export declare function markUploaded(state: ScanState): void;
186
+ /**
187
+ * What a full scan knows about prompts, and may therefore rewrite.
188
+ *
189
+ * The three cases are genuinely different, and collapsing any two of them
190
+ * loses data: a command that never looked at prompts must not be read as a
191
+ * command that found none.
192
+ */
193
+ export type StagedPrompts =
194
+ /** A prompt scan ran — re-base the prompt state on its aggregate. */
195
+ {
196
+ scanned: PromptActivityAggregate;
197
+ }
198
+ /** The user is at the `none` tier — drop the prompt state entirely. */
199
+ | {
200
+ scanned: null;
201
+ }
202
+ /** This command never reads prompts (`hacklab scan`) — leave them alone. */
203
+ | 'untouched';
204
+ /**
205
+ * A full scan, re-based and ready to upload: the prompt rows this upload should
206
+ * carry, and the `commit` that records the whole thing as delivered.
207
+ */
208
+ export type StagedFullScan = {
209
+ /**
210
+ * Outstanding prompt activity to put on this upload, or undefined when there
211
+ * is none (or the user is at the `none` tier).
212
+ */
213
+ promptActivity?: PromptActivity;
214
+ /**
215
+ * Call once the server took the payload. Persists the re-based state, clears
216
+ * the prompt rows this upload claimed, and leaves anything a cap held back
217
+ * dirty for the next run. Best-effort and never throws.
218
+ */
219
+ commit: () => Promise<void>;
220
+ };
135
221
  /**
136
222
  * Rebuild the whole state from a full scan's results — the self-healing half of
137
223
  * the design. Whatever the tick's tail-follow got wrong (a rotated log, a
138
224
  * mid-file model switch, a Codex date guessed from an mtime) is corrected here,
139
225
  * so incremental drift can never outlive a day. Best-effort: a state we failed
140
- * to rebuild costs a tick, never the sync that just succeeded.
226
+ * to rebuild costs a tick, never the sync that called us.
227
+ *
228
+ * Staged rather than persisted outright, because the full-scan paths carry
229
+ * prompt activity too — a machine with no daemon has no tick to drain it. The
230
+ * rebuild diffs the scan's aggregate against what was already sent, claims the
231
+ * difference for this upload, and only `commit` (on a 200) clears it. A failed
232
+ * POST therefore leaves every row dirty for the next run, which the server's
233
+ * GREATEST upserts make free to resend.
234
+ *
235
+ * `prompts` says whether this caller has any authority over the prompt state —
236
+ * see `StagedPrompts`. Only a caller that actually resolved the consent tier
237
+ * gets to rewrite it, and only such a caller claims prompt rows for the upload.
141
238
  */
142
- export declare function rebuildScanState(results: ScanResult[], sources?: TickSources): Promise<void>;
239
+ export declare function stageFullScan(results: ScanResult[], prompts?: StagedPrompts, sources?: TickSources): Promise<StagedFullScan>;
143
240
  export {};
144
241
  //# sourceMappingURL=incremental.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"incremental.d.ts","sourceRoot":"","sources":["../../src/scanners/incremental.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,aAAa,EAelB,KAAK,UAAU,EAGf,KAAK,cAAc,EACnB,KAAK,IAAI,EAET,KAAK,SAAS,EACf,MAAM,YAAY,CAAA;AAiBnB,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAEnC,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzE,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9E,MAAM,MAAM,YAAY,GAAG;IACzB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAChC,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC5C,6DAA6D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