@agentdeck/shared 1.0.21 → 1.0.23

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.
@@ -51,6 +51,8 @@ export declare const Brand: {
51
51
  readonly codex: "#6166E0";
52
52
  readonly openclaw: "#FF4D4D";
53
53
  readonly opencode: "#3a3a3a";
54
+ readonly antigravity: "#5F6368";
55
+ readonly kiro: "#7C3AED";
54
56
  };
55
57
  export declare const Font: {
56
58
  readonly sans: "\"IBM Plex Sans\", \"IBM Plex Sans KR\", \"IBM Plex Sans JP\", -apple-system, BlinkMacSystemFont, system-ui, sans-serif";
@@ -181,6 +183,8 @@ export declare const DesignTokens: {
181
183
  readonly codex: "#6166E0";
182
184
  readonly openclaw: "#FF4D4D";
183
185
  readonly opencode: "#3a3a3a";
186
+ readonly antigravity: "#5F6368";
187
+ readonly kiro: "#7C3AED";
184
188
  };
185
189
  readonly Font: {
186
190
  readonly sans: "\"IBM Plex Sans\", \"IBM Plex Sans KR\", \"IBM Plex Sans JP\", -apple-system, BlinkMacSystemFont, system-ui, sans-serif";
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens.d.ts","sourceRoot":"","sources":["../src/design-tokens.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI;;;;;CAKP,CAAC;AAEX,eAAO,MAAM,GAAG;;;;;;CAMN,CAAC;AAEX,eAAO,MAAM,IAAI;;;;CAIP,CAAC;AAEX,eAAO,MAAM,KAAK;;;CAGR,CAAC;AAEX,eAAO,MAAM,KAAK;;CAER,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;CAKT,CAAC;AAIX,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;CAgBL,CAAC;AAIX,eAAO,MAAM,KAAK;;;;;CAKR,CAAC;AAEX,eAAO,MAAM,IAAI;;;CAGP,CAAC;AAEX,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;CAeP,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBf,CAAC"}
@@ -59,6 +59,8 @@ export const Brand = {
59
59
  codex: "#6166E0",
60
60
  openclaw: "#FF4D4D",
61
61
  opencode: "#3a3a3a",
62
+ antigravity: "#5F6368",
63
+ kiro: "#7C3AED",
62
64
  };
63
65
  export const Font = {
64
66
  sans: '"IBM Plex Sans", "IBM Plex Sans KR", "IBM Plex Sans JP", -apple-system, BlinkMacSystemFont, system-ui, sans-serif',
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens.js","sourceRoot":"","sources":["../src/design-tokens.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,4DAA4D;AAC5D,mFAAmF;AAEnF,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,SAAS;CACP,CAAC;AAEX,0DAA0D;AAC1D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,GAAG,CAAC,IAAI;IACd,UAAU,EAAE,I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Y,GAAG;IAC1B,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,EAAE;IACF,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACE,CAAC"}
@@ -0,0 +1,213 @@
1
+ /**
2
+ * ESP32 board SSOT — the machine-readable half of the board table.
3
+ *
4
+ * WHY THIS FILE EXISTS. The same board set was written out by hand in four
5
+ * places and only one edge had a gate:
6
+ *
7
+ * docs/hardware-compatibility.md (spec sheet — gated into docs/hardware/index.html)
8
+ * .github/workflows/esp32-release.yml (build matrix — enforced by a COMMENT only)
9
+ * bridge/src/cli.ts (ESP32_OTA_BOARDS)
10
+ * docs/esp32.md (alias table)
11
+ *
12
+ * A board missing from the release matrix ships no firmware and nothing fails —
13
+ * which is exactly how `t_embed`, `t_display_pro` and `esp32_c6_147` had no
14
+ * binaries at all in 1.0.1. This file is where those literals stop being
15
+ * literals; `scripts/generate-esp32-board-matrix.mjs` emits the derived copies
16
+ * and cross-checks the rest.
17
+ *
18
+ * DIVISION OF LABOUR with docs/hardware-compatibility.md: that file stays the
19
+ * SSOT for the human columns (display, controller, input, peripherals, status)
20
+ * and this one owns the machine fields. Two SSOTs over DISJOINT column sets,
21
+ * bound by a gate — not a second copy. Drop the cross-check and this file makes
22
+ * the duplication worse, not better.
23
+ */
24
+ export type Esp32ChipFamily = 'ESP32' | 'ESP32-S3' | 'ESP32-P4' | 'ESP32-C6';
25
+ export type Esp32FlashSize = '4MB' | '8MB' | '16MB';
26
+ /** esptool `--before` values (esptool-js calls this the reset `mode`). */
27
+ export type Esp32ResetBefore = 'default_reset' | 'usb_reset' | 'no_reset' | 'no_reset_no_sync';
28
+ /** esptool `--after` values. */
29
+ export type Esp32ResetAfter = 'hard_reset' | 'soft_reset' | 'no_reset' | 'no_reset_stub';
30
+ /**
31
+ * Whether the browser flasher may offer this board.
32
+ * - `verified` a hardware run connected and both guards agreed
33
+ * - `verified-partial` connected, but something is degraded (see the evidence)
34
+ * - `unverified` never measured — listed, disabled, with the reason shown
35
+ * - `blocked` measured and it cannot work here
36
+ */
37
+ export type Esp32WebFlashStatus = 'verified' | 'verified-partial' | 'unverified' | 'blocked';
38
+ export interface Esp32BoardSpec {
39
+ /** canonical `device_info.board` — the string every AgentDeck surface addresses */
40
+ id: string;
41
+ /** PlatformIO environment. A DIFFERENT namespace from `id`, deliberately. */
42
+ env: string;
43
+ name: string;
44
+ /** panel summary, mirrored into the release notes table */
45
+ display: string;
46
+ /**
47
+ * Extra CLI spellings accepted for `agentdeck esp32-ota <target>`. This list
48
+ * is the CLI's existing set VERBATIM — adding a spelling here changes what
49
+ * the command accepts, so it is a behaviour change, not bookkeeping.
50
+ * `esp32/scripts/flash.sh` keeps its own friendlier names (`tft_114`,
51
+ * `amoled_18`, …) for the local build path; those are deliberately NOT
52
+ * merged in, because they were never valid daemon targets.
53
+ */
54
+ aliases: string[];
55
+ chipFamily: Esp32ChipFamily;
56
+ flashSize: Esp32FlashSize;
57
+ flashMode: 'dio';
58
+ flashFreq: '40m' | '80m';
59
+ /**
60
+ * Where the bootloader sits INSIDE the merged image. Audit field only —
61
+ * consumers write the merged image at 0x0 and never branch on this.
62
+ */
63
+ bootloaderOffset: number;
64
+ uploadBaud: number;
65
+ /** verbatim `upload_flags` from platformio.ini, for the esptool CLI path */
66
+ esptoolFlags: string[];
67
+ /** the reset mode the env's flags imply */
68
+ before: Esp32ResetBefore;
69
+ after: Esp32ResetAfter;
70
+ /** does the flasher stub load on this board? (some envs pin --no-stub) */
71
+ stub: boolean;
72
+ /** native-USB CDC/JTAG: entering download mode RE-ENUMERATES the device node */
73
+ nativeUsb: boolean;
74
+ /** has dual-OTA partitions, i.e. `agentdeck esp32-ota` can target it */
75
+ ota: boolean;
76
+ webFlash: boolean;
77
+ webFlashStatus: Esp32WebFlashStatus;
78
+ /**
79
+ * The evidence for `webFlash`. A flag nobody measured is indistinguishable
80
+ * from one a board produced, so this string is what tells them apart — and it
81
+ * is required whenever `webFlash` is true (gated in tests).
82
+ */
83
+ webFlashVerified: string;
84
+ notes: string[];
85
+ }
86
+ /**
87
+ * esptool's own default bootloader offsets. Three values, not two — ESP32-P4 at
88
+ * 0x2000 is the one that gets missed, because every other chip in this fleet is
89
+ * 0x0 or 0x1000 and a "two cases" assumption survives review right up until a
90
+ * P4 is bricked.
91
+ */
92
+ export declare const ESP32_BOOTLOADER_OFFSET: Record<Esp32ChipFamily, number>;
93
+ /** Ordered as the release matrix builds them, so the generated diff stays small. */
94
+ export declare const ESP32_BOARDS: Esp32BoardSpec[];
95
+ export declare const esp32BoardById: (id: string) => Esp32BoardSpec | undefined;
96
+ /**
97
+ * alias / canonical id / env → the board it means.
98
+ *
99
+ * Built as a declaration rather than a top-level loop: this package is
100
+ * published with `sideEffects: false`, so import-time statements are work a
101
+ * bundler is allowed to delete (gated by shared/src/__tests__/no-side-effects.test.ts).
102
+ */
103
+ export declare const ESP32_BOARD_BY_TARGET: Record<string, Esp32BoardSpec>;
104
+ /**
105
+ * esptool reports a chip DESCRIPTION, not a family: "ESP32-D0WD (revision 1)",
106
+ * "ESP32-S3 (QFN56) (revision v0.2)". Order matters — every variant string also
107
+ * contains the substring "ESP32", so the classic case has to be the fallback or
108
+ * it swallows the whole family.
109
+ */
110
+ export declare function esp32ChipFamilyOf(description: string): Esp32ChipFamily | 'other';
111
+ /**
112
+ * esptool-js's `detectFlashSize()` silently returns `"4MB"` when it cannot
113
+ * decode the size id, so "4MB" means either a 4MB part or "no idea". Measured
114
+ * 2026-08-22: a TTGO T-Display read through the ROM loader (no stub) answers
115
+ * `0xffffff` and was reported as 4MB, while the same board with the stub reads
116
+ * `0x1840ef` → 16MB, and esptool.py reads 16MB either way.
117
+ *
118
+ * So the id is checked first and "unknown" is allowed to stay unknown.
119
+ */
120
+ export declare function esp32FlashIdIsUsable(flashIdHex: string | undefined): boolean;
121
+ /**
122
+ * The flash-size guard is DIRECTIONAL.
123
+ *
124
+ * Declaring MORE flash than the part has is the brick: the bootloader header
125
+ * claims a geometry the chip cannot serve and the partition table is rejected.
126
+ * Declaring LESS is merely conservative — and on InkDeck it is mandatory, since
127
+ * the XIAO ESP32-S3 Plus is physically 16MB but its BSP bakes an 8MB field. An
128
+ * equality test fails that board for doing the correct thing.
129
+ *
130
+ * Returns undefined when the detected size is unknown; that is its own answer,
131
+ * not a pass and not a failure.
132
+ */
133
+ export declare function esp32FlashSizeIsSafe(declared: string, detected: string | undefined): boolean | undefined;
134
+ /** The `--chip` argument esptool expects for a board's family. */
135
+ export declare const ESP32_ESPTOOL_CHIP: Record<Esp32ChipFamily, string>;
136
+ /** Chip ID `esptool image-info` prints, per family — used to self-check a merged image. */
137
+ export declare const ESP32_IMAGE_CHIP_ID: Record<Esp32ChipFamily, number>;
138
+ /** Where the partition table lives; also where the bootloader region ends. */
139
+ export declare const ESP32_PARTITION_TABLE_OFFSET = 32768;
140
+ /** boot_app0 (the OTA-selection blob) offset. Absent, a board can boot a stale slot. */
141
+ export declare const ESP32_BOOT_APP0_OFFSET = 57344;
142
+ /** app0 — the first application slot. Same on every board here. */
143
+ export declare const ESP32_APP0_OFFSET = 65536;
144
+ export type Esp32PreflightCode =
145
+ /** every check the link could answer agreed */
146
+ 'ok'
147
+ /** connected, but the flash id was unreadable — chip family is all we verified */
148
+ | 'ok-unknown-flash'
149
+ /** the chip on the wire is not the family this image was built for */
150
+ | 'chip-mismatch'
151
+ /** the image declares more flash than the part reports having */
152
+ | 'flash-too-small'
153
+ /** this SURFACE does not offer the board (browser only — see `surface`) */
154
+ | 'board-not-offered'
155
+ /** the image about to be written was built for different geometry than this board's spec */
156
+ | 'image-geometry-mismatch';
157
+ /**
158
+ * Which tool is asking. It changes exactly one thing, and getting it wrong in
159
+ * either direction is a real defect:
160
+ *
161
+ * - `'browser'` additionally requires `webFlash`, because the page only offers
162
+ * boards a hardware run measured.
163
+ * - `'cli'` does NOT. `webFlash` means "offered in the browser", never "may be
164
+ * written at all" — and `esp32_c6_147` has no OTA slot, so USB is its ONLY
165
+ * update path. A CLI that inherited the browser's list would leave that board
166
+ * with no way to be updated at all.
167
+ */
168
+ export type Esp32FlashSurface = 'browser' | 'cli';
169
+ export interface Esp32PreflightInput {
170
+ board: Esp32BoardSpec;
171
+ surface: Esp32FlashSurface;
172
+ /** raw `getChipDescription()` output, e.g. "ESP32-S3 (QFN56) (revision v0.2)" */
173
+ detectedChip: string | undefined;
174
+ /** `detectFlashSize()` output, or undefined when the flash id was unusable */
175
+ detectedFlashSize: string | undefined;
176
+ /**
177
+ * What the IMAGE says, read from the release manifest — as opposed to what
178
+ * this build's SSOT says the board is.
179
+ *
180
+ * These are not the same fact and they are deliberately decoupled: the CLI
181
+ * takes its manifest from a release tag (`--tag`, or the newest published
182
+ * one) while its board spec is bundled, and the browser page ships from
183
+ * master while its manifest comes from whichever release Pages deployed. So
184
+ * the value the guard checks and the value actually written into the
185
+ * flash-params header can differ, and the guard would be validating a number
186
+ * nobody writes.
187
+ *
188
+ * Omit when writing a hand-supplied image (`--firmware`), where there is no
189
+ * manifest to disagree with.
190
+ */
191
+ imageGeometry?: {
192
+ chipFamily: string;
193
+ flashSize: string;
194
+ };
195
+ }
196
+ export interface Esp32PreflightVerdict {
197
+ code: Esp32PreflightCode;
198
+ /** the only field a caller may branch on to start a write */
199
+ mayWrite: boolean;
200
+ /** what was compared, for the UI to show detected-vs-expected */
201
+ detectedFamily?: Esp32ChipFamily | 'other';
202
+ }
203
+ /**
204
+ * There is deliberately no `force` parameter.
205
+ *
206
+ * Writing a 16MB-header image to an 8MB part, or an S3 image to a classic
207
+ * ESP32, is precisely how these boards are bricked — and the recovery for a
208
+ * bricked board is the very tool that refused. An override switch would make
209
+ * the guard advisory, and an advisory guard is the one that gets clicked
210
+ * through at 2am. Callers that legitimately need to bypass have esptool.
211
+ */
212
+ export declare function esp32PreflightVerdict(input: Esp32PreflightInput): Esp32PreflightVerdict;
213
+ //# sourceM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,MAAM,MAAM,kBAAkB;AAC5B,+CAA+C;AAC7C,IAAI;AACN,kFAAkF;GAChF,kBAAkB;AACpB,sEAAsE;GACpE,eAAe;AACjB,iEAAiE;GAC/D,iBAAiB;AACnB,2EAA2E;GACzE,mBAAmB;AACrB,4FAA4F;GAC1F,yBAAyB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,KAAK,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,iFAAiF;IACjF,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8EAA8E;IAC9E,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,kBAAkB,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,cAAc,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,CA+CvF"}
@@ -0,0 +1,327 @@
1
+ /**
2
+ * ESP32 board SSOT — the machine-readable half of the board table.
3
+ *
4
+ * WHY THIS FILE EXISTS. The same board set was written out by hand in four
5
+ * places and only one edge had a gate:
6
+ *
7
+ * docs/hardware-compatibility.md (spec sheet — gated into docs/hardware/index.html)
8
+ * .github/workflows/esp32-release.yml (build matrix — enforced by a COMMENT only)
9
+ * bridge/src/cli.ts (ESP32_OTA_BOARDS)
10
+ * docs/esp32.md (alias table)
11
+ *
12
+ * A board missing from the release matrix ships no firmware and nothing fails —
13
+ * which is exactly how `t_embed`, `t_display_pro` and `esp32_c6_147` had no
14
+ * binaries at all in 1.0.1. This file is where those literals stop being
15
+ * literals; `scripts/generate-esp32-board-matrix.mjs` emits the derived copies
16
+ * and cross-checks the rest.
17
+ *
18
+ * DIVISION OF LABOUR with docs/hardware-compatibility.md: that file stays the
19
+ * SSOT for the human columns (display, controller, input, peripherals, status)
20
+ * and this one owns the machine fields. Two SSOTs over DISJOINT column sets,
21
+ * bound by a gate — not a second copy. Drop the cross-check and this file makes
22
+ * the duplication worse, not better.
23
+ */
24
+ /**
25
+ * esptool's own default bootloader offsets. Three values, not two — ESP32-P4 at
26
+ * 0x2000 is the one that gets missed, because every other chip in this fleet is
27
+ * 0x0 or 0x1000 and a "two cases" assumption survives review right up until a
28
+ * P4 is bricked.
29
+ */
30
+ export const ESP32_BOOTLOADER_OFFSET = {
31
+ ESP32: 0x1000,
32
+ 'ESP32-S3': 0x0,
33
+ 'ESP32-C6': 0x0,
34
+ 'ESP32-P4': 0x2000,
35
+ };
36
+ const EV = '2026-08-22 · esptool-js 0.6.1 · Node 26.5 serialport adapter · ';
37
+ /** Ordered as the release matrix builds them, so the generated diff stays small. */
38
+ export const ESP32_BOARDS = [
39
+ {
40
+ id: '86box', env: 'box_86', name: '86 Box', display: '4" 480x480 ST7701',
41
+ aliases: ['box_86', 'box_40'],
42
+ chipFamily: 'ESP32-S3', flashSize: '16MB', flashMode: 'dio', flashFreq: '80m',
43
+ bootloaderOffset: 0x0, uploadBaud: 460800, esptoolFlags: [],
44
+ before: 'default_reset', after: 'hard_reset', stub: true, nativeUsb: false,
45
+ ota: true,
46
+ webFlash: true, webFlashStatus: 'verified',
47
+ webFlashVerified: EV +
48
+ 'default_reset/stub · ESP32-S3 (QFN56) rev v0.2 · flash 16MB · 460800 ok. ' +
49
+ 'Writes and MD5-verifies from the released merged image (4 runs, esp32-v1.0.7). ' +
50
+ 'POST-WRITE RESET DOES NOT WORK ON THIS BOARD: it stays parked in the flasher stub — silent for 200s ' +
51
+ 'with exclusive port access — after every write, and comes up in 2.0s only once python esptool pulses EN. ' +
52
+ 'A serialport RTS pulse, a DTR pulse, an RTS pulse through the Transport shim, and ' +
53
+ 'main(default_reset)+after(hard_reset) were each measured and none reboot it; esptool-js HardReset is a ' +
54
+ 'release with no assert. The firmware written is correct — the user must power-cycle.',
55
+ notes: ['CH340 USB-serial bridge.'],
56
+ },
57
+ {
58
+ id: 'ips_35', env: 'ips35', name: 'IPS 3.5"', display: '3.5" 480x320 AXS15231B',
59
+ aliases: ['ips35'],
60
+ chipFamily: 'ESP32-S3', flashSize: '16MB', flashMode: 'dio', flashFreq: '80m',
61
+ bootloaderOffset: 0x0, uploadBaud: 460800,
62
+ esptoolFlags: ['--before', 'no_reset', '--no-stub'],
63
+ before: 'no_reset', after: 'hard_reset', stub: false, nativeUsb: true,
64
+ ota: true,
65
+ webFlash: false, webFlashStatus: 'unverified',
66
+ webFlashVerified: '2026-08-22 · owned and live on Wi-Fi, but not USB-attached during the spike. A --no-stub board like the TTGO that did pass, so it is the best next candidate.',
67
+ notes: ['esptool misdetects the flash as 8MB during a bootloop — 16MB must be explicit.'],
68
+ },
69
+ {
70
+ id: 'round_amoled', env: 'amoled', name: 'Round AMOLED', display: '1.8" 360x360 ST77916',
71
+ // `amoled_18` was documented in docs/esp32.md but absent from the CLI, so
72
+ // a user following the docs got "No online WiFi ESP32 target matches". The
73
+ // CLI already accepts the other flash.sh friendly names (box_40, ips_101,
74
+ // knob, ticker, s3pro), so this was a gap, not a deliberate exclusion.
75
+ aliases: ['amoled', 'amoled_18'],
76
+ chipFamily: 'ESP32-S3', flashSize: '8MB', flashMode: 'dio', flashFreq: '80m',
77
+ bootloaderOffset: 0x0, uploadBaud: 460800,
78
+ esptoolFlags: ['--before', 'no_reset', '--no-stub'],
79
+ before: 'no_reset', after: 'hard_reset', stub: false, nativeUsb: true,
80
+ ota: true,
81
+ webFlash: false, webFlashStatus: 'unverified',
82
+ webFlashVerified: '2026-08-22 · owned and live on Wi-Fi, but not USB-attached during the spike.',
83
+ notes: [],
84
+ },
85
+ {
86
+ id: 'ips_10', env: 'ips10', name: 'IPS 10.1"', display: '10.1" 800x1280 JD9365',
87
+ aliases: ['ips10', 'ips_101'],
88
+ chipFamily: 'ESP32-P4', flashSize: '16MB', flashMode: 'dio', flashFreq: '40m',
89
+ bootloaderOffset: 0x2000, uploadBaud: 115200,
90
+ esptoolFlags: ['--before', 'no_reset', '--after', 'no_reset', '--no-stub'],
91
+ before: 'no_reset', after: 'no_reset', stub: false, nativeUsb: false,
92
+ ota: true,
93
+ webFlash: false, webFlashStatus: 'blocked',
94
+ webFlashVerified: '2026-08-22 · enters download mode but never answers. esptool.py 5.1.2 (the PlatformIO-vendored tool-esptoolpy build — NOT a PyPI release: the PyPI 5.1 line stops at 5.1.0, which is how a CI pin read off a local `pip show esptool` failed the esp32-v1.0.7 cut) reports "Download mode successfully detected, but getting no sync reply: The serial TX path seems to be down" — board-side, not esptool-js.',
95
+ notes: ['ESP32-P4: the bootloader lives at 0x2000, not 0x0.'],
96
+ },
97
+ {
98
+ id: 'inkdeck', env: 'inkdeck', name: 'InkDeck', display: '7.5" 800x480 e-ink UC8179',
99
+ aliases: [],
100
+ chipFamily: 'ESP32-S3', flashSize: '8MB', flashMode: 'dio', flashFreq: '80m',
101
+ bootloaderOffset: 0x0, uploadBaud: 460800, esptoolFlags: [],
102
+ before: 'default_reset', after: 'hard_reset', stub: true, nativeUsb: true,
103
+ ota: true,
104
+ webFlash: true, webFlashStatus: 'verified',
105
+ webFlashVerified: EV +
106
+ 'default_reset/stub · ESP32-S3 (QFN56) rev v0.2 · flash 16MB detected vs 8MB declared (BSP-correct) · 460800 ok. Connected on the DOWNLOAD-MODE node, which is a different device node from the running one.',
107
+ notes: [
108
+ 'The XIAO ESP32-S3 Plus is physically 16MB, but its BSP bakes an 8MB flash-size field — 8MB is the correct declaration, not a mistake.',
109
+ 'Pick the download-mode port, not the running one.',
110
+ ],
111
+ },
112
+ {
113
+ id: 'ttgo_t_display', env: 'ttgo', name: 'TTGO T-Display', display: '1.14" 240x135 ST7789',
114
+ aliases: ['ttgo'],
115
+ chipFamily: 'ESP32', flashSize: '16MB', flashMode: 'dio', flashFreq: '80m',
116
+ bootloaderOffset: 0x1000, uploadBaud: 115200, esptoolFlags: ['--no-stub'],
117
+ before: 'default_reset', after: 'hard_reset', stub: false, nativeUsb: false,
118
+ ota: true,
119
+ webFlash: true, webFlashStatus: 'verified-partial',
120
+ webFlashVerified: EV +
121
+ 'BOTH default_reset/stub and default_reset/no-stub connect · ESP32-D0WDQ6 rev v1.1. This is the measurement that proves the --no-stub path works. Flash size reads 16MB WITH the stub and is unreadable without it (flashId 0xffffff), so the size guard is unavailable stubless.',
122
+ notes: ['Stubless SPI flash-id reads return 0xffffff on this board; the size guard degrades to chip-family only.'],
123
+ },
124
+ {
125
+ id: 'ulanzi_tc001', env: 'led8x32', name: 'Ulanzi TC001', display: '32x8 WS2812B matrix',
126
+ aliases: ['led8x32'],
127
+ chipFamily: 'ESP32', flashSize: '8MB', flashMode: 'dio', flashFreq: '80m',
128
+ bootloaderOffset: 0x1000, uploadBaud: 115200, esptoolFlags: [],
129
+ before: 'default_reset', after: 'hard_reset', stub: true, nativeUsb: false,
130
+ ota: true,
131
+ webFlash: true, webFlashStatus: 'verified',
132
+ webFlashVerified: EV + 'default_reset/stub · ESP32-D0WD rev 1 · flash 8MB',
133
+ notes: [
134
+ 'Flash size MUST be 8MB — the 4MB default leaves the bootloader misbehaving (GPIO15 buzzer stuck HIGH, no display).',
135
+ 'This board does NOT answer device_info_request: its CH340 TX is hardware-broken. Verify a flash by the matrix render plus Wi-Fi registration, never by a serial probe.',
136
+ ],
137
+ },
138
+ {
139
+ id: 't_embed', env: 't_embed', name: 'T-Embed CC1101', display: '1.9" 320x170 ST7789',
140
+ aliases: ['tembed', 'knob'],
141
+ chipFamily: 'ESP32-S3', flashSize: '16MB', flashMode: 'dio', flashFreq: '80m',
142
+ bootloaderOffset: 0x0, uploadBaud: 460800, esptoolFlags: [],
143
+ before: 'default_reset', after: 'hard_reset', stub: true, nativeUsb: true,
144
+ ota: true,
145
+ webFlash: false, webFlashStatus: 'unverified',
146
+ webFlashVerified: '2026-08-22 · no auto entry into download mode; esptool.py 5.1.2 (the PlatformIO-vendored tool-esptoolpy build, not a PyPI release) fails identically ("No serial data received"), so this is the board, not esptool-js. Needs a physical BOOT press to verify.',
147
+ notes: [
148
+ 'Native USB CDC needs esptool\'s NORMAL reset — copying the no_reset/no-stub flags from the CH340 envs made every upload fail (2026-07-26).',
149
+ ],
150
+ },
151
+ {
152
+ id: 't_display_pro', env: 't_display_pro', name: 'T-Display-S3-Pro', display: '2.33" 480x222 ST7796U',
153
+ aliases: ['tdisplaypro', 'ticker', 's3pro'],
154
+ chipFamily: 'ESP32-S3', flashSize: '16MB', flashMode: 'dio', flashFreq: '80m',
155
+ bootloaderOffset: 0x0, uploadBaud: 230400, esptoolFlags: [],
156
+ before: 'default_reset', after: 'hard_reset', stub: true, nativeUsb: true,
157
+ ota: true,
158
+ webFlash: true, webFlashStatus: 'verified',
159
+ webFlashVerified: EV + 'default_reset/stub · ESP32-S3 (QFN56) rev v0.2 · flash 16MB · 230400 ok (the pinned rate held)',
160
+ notes: ['USB CDC corrupts the esptool stream above 230400 — stub + 230400 is the proven-stable combination.'],
161
+ },
162
+ {
163
+ id: 'esp32_c6_147', env: 'esp32_c6_147', name: 'Waveshare C6-LCD-1.47', display: '1.47" 172x320 ST7789',
164
+ aliases: [],
165
+ chipFamily: 'ESP32-C6', flashSize: '4MB', flashMode: 'dio', flashFreq: '80m',
166
+ bootloaderOffset: 0x0, uploadBaud: 460800, esptoolFlags: [],
167
+ before: 'default_reset', after: 'hard_reset', stub: true, nativeUsb: true,
168
+ // Single-app 4MB layout: no OTA slot, so USB is this board's ONLY update
169
+ // path. Stated here rather than inferred from an absent line in the CLI's
170
+ // OTA list, which is how it read before.
171
+ ota: false,
172
+ webFlash: false, webFlashStatus: 'unverified',
173
+ webFlashVerified: '2026-08-22 · not present on serial or Wi-Fi during the spike, and the only ESP32-C6 in the fleet, so the entire C6 path is unverified.',
174
+ notes: ['No OTA partitions — USB is the only way to update this board.'],
175
+ },
176
+ ];
177
+ export const esp32BoardById = (id) => ESP32_BOARDS.find((b) => b.id === id);
178
+ /**
179
+ * alias / canonical id / env → the board it means.
180
+ *
181
+ * Built as a declaration rather than a top-level loop: this package is
182
+ * published with `sideEffects: false`, so import-time statements are work a
183
+ * bundler is allowed to delete (gated by shared/src/__tests__/no-side-effects.test.ts).
184
+ */
185
+ export const ESP32_BOARD_BY_TARGET = Object.fromEntries(ESP32_BOARDS.flatMap((b) => [b.id, b.env, ...b.aliases].map((key) => [key, b])));
186
+ /**
187
+ * esptool reports a chip DESCRIPTION, not a family: "ESP32-D0WD (revision 1)",
188
+ * "ESP32-S3 (QFN56) (revision v0.2)". Order matters — every variant string also
189
+ * contains the substring "ESP32", so the classic case has to be the fallback or
190
+ * it swallows the whole family.
191
+ */
192
+ export function esp32ChipFamilyOf(description) {
193
+ const d = description.toUpperCase();
194
+ if (/ESP32-S3/.test(d))
195
+ return 'ESP32-S3';
196
+ if (/ESP32-P4/.test(d))
197
+ return 'ESP32-P4';
198
+ if (/ESP32-C6/.test(d))
199
+ return 'ESP32-C6';
200
+ if (/ESP32-(S2|C2|C3|C5|C61|H2)/.test(d))
201
+ return 'other';
202
+ if (/ESP32/.test(d))
203
+ return 'ESP32';
204
+ return 'other';
205
+ }
206
+ /* --------------------------------------------------------------- flash guards
207
+ * These two rules decide whether it is safe to write to a board, so the browser
208
+ * flasher and the CLI must apply them IDENTICALLY — which makes them SSOT
209
+ * material, not per-surface helpers.
210
+ */
211
+ /**
212
+ * esptool-js's `detectFlashSize()` silently returns `"4MB"` when it cannot
213
+ * decode the size id, so "4MB" means either a 4MB part or "no idea". Measured
214
+ * 2026-08-22: a TTGO T-Display read through the ROM loader (no stub) answers
215
+ * `0xffffff` and was reported as 4MB, while the same board with the stub reads
216
+ * `0x1840ef` → 16MB, and esptool.py reads 16MB either way.
217
+ *
218
+ * So the id is checked first and "unknown" is allowed to stay unknown.
219
+ */
220
+ export function esp32FlashIdIsUsable(flashIdHex) {
221
+ if (!flashIdHex)
222
+ return false;
223
+ const n = Number.parseInt(flashIdHex, 16);
224
+ return Number.isFinite(n) && n !== 0xffffff && n !== 0x000000;
225
+ }
226
+ /**
227
+ * The flash-size guard is DIRECTIONAL.
228
+ *
229
+ * Declaring MORE flash than the part has is the brick: the bootloader header
230
+ * claims a geometry the chip cannot serve and the partition table is rejected.
231
+ * Declaring LESS is merely conservative — and on InkDeck it is mandatory, since
232
+ * the XIAO ESP32-S3 Plus is physically 16MB but its BSP bakes an 8MB field. An
233
+ * equality test fails that board for doing the correct thing.
234
+ *
235
+ * Returns undefined when the detected size is unknown; that is its own answer,
236
+ * not a pass and not a failure.
237
+ */
238
+ export function esp32FlashSizeIsSafe(declared, detected) {
239
+ const mb = (s) => {
240
+ if (!s)
241
+ return undefined;
242
+ const m = /(\d+)\s*MB/i.exec(s);
243
+ return m ? Number(m[1]) : undefined;
244
+ };
245
+ const want = mb(declared);
246
+ const have = mb(detected);
247
+ if (want === undefined || have === undefined)
248
+ return undefined;
249
+ return want <= have;
250
+ }
251
+ /** The `--chip` argument esptool expects for a board's family. */
252
+ export const ESP32_ESPTOOL_CHIP = {
253
+ ESP32: 'esp32',
254
+ 'ESP32-S3': 'esp32s3',
255
+ 'ESP32-C6': 'esp32c6',
256
+ 'ESP32-P4': 'esp32p4',
257
+ };
258
+ /** Chip ID `esptool image-info` prints, per family — used to self-check a merged image. */
259
+ export const ESP32_IMAGE_CHIP_ID = {
260
+ ESP32: 0,
261
+ 'ESP32-S3': 9,
262
+ 'ESP32-C6': 13,
263
+ 'ESP32-P4': 18,
264
+ };
265
+ /** Where the partition table lives; also where the bootloader region ends. */
266
+ export const ESP32_PARTITION_TABLE_OFFSET = 0x8000;
267
+ /** boot_app0 (the OTA-selection blob) offset. Absent, a board can boot a stale slot. */
268
+ export const ESP32_BOOT_APP0_OFFSET = 0xe000;
269
+ /** app0 — the first application slot. Same on every board here. */
270
+ export const ESP32_APP0_OFFSET = 0x10000;
271
+ /**
272
+ * There is deliberately no `force` parameter.
273
+ *
274
+ * Writing a 16MB-header image to an 8MB part, or an S3 image to a classic
275
+ * ESP32, is precisely how these boards are bricked — and the recovery for a
276
+ * bricked board is the very tool that refused. An override switch would make
277
+ * the guard advisory, and an advisory guard is the one that gets clicked
278
+ * through at 2am. Callers that legitimately need to bypass have esptool.
279
+ */
280
+ export function esp32PreflightVerdict(input) {
281
+ const { board, surface, detectedChip, detectedFlashSize } = input;
282
+ if (surface === 'browser' && !board.webFlash) {
283
+ return { code: 'board-not-offered', mayWrite: false };
284
+ }
285
+ const detectedFamily = detectedChip ? esp32ChipFamilyOf(detectedChip) : undefined;
286
+ if (detectedFamily !== board.chipFamily) {
287
+ return { code: 'chip-mismatch', mayWrite: false, detectedFamily };
288
+ }
289
+ // The guard must check the value that will actually be WRITTEN. Concretely:
290
+ // the SSOT corrects a board down to 4MB, a pinned manifest still says 16MB,
291
+ // the part reports 8MB — `4 <= 8` passes while a 16MB header lands on an 8MB
292
+ // part, which is precisely the brick every other rule here exists to prevent.
293
+ //
294
+ // STRICT EQUALITY, NOT DIRECTIONAL, and deliberately so. Unlike the size rule
295
+ // below, these two values are not "declared vs actual": they are two
296
+ // descriptions of the SAME board from two sources that are supposed to agree
297
+ // (a release manifest, and this build's SSOT). A disagreement in either
298
+ // direction means they describe different boards and there is no way to tell
299
+ // which one is true.
300
+ //
301
+ // It is also the ONLY size check left when the flash id is unreadable — a
302
+ // stubless TTGO answers 0xffffff, `esp32FlashSizeIsSafe` returns undefined,
303
+ // and the size axis goes unchecked. Loosening this to a directional test
304
+ // would remove the sole guard in exactly the case with the least information.
305
+ //
306
+ // The cost is a release-ordering constraint, not a defect: after any SSOT
307
+ // flash-size change, the browser flasher refuses against the previously
308
+ // deployed release until Pages redeploys with the new manifest. Cut the esp32
309
+ // release, then push master. See RELEASING.md.
310
+ const { imageGeometry } = input;
311
+ if (imageGeometry &&
312
+ (imageGeometry.flashSize !== board.flashSize || imageGeometry.chipFamily !== board.chipFamily)) {
313
+ return { code: 'image-geometry-mismatch', mayWrite: false, detectedFamily };
314
+ }
315
+ const sizeSafe = esp32FlashSizeIsSafe(board.flashSize, detectedFlashSize);
316
+ if (sizeSafe === false)
317
+ return { code: 'flash-too-small', mayWrite: false, detectedFamily };
318
+ // Unknown is its own answer, and it is a PASS: the merged image bakes its
319
+ // flash-size field at build time from this same SSOT and CI asserts it with
320
+ // `esptool image-info`, so the geometry is already correct in the bits. What
321
+ // is lost is the runtime cross-check, and that has to be said in the UI
322
+ // rather than quietly downgraded to a full pass.
323
+ if (sizeSafe === undefined)
324
+ return { code: 'ok-unknown-flash', mayWrite: true, detectedFamily };
325
+ return { code: 'ok', mayWrite: true, detectedFamily };
326
+ }
327
+ //# sourceMappingURL=esp32-boards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esp32-boards.js","sourceRoot":"","sources":["../src/esp32-boards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAsEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAoC;IACtE,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;CACnB,CAAC;AAEF,MAAM,EAAE,GAAG,iEAAiE,CAAC;AAE7E,oFAAoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAAqB;IAC5C;QACE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,mBAAmB;QACxE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC7B,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK;QAC7E,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EAAE,CAAC;AACxD,CAAC"}
@@ -155,6 +155,47 @@ export declare function scopedLimitClaimsUsageKey(scoped: {
155
155
  * Claude 5H, 7D, Scoped (Fable), and Codex windows together across up to 4 usage keys.
156
156
  */
157
157
  export declare function codexWindowsBeside<T>(codexWindows: T[], _scopedClaimsKey?: boolean): T[];
158
+ /**
159
+ * Display name for a raw `chatgpt_plan_type`, keyed by the tier with every
160
+ * separator removed — `prolite`, `pro_lite` and `pro lite` are one plan.
161
+ *
162
+ * SSOT for both daemons: the Swift mirror (`ChatGPTPlan` in
163
+ * CodexFreshnessRules.generated.swift) is emitted from this table. It used to be
164
+ * a hand copy, and a tier missing from one copy does not degrade gracefully —
165
+ * it renders as the fallback capitalisation ("ChatGPT Prolite") on that surface
166
+ * only, so the same account reads differently on the dashboard and the deck.
167
+ */
168
+ export declare const CHATGPT_PLAN_DISPLAY_NAMES: Readonly<Record<string, string>>;
169
+ /**
170
+ * Format a raw `chatgpt_plan_type` for display, or `undefined` when there is no
171
+ * tier to show.
172
+ *
173
+ * An unrecognised tier is capitalised rather than dropped: OpenAI mints new plan
174
+ * names on its own schedule (`prolite` arrived unannounced), and a tier this
175
+ * build predates must still read as a plan beside Plus/Pro/Team — never as the
176
+ * raw lowercase token, and never as nothing.
177
+ */
178
+ export declare function formatChatGptPlanName(planType?: string | null): string | undefined;
179
+ /**
180
+ * The one comparison form for a raw `chatgpt_plan_type`.
181
+ *
182
+ * Trimmed, lowercased, and stripped of separators — `prolite`, `pro_lite` and
183
+ * `pro lite` are one plan, so they must key the display table AND compare equal.
184
+ * Normalizing only the display path was an internal contradiction with teeth:
185
+ * the two sides of the plan check come from different producers (the auth token
186
+ * for the account tier, the rollout stamp for the snapshot), so a spelling the
187
+ * table was written to absorb would still land every candidate in the "mismatch"
188
+ * class — ranking would have nothing to prefer, the winner would be voided, and
189
+ * on the Node daemon `passivePlanMatchesAccount` would be permanently false, so
190
+ * `codex app-server` would be spawned every 5 minutes forever and its answer
191
+ * voided too. The exact failure this module exists to prevent, via a different
192
+ * spelling.
193
+ *
194
+ * A value that is nothing but separators normalizes to `''` — i.e. "unknown",
195
+ * which the predicate already treats as no information rather than as a licence
196
+ * to void.
197
+ */
198
+ export declare function normalizeChatGptPlanKey(value?: string | null): string;
158
199
  /**
159
200
  * True when the ChatGPT tier carries no paid Codex subscription.
160
201
  *
@@ -179,8 +220,85 @@ export declare function isCodexFreePlan(plan?: string | null): boolean;
179
220
  * Unknown on either side → matches. Absence is "no information", never a licence
180
221
  * to void real data: an API-key Codex install reports no account tier, and a
181
222
  * pre-`plan_type` rollout reports no snapshot tier.
223
+ *
224
+ * The emptiness test MUST stay ahead of the equality test, and not because it is
225
+ * a cheap early-out. Normalization strips separators, so two separator-only
226
+ * values (`"-"`, `" "`) both reduce to `''` — reordered, they would compare equal
227
+ * and report a positive plan MATCH where the answer is "neither side named a
228
+ * tier". Every current caller happens to act the same way on both answers, which
229
+ * is exactly why the difference would go unnoticed. Mirrored in Swift.
182
230
  */
183
231
  export declare function codexSnapshotMatchesAccountPlan(snapshotPlan?: string | null, accountPlan?: string | null): boolean;
232
+ /**
233
+ * True when a Codex `rate_limits` snapshot meters a single model or feature
234
+ * rather than the account.
235
+ *
236
+ * Codex writes more than one limit FAMILY, and the rollout carries whichever one
237
+ * the last request was metered against — not necessarily the account's. Measured
238
+ * across 823 rollout files on 2026-08-22, the whole observed space is three
239
+ * families and the discriminator is exact:
240
+ *
241
+ * limit_id "codex" limit_name null 37,985 lines account
242
+ * limit_id "premium" limit_name null 66 lines account (credit plan)
243
+ * limit_id "codex_bengalfox" limit_name "GPT-5.3-Codex-Spark" 915 lines ONE MODEL
244
+ *
245
+ * A named limit is a scoped limit — the name exists precisely to say which model
246
+ * it applies to. So the account-wide families are the unnamed ones, and that is
247
+ * what "Codex usage" on a deck, dial or panel means.
248
+ *
249
+ * This is not a freshness or a plan question, and neither axis can catch it: the
250
+ * scoped snapshot is CURRENT and belongs to the right plan. It is simply a
251
+ * different quantity, and rendering it under the account's label reports 0%
252
+ * while the account sits at 13% (observed). Within a single session the family
253
+ * alternates hour to hour, so "newest line wins" silently switches quantities
254
+ * mid-stream.
255
+ *
256
+ * Polarity is deliberate and follows the unknown-agent rule (CLAUDE.md): this is
257
+ * an allow-list of the UNNAMED, never a deny-list of known scoped ids. A new
258
+ * scoped family — OpenAI ships models on its own schedule — is excluded
259
+ * automatically; the failure mode of a deny-list is that the new family renders
260
+ * AS the account's number, which is a wrong reading rather than a missing one.
261
+ * If a future account-wide family ever carries a name, this hides it, and a
262
+ * missing gauge is the safe direction.
263
+ *
264
+ * Callers skip such snapshots and keep scanning; they must not treat a scoped
265
+ * snapshot as "no Codex data" for the file, because a session that alternates
266
+ * families still has an account-wide line further back in the same tail.
267
+ */
268
+ export declare function isModelScopedCodexLimit(limitName?: string | null): boolean;
269
+ /**
270
+ * Rank one Codex usage snapshot against another for the live account tier.
271
+ *
272
+ * Recency alone is the wrong ordering, because a snapshot that will be VOIDED a
273
+ * step later must not first win the selection. Codex stamps `plan_type` from the
274
+ * auth token the WRITING PROCESS started with, so a Codex session opened before
275
+ * a plan change keeps appending old-plan snapshots for as long as it stays open
276
+ * — and, being the busiest session, it also keeps minting the newest timestamps.
277
+ * A newest-wins picker therefore hands `normalizeCodexRateLimits` a mismatched
278
+ * snapshot on every single build, the windows are voided, and every gauge goes
279
+ * blank even though a valid same-plan snapshot is sitting right there in another
280
+ * rollout (measured 2026-08-22: a 20:35 pre-upgrade session out-stamping a 01:43
281
+ * post-upgrade one indefinitely).
282
+ *
283
+ * So plan agreement is the PRIMARY key and age is only the tie-break:
284
+ * 1. a snapshot matching the account plan outranks one that does not, at any age
285
+ * 2. within the same match class, the newer `capturedAtMs` wins
286
+ * 3. exact ties keep the incumbent (both pickers scan in priority order)
287
+ *
288
+ * This orders snapshots; it never rescues one. A mismatched snapshot that wins
289
+ * because it is the only one left is still voided downstream — the point is that
290
+ * it must not displace a valid peer first.
291
+ *
292
+ * `capturedAtMs` is a number, not a string, so both a parsed rollout stamp and
293
+ * "unknown" (`-Infinity` / `-.infinity`) order without a second date parse.
294
+ */
295
+ export declare function codexSnapshotOutranks(candidate: {
296
+ planType?: string | null;
297
+ capturedAtMs: number;
298
+ }, incumbent: {
299
+ planType?: string | null;
300
+ capturedAtMs: number;
301
+ }, accountPlan?: string | null): boolean;
184
302
  /**
185
303
  * Antigravity plan name → compact "AGY <tier>" chip.
186
304
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format-utils.d.ts","sourceRoot":"","sources":["../src/format-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAyBjF;AAED,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAahE;AAED,oDAAoD;AACpD,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAI7C;AAED,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYzE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAM5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvF;AAED,iDAAiD;AACjD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,QAAQ,EAAE,MAAM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EAAE,MAAM,CAAA;CAAE,EAC7D,SAAS,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,EAC7D,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAC1B,OAAO,CAKT;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CASvF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAWrD;AAED,sDAAsD;AACtD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAK3D"}
@@ -304,6 +304,64 @@ export function scopedLimitClaimsUsageKey(scoped, _codexWindowCount) {
304
304
  export function codexWindowsBeside(codexWindows, _scopedClaimsKey) {
305
305
  return codexWindows;
306
306
  }
307
+ /**
308
+ * Display name for a raw `chatgpt_plan_type`, keyed by the tier with every
309
+ * separator removed — `prolite`, `pro_lite` and `pro lite` are one plan.
310
+ *
311
+ * SSOT for both daemons: the Swift mirror (`ChatGPTPlan` in
312
+ * CodexFreshnessRules.generated.swift) is emitted from this table. It used to be
313
+ * a hand copy, and a tier missing from one copy does not degrade gracefully —
314
+ * it renders as the fallback capitalisation ("ChatGPT Prolite") on that surface
315
+ * only, so the same account reads differently on the dashboard and the deck.
316
+ */
317
+ export const CHATGPT_PLAN_DISPLAY_NAMES = {
318
+ free: 'ChatGPT Free',
319
+ plus: 'ChatGPT Plus',
320
+ pro: 'ChatGPT Pro',
321
+ prolite: 'ChatGPT Pro Lite',
322
+ team: 'ChatGPT Team',
323
+ enterprise: 'ChatGPT Enterprise',
324
+ };
325
+ /**
326
+ * Format a raw `chatgpt_plan_type` for display, or `undefined` when there is no
327
+ * tier to show.
328
+ *
329
+ * An unrecognised tier is capitalised rather than dropped: OpenAI mints new plan
330
+ * names on its own schedule (`prolite` arrived unannounced), and a tier this
331
+ * build predates must still read as a plan beside Plus/Pro/Team — never as the
332
+ * raw lowercase token, and never as nothing.
333
+ */
334
+ export function formatChatGptPlanName(planType) {
335
+ const raw = planType?.trim();
336
+ if (!raw)
337
+ return undefined;
338
+ const known = CHATGPT_PLAN_DISPLAY_NAMES[normalizeChatGptPlanKey(raw)];
339
+ if (known)
340
+ return known;
341
+ return `ChatGPT ${raw.charAt(0).toUpperCase()}${raw.slice(1)}`;
342
+ }
343
+ /**
344
+ * The one comparison form for a raw `chatgpt_plan_type`.
345
+ *
346
+ * Trimmed, lowercased, and stripped of separators — `prolite`, `pro_lite` and
347
+ * `pro lite` are one plan, so they must key the display table AND compare equal.
348
+ * Normalizing only the display path was an internal contradiction with teeth:
349
+ * the two sides of the plan check come from different producers (the auth token
350
+ * for the account tier, the rollout stamp for the snapshot), so a spelling the
351
+ * table was written to absorb would still land every candidate in the "mismatch"
352
+ * class — ranking would have nothing to prefer, the winner would be voided, and
353
+ * on the Node daemon `passivePlanMatchesAccount` would be permanently false, so
354
+ * `codex app-server` would be spawned every 5 minutes forever and its answer
355
+ * voided too. The exact failure this module exists to prevent, via a different
356
+ * spelling.
357
+ *
358
+ * A value that is nothing but separators normalizes to `''` — i.e. "unknown",
359
+ * which the predicate already treats as no information rather than as a licence
360
+ * to void.
361
+ */
362
+ export function normalizeChatGptPlanKey(value) {
363
+ return (value ?? '').trim().toLowerCase().replace(/[\s_-]+/g, '');
364
+ }
307
365
  /**
308
366
  * True when the ChatGPT tier carries no paid Codex subscription.
309
367
  *
@@ -312,7 +370,7 @@ export function codexWindowsBeside(codexWindows, _scopedClaimsKey) {
312
370
  * rollout snapshots below.
313
371
  */
314
372
  export function isCodexFreePlan(plan) {
315
- return (plan ?? '').trim().toLowerCase() === 'free';
373
+ return normalizeChatGptPlanKey(plan) === 'free';
316
374
  }
317
375
  /**
318
376
  * True when a rollout usage snapshot still belongs to the plan the account
@@ -330,14 +388,93 @@ export function isCodexFreePlan(plan) {
330
388
  * Unknown on either side → matches. Absence is "no information", never a licence
331
389
  * to void real data: an API-key Codex install reports no account tier, and a
332
390
  * pre-`plan_type` rollout reports no snapshot tier.
391
+ *
392
+ * The emptiness test MUST stay ahead of the equality test, and not because it is
393
+ * a cheap early-out. Normalization strips separators, so two separator-only
394
+ * values (`"-"`, `" "`) both reduce to `''` — reordered, they would compare equal
395
+ * and report a positive plan MATCH where the answer is "neither side named a
396
+ * tier". Every current caller happens to act the same way on both answers, which
397
+ * is exactly why the difference would go unnoticed. Mirrored in Swift.
333
398
  */
334
399
  export function codexSnapshotMatchesAccountPlan(snapshotPlan, accountPlan) {
335
- const snap = (snapshotPlan ?? '').trim().toLowerCase();
336
- const account = (accountPlan ?? '').trim().toLowerCase();
400
+ const snap = normalizeChatGptPlanKey(snapshotPlan);
401
+ const account = normalizeChatGptPlanKey(accountPlan);
337
402
  if (!snap || !account)
338
403
  return true;
339
404
  return snap === account;
340
405
  }
406
+ /**
407
+ * True when a Codex `rate_limits` snapshot meters a single model or feature
408
+ * rather than the account.
409
+ *
410
+ * Codex writes more than one limit FAMILY, and the rollout carries whichever one
411
+ * the last request was metered against — not necessarily the account's. Measured
412
+ * across 823 rollout files on 2026-08-22, the whole observed space is three
413
+ * families and the discriminator is exact:
414
+ *
415
+ * limit_id "codex" limit_name null 37,985 lines account
416
+ * limit_id "premium" limit_name null 66 lines account (credit plan)
417
+ * limit_id "codex_bengalfox" limit_name "GPT-5.3-Codex-Spark" 915 lines ONE MODEL
418
+ *
419
+ * A named limit is a scoped limit — the name exists precisely to say which model
420
+ * it applies to. So the account-wide families are the unnamed ones, and that is
421
+ * what "Codex usage" on a deck, dial or panel means.
422
+ *
423
+ * This is not a freshness or a plan question, and neither axis can catch it: the
424
+ * scoped snapshot is CURRENT and belongs to the right plan. It is simply a
425
+ * different quantity, and rendering it under the account's label reports 0%
426
+ * while the account sits at 13% (observed). Within a single session the family
427
+ * alternates hour to hour, so "newest line wins" silently switches quantities
428
+ * mid-stream.
429
+ *
430
+ * Polarity is deliberate and follows the unknown-agent rule (CLAUDE.md): this is
431
+ * an allow-list of the UNNAMED, never a deny-list of known scoped ids. A new
432
+ * scoped family — OpenAI ships models on its own schedule — is excluded
433
+ * automatically; the failure mode of a deny-list is that the new family renders
434
+ * AS the account's number, which is a wrong reading rather than a missing one.
435
+ * If a future account-wide family ever carries a name, this hides it, and a
436
+ * missing gauge is the safe direction.
437
+ *
438
+ * Callers skip such snapshots and keep scanning; they must not treat a scoped
439
+ * snapshot as "no Codex data" for the file, because a session that alternates
440
+ * families still has an account-wide line further back in the same tail.
441
+ */
442
+ export function isModelScopedCodexLimit(limitName) {
443
+ return (limitName ?? '').trim().length > 0;
444
+ }
445
+ /**
446
+ * Rank one Codex usage snapshot against another for the live account tier.
447
+ *
448
+ * Recency alone is the wrong ordering, because a snapshot that will be VOIDED a
449
+ * step later must not first win the selection. Codex stamps `plan_type` from the
450
+ * auth token the WRITING PROCESS started with, so a Codex session opened before
451
+ * a plan change keeps appending old-plan snapshots for as long as it stays open
452
+ * — and, being the busiest session, it also keeps minting the newest timestamps.
453
+ * A newest-wins picker therefore hands `normalizeCodexRateLimits` a mismatched
454
+ * snapshot on every single build, the windows are voided, and every gauge goes
455
+ * blank even though a valid same-plan snapshot is sitting right there in another
456
+ * rollout (measured 2026-08-22: a 20:35 pre-upgrade session out-stamping a 01:43
457
+ * post-upgrade one indefinitely).
458
+ *
459
+ * So plan agreement is the PRIMARY key and age is only the tie-break:
460
+ * 1. a snapshot matching the account plan outranks one that does not, at any age
461
+ * 2. within the same match class, the newer `capturedAtMs` wins
462
+ * 3. exact ties keep the incumbent (both pickers scan in priority order)
463
+ *
464
+ * This orders snapshots; it never rescues one. A mismatched snapshot that wins
465
+ * because it is the only one left is still voided downstream — the point is that
466
+ * it must not displace a valid peer first.
467
+ *
468
+ * `capturedAtMs` is a number, not a string, so both a parsed rollout stamp and
469
+ * "unknown" (`-Infinity` / `-.infinity`) order without a second date parse.
470
+ */
471
+ export function codexSnapshotOutranks(candidate, incumbent, accountPlan) {
472
+ const candidateMatches = codexSnapshotMatchesAccountPlan(candidate.planType, accountPlan);
473
+ const incumbentMatches = codexSnapshotMatchesAccountPlan(incumbent.planType, accountPlan);
474
+ if (candidateMatches !== incumbentMatches)
475
+ return candidateMatches;
476
+ return candidate.capturedAtMs > incumbent.capturedAtMs;
477
+ }
341
478
  /**
342
479
  * Antigravity plan name → compact "AGY <tier>" chip.
343
480
  *
@@ -1 +1 @@
1
- {"version":3,"file":"format-utils.js","sourceRoot":"","sources":["../src/format-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,SAA6B;IAC3D,IAAI,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IACjC,2EAA2E;IAC3E,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAE/C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;QAC9C,IAAI,KAAK,CAAC,OAAO,CAAC;YAAE,OAAO,SAAS,CAAC;QACrC,MAAM,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAEpC,IAAI,MAAM,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAE9B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;QAC3C,IAAI,OAAO,GAAG,EAAE;YAAE,OAAO,GAAG,OAAO,GAAG,CAAC;QAEvC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,GAAG,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC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EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACzC,CAAC;IACD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACvC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,KAAK,GAAG,CAAC;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7B,OAAO,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './pairing-code.js';
12
12
  export * from './mdns-identity.js';
13
13
  export * from './timeline.js';
14
14
  export * from './subagent-activity.js';
15
+ export * from './esp32-boards.js';
15
16
  export * from './model-provider.js';
16
17
  export * from './timeline-icons.js';
17
18
  export * from './timeline-label.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,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,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export * from './pairing-code.js';
12
12
  export * from './mdns-identity.js';
13
13
  export * from './timeline.js';
14
14
  export * from './subagent-activity.js';
15
+ export * from './esp32-boards.js';
15
16
  export * from './model-provider.js';
16
17
  export * from './timeline-icons.js';
17
18
  export * from './timeline-label.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,C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ACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentdeck/shared",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },