@bridge4dev/runner 0.42.0 → 0.42.1

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.
@@ -701,6 +701,17 @@ class ClaudeSession {
701
701
  limitBlockPending = false;
702
702
  /** When `/usage` was last read, so a busy session does not spawn a process a second. */
703
703
  usageProbedAt = 0;
704
+ /**
705
+ * The one key the window map is written under, from every source.
706
+ *
707
+ * Live 2026-08-15: the event wrote under the provider's raw name
708
+ * (`five_hour`) while the `/usage` merge wrote under `five_hour:` — so the
709
+ * same window arrived twice, once with the clock and once with the number,
710
+ * and the panel drew both rows. One scheme, one row.
711
+ */
712
+ static windowKey(key, label) {
713
+ return `${key}:${label ?? ''}`;
714
+ }
704
715
  /**
705
716
  * Read the percentages out of the CLI's own `/usage` (#279).
706
717
  *
@@ -731,7 +742,7 @@ class ClaudeSession {
731
742
  const merged = applyUsagePercentages([...this.rateLimitWindows.values()], rows);
732
743
  this.rateLimitWindows.clear();
733
744
  for (const window of merged) {
734
- this.rateLimitWindows.set(`${window.key}:${window.label ?? ''}`, window);
745
+ this.rateLimitWindows.set(ClaudeSession.windowKey(window.key, window.label), window);
735
746
  }
736
747
  this.emitRateLimits();
737
748
  })
@@ -780,7 +791,7 @@ class ClaudeSession {
780
791
  if (!window || typeof window.utilization !== 'number')
781
792
  continue;
782
793
  const key = rateWindowKey(name);
783
- this.rateLimitWindows.set(name, {
794
+ this.rateLimitWindows.set(ClaudeSession.windowKey(key), {
784
795
  key,
785
796
  windowMinutes: RATE_WINDOW_MINUTES[key] ?? null,
786
797
  usedPercent: clampPercent(window.utilization),
@@ -817,8 +828,8 @@ class ClaudeSession {
817
828
  // Keep whatever the previous event said about the percentage: the field
818
829
  // comes and goes between events about the same window, and dropping it on
819
830
  // the next silent one would make a number that was true flicker away.
820
- const known = this.rateLimitWindows.get(name);
821
- this.rateLimitWindows.set(name, {
831
+ const known = this.rateLimitWindows.get(ClaudeSession.windowKey(key));
832
+ this.rateLimitWindows.set(ClaudeSession.windowKey(key), {
822
833
  key,
823
834
  windowMinutes: RATE_WINDOW_MINUTES[key] ?? null,
824
835
  usedPercent: typeof utilization === 'number' ? clampPercent(utilization) : (known?.usedPercent ?? null),
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const RUNNER_VERSION = "0.42.0";
1
+ export declare const RUNNER_VERSION = "0.42.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Kept in sync with package.json by the release script (manual for now).
2
- export const RUNNER_VERSION = '0.42.0';
2
+ export const RUNNER_VERSION = '0.42.1';
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge4dev/runner",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
4
4
  "description": "DevBridge dev runner — connects a dev server to DevBridge and runs agent sessions (Claude Code / Codex)",
5
5
  "homepage": "https://bridge4.dev",
6
6
  "license": "MIT",