specweave 3.0.9 → 3.0.11

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.
@@ -12,14 +12,18 @@
12
12
  * `rate_limits.primary` / `secondary` `.used_percent` to the
13
13
  * rollout file the hook's `transcript_path` points at.
14
14
  *
15
- * The Stop hook (`specweave usage-guard`) then blocks the stop once per
16
- * session and usage window when any window is at or past the threshold, and
17
- * the agent runs `specweave handoff`. Under the threshold it prints `{}`: no
18
- * tokens, no files.
15
+ * The Stop hook (`specweave usage-guard`) acts once per session and usage
16
+ * window when any window is at or past the threshold (95% by default). In the
17
+ * default `suggest` mode it only tells the user, and the work goes on; in
18
+ * `enforce` mode it stops the session and the agent runs `specweave handoff`.
19
+ * When every full window resets within `waitUnder` minutes (30 by default) it
20
+ * does neither: waiting for the reset costs less than moving the work. Under
21
+ * the threshold it prints `{}`: no tokens, no files.
19
22
  *
20
23
  * It only asks inside a SpecWeave project (the hook's `cwd` is in one), since
21
- * `specweave handoff` has nothing to hand off anywhere else, and never a Codex
22
- * session whose plan has credits: Codex keeps working past 100% on those.
24
+ * `specweave handoff` has nothing to hand off anywhere else. A Codex plan with
25
+ * credits keeps working past 100%, so it is asked only when the session's own
26
+ * log shows under an hour of credits left at the rate they are being spent.
23
27
  *
24
28
  * Two more cases never steer the model. `mode: "checkpoint"` is for plans where
25
29
  * credits or a proxy keep working past 100%: only local checkpoints are saved.
@@ -28,7 +32,11 @@
28
32
  *
29
33
  * @module core/session/usage-guard
30
34
  */
31
- export declare const DEFAULT_THRESHOLD = 90;
35
+ export declare const DEFAULT_THRESHOLD = 95;
36
+ /** When every full window resets sooner than this many minutes, waiting beats a handoff. */
37
+ export declare const DEFAULT_WAIT_UNDER_MINUTES = 30;
38
+ /** Settings files without this version were written before 3.0.11, when the only mode stopped the session. */
39
+ export declare const SETTINGS_VERSION = 2;
32
40
  /** The shortest usage window; a session that hit the limit may hit it again after this. */
33
41
  export declare const LIMIT_HIT_REARM_MS: number;
34
42
  export interface UsageWindow {
@@ -39,20 +47,35 @@ export interface UsageWindow {
39
47
  /** Unix seconds, when known. */
40
48
  resetsAt?: number;
41
49
  }
42
- /** `handoff`: stop once at the threshold and hand off. `checkpoint`: only save local checkpoints. */
43
- export type AutoHandoffMode = 'handoff' | 'checkpoint';
50
+ /**
51
+ * `suggest`: at the threshold, tell the user once that a handoff is available and keep working.
52
+ * `enforce`: at the threshold, stop once and hand off.
53
+ * `checkpoint`: only save local checkpoints; usage never steers the model.
54
+ */
55
+ export type AutoHandoffMode = 'suggest' | 'enforce' | 'checkpoint';
56
+ export declare const AUTO_HANDOFF_MODES: readonly AutoHandoffMode[];
44
57
  export interface AutoHandoffSettings {
45
58
  at: number;
46
- /** Missing means `handoff`, including settings written by 3.0.6. */
59
+ /** Missing means `suggest`. Files written before 3.0.11 read as `suggest` unless they say `checkpoint`. */
47
60
  mode?: AutoHandoffMode;
61
+ /** Minutes. When every window at the threshold resets sooner, nothing is suggested or enforced; 0 turns the rule off. */
62
+ waitUnder?: number;
63
+ version?: number;
48
64
  since?: string;
49
65
  /** Status line command that was there before `auto-handoff on`, restored by `off`. */
50
66
  previousStatusLine?: unknown;
51
67
  }
52
68
  export declare function specweaveHome(home?: string): string;
69
+ /**
70
+ * The stored settings, with defaults filled in. A file written before 3.0.11
71
+ * (no `version`) had one mode that stopped the session at 90%; it now reads as
72
+ * `suggest` at 95%, keeping `checkpoint` and any threshold the user chose.
73
+ */
53
74
  export declare function readSettings(home?: string): AutoHandoffSettings | undefined;
54
- /** Whether these settings stop the session and hand off at the threshold. */
75
+ /** Whether these settings let usage steer the model at all (suggest or enforce), not only save checkpoints. */
55
76
  export declare function handsOff(settings: AutoHandoffSettings | undefined): boolean;
77
+ /** Whether these settings stop the session and hand off at the threshold. */
78
+ export declare function enforces(settings: AutoHandoffSettings | undefined): boolean;
56
79
  /**
57
80
  * The Studio thread this hook runs in, when SpecWeave Studio started the provider session.
58
81
  * Any non-empty value counts: delegated worker ids carry `%` and `:` and must still
@@ -97,21 +120,46 @@ export declare function desktopUsageReading(opts?: {
97
120
  now?: number;
98
121
  platform?: NodeJS.Platform;
99
122
  }): UsageReading | undefined;
100
- /** The freshest reading for a Claude Code session that runs no status line. */
123
+ /**
124
+ * The freshest reading for a Claude Code session that runs no status line.
125
+ * Desktop samples carry no reset times; a window's reset does not move until
126
+ * it passes, so one still ahead in the usage cache is borrowed for it.
127
+ */
101
128
  export declare function claudeFallbackReading(opts?: {
102
129
  env?: NodeJS.ProcessEnv;
103
130
  home?: string;
104
131
  now?: number;
105
132
  platform?: NodeJS.Platform;
106
133
  }): UsageReading | undefined;
107
- /** What the newest `token_count` event in a Codex rollout file says about the plan. */
134
+ /** What the newest `token_count` events in a Codex rollout file say about the plan. */
108
135
  export interface CodexUsage {
109
136
  windows: UsageWindow[];
110
137
  /** Credits (or an unlimited plan) keep Codex working after a window is full. */
111
138
  credits: boolean;
139
+ /**
140
+ * Minutes the credit balance lasts at the rate this log shows it falling.
141
+ * Undefined when the plan is unlimited or the log shows no fall to measure.
142
+ */
143
+ creditMinutesLeft?: number;
112
144
  }
113
- /** Windows and credits from the newest `token_count` event in a Codex rollout file. */
145
+ /** Credit balances older than this say nothing about the current rate. */
146
+ export declare const CREDIT_BURN_WINDOW_MS: number;
147
+ /** A Codex session with credits is asked to hand off when fewer minutes of credits are left. */
148
+ export declare const CREDIT_MINUTES_LOW = 60;
149
+ /**
150
+ * Windows and credits from the newest `token_count` event of the plan's own
151
+ * limit in a Codex rollout file. Codex logs several limits in one session; a
152
+ * later `gpt-reserve` record at 0% must not hide a plan window at 95%, so
153
+ * another bucket is used only when no plan record is found.
154
+ *
155
+ * For a plan with a finite credit balance the scan goes on, back to an hour
156
+ * before that record, to see how fast the balance is falling. It stops at a
157
+ * top-up (a record with no credits, or with less than half of today's
158
+ * balance): what was spent before one says nothing about what is left.
159
+ */
114
160
  export declare function codexUsage(transcriptPath: string): CodexUsage;
161
+ /** Whether a Codex plan's credits will carry the session on: it has some, and they are not about to run out. */
162
+ export declare function codexCreditsLast(usage: CodexUsage): boolean;
115
163
  /** Windows from the newest `token_count` event in a Codex rollout file. */
116
164
  export declare function codexWindows(transcriptPath: string): UsageWindow[];
117
165
  export interface UsageReading {
@@ -119,8 +167,10 @@ export interface UsageReading {
119
167
  /** Epoch milliseconds of the reading. */
120
168
  at: number;
121
169
  windows: UsageWindow[];
122
- /** Codex only: credits keep it working past a full window, so it is never asked to hand off. */
170
+ /** Codex only: credits keep it working past a full window, so it is not asked to hand off while they last. */
123
171
  credits?: boolean;
172
+ /** Codex only: minutes of credits left at the rate the newest session log shows, when it shows one. */
173
+ creditMinutesLeft?: number;
124
174
  }
125
175
  /** The newest usage any Claude Code session's status line recorded. */
126
176
  export declare function latestClaudeReading(home?: string): UsageReading | undefined;
@@ -128,7 +178,30 @@ export declare function latestClaudeReading(home?: string): UsageReading | undef
128
178
  export declare function latestCodexReading(home?: string): UsageReading | undefined;
129
179
  /** The fullest window that has not reset yet. */
130
180
  export declare function fullest(windows: UsageWindow[], now?: number): UsageWindow | undefined;
131
- export declare function handoffInstruction(w: UsageWindow): string;
181
+ /** "25 min", "2 h 10 min", "4 days". */
182
+ export declare function minutesPhrase(minutes: number): string;
183
+ /**
184
+ * What the guard does about the usage it read:
185
+ * `none` under the threshold, or usage never steers the model (checkpoint mode);
186
+ * `wait` at the threshold, but every full window resets within `waitUnder` minutes;
187
+ * `suggest` tell the user once that a handoff is available, keep working;
188
+ * `enforce` stop once and hand off.
189
+ * `resetMinutes` is when the last of the full windows resets, when every one of them says.
190
+ */
191
+ export type UsageDecision = {
192
+ kind: 'none';
193
+ } | {
194
+ kind: 'wait' | 'suggest' | 'enforce';
195
+ window: UsageWindow;
196
+ resetMinutes?: number;
197
+ };
198
+ /** Minutes until every given window has reset, or undefined when one of them has no reset time. */
199
+ export declare function minutesUntilReset(windows: UsageWindow[], now?: number): number | undefined;
200
+ export declare function usageDecision(settings: AutoHandoffSettings | undefined, windows: UsageWindow[], now?: number): UsageDecision;
201
+ /** `creditMinutes`: a Codex plan that got this far on credits, with about that many minutes of them left. */
202
+ export declare function handoffInstruction(w: UsageWindow, creditMinutes?: number, resetMinutes?: number): string;
203
+ /** The `suggest` mode note: the model tells the user once and does not stop on its own account. */
204
+ export declare function suggestionInstruction(w: UsageWindow, creditMinutes?: number, resetMinutes?: number): string;
132
205
  export interface GuardInput {
133
206
  session_id?: string;
134
207
  /** Where the session runs; both tools send it. */
@@ -153,9 +226,12 @@ export interface GuardOutput {
153
226
  }
154
227
  /**
155
228
  * Stop-hook output. The first time a session is at or past the threshold in a
156
- * usage window, it keeps the agent going so it hands off; otherwise `{}`.
157
- * Also `{}` outside a SpecWeave project (a plain chat has nothing to hand off)
158
- * and for a Codex plan with credits, which keeps working past the limit.
229
+ * usage window, it keeps the agent going for one more reply: to tell the user
230
+ * a handoff is available (`suggest`) or to hand off (`enforce`); otherwise `{}`.
231
+ * Also `{}` when every full window resets within `waitUnder` minutes, outside
232
+ * a SpecWeave project (a plain chat has nothing to hand off) and for a Codex
233
+ * plan whose credits keep it working past the limit, until they are about to
234
+ * run out.
159
235
  */
160
236
  export declare function usageGuard(input: GuardInput, opts?: {
161
237
  home?: string;
@@ -179,17 +255,27 @@ export interface LimitHitInput {
179
255
  workspaceRoot?: string;
180
256
  error?: string;
181
257
  }
258
+ /**
259
+ * Minutes until a session that just hit the limit can go on: when the last
260
+ * full window resets. The reading may predate the jump to 100%, so with no
261
+ * window at the threshold the fullest one counts. Undefined when unknown.
262
+ */
263
+ export declare function limitResetMinutes(windows: UsageWindow[], at: number, now?: number): number | undefined;
182
264
  /**
183
265
  * Where a rate-limited turn should hand off, or undefined when it should not:
184
266
  * auto-handoff is off or checkpoint-only, the session runs inside Studio, the
185
- * failure is not a rate limit, the session already wrote one in the last five
186
- * hours, or the directory is not a SpecWeave project. Writes its marker before returning, so a retry storm
187
- * hands off once. The marker is separate from the Stop hook's: a session that
188
- * was asked to hand off at 90% and still ran out writes a fresh handoff.
267
+ * failure is not a rate limit, the limit resets within `waitUnder` minutes
268
+ * (the session can wait it out), the session already wrote one in the last
269
+ * five hours, or the directory is not a SpecWeave project. Both `suggest` and
270
+ * `enforce` hand off here: the session cannot go on, so this is the last
271
+ * moment to write the handoff. Writes its marker before returning, so a retry
272
+ * storm hands off once. The marker is separate from the Stop hook's: a session
273
+ * that was asked at the threshold and still ran out writes a fresh handoff.
189
274
  */
190
275
  export declare function limitHitTarget(input: LimitHitInput, opts?: {
191
276
  home?: string;
192
277
  now?: number;
193
278
  env?: NodeJS.ProcessEnv;
279
+ platform?: NodeJS.Platform;
194
280
  }): string | undefined;
195
281
  //# sourceMappingURL=usage-guard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage-guard.d.ts","sourceRoot":"","sources":["../../../../src/core/session/usage-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAOH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,QAAqB,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qGAAqG;AACrG,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,IAAI,SAAe,GAAG,MAAM,CAEzD;AAUD,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,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