@agentdeck/bridge 1.0.24 → 1.2.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 (184) hide show
  1. package/README.md +14 -6
  2. package/assets/fonts/NOTICE-PocketSansWorld.md +10 -0
  3. package/assets/fonts/OFL-PocketSansWorld.txt +93 -0
  4. package/assets/fonts/PocketSansWorld_12.cpfont +0 -0
  5. package/assets/fonts/pocket-sans-world.manifest.json +49 -0
  6. package/assets/learning/LICENSE-CC-BY-SA-4.0.txt +10 -0
  7. package/assets/learning/NOTICE.md +33 -0
  8. package/assets/learning/jp-n3-ko.manifest.json +27 -0
  9. package/assets/learning/jp-n3-ko.pdl +0 -0
  10. package/dist/adapters/openclaw.d.ts +74 -4
  11. package/dist/adapters/openclaw.d.ts.map +1 -1
  12. package/dist/adapters/openclaw.js +235 -43
  13. package/dist/adapters/openclaw.js.map +1 -1
  14. package/dist/agent-cli-diagnostics.d.ts +20 -0
  15. package/dist/agent-cli-diagnostics.d.ts.map +1 -0
  16. package/dist/agent-cli-diagnostics.js +100 -0
  17. package/dist/agent-cli-diagnostics.js.map +1 -0
  18. package/dist/apme/adapters/openclaw-hook.d.ts +38 -10
  19. package/dist/apme/adapters/openclaw-hook.d.ts.map +1 -1
  20. package/dist/apme/adapters/openclaw-hook.js +181 -37
  21. package/dist/apme/adapters/openclaw-hook.js.map +1 -1
  22. package/dist/apme/collector.d.ts +55 -2
  23. package/dist/apme/collector.d.ts.map +1 -1
  24. package/dist/apme/collector.js +324 -37
  25. package/dist/apme/collector.js.map +1 -1
  26. package/dist/apme/dashboard-html.d.ts.map +1 -1
  27. package/dist/apme/dashboard-html.js +275 -35
  28. package/dist/apme/dashboard-html.js.map +1 -1
  29. package/dist/apme/http.d.ts.map +1 -1
  30. package/dist/apme/http.js +33 -5
  31. package/dist/apme/http.js.map +1 -1
  32. package/dist/apme/index.d.ts.map +1 -1
  33. package/dist/apme/index.js +6 -2
  34. package/dist/apme/index.js.map +1 -1
  35. package/dist/apme/pareto.d.ts +2 -1
  36. package/dist/apme/pareto.d.ts.map +1 -1
  37. package/dist/apme/pareto.js +15 -4
  38. package/dist/apme/pareto.js.map +1 -1
  39. package/dist/apme/recommend.d.ts +24 -1
  40. package/dist/apme/recommend.d.ts.map +1 -1
  41. package/dist/apme/recommend.js +43 -7
  42. package/dist/apme/recommend.js.map +1 -1
  43. package/dist/apme/store.d.ts +47 -1
  44. package/dist/apme/store.d.ts.map +1 -1
  45. package/dist/apme/store.js +397 -99
  46. package/dist/apme/store.js.map +1 -1
  47. package/dist/bridge-core.d.ts +25 -1
  48. package/dist/bridge-core.d.ts.map +1 -1
  49. package/dist/bridge-core.js +50 -9
  50. package/dist/bridge-core.js.map +1 -1
  51. package/dist/card-feed.d.ts +46 -1
  52. package/dist/card-feed.d.ts.map +1 -1
  53. package/dist/card-feed.js +166 -6
  54. package/dist/card-feed.js.map +1 -1
  55. package/dist/cli.d.ts +56 -0
  56. package/dist/cli.d.ts.map +1 -1
  57. package/dist/cli.js +442 -34
  58. package/dist/cli.js.map +1 -1
  59. package/dist/codex-rate-limits-live.d.ts +180 -10
  60. package/dist/codex-rate-limits-live.d.ts.map +1 -1
  61. package/dist/codex-rate-limits-live.js +475 -22
  62. package/dist/codex-rate-limits-live.js.map +1 -1
  63. package/dist/daemon-build-identity.d.ts +124 -0
  64. package/dist/daemon-build-identity.d.ts.map +1 -0
  65. package/dist/daemon-build-identity.js +310 -0
  66. package/dist/daemon-build-identity.js.map +1 -0
  67. package/dist/daemon-server.d.ts +34 -6
  68. package/dist/daemon-server.d.ts.map +1 -1
  69. package/dist/daemon-server.js +876 -109
  70. package/dist/daemon-server.js.map +1 -1
  71. package/dist/daemon-takeover.d.ts +11 -0
  72. package/dist/daemon-takeover.d.ts.map +1 -1
  73. package/dist/daemon-takeover.js +62 -17
  74. package/dist/daemon-takeover.js.map +1 -1
  75. package/dist/daemon-ws-client.d.ts +1 -0
  76. package/dist/daemon-ws-client.d.ts.map +1 -1
  77. package/dist/daemon-ws-client.js +25 -16
  78. package/dist/daemon-ws-client.js.map +1 -1
  79. package/dist/daemon.js +1 -1
  80. package/dist/daemon.js.map +1 -1
  81. package/dist/esp32-serial.d.ts +18 -0
  82. package/dist/esp32-serial.d.ts.map +1 -1
  83. package/dist/esp32-serial.js +23 -1
  84. package/dist/esp32-serial.js.map +1 -1
  85. package/dist/font-pack.d.ts +15 -0
  86. package/dist/font-pack.d.ts.map +1 -0
  87. package/dist/font-pack.js +75 -0
  88. package/dist/font-pack.js.map +1 -0
  89. package/dist/glance-frame.d.ts.map +1 -1
  90. package/dist/glance-frame.js +5 -1
  91. package/dist/glance-frame.js.map +1 -1
  92. package/dist/hook-codex-sessions.d.ts +3 -1
  93. package/dist/hook-codex-sessions.d.ts.map +1 -1
  94. package/dist/hook-codex-sessions.js +27 -7
  95. package/dist/hook-codex-sessions.js.map +1 -1
  96. package/dist/http-auth-gate.d.ts.map +1 -1
  97. package/dist/http-auth-gate.js +9 -1
  98. package/dist/http-auth-gate.js.map +1 -1
  99. package/dist/index.js +2 -2
  100. package/dist/index.js.map +1 -1
  101. package/dist/learning-pack.d.ts +24 -0
  102. package/dist/learning-pack.d.ts.map +1 -0
  103. package/dist/learning-pack.js +125 -0
  104. package/dist/learning-pack.js.map +1 -0
  105. package/dist/legacy-rearm-ledger.d.ts +56 -0
  106. package/dist/legacy-rearm-ledger.d.ts.map +1 -0
  107. package/dist/legacy-rearm-ledger.js +66 -0
  108. package/dist/legacy-rearm-ledger.js.map +1 -0
  109. package/dist/mdns.d.ts +33 -0
  110. package/dist/mdns.d.ts.map +1 -1
  111. package/dist/mdns.js +92 -3
  112. package/dist/mdns.js.map +1 -1
  113. package/dist/openclaw-session.d.ts.map +1 -1
  114. package/dist/openclaw-session.js +13 -0
  115. package/dist/openclaw-session.js.map +1 -1
  116. package/dist/openclaw-timeline-feed.d.ts +84 -0
  117. package/dist/openclaw-timeline-feed.d.ts.map +1 -0
  118. package/dist/openclaw-timeline-feed.js +162 -0
  119. package/dist/openclaw-timeline-feed.js.map +1 -0
  120. package/dist/openclaw-transcript-timeline.d.ts +103 -0
  121. package/dist/openclaw-transcript-timeline.d.ts.map +1 -0
  122. package/dist/openclaw-transcript-timeline.js +328 -0
  123. package/dist/openclaw-transcript-timeline.js.map +1 -0
  124. package/dist/pairing-knocks.d.ts +80 -0
  125. package/dist/pairing-knocks.d.ts.map +1 -0
  126. package/dist/pairing-knocks.js +312 -0
  127. package/dist/pairing-knocks.js.map +1 -0
  128. package/dist/passive-observer.d.ts +21 -1
  129. package/dist/passive-observer.d.ts.map +1 -1
  130. package/dist/passive-observer.js +37 -3
  131. package/dist/passive-observer.js.map +1 -1
  132. package/dist/pixoo/micro-glyphs.d.ts +4 -0
  133. package/dist/pixoo/micro-glyphs.d.ts.map +1 -1
  134. package/dist/pixoo/micro-glyphs.js +29 -0
  135. package/dist/pixoo/micro-glyphs.js.map +1 -1
  136. package/dist/pixoo/pixoo-font.d.ts.map +1 -1
  137. package/dist/pixoo/pixoo-font.js +3 -1
  138. package/dist/pixoo/pixoo-font.js.map +1 -1
  139. package/dist/pixoo/pixoo-renderer.d.ts +1 -1
  140. package/dist/pixoo/pixoo-renderer.d.ts.map +1 -1
  141. package/dist/pixoo/pixoo-renderer.js +17 -2
  142. package/dist/pixoo/pixoo-renderer.js.map +1 -1
  143. package/dist/pty-manager.d.ts +9 -0
  144. package/dist/pty-manager.d.ts.map +1 -1
  145. package/dist/pty-manager.js +63 -4
  146. package/dist/pty-manager.js.map +1 -1
  147. package/dist/relayed-usage.d.ts +98 -0
  148. package/dist/relayed-usage.d.ts.map +1 -0
  149. package/dist/relayed-usage.js +103 -0
  150. package/dist/relayed-usage.js.map +1 -0
  151. package/dist/session-aggregator.d.ts +3 -0
  152. package/dist/session-aggregator.d.ts.map +1 -1
  153. package/dist/session-aggregator.js.map +1 -1
  154. package/dist/session-registry.d.ts +1 -0
  155. package/dist/session-registry.d.ts.map +1 -1
  156. package/dist/surface-protocol.d.ts +84 -0
  157. package/dist/surface-protocol.d.ts.map +1 -0
  158. package/dist/surface-protocol.js +237 -0
  159. package/dist/surface-protocol.js.map +1 -0
  160. package/dist/timeline-store.d.ts +1 -1
  161. package/dist/timeline-store.d.ts.map +1 -1
  162. package/dist/timeline-store.js +16 -1
  163. package/dist/timeline-store.js.map +1 -1
  164. package/dist/tui/dashboard.d.ts.map +1 -1
  165. package/dist/tui/dashboard.js +8 -1
  166. package/dist/tui/dashboard.js.map +1 -1
  167. package/dist/tui/renderer.d.ts.map +1 -1
  168. package/dist/tui/renderer.js +35 -0
  169. package/dist/tui/renderer.js.map +1 -1
  170. package/dist/weather-config.d.ts +17 -0
  171. package/dist/weather-config.d.ts.map +1 -0
  172. package/dist/weather-config.js +54 -0
  173. package/dist/weather-config.js.map +1 -0
  174. package/dist/weather.d.ts +44 -4
  175. package/dist/weather.d.ts.map +1 -1
  176. package/dist/weather.js +223 -15
  177. package/dist/weather.js.map +1 -1
  178. package/dist/ws-server.d.ts +18 -0
  179. package/dist/ws-server.d.ts.map +1 -1
  180. package/dist/ws-server.js +95 -7
  181. package/dist/ws-server.js.map +1 -1
  182. package/fm-helper/AgentDeckFMHelper.swift +51 -5
  183. package/package.json +4 -3
  184. package/src/timebox/sync_ble.py +35 -16
@@ -29,6 +29,13 @@ import { codexSnapshotMatchesAccountPlan, codexSnapshotOutranks, isModelScopedCo
29
29
  * must never spawn anything — it keeps the passive read). While Codex is actively
30
30
  * working, the passive reading is free and exact, so the live query only fires
31
31
  * once the rollout snapshot has gone quiet.
32
+ *
33
+ * It is also the only source that says WHICH limit the numbers belong to. The
34
+ * rollout's own `limit_id`/`limit_name` stopped answering that on 2026-08-27
35
+ * (see `codexSnapshotsShareLimitFamily`), and `rateLimitsByLimitId` keys every
36
+ * family correctly — which is why the passive-only daemon has no equivalent
37
+ * defence and will report the per-model pool as the account's once the account
38
+ * limit is reached.
32
39
  */
33
40
  /** Hard ceiling on one query — the child is killed and the read reported as a
34
41
  * miss rather than left to hang (external-peer await always carries a timeout). */
@@ -84,15 +91,22 @@ export function parseLiveCodexRateLimits(result, capturedAt) {
84
91
  // itself presents. But the app-server also returns every family keyed by id,
85
92
  // so when the top level is scoped to one model there is still an account-wide
86
93
  // answer in the map — take it rather than reporting a single model's quota as
87
- // the account's. (Not currently reachable; the guard costs one lookup and the
88
- // alternative is the rollout bug in a place with no second source.)
89
- const rl = pickAccountWideLiveLimits(res?.rateLimits, res?.rateLimitsByLimitId);
90
- if (!rl || typeof rl !== 'object')
94
+ // the account's. Reached when the top-level block carries a scoping name; the
95
+ // fingerprint-based second path was deleted with the rest of that machinery,
96
+ // and `pickAccountWideLiveLimits` records why.
97
+ const picked = pickAccountWideLiveLimits(res?.rateLimits, res?.rateLimitsByLimitId);
98
+ if (!picked)
91
99
  return null;
100
+ const rl = picked.limits;
92
101
  const primary = toWindow(rl.primary);
93
102
  const secondary = toWindow(rl.secondary);
94
103
  const credits = toCredits(rl.credits);
95
- const limitId = typeof rl.limitId === 'string' ? rl.limitId : undefined;
104
+ // The map key rides out with the block. Without it a value that carries no
105
+ // `limitId` produces a snapshot with none, and `codexSnapshotsShareLimitFamily`
106
+ // then short-circuits on the missing id and answers "same family" for every
107
+ // comparison — the guard silently switched off, while
108
+ // `codexLiveFamilyAuthorityExpiry` went on reporting authority.
109
+ const limitId = typeof picked.limitId === 'string' ? picked.limitId : undefined;
96
110
  if (!primary && !secondary && !credits && !limitId)
97
111
  return null;
98
112
  return {
@@ -104,21 +118,93 @@ export function parseLiveCodexRateLimits(result, capturedAt) {
104
118
  capturedAt,
105
119
  };
106
120
  }
121
+ /** The weekly window's reset instant on a raw live block — the same fingerprint
122
+ * the passive side uses, read off the app-server's spelling of the fields. */
123
+ function liveWeeklyResetsAt(rl) {
124
+ for (const window of [rl?.primary, rl?.secondary]) {
125
+ const minutes = typeof window?.windowDurationMins === 'number'
126
+ ? window.windowDurationMins
127
+ : window?.windowMinutes;
128
+ if (typeof minutes !== 'number' || minutes < WEEKLY_WINDOW_MIN_MINUTES)
129
+ continue;
130
+ if (typeof window?.resetsAt === 'number' && window.resetsAt > 0)
131
+ return window.resetsAt;
132
+ }
133
+ return undefined;
134
+ }
107
135
  /**
108
- * The account-wide limit block among what `account/rateLimits/read` returned.
136
+ * The account-wide limit block among what `account/rateLimits/read` returned,
137
+ * plus the id it should be recorded under.
138
+ *
139
+ * Prefers the top-level `rateLimits` — what the Codex CLI itself shows, and
140
+ * measured correct on 2026-08-27 at the exact moment the rollout was lying (the
141
+ * account at 100% up there, the Spark pool only under its own map key). Falls
142
+ * back to an unnamed entry of `rateLimitsByLimitId`, windowed before windowless
143
+ * so a `premium` credit block cannot be handed back ahead of a real windowed
144
+ * `codex` entry on iteration order alone. Returns null when every family is
145
+ * model-scoped: "no account-wide reading" is the honest answer, and the caller
146
+ * then keeps whatever the rollout path found rather than adopting one model's
147
+ * quota as the account's.
148
+ *
149
+ * ## What this deliberately does NOT do any more
109
150
  *
110
- * Prefers the top-level `rateLimits` (what the Codex CLI shows) and falls back
111
- * to the first unnamed entry of `rateLimitsByLimitId`. Returns null when every
112
- * family is model-scoped: "no account-wide reading" is the honest answer, and
113
- * the caller then keeps whatever the rollout path found rather than adopting one
114
- * model's quota as the account's. Exported for unit testing.
151
+ * Three successive review rounds found HIGH-severity defects in machinery added
152
+ * here to defend a shape that has never been observed: a top-level block that
153
+ * mislabels itself the way the ROLLOUT does. The defence fingerprinted every
154
+ * candidate against the weekly resets of the response's own named pools, and
155
+ * each version of it failed in a new direction — handing back a block it had
156
+ * just identified as a pool, admitting a pool through a rung that dropped the
157
+ * key test, and finally refusing everything, because the response mirrors its
158
+ * top-level block into the map under its own key and any account id outside a
159
+ * hardcoded allow-list therefore fingerprint-matched ITSELF (`codex_pro` →
160
+ * `null` → no live read at all, which disables the 100%-wall detection this
161
+ * whole path exists for, pins the mid-turn spawn skip open, and leaves the relay
162
+ * guard permanently unarmed).
163
+ *
164
+ * The measured discriminators are `limitName` (non-empty ⇒ scoped, across 823
165
+ * rollouts and every live sample) and the map key, and they are enough. Guessing
166
+ * at a failure the producer has not shown produced three real ones. If the live
167
+ * top level is ever seen mislabelling itself, the fix belongs here — with that
168
+ * observation attached.
115
169
  */
116
170
  export function pickAccountWideLiveLimits(top, byLimitId) {
117
- if (top && !isModelScopedCodexLimit(top.limitName))
118
- return top;
119
- for (const candidate of Object.values(byLimitId ?? {})) {
120
- if (candidate && !isModelScopedCodexLimit(candidate.limitName))
121
- return candidate;
171
+ const entries = Object.entries(byLimitId ?? {}).filter((entry) => !!entry[1]);
172
+ const unnamed = (candidate) => !!candidate && !isModelScopedCodexLimit(candidate.limitName);
173
+ // Adopt a map entry's key when the top level names no id of its own. Without
174
+ // it the preferred path emits a snapshot with `limitId: undefined`, and
175
+ // `codexSnapshotsShareLimitFamily` short-circuits on the missing id — the
176
+ // guard answers "same family" for every comparison and switches itself off
177
+ // while `codexLiveFamilyAuthorityExpiry` goes on granting authority.
178
+ const keyMirroring = (candidate) => {
179
+ const weekly = liveWeeklyResetsAt(candidate);
180
+ if (typeof weekly !== 'number')
181
+ return undefined;
182
+ for (const [key, other] of entries) {
183
+ // Unnamed only, like every other family test here. The pool's anchor
184
+ // sweeps through the account's once a week (see
185
+ // `codexSnapshotsShareLimitFamily`), and during that stretch an unfiltered
186
+ // scan would stamp `codex_bengalfox` onto the correct account reading —
187
+ // after which it mismatches every correct passive `codex` reading and the
188
+ // relay guard is denied its authority.
189
+ if (!unnamed(other))
190
+ continue;
191
+ const otherWeekly = liveWeeklyResetsAt(other);
192
+ if (typeof otherWeekly === 'number' && sameWeeklyReset(weekly * 1000, otherWeekly * 1000)) {
193
+ return other.limitId ?? key;
194
+ }
195
+ }
196
+ return undefined;
197
+ };
198
+ if (unnamed(top))
199
+ return { limits: top, limitId: top.limitId ?? keyMirroring(top) };
200
+ for (const [key, candidate] of entries) {
201
+ if (unnamed(candidate) && liveWeeklyResetsAt(candidate) != null) {
202
+ return { limits: candidate, limitId: candidate.limitId ?? key };
203
+ }
204
+ }
205
+ for (const [key, candidate] of entries) {
206
+ if (unnamed(candidate))
207
+ return { limits: candidate, limitId: candidate.limitId ?? key };
122
208
  }
123
209
  return null;
124
210
  }
@@ -229,6 +315,222 @@ function capturedAtMs(rl) {
229
315
  const ms = new Date(rl.capturedAt).getTime();
230
316
  return isNaN(ms) ? 0 : ms;
231
317
  }
318
+ /** A window this long or longer is the weekly one. The 5h window's `resetsAt`
319
+ * slides with every request, so only the weekly reset instant is stable enough
320
+ * to identify a limit family across snapshots. */
321
+ const WEEKLY_WINDOW_MIN_MINUTES = 1440;
322
+ function weeklyWindow(rl) {
323
+ for (const window of [rl.primary, rl.secondary]) {
324
+ if (!window || typeof window.windowMinutes !== 'number')
325
+ continue;
326
+ if (window.windowMinutes < WEEKLY_WINDOW_MIN_MINUTES)
327
+ continue;
328
+ // `continue`, not `return`: a weekly window can reach here with its reset
329
+ // stripped (`normalizeCodexWindow` clears it once the window has elapsed),
330
+ // and returning on the first long slot would then report "no fingerprint"
331
+ // while the other slot still carries one. Its twin `liveWeeklyResetsAt`
332
+ // reads the same way — two helpers documented as computing one fingerprint
333
+ // must not disagree about which slot answers.
334
+ if (window.resetsAt)
335
+ return window;
336
+ }
337
+ return undefined;
338
+ }
339
+ /**
340
+ * Whether a reading's weekly anchor is ROLLING — sitting a full window ahead of
341
+ * its own capture — rather than pinned to a window that has already started.
342
+ * Undefined when the reading carries no capture stamp: no claim either way.
343
+ */
344
+ function weeklyAnchorIsRolling(rl) {
345
+ const window = weeklyWindow(rl);
346
+ const resetsMs = weeklyResetsAtMs(rl);
347
+ const capturedMs = rl.capturedAt ? new Date(rl.capturedAt).getTime() : NaN;
348
+ if (!window || resetsMs == null || isNaN(capturedMs))
349
+ return undefined;
350
+ return resetsMs - capturedMs >= window.windowMinutes * 60 * 1000 - FAMILY_RESET_TOLERANCE_MS;
351
+ }
352
+ /** Whether a reading carries anything a surface can render. Credits count: on a
353
+ * credit plan with a partial balance that is the ONLY reading there is, and
354
+ * treating it as empty discarded the one current answer in favour of a leftover
355
+ * windowed rollout. What this excludes is a block with no measurement at all —
356
+ * a voided snapshot, or an empty credit shell. */
357
+ function hasRenderableContent(rl) {
358
+ return rl.primary != null || rl.secondary != null || rl.credits != null;
359
+ }
360
+ function weeklyResetsAtMs(rl) {
361
+ const resetsAt = weeklyWindow(rl)?.resetsAt;
362
+ if (!resetsAt)
363
+ return undefined;
364
+ const ms = new Date(resetsAt).getTime();
365
+ return isNaN(ms) ? undefined : ms;
366
+ }
367
+ /**
368
+ * How far two weekly reset instants may sit apart and still be the same window.
369
+ *
370
+ * Codex does not report a fixed instant. Measured over 32,753 weekly-bearing
371
+ * `rate_limits` lines in a real store (14 days), the account family's 21 raw
372
+ * values collapse to 10 windows, each carrying a few seconds of jitter — the
373
+ * same window appears as `1788274878` and `1788274890`, twelve seconds apart —
374
+ * while the passive and live readings are by construction taken at different
375
+ * instants. Compared exactly, ~4% of same-family pairs read as a family change:
376
+ * a correct rollout is discarded for a cached live snapshot up to five minutes
377
+ * old, the mid-turn spawn skip is lifted for as long as Codex is in use, and the
378
+ * relay guard's authority reads false in the ordinary good case.
379
+ *
380
+ * Ten minutes is the middle of a band that is narrower than it first looks.
381
+ * Clustering the account family's 105 raw anchors at successive tolerances: at
382
+ * 600s they collapse to 33 windows whose widest internal spread is 240s, and the
383
+ * closest two DISTINCT windows sit 1,848s apart. So the floor is ~4 minutes of
384
+ * jitter and the ceiling is ~31 minutes of real separation — an earlier draft of
385
+ * this comment claimed the ceiling was 1.5 days, which was true only of the
386
+ * 14-day sample it was measured on. 600s is ~2.5× the observed jitter and ~1/3
387
+ * of the closest real gap.
388
+ */
389
+ const FAMILY_RESET_TOLERANCE_MS = 10 * 60 * 1000;
390
+ /** How long a live answer may speak for the account's current weekly window.
391
+ * Three query intervals: a healthy daemon refreshes every
392
+ * `MIN_QUERY_INTERVAL_MS`, so this survives a couple of skipped builds while
393
+ * still expiring long before a re-anchor could go unnoticed. */
394
+ const LIVE_FAMILY_AUTHORITY_MAX_AGE_MS = 3 * MIN_QUERY_INTERVAL_MS;
395
+ function sameWeeklyReset(aMs, bMs) {
396
+ return Math.abs(aMs - bMs) <= FAMILY_RESET_TOLERANCE_MS;
397
+ }
398
+ /**
399
+ * Whether a snapshot's family fingerprint is good enough to REJECT another
400
+ * reading — it must carry a weekly window, and that window must still be
401
+ * running.
402
+ *
403
+ * Both halves are the same rule seen twice, and both directions were wrong
404
+ * before. An ELAPSED window describes something that no longer exists, so it is
405
+ * not evidence about the current family; the account's own weekly rollover
406
+ * reaches the rollout first and reads as a mismatch, and without this bound a
407
+ * live query that then starts missing pins an expired snapshot for the whole
408
+ * backoff. An ABSENT window is not evidence either, and reading absence as "no
409
+ * reason to doubt it" is how a windowless credit-plan block (`limit_id:
410
+ * "premium"`, no windows — a shape `parseLiveCodexRateLimits` explicitly admits)
411
+ * came to veto a fully-windowed passive reading captured seconds ago: the ids
412
+ * differ, so `codexSnapshotsShareLimitFamily` answers before its own weekly
413
+ * check ever runs, and every Codex gauge blanks because consumers test for a
414
+ * window, not for the block. Rejecting is the strong move; only a fingerprint
415
+ * that exists and is current may make it.
416
+ */
417
+ function familyFingerprintCanReject(rl, nowMs) {
418
+ const window = weeklyWindow(rl);
419
+ const resetsMs = weeklyResetsAtMs(rl);
420
+ if (!window || resetsMs == null)
421
+ return false;
422
+ if (resetsMs <= nowMs)
423
+ return false;
424
+ // An anchor is a discriminator, but it is never immutable, so authority has to
425
+ // decay with the reading's own age. Measured over 45,743 account-family weekly
426
+ // readings (2026-07-03 → 08-27): 104 distinct anchors, and in 103 of the 104
427
+ // changes the OLD anchor was still 1.6–7.0 days in the future when the new one
428
+ // first appeared. So window expiry cannot detect a re-anchor — at every one of
429
+ // them a cached snapshot would go on vetoing the fresh rollout, indefinitely
430
+ // once the query enters its 30-minute backoff or the `codex` binary goes away
431
+ // after one good answer. A live answer refreshed at most every
432
+ // MIN_QUERY_INTERVAL_MS may speak for the current window for a few intervals;
433
+ // past that it is a claim about a window that may no longer be the one running,
434
+ // and the fresh rollout is the better guess. An unstamped reading has no age
435
+ // and therefore no authority.
436
+ const capturedMs = rl.capturedAt ? new Date(rl.capturedAt).getTime() : NaN;
437
+ if (isNaN(capturedMs))
438
+ return false;
439
+ if (nowMs - capturedMs > LIVE_FAMILY_AUTHORITY_MAX_AGE_MS)
440
+ return false;
441
+ // A ROLLING window identifies nothing. Measured in the same store, the
442
+ // per-model pool's weekly reset takes 749 distinct values — one per request,
443
+ // sliding 43 minutes in step with the clock — because `resets_at` there is
444
+ // always one full window ahead of the reading (`resets_at − timestamp` pinned
445
+ // at ~604,790s of a 604,800s window). That is a countdown, not an anchor, and
446
+ // an anchor is the entire job here: the elapsed-window escape can never
447
+ // retire it, so left unchecked such a fingerprint could veto every passive
448
+ // reading for as long as it stayed cached. A fixed window looks like this
449
+ // only in its first minutes, where falling back to recency costs nothing.
450
+ return weeklyAnchorIsRolling(rl) !== true;
451
+ }
452
+ /**
453
+ * Whether the live reading contradicts the passive one about WHOSE quota it is.
454
+ * The picker uses it to prefer the live snapshot; the throttle uses its negation
455
+ * to decide whether the passive snapshot's freshness may suppress the next
456
+ * query. One expression, because written as two they drifted immediately: the
457
+ * throttle compared families against a cached live snapshot with no bound at
458
+ * all, so once that snapshot's window elapsed the mid-turn skip was lifted
459
+ * permanently while the picker had already stopped honouring the same
460
+ * fingerprint.
461
+ *
462
+ * The two consumers still REACH it differently, and that is deliberate rather
463
+ * than drift. The picker settles plan disagreement first and never asks this at
464
+ * all when the classes differ; the throttle asks it regardless, because a cached
465
+ * live snapshot minted under a retired plan is itself a reason to spend a query
466
+ * — the answer that replaces it is the only thing that can end the disagreement.
467
+ * The cost is bounded by the same spawn throttles as everything else here.
468
+ *
469
+ * The throttle must NOT reuse this predicate, and that is the whole point of
470
+ * `liveCorroboratesPassiveFamily` below. Exported for unit testing.
471
+ */
472
+ export function liveRejectsPassiveFamily(passive, live, nowMs = Date.now()) {
473
+ if (!passive || !live)
474
+ return false;
475
+ if (codexSnapshotsShareLimitFamily(passive, live))
476
+ return false;
477
+ return familyFingerprintCanReject(live, nowMs);
478
+ }
479
+ /**
480
+ * True when two snapshots describe the same limit FAMILY — or when there is not
481
+ * enough information to say they do not.
482
+ *
483
+ * `isModelScopedCodexLimit` reads the family off the snapshot's own `limit_name`,
484
+ * and that discriminator stopped being reliable on the rollout path. Measured
485
+ * 2026-08-27, inside a single rollout file, after the account's weekly quota was
486
+ * exhausted:
487
+ *
488
+ * ...T20:59:45Z limit_id "codex" limit_name null weekly resets 1788274890 (the account)
489
+ * ...T20:59:46Z limit_id "premium" limit_name null no windows at all
490
+ * ...T13:01:31Z limit_id "codex" limit_name null 5h + weekly resets 1788440488
491
+ *
492
+ * That third shape is `codex_bengalfox` ("GPT-5.3-Codex-Spark") wearing the
493
+ * account's id: `account/rateLimits/read` returned the SAME two reset instants
494
+ * under `rateLimitsByLimitId.codex_bengalfox` at that moment, while the account
495
+ * family sat at 100% with `rateLimitReachedType: "rate_limit_reached"`. So once
496
+ * the account limit is reached and Codex serves the turn from a per-model pool,
497
+ * the rollout records that pool's numbers under an unnamed `codex` label and the
498
+ * name-based filter admits them: the deck read 54% / 24% for an exhausted week.
499
+ *
500
+ * The live read is the only source that keys families correctly, so it is what
501
+ * the passive reading is checked against. Two rules keep the check honest:
502
+ * an unknown on either side is "no information" and matches (a pre-`limit_id`
503
+ * rollout, a credit plan with no weekly window), and a mismatch is resolved by
504
+ * preferring the LIVE snapshot rather than by dropping both — the mismatch also
505
+ * arises legitimately for a few minutes after the account's weekly window rolls
506
+ * over, and there the live answer is merely stale, never wrong about whose
507
+ * quota it is. Exported for unit testing.
508
+ */
509
+ export function codexSnapshotsShareLimitFamily(a, b) {
510
+ if (!a || !b)
511
+ return true;
512
+ if (!a.limitId || !b.limitId)
513
+ return true;
514
+ if (a.limitId !== b.limitId)
515
+ return false;
516
+ const aWeekly = weeklyResetsAtMs(a);
517
+ const bWeekly = weeklyResetsAtMs(b);
518
+ if (aWeekly == null || bWeekly == null)
519
+ return true;
520
+ // KNOWN BLIND SPOT, stated rather than papered over. The pool's anchor slides a
521
+ // second per second, so once a week it sweeps THROUGH the account's fixed
522
+ // anchor and spends ~20 minutes inside the tolerance, during which a pool
523
+ // reading is indistinguishable from the account's here. Two things that look
524
+ // like fixes are not. Shrinking the tolerance cannot close it — the floor is
525
+ // 240s of measured jitter. And "one anchor is rolling, the other is pinned"
526
+ // cannot either: the sweep instant is by construction the account window's own
527
+ // start (the pool's anchor equals A exactly when captured at A − 7d, which is
528
+ // when the account's window beginning at A − 7d starts), so at that moment BOTH
529
+ // readings sit a full window ahead of their capture and the shape test answers
530
+ // "same" too. What bounds the damage is that the account has just reset there,
531
+ // so the reading being shadowed is the one at ~0%.
532
+ return sameWeeklyReset(aWeekly, bWeekly);
533
+ }
232
534
  /**
233
535
  * Choose between the passive rollout reading and the live app-server reading.
234
536
  *
@@ -239,36 +541,176 @@ function capturedAtMs(rl) {
239
541
  * current, and the ONLY source carrying the new tier — lost every comparison and
240
542
  * was then voided as a mismatch. A snapshot with no `capturedAt` at all loses to
241
543
  * a stamped one within its match class; ties keep the passive reading, which is
242
- * the on-disk ground truth. Exported for unit testing.
544
+ * the on-disk ground truth.
545
+ *
546
+ * Family agreement is a tie-break WITHIN the plan class, and settled before
547
+ * recency, which cannot see it: the rollout is appended every couple of seconds
548
+ * while Codex works, so a snapshot describing a per-model pool under the
549
+ * account's id (see `codexSnapshotsShareLimitFamily`) wins every recency
550
+ * comparison for as long as the session runs, and the true account reading only
551
+ * surfaces in the gaps where the live query gets to fire. That is the
552
+ * oscillation this guard removes — the same gauge alternating between an
553
+ * exhausted week and a half-used one depending on which source answered last.
554
+ *
555
+ * It must stay UNDER the plan test, because a plan change moves the weekly reset
556
+ * instant too (`1787805401` under `plus` → `1787934975` under `prolite`, same
557
+ * `limit_id: "codex"`, both verbatim in `codex-rate-limits.test.ts`). Ranked
558
+ * above it, the family guard would answer a plan change by handing back the
559
+ * retired-plan live snapshot — which `normalizeCodexRateLimits` then voids to a
560
+ * windowless block, blanking every Codex gauge for up to the failure backoff.
561
+ * That is precisely the regression `codexSnapshotOutranks` exists to prevent,
562
+ * reintroduced through the door next to it.
563
+ *
564
+ * Only a live snapshot whose own weekly window exists AND is still running gets
565
+ * to reject anything (`familyFingerprintCanReject`) — an expired or absent
566
+ * fingerprint is not evidence about which family the current window belongs to.
567
+ * Exported for unit testing; `nowMs` is injectable for the same reason.
243
568
  */
244
- export function pickBestCodexRateLimits(passive, live, accountPlan) {
569
+ export function pickBestCodexRateLimits(passive, live, accountPlan, nowMs = Date.now(), opts = {}) {
245
570
  if (!live)
246
571
  return passive;
247
572
  if (!passive)
248
573
  return live;
574
+ const livePlanMatches = codexSnapshotMatchesAccountPlan(live.planType, accountPlan);
575
+ const passivePlanMatches = codexSnapshotMatchesAccountPlan(passive.planType, accountPlan);
576
+ if (livePlanMatches !== passivePlanMatches)
577
+ return livePlanMatches ? live : passive;
578
+ if (opts.liveOwnsFamilyAuthority !== false && liveRejectsPassiveFamily(passive, live, nowMs)) {
579
+ return live;
580
+ }
581
+ // A reading with no measurement at all never displaces one that has some, in
582
+ // EITHER direction. Guarding only the `live` side covered only half the
583
+ // callers: the relay passes (relayed, own), so the unguarded direction was a
584
+ // newer contentless relayed block blanking the daemon's real one. Recency
585
+ // cannot see this — a live answer is captured "now" by construction and a
586
+ // relayed rollout is seconds old — and the result is every slot-based Codex
587
+ // surface going empty.
588
+ if (hasRenderableContent(passive) !== hasRenderableContent(live)) {
589
+ return hasRenderableContent(passive) ? passive : live;
590
+ }
249
591
  return codexSnapshotOutranks({ planType: live.planType, capturedAtMs: capturedAtMs(live) }, { planType: passive.planType, capturedAtMs: capturedAtMs(passive) }, accountPlan)
250
592
  ? live
251
593
  : passive;
252
594
  }
253
595
  /** Throttle policy, kept pure so the cadence is testable without spawning. */
254
596
  export function shouldQueryCodexRateLimitsLive(input) {
255
- const { nowMs, lastAttemptMs, consecutiveFailures, passiveCapturedAtMs, passivePlanMatchesAccount = true, } = input;
597
+ const { nowMs, lastAttemptMs, consecutiveFailures, passiveCapturedAtMs, passivePlanMatchesAccount = true, passiveMatchesAccountFamily = true, } = input;
256
598
  const interval = consecutiveFailures >= MAX_CONSECUTIVE_FAILURES ? FAILURE_BACKOFF_MS : MIN_QUERY_INTERVAL_MS;
257
599
  // Spawn throttles are unconditional: a mismatch is a reason to prefer the live
258
600
  // read, never a licence to spawn a subprocess on every usage build.
259
601
  if (lastAttemptMs > 0 && nowMs - lastAttemptMs < interval)
260
602
  return false;
603
+ // Nothing has ever been asked. There is no baseline to compare a passive
604
+ // snapshot's limit family against, and on a machine where Codex is in constant
605
+ // use the freshness skip below would keep it that way for as long as the
606
+ // daemon lives — the family guard would then never engage, which is exactly
607
+ // the busy machine it exists for. One spawn per daemon start buys the
608
+ // baseline; the throttles govern every query after it.
609
+ if (lastAttemptMs === 0)
610
+ return true;
261
611
  // Codex is mid-turn: the rollout is already writing fresh readings — but only
262
612
  // if those readings are usable at all. A snapshot stamped with a retired plan
263
613
  // is voided downstream, so "the passive read is fresh" would suppress the one
264
614
  // source that still has a number, precisely while Codex is being used hardest.
615
+ // The same reasoning covers the family axis: a rollout pouring out per-model
616
+ // pool readings every two seconds is the state in which the account's own
617
+ // number is least visible and most wanted, so it must not throttle the only
618
+ // source that can still report it.
265
619
  if (passivePlanMatchesAccount &&
620
+ passiveMatchesAccountFamily &&
266
621
  passiveCapturedAtMs > 0 &&
267
622
  nowMs - passiveCapturedAtMs < PASSIVE_FRESH_MS) {
268
623
  return false;
269
624
  }
270
625
  return true;
271
626
  }
627
+ /**
628
+ * Whether a published Codex block may speak for the account's limit FAMILY —
629
+ * the question the relay path has to answer before it lets that block reject a
630
+ * session bridge's.
631
+ *
632
+ * It is deliberately NOT "did the live snapshot win the last pick". Identity
633
+ * with the pick is false in the ordinary good case: when the two readings agree
634
+ * on family the picker keeps the fresher rollout, which while Codex is working
635
+ * is every single build. Read that way, the guard switched itself off exactly
636
+ * when the daemon did hold a verified baseline — and a bridge sampling a
637
+ * mislabelled pool line a second later then won on recency, which is the
638
+ * oscillation this whole change removes, surviving at the one call site that
639
+ * had no other defence.
640
+ *
641
+ * The real question is whether a live answer exists, carries a fingerprint that
642
+ * may reject (`familyFingerprintCanReject`), and agrees with what was published.
643
+ * A plan-voided live snapshot fails the second test rather than lending its
644
+ * authority to a passive block that outranked it for unrelated reasons.
645
+ *
646
+ * Takes the live block rather than reading the module cache, so the rule can be
647
+ * driven directly instead of only through a spawn, and answers with the instant
648
+ * the authority lapses rather than a yes/no read against the caller's clock.
649
+ */
650
+ export function codexLiveFamilyAuthorityExpiry(published, live) {
651
+ if (!published || !live)
652
+ return null;
653
+ const capturedMs = live.capturedAt ? new Date(live.capturedAt).getTime() : NaN;
654
+ if (isNaN(capturedMs))
655
+ return null;
656
+ // Judged at the live answer's OWN capture instant, then handed out as the
657
+ // instant it lapses. A boolean frozen at build time is a claim about a clock
658
+ // that has since moved: the relay path can only re-check the age of the block
659
+ // it received, and when the picker kept the fresher rollout — the common case
660
+ // — that block is younger than the live answer that granted the authority, so
661
+ // a `true` outlived the fifteen minutes this file says it lasts.
662
+ if (!familyFingerprintCanReject(live, capturedMs))
663
+ return null;
664
+ if (!codexSnapshotsShareLimitFamily(published, live))
665
+ return null;
666
+ return capturedMs + LIVE_FAMILY_AUTHORITY_MAX_AGE_MS;
667
+ }
668
+ /**
669
+ * Whether the cached live answer positively vouches for the passive reading's
670
+ * family — the THROTTLE's question, and deliberately not the picker's.
671
+ *
672
+ * Routing the throttle through `liveRejectsPassiveFamily` deadlocked the two
673
+ * bounds against each other on exactly the busy machine this change is for. The
674
+ * skip suppresses queries while the rollout is fresh, so under continuous Codex
675
+ * use the cached answer is never refreshed; fifteen minutes in it loses its
676
+ * authority; and from then on a disagreement could no longer be REPORTED as one,
677
+ * because the age bound lives inside the rejection test. `passiveMatchesAccountFamily`
678
+ * stayed true, the skip stayed engaged, no query ever fired, and the picker fell
679
+ * through to recency — publishing the mislabelled pool reading for the rest of
680
+ * the run.
681
+ *
682
+ * So the polarity is inverted here on purpose: the skip is earned by a live
683
+ * answer that is present, still able to arbitrate, and in agreement. Anything
684
+ * else — no answer, a stale one, a disagreeing one — is a REASON to spend a
685
+ * query, never a reason to skip one. The spawn throttles bound the cost either
686
+ * way. Exported for unit testing.
687
+ */
688
+ export function liveCorroboratesPassiveFamily(passive, live, nowMs = Date.now()) {
689
+ if (!passive || !live)
690
+ return false;
691
+ if (!codexSnapshotsShareLimitFamily(passive, live))
692
+ return false;
693
+ // A credit-based plan reports no windows at all (`limit_id: "premium"`), so no
694
+ // live answer it ever returns can carry a weekly fingerprint. Demanding one
695
+ // makes corroboration structurally impossible there: the skip is disabled
696
+ // forever, the query succeeds every time so the failure backoff never engages,
697
+ // and the daemon spawns `codex app-server` every five minutes for as long as
698
+ // Codex is in use, with no state that can end it. "Has no fingerprint to
699
+ // offer" is a different answer from "has one that no longer means anything".
700
+ //
701
+ // But it must NAME that shape, not just the absence of a weekly window, or it
702
+ // reopens the deadlock one door down. A content-free block — `{limitId,
703
+ // capturedAt}`, which this file's own third rung can return and
704
+ // `parseLiveCodexRateLimits` accepts on `limitId` alone — would otherwise
705
+ // corroborate forever: the answer counts as a success so the failure backoff
706
+ // never engages, the family test short-circuits on the missing weekly, the
707
+ // skip stays engaged for as long as Codex is in use, and `cachedLive` freezes
708
+ // on a block that can never arbitrate anything downstream. Same for a 5h-only
709
+ // answer. Granting the skip to those buys nothing and costs the whole fix.
710
+ if (weeklyWindow(live) == null)
711
+ return live.credits != null;
712
+ return familyFingerprintCanReject(live, nowMs);
713
+ }
272
714
  let cachedLive = null;
273
715
  let lastAttemptMs = 0;
274
716
  let consecutiveFailures = 0;
@@ -287,6 +729,11 @@ export function getLiveCodexRateLimits() {
287
729
  * `accountPlan` is the live tier from `auth.json`. Passing it is what lets both
288
730
  * halves of this function tell "old" from "void"; omitting it keeps the previous
289
731
  * newest-wins behaviour.
732
+ *
733
+ * The third axis needs no argument: the last live answer is itself the record of
734
+ * which limit family belongs to the account, so a passive snapshot describing a
735
+ * different one is neither preferred nor allowed to throttle the next query
736
+ * (`codexSnapshotsShareLimitFamily`).
290
737
  */
291
738
  export function codexRateLimitsWithLiveRefresh(passive, accountPlan) {
292
739
  if (process.env.AGENTDECK_CODEX_LIVE_USAGE !== '0') {
@@ -298,6 +745,7 @@ export function codexRateLimitsWithLiveRefresh(passive, accountPlan) {
298
745
  consecutiveFailures,
299
746
  passiveCapturedAtMs: capturedAtMs(passive),
300
747
  passivePlanMatchesAccount: codexSnapshotMatchesAccountPlan(passive?.planType, accountPlan),
748
+ passiveMatchesAccountFamily: liveCorroboratesPassiveFamily(passive, cachedLive, nowMs),
301
749
  })) {
302
750
  inFlight = true;
303
751
  lastAttemptMs = nowMs;
@@ -322,10 +770,15 @@ export function codexRateLimitsWithLiveRefresh(passive, accountPlan) {
322
770
  return pickBestCodexRateLimits(passive, cachedLive, accountPlan);
323
771
  }
324
772
  /** Test hook — clears the module-level cache and throttle state. */
325
- export function __resetCodexRateLimitsLiveForTest() {
326
- cachedLive = null;
327
- lastAttemptMs = 0;
773
+ export function __resetCodexRateLimitsLiveForTest(seed) {
774
+ cachedLive = seed?.cachedLive ?? null;
775
+ lastAttemptMs = seed?.lastAttemptMs ?? 0;
328
776
  consecutiveFailures = 0;
329
777
  inFlight = false;
330
778
  }
779
+ /** Throttle state, so a test can tell "a query was spent" from "the skip held".
780
+ * `lastAttemptMs` moves synchronously, before any subprocess exists. */
781
+ export function __peekCodexRateLimitsLiveForTest() {
782
+ return { lastAttemptMs };
783
+ }
331
784
  //# sourceMappingURL=codex-rate-limits-live.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex-rate-limits-live.js","sourceRoot":"","sources":["../src/codex-rate-limits-live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EACL,+BAA+B,EAC/B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,mBA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