@bitmagic/cli 0.1.83-dev.1 → 0.1.83-dev.3

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 (206) hide show
  1. package/README.md +69 -0
  2. package/assets/skills/publishing-to-steam/SKILL.md +218 -0
  3. package/dist/assets/vxl-summary.d.ts +6 -20
  4. package/dist/assets/vxl-summary.js +9 -100
  5. package/dist/assets/vxl-summary.js.map +1 -1
  6. package/dist/cli.d.ts +1 -0
  7. package/dist/cli.js +2 -0
  8. package/dist/cli.js.map +1 -1
  9. package/dist/commands/check.js +5 -0
  10. package/dist/commands/check.js.map +1 -1
  11. package/dist/commands/forge.js +1 -1
  12. package/dist/commands/forge.js.map +1 -1
  13. package/dist/commands/ios.js +88 -136
  14. package/dist/commands/ios.js.map +1 -1
  15. package/dist/commands/steam-build.d.ts +67 -0
  16. package/dist/commands/steam-build.js +286 -0
  17. package/dist/commands/steam-build.js.map +1 -0
  18. package/dist/commands/steam-portal.d.ts +1 -0
  19. package/dist/commands/steam-portal.js +319 -0
  20. package/dist/commands/steam-portal.js.map +1 -0
  21. package/dist/commands/steam-upload.d.ts +37 -0
  22. package/dist/commands/steam-upload.js +174 -0
  23. package/dist/commands/steam-upload.js.map +1 -0
  24. package/dist/commands/steam.d.ts +1 -0
  25. package/dist/commands/steam.js +504 -0
  26. package/dist/commands/steam.js.map +1 -0
  27. package/dist/commands/verify.js +6 -0
  28. package/dist/commands/verify.js.map +1 -1
  29. package/dist/editor/asset-viewer.js +5 -4
  30. package/dist/editor/asset-viewer.js.map +1 -1
  31. package/dist/editor/server.js +1 -1
  32. package/dist/editor/server.js.map +1 -1
  33. package/dist/editor/shell-page.js +3 -3
  34. package/dist/forge/browser-host.d.ts +1 -1
  35. package/dist/forge/browser-host.js +1 -1
  36. package/dist/forge/browser-host.js.map +1 -1
  37. package/dist/ios/native-overrides.d.ts +27 -0
  38. package/dist/ios/native-overrides.js +87 -0
  39. package/dist/ios/native-overrides.js.map +1 -0
  40. package/dist/ios/record-validate.d.ts +1 -33
  41. package/dist/ios/record-validate.js +2 -100
  42. package/dist/ios/record-validate.js.map +1 -1
  43. package/dist/ios/store-bridge.d.ts +26 -0
  44. package/dist/ios/store-bridge.js +224 -0
  45. package/dist/ios/store-bridge.js.map +1 -0
  46. package/dist/ios/storekit-config.d.ts +15 -0
  47. package/dist/ios/storekit-config.js +106 -0
  48. package/dist/ios/storekit-config.js.map +1 -0
  49. package/dist/ios/xcode-template.d.ts +12 -3
  50. package/dist/ios/xcode-template.js +158 -27
  51. package/dist/ios/xcode-template.js.map +1 -1
  52. package/dist/package/collect-urls.d.ts +1 -1
  53. package/dist/package/collect-urls.js +10 -2
  54. package/dist/package/collect-urls.js.map +1 -1
  55. package/dist/package/offline-payload.d.ts +35 -0
  56. package/dist/package/offline-payload.js +142 -0
  57. package/dist/package/offline-payload.js.map +1 -0
  58. package/dist/package/packaged-check.d.ts +39 -0
  59. package/dist/package/packaged-check.js +104 -0
  60. package/dist/package/packaged-check.js.map +1 -0
  61. package/dist/package/transform.d.ts +4 -4
  62. package/dist/package/transform.js +3 -3
  63. package/dist/project/published-three.d.ts +14 -0
  64. package/dist/project/published-three.js +91 -0
  65. package/dist/project/published-three.js.map +1 -0
  66. package/dist/publish/bundle.js +6 -0
  67. package/dist/publish/bundle.js.map +1 -1
  68. package/dist/scaffold/project-files.js +7 -4
  69. package/dist/scaffold/project-files.js.map +1 -1
  70. package/dist/scaffold/project.js +2 -0
  71. package/dist/scaffold/project.js.map +1 -1
  72. package/dist/scaffold/skill-files.js +3 -1
  73. package/dist/scaffold/skill-files.js.map +1 -1
  74. package/dist/scaffold/steam-skill-files.d.ts +2 -0
  75. package/dist/scaffold/steam-skill-files.js +7 -0
  76. package/dist/scaffold/steam-skill-files.js.map +1 -0
  77. package/dist/steam/art-generate.d.ts +55 -0
  78. package/dist/steam/art-generate.js +174 -0
  79. package/dist/steam/art-generate.js.map +1 -0
  80. package/dist/steam/art-render.d.ts +25 -0
  81. package/dist/steam/art-render.js +157 -0
  82. package/dist/steam/art-render.js.map +1 -0
  83. package/dist/steam/art-use.d.ts +20 -0
  84. package/dist/steam/art-use.js +84 -0
  85. package/dist/steam/art-use.js.map +1 -0
  86. package/dist/steam/art.d.ts +98 -0
  87. package/dist/steam/art.js +243 -0
  88. package/dist/steam/art.js.map +1 -0
  89. package/dist/steam/check.d.ts +21 -0
  90. package/dist/steam/check.js +113 -0
  91. package/dist/steam/check.js.map +1 -0
  92. package/dist/steam/config.d.ts +57 -0
  93. package/dist/steam/config.js +145 -0
  94. package/dist/steam/config.js.map +1 -0
  95. package/dist/steam/electron-cache.d.ts +11 -0
  96. package/dist/steam/electron-cache.js +105 -0
  97. package/dist/steam/electron-cache.js.map +1 -0
  98. package/dist/steam/fuses.d.ts +16 -0
  99. package/dist/steam/fuses.js +75 -0
  100. package/dist/steam/fuses.js.map +1 -0
  101. package/dist/steam/icon-files.d.ts +16 -0
  102. package/dist/steam/icon-files.js +70 -0
  103. package/dist/steam/icon-files.js.map +1 -0
  104. package/dist/steam/image-info.d.ts +16 -0
  105. package/dist/steam/image-info.js +89 -0
  106. package/dist/steam/image-info.js.map +1 -0
  107. package/dist/steam/launch-check.d.ts +12 -0
  108. package/dist/steam/launch-check.js +101 -0
  109. package/dist/steam/launch-check.js.map +1 -0
  110. package/dist/steam/media.d.ts +48 -0
  111. package/dist/steam/media.js +155 -0
  112. package/dist/steam/media.js.map +1 -0
  113. package/dist/steam/package-macos.d.ts +52 -0
  114. package/dist/steam/package-macos.js +268 -0
  115. package/dist/steam/package-macos.js.map +1 -0
  116. package/dist/steam/package-windows.d.ts +23 -0
  117. package/dist/steam/package-windows.js +83 -0
  118. package/dist/steam/package-windows.js.map +1 -0
  119. package/dist/steam/paths.d.ts +35 -0
  120. package/dist/steam/paths.js +44 -0
  121. package/dist/steam/paths.js.map +1 -0
  122. package/dist/steam/playtest-shots.d.ts +18 -0
  123. package/dist/steam/playtest-shots.js +83 -0
  124. package/dist/steam/playtest-shots.js.map +1 -0
  125. package/dist/steam/portal-recipes.d.ts +25 -0
  126. package/dist/steam/portal-recipes.js +61 -0
  127. package/dist/steam/portal-recipes.js.map +1 -0
  128. package/dist/steam/portal.d.ts +58 -0
  129. package/dist/steam/portal.js +340 -0
  130. package/dist/steam/portal.js.map +1 -0
  131. package/dist/steam/raster.d.ts +58 -0
  132. package/dist/steam/raster.js +285 -0
  133. package/dist/steam/raster.js.map +1 -0
  134. package/dist/steam/shell-files.d.ts +17 -0
  135. package/dist/steam/shell-files.js +268 -0
  136. package/dist/steam/shell-files.js.map +1 -0
  137. package/dist/steam/specs.d.ts +61 -0
  138. package/dist/steam/specs.js +103 -0
  139. package/dist/steam/specs.js.map +1 -0
  140. package/dist/steam/steampipe.d.ts +46 -0
  141. package/dist/steam/steampipe.js +170 -0
  142. package/dist/steam/steampipe.js.map +1 -0
  143. package/dist/steam/store-copy.d.ts +88 -0
  144. package/dist/steam/store-copy.js +214 -0
  145. package/dist/steam/store-copy.js.map +1 -0
  146. package/dist/steam/tags.d.ts +9 -0
  147. package/dist/steam/tags.js +52 -0
  148. package/dist/steam/tags.js.map +1 -0
  149. package/dist/steam/trailer.d.ts +34 -0
  150. package/dist/steam/trailer.js +141 -0
  151. package/dist/steam/trailer.js.map +1 -0
  152. package/dist/theme/kernel.d.ts +14 -0
  153. package/dist/theme/kernel.js +15 -0
  154. package/dist/theme/kernel.js.map +1 -0
  155. package/dist/theme/theme-io.js +11 -16
  156. package/dist/theme/theme-io.js.map +1 -1
  157. package/dist/vendor/hud-theme/catalog.js +71 -0
  158. package/dist/vendor/hud-theme/engine/hud/ThemeTokens.js +115 -0
  159. package/dist/{theme/theme-color-math.js → vendor/hud-theme/engine/hud/colorMath.js} +13 -14
  160. package/dist/vendor/hud-theme/engine/hud/decorations.js +179 -0
  161. package/dist/vendor/hud-theme/engine/hud/fonts.js +147 -0
  162. package/dist/vendor/hud-theme/engine/hud/presets.js +80 -0
  163. package/dist/vendor/hud-theme/engine/hud/resolveWorldTheme.js +66 -0
  164. package/dist/vendor/hud-theme/engine/hud/themes/bitmagic.js +29 -0
  165. package/dist/vendor/hud-theme/engine/hud/themes/nexus.js +69 -0
  166. package/dist/vendor/hud-theme/engine/hud/themes/racing.js +57 -0
  167. package/dist/vendor/hud-theme/engine/hud/themes/rift-raider.js +63 -0
  168. package/dist/vendor/hud-theme/engine/hud/themes/simulator.js +55 -0
  169. package/dist/vendor/hud-theme/engine/hud/themes/village-keep.js +108 -0
  170. package/dist/vendor/hud-theme/engine/hud/validateTheme.js +535 -0
  171. package/dist/vendor/hud-theme/index.js +26 -0
  172. package/dist/{theme/theme-merge.js → vendor/hud-theme/merge.js} +0 -1
  173. package/dist/{theme/theme-report.js → vendor/hud-theme/report.js} +8 -9
  174. package/dist/{theme/theme-stored.js → vendor/hud-theme/stored.js} +6 -9
  175. package/dist/{theme/theme-validate.js → vendor/hud-theme/validate-strict.js} +102 -164
  176. package/dist/verify/browser.d.ts +11 -0
  177. package/dist/verify/browser.js +222 -155
  178. package/dist/verify/browser.js.map +1 -1
  179. package/dist/verify/categories.d.ts +1 -1
  180. package/dist/verify/categories.js +1 -0
  181. package/dist/verify/categories.js.map +1 -1
  182. package/dist/verify/classify.d.ts +14 -2
  183. package/dist/verify/classify.js +23 -4
  184. package/dist/verify/classify.js.map +1 -1
  185. package/dist/verify/hud-theme.d.ts +19 -14
  186. package/dist/verify/hud-theme.js +23 -17
  187. package/dist/verify/hud-theme.js.map +1 -1
  188. package/dist/verify/mobile-parity.d.ts +1 -1
  189. package/dist/verify/mobile-parity.js +1 -1
  190. package/dist/verify/start.d.ts +3 -2
  191. package/dist/verify/start.js +1 -1
  192. package/dist/verify/start.js.map +1 -1
  193. package/package.json +8 -6
  194. package/dist/theme/hud-theme-catalog.d.ts +0 -235
  195. package/dist/theme/hud-theme-catalog.js +0 -389
  196. package/dist/theme/hud-theme-catalog.js.map +0 -1
  197. package/dist/theme/theme-color-math.d.ts +0 -21
  198. package/dist/theme/theme-color-math.js.map +0 -1
  199. package/dist/theme/theme-merge.d.ts +0 -36
  200. package/dist/theme/theme-merge.js.map +0 -1
  201. package/dist/theme/theme-report.d.ts +0 -28
  202. package/dist/theme/theme-report.js.map +0 -1
  203. package/dist/theme/theme-stored.d.ts +0 -21
  204. package/dist/theme/theme-stored.js.map +0 -1
  205. package/dist/theme/theme-validate.d.ts +0 -41
  206. package/dist/theme/theme-validate.js.map +0 -1
@@ -1,389 +0,0 @@
1
- // Agent-side mirror of the engine's HUD theme catalog. Kept in sync by hand —
2
- // agent tools can't import from `game/src/engine/` because the two projects
3
- // have separate tsconfig include sets. When you add a font/decoration/preset
4
- // in `game/src/engine/hud/`, mirror it here so the agent's catalog tool and
5
- // validator see it.
6
- //
7
- // What the agent uses these for:
8
- // - `get_hud_catalog` returns this verbatim so the agent can list what's
9
- // available without reading source files.
10
- // - `write_hud_theme` validates that font/decoration references resolve
11
- // against this catalog before writing to world.json.
12
- //
13
- // What's NOT here:
14
- // - Full theme schema validation (the engine's `resolveWorldTheme` falls
15
- // back to the default look with a console warning if a written theme is structurally
16
- // bad — that's the safety net).
17
- // - Per-decoration SVG markup (not needed at write time).
18
- export const HUD_PRESETS = [
19
- 'rift-raider',
20
- 'village-keep',
21
- 'nexus',
22
- 'simulator',
23
- 'racing',
24
- ];
25
- // Agent-only choose-metadata: one-line vibe per preset so the agent can match a
26
- // user's brief to a preset without trial and error (same species as the fonts'
27
- // `evokes` labels). The engine has no counterpart field — deliberately NOT part
28
- // of the drift-checked mirror surface.
29
- /**
30
- * The five presets' ACTUAL token values, mirrored from `game/src/engine/hud/themes/*.ts`.
31
- *
32
- * This exists because the promoted customization flow — "preset X but with
33
- * orange accents" — was unimplementable without it. `read-hud-theme` returns a
34
- * preset's NAME, `write-hud-theme` does a full replace rather than a merge, and
35
- * the engine source that holds the values is not readable from the hosted agent.
36
- * So an agent asked to tweak an active preset had nothing to patch and had to
37
- * invent a whole theme "in that preset's spirit", which is how a tweak request
38
- * silently became a redesign.
39
- *
40
- * Each entry is the RAW preset data, which is the same shape as an inline theme
41
- * — so it can be spread, edited and written straight back through
42
- * `write-hud-theme`. Use `presetTheme(name)` rather than reading this directly:
43
- * it strips `evokes`, which is authoring metadata and not a theme token.
44
- *
45
- * Hand-mirrored and drift-checked by `scripts/check-hud-catalog.ts`, which deep
46
- * compares every value against the engine modules.
47
- */
48
- export const HUD_PRESET_THEMES = {
49
- "rift-raider": {
50
- name: 'Rift Raider',
51
- evokes: 'Mobile action-RPG — cast-gold medallion frames on dark indigo glass, chunky cream type with a dark ink ring, royal borders (Diablo-style)',
52
- font: {
53
- key: 'baloo-2',
54
- case: 'upper',
55
- weightBody: 500,
56
- weightHeading: 700,
57
- trackingLabel: 0.8,
58
- outlineWidth: 2,
59
- },
60
- colors: {
61
- primary: '#F0B23A',
62
- danger: '#D6332E',
63
- warning: '#E07A28',
64
- success: '#5FB35A',
65
- background: '#0B0716',
66
- surface: '#191228',
67
- text: '#FFF6E2',
68
- textMuted: '#B9A889',
69
- outline: '#5A3D0C',
70
- },
71
- shape: {
72
- radiusPill: 14,
73
- radiusCard: 14,
74
- glow: 'gold',
75
- imageRendering: 'auto',
76
- borderWidth: 2,
77
- bevel: 0.85,
78
- },
79
- decorations: {
80
- progressBar: {
81
- borderImage: 'royal-frame',
82
- },
83
- healthBar: {
84
- borderImage: 'royal-frame',
85
- },
86
- toast: {
87
- borderImage: 'royal-frame',
88
- },
89
- controls: {
90
- backdrop: 'grain-texture',
91
- },
92
- },
93
- },
94
- "village-keep": {
95
- name: 'Village Keep',
96
- evokes: 'Cartoon strategy — light parchment panels with darker moulded HUD chips over a sunny world, candy-green glossy buttons, ink-outlined type, zero glow (Clash-style)',
97
- font: {
98
- key: 'fredoka',
99
- case: 'upper',
100
- weightBody: 500,
101
- weightHeading: 700,
102
- trackingLabel: 0.6,
103
- outlineWidth: 2,
104
- },
105
- colors: {
106
- primary: '#9BDB4F',
107
- danger: '#FFA898',
108
- warning: '#FFC46B',
109
- success: '#A5E27E',
110
- background: '#E9E1CE',
111
- surface: '#6E5C44',
112
- text: '#413A2C',
113
- textMuted: '#585040',
114
- outline: '#3A6212',
115
- },
116
- shape: {
117
- radiusPill: 14,
118
- radiusCard: 18,
119
- glow: 'none',
120
- imageRendering: 'auto',
121
- borderWidth: 3,
122
- bevel: 0.9,
123
- },
124
- decorations: {
125
- toast: {
126
- backdrop: 'candy-gloss',
127
- },
128
- },
129
- elements: {
130
- progressBar: {
131
- colors: {
132
- background: '#3A3126',
133
- },
134
- },
135
- healthBar: {
136
- colors: {
137
- background: '#3A3126',
138
- danger: '#E2452F',
139
- warning: '#E89A2A',
140
- },
141
- },
142
- },
143
- },
144
- "nexus": {
145
- name: 'Nexus',
146
- evokes: 'Holographic sci-fi — hairline cyan on near-black, corner brackets, lit teal plate buttons with a graded cyan bezel, depth by glow (Mass Effect-style)',
147
- font: {
148
- key: 'chakra-petch',
149
- case: 'upper',
150
- weightBody: 500,
151
- weightHeading: 700,
152
- trackingLabel: 1.4,
153
- outlineWidth: 0,
154
- },
155
- colors: {
156
- primary: '#4FD8E8',
157
- danger: '#FF6B4A',
158
- warning: '#F0A22E',
159
- success: '#6FD9A4',
160
- background: '#04070C',
161
- surface: '#0A121A',
162
- text: '#E6F6FA',
163
- textMuted: '#9DBBC8',
164
- outline: '#2E9FB5',
165
- },
166
- shape: {
167
- radiusPill: 6,
168
- radiusCard: 4,
169
- glow: 'cyan',
170
- imageRendering: 'auto',
171
- borderWidth: 2,
172
- bevel: 0.5,
173
- },
174
- decorations: {
175
- progressBar: {
176
- borderImage: 'bracket-frame',
177
- },
178
- counter: {
179
- borderImage: 'bracket-frame',
180
- },
181
- reticle: {
182
- backdrop: 'glow-aura',
183
- },
184
- },
185
- },
186
- "simulator": {
187
- name: 'Simulator',
188
- evokes: 'Serious instrument panel — flat slate, hard corners, one azure accent for state, thin meters and a bare dial, no glow or ornament (flight/truck sim)',
189
- font: {
190
- key: 'ibm-plex-sans',
191
- case: 'upper',
192
- weightBody: 400,
193
- weightHeading: 700,
194
- trackingLabel: 0.8,
195
- outlineWidth: 0,
196
- },
197
- colors: {
198
- primary: '#2E9BDB',
199
- danger: '#C8453F',
200
- warning: '#D8A32E',
201
- success: '#4E9E57',
202
- background: '#0E141B',
203
- surface: '#161E27',
204
- text: '#DDE5EC',
205
- textMuted: '#A2B0BE',
206
- outline: '#46586A',
207
- },
208
- shape: {
209
- radiusPill: 4,
210
- radiusCard: 2,
211
- glow: 'none',
212
- imageRendering: 'auto',
213
- borderWidth: 1,
214
- bevel: 0.35,
215
- },
216
- },
217
- "racing": {
218
- name: 'Racing',
219
- evokes: 'Motorsport telemetry — white line-art chrome on black with red reserved for state, tall narrow gothic caps, amber caution / green sector',
220
- font: {
221
- key: 'archivo-narrow',
222
- case: 'upper',
223
- weightBody: 500,
224
- weightHeading: 700,
225
- trackingLabel: 1.2,
226
- outlineWidth: 0,
227
- },
228
- colors: {
229
- primary: '#E8EDF2',
230
- danger: '#FF4D3A',
231
- warning: '#FFB000',
232
- success: '#22C55E',
233
- background: '#07090C',
234
- surface: '#0E1319',
235
- text: '#F2F5F8',
236
- textMuted: '#9BA4AE',
237
- outline: '#C9D2DA',
238
- },
239
- shape: {
240
- radiusPill: 4,
241
- radiusCard: 2,
242
- glow: 'none',
243
- imageRendering: 'auto',
244
- borderWidth: 2,
245
- bevel: 0.5,
246
- },
247
- },
248
- };
249
- /**
250
- * A preset's tokens as a writable inline theme — the mirror entry minus the
251
- * `evokes` label, which describes the style rather than rendering it.
252
- *
253
- * The intended patch flow: `const base = presetTheme('nexus')`, apply the user's
254
- * change, then `write-hud-theme` the result.
255
- */
256
- export function presetTheme(name) {
257
- const { evokes: _evokes, ...tokens } = HUD_PRESET_THEMES[name];
258
- return structuredClone(tokens);
259
- }
260
- /**
261
- * The one-line mood label per preset, DERIVED from the mirrored preset data
262
- * above rather than kept as a second hand-written list.
263
- *
264
- * It used to be an independent map explicitly excluded from the drift gate, on
265
- * the grounds that the engine had no counterpart. It then rotted: three of five
266
- * labels described styles that had since been retuned, and this is the field an
267
- * agent picks a preset BY. The engine presets carry `evokes` beside their tokens
268
- * now, so the description and the style are one edit and one check.
269
- */
270
- export const HUD_PRESET_INFO = Object.fromEntries(Object.keys(HUD_PRESET_THEMES).map((n) => [n, { evokes: HUD_PRESET_THEMES[n].evokes }]));
271
- export const HUD_FONTS = {
272
- 'red-hat-display': { family: 'Red Hat Display', weights: [300, 400, 500, 700], suitsCase: ['upper', 'normal'], evokes: 'Default Bitmagic — warm, technical, modern sans' },
273
- 'chakra-petch': { family: 'Chakra Petch', weights: [300, 400, 500, 600, 700], suitsCase: ['upper', 'normal'], evokes: 'Chamfered techno sans — holographic HUD, sci-fi console, cut corners' },
274
- 'ibm-plex-sans': { family: 'IBM Plex Sans', weights: [300, 400, 500, 600, 700], suitsCase: ['upper', 'normal'], evokes: 'Engineered humanist sans — instrument panel, operator console, tabular data' },
275
- 'archivo-narrow': { family: 'Archivo Narrow', weights: [400, 500, 600, 700], suitsCase: ['upper', 'normal'], evokes: 'Narrow gothic that keeps its ink — motorsport telemetry, broadcast overlay' },
276
- 'bebas-neue': { family: 'Bebas Neue', weights: [400], suitsCase: ['upper', 'normal'], evokes: 'Tall, bold display — sports, action, news ticker' },
277
- 'press-start-2p': { family: 'Press Start 2P', weights: [400], suitsCase: ['upper', 'normal'], evokes: 'Retro arcade pixel — 8-bit, NES, chiptune' },
278
- 'creepster': { family: 'Creepster', weights: [400], suitsCase: ['normal'], evokes: 'Horror, halloween, dripping — already display-styled' },
279
- 'pacifico': { family: 'Pacifico', weights: [400], suitsCase: ['normal'], evokes: 'Handwritten cursive — tropical, beachy, casual' },
280
- 'space-grotesk': { family: 'Space Grotesk', weights: [400, 500, 700], suitsCase: ['upper', 'normal'], evokes: 'Geometric sans — sci-fi, technical, modern' },
281
- 'rubik-mono-one': { family: 'Rubik Mono One', weights: [400], suitsCase: ['upper', 'normal'], evokes: 'Heavy, slabby display — bold, blocky, attention-grabbing' },
282
- 'vt323': { family: 'VT323', weights: [400], suitsCase: ['upper', 'normal'], evokes: 'CRT terminal monospace — retro computer, hacker, glitch' },
283
- 'orbitron': { family: 'Orbitron', weights: [400, 500, 700, 900], suitsCase: ['upper', 'normal'], evokes: 'Futuristic geometric — sci-fi, cyber, racing HUD' },
284
- 'shrikhand': { family: 'Shrikhand', weights: [400], suitsCase: ['normal'], evokes: 'Italic display — celebratory, party, energetic' },
285
- 'baloo-2': { family: 'Baloo 2', weights: [400, 500, 600, 700, 800], suitsCase: ['upper', 'normal'], evokes: 'Rounded chunky sans with a real weight range — mobile action-RPG chrome' },
286
- 'lilita-one': { family: 'Lilita One', weights: [400], suitsCase: ['upper', 'normal'], evokes: 'Chunky rounded comic display — cartoon battler, toon town' },
287
- 'fredoka': { family: 'Fredoka', weights: [300, 400, 500, 700], suitsCase: ['upper', 'normal'], evokes: 'Soft rounded bubble sans — candy, casual mobile, sweet' },
288
- 'grenze-gotisch': { family: 'Grenze Gotisch', weights: [400, 500, 700, 900], suitsCase: ['normal'], evokes: 'Readable blackletter — dark fantasy, gothic dungeon' },
289
- 'cinzel': { family: 'Cinzel', weights: [400, 500, 700, 900], suitsCase: ['upper', 'normal'], evokes: 'Carved Roman caps — epic fantasy, ancient temple' },
290
- };
291
- export const HUD_DECORATIONS = {
292
- 'drip-border': { suitsSlots: ['borderImage', 'decorationAfter'], evokes: 'Horror drips on edges' },
293
- 'pixel-corners': { suitsSlots: ['borderImage'], evokes: '8-bit pixel corner brackets' },
294
- 'scanline': { suitsSlots: ['backdrop'], evokes: 'CRT scanlines tiled across the surface' },
295
- 'vine-corner': { suitsSlots: ['borderImage', 'decorationBefore'], evokes: 'Tropical vines / leaves in corners' },
296
- 'glow-aura': { suitsSlots: ['backdrop', 'decorationBefore', 'decorationAfter'], evokes: 'Soft radial glow halo behind the element' },
297
- 'bracket-frame': { suitsSlots: ['borderImage'], evokes: 'Sci-fi targeting brackets on each corner' },
298
- 'ribbon-edge': { suitsSlots: ['decorationAfter', 'decorationBefore'], evokes: 'Bunting / banner saw-tooth edge' },
299
- 'circuit-trace': { suitsSlots: ['backdrop'], evokes: 'PCB / circuit board trace pattern' },
300
- 'candy-gloss': { suitsSlots: ['backdrop', 'decorationBefore'], evokes: 'Glossy sugar highlight across the top — candy button shine' },
301
- 'ornate-corner': { suitsSlots: ['borderImage'], evokes: 'Gothic filigree corner frame — dark fantasy, dungeon' },
302
- 'royal-frame': { suitsSlots: ['borderImage'], evokes: 'Double gold-trim picture frame with corner studs — epic fantasy' },
303
- 'hazard-stripes': { suitsSlots: ['backdrop'], evokes: 'Faint diagonal caution stripes — military / sci-fi warning panel' },
304
- 'pixel-frame': { suitsSlots: ['borderImage'], evokes: 'NES dialog double-ring pixel border' },
305
- 'grain-texture': { suitsSlots: ['backdrop'], evokes: 'Subtle parchment / leather grain tooth' },
306
- };
307
- // The engine's DEFAULT theme (bitmagic) as raw preset data — the base a patch
308
- // applies to when the game has no theme set. Mirrors BITMAGIC_THEME_DATA in
309
- // game/src/engine/hud/themes/bitmagic.ts, drift-checked like the presets. It is
310
- // deliberately NOT in HUD_PRESET_THEMES: bitmagic is the fallback, not a
311
- // selectable preset, and listing it would put it back in the catalog the agent
312
- // offers users.
313
- export const DEFAULT_THEME_TOKENS = {
314
- name: 'Bitmagic',
315
- font: {
316
- key: 'red-hat-display',
317
- case: 'upper',
318
- weightBody: 400,
319
- weightHeading: 700,
320
- trackingLabel: 1.6,
321
- },
322
- colors: {
323
- primary: '#A0DAB9',
324
- danger: '#E0218A',
325
- warning: '#FF8200',
326
- success: '#F9E547',
327
- background: '#0b0b0b',
328
- surface: '#181818',
329
- text: '#ffffff',
330
- textMuted: '#b3b3b3',
331
- },
332
- shape: {
333
- radiusPill: 500,
334
- radiusCard: 8,
335
- glow: 'aqua',
336
- imageRendering: 'auto',
337
- },
338
- };
339
- // The curated decorations' SVG SOURCE, verbatim from game/src/engine/hud/
340
- // decorations.ts and drift-checked byte-for-byte. Exposed through
341
- // get-hud-catalog's decorationSvg input as ADAPTATION REFERENCE: an agent
342
- // authoring a custom inline decoration copies the closest curated one and
343
- // edits, instead of inventing SVG from nothing — sizing rules included.
344
- export const HUD_DECORATION_SVGS = {
345
- 'drip-border': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 60 60\" preserveAspectRatio=\"none\"><rect x=\"0\" y=\"0\" width=\"60\" height=\"2\" fill=\"__primary__\"/><rect x=\"0\" y=\"0\" width=\"2\" height=\"60\" fill=\"__primary__\"/><rect x=\"58\" y=\"0\" width=\"2\" height=\"60\" fill=\"__primary__\"/><path d=\"M0,58 L60,58 L60,50 Q54,60 48,52 Q42,62 36,53 Q30,64 24,54 Q18,60 12,52 Q6,62 0,52 Z\" fill=\"__primary__\"/></svg>",
346
- 'pixel-corners': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 12\" shape-rendering=\"crispEdges\"><path d=\"M0,0 H4 V2 H2 V4 H0 Z M8,0 H12 V4 H10 V2 H8 Z M0,8 H2 V10 H4 V12 H0 Z M10,8 H12 V12 H8 V10 H10 Z\" fill=\"__primary__\"/></svg>",
347
- 'scanline': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 4\" preserveAspectRatio=\"none\"><rect width=\"4\" height=\"1\" fill=\"__primary__\" opacity=\"0.15\"/></svg>",
348
- 'vine-corner': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\"><path d=\"M0,40 Q0,20 8,12 Q16,4 24,8 Q20,16 12,16 Q4,20 4,40 Z\" fill=\"__success__\" opacity=\"0.7\"/><circle cx=\"10\" cy=\"14\" r=\"2\" fill=\"__success__\"/><circle cx=\"16\" cy=\"10\" r=\"1.5\" fill=\"__success__\"/></svg>",
349
- 'glow-aura': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"><defs><radialGradient id=\"g\"><stop offset=\"0%\" stop-color=\"__primary__\" stop-opacity=\"0.5\"/><stop offset=\"60%\" stop-color=\"__primary__\" stop-opacity=\"0.1\"/><stop offset=\"100%\" stop-color=\"__primary__\" stop-opacity=\"0\"/></radialGradient></defs><rect width=\"100\" height=\"100\" fill=\"url(#g)\"/></svg>",
350
- 'bracket-frame': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0,0 H8 V1 H1 V8 H0 Z M16,0 H24 V8 H23 V1 H16 Z M0,16 H1 V23 H8 V24 H0 Z M16,24 V23 H23 V16 H24 V24 Z\" fill=\"__primary__\"/></svg>",
351
- 'ribbon-edge': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 8\" preserveAspectRatio=\"none\"><path d=\"M0,0 L30,0 L30,4 L26,8 L22,4 L18,8 L14,4 L10,8 L6,4 L2,8 L0,4 Z\" fill=\"__primary__\"/></svg>",
352
- 'circuit-trace': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><path d=\"M0,16 H10 M22,16 H32 M16,0 V10 M16,22 V32\" stroke=\"__primary__\" stroke-width=\"1\" fill=\"none\"/><circle cx=\"16\" cy=\"16\" r=\"2\" fill=\"none\" stroke=\"__primary__\" stroke-width=\"1\"/></svg>",
353
- 'candy-gloss': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 40\" preserveAspectRatio=\"none\"><radialGradient id=\"cgh\" cx=\".5\" cy=\".28\" r=\".72\"><stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".38\"/><stop offset=\".55\" stop-color=\"#fff\" stop-opacity=\".15\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient><ellipse cx=\"50\" cy=\"8\" rx=\"48\" ry=\"13\" fill=\"url(#cgh)\"/></svg>",
354
- 'ornate-corner': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><defs><g id=\"f\"><path d=\"M2 14 Q2 2 14 2\" fill=\"none\" stroke=\"__primary__\" stroke-width=\"2\"/><path d=\"M8 8 L11 5 L14 8 L11 11 Z\" fill=\"__primary__\"/></g></defs><rect x=\"5\" y=\"5\" width=\"38\" height=\"38\" fill=\"none\" stroke=\"__primary__\" stroke-width=\"1.5\"/><use href=\"#f\"/><use href=\"#f\" transform=\"rotate(90 24 24)\"/><use href=\"#f\" transform=\"rotate(180 24 24)\"/><use href=\"#f\" transform=\"rotate(270 24 24)\"/></svg>",
355
- 'royal-frame': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><rect x=\"3\" y=\"3\" width=\"42\" height=\"42\" rx=\"6\" fill=\"none\" stroke=\"__primary__\" stroke-width=\"2\"/><rect x=\"8\" y=\"8\" width=\"32\" height=\"32\" rx=\"3\" fill=\"none\" stroke=\"__primary__\" stroke-width=\"1\" opacity=\"0.6\"/><circle cx=\"6\" cy=\"6\" r=\"2.4\" fill=\"__primary__\"/><circle cx=\"42\" cy=\"6\" r=\"2.4\" fill=\"__primary__\"/><circle cx=\"6\" cy=\"42\" r=\"2.4\" fill=\"__primary__\"/><circle cx=\"42\" cy=\"42\" r=\"2.4\" fill=\"__primary__\"/></svg>",
356
- 'hazard-stripes': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M-4 4 L4 -4 M0 16 L16 0 M12 20 L20 12\" stroke=\"__warning__\" stroke-width=\"4\" opacity=\"0.12\" fill=\"none\"/></svg>",
357
- 'pixel-frame': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" shape-rendering=\"crispEdges\"><path fill-rule=\"evenodd\" d=\"M0 0 H16 V16 H0 Z M1 1 V15 H15 V1 Z\" fill=\"__text__\"/><path fill-rule=\"evenodd\" d=\"M3 3 H13 V13 H3 Z M4 4 V12 H12 V4 Z\" fill=\"__primary__\"/></svg>",
358
- 'grain-texture': "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\"><g fill=\"__text__\" opacity=\"0.07\"><rect x=\"3\" y=\"5\" width=\"1\" height=\"1\"/><rect x=\"11\" y=\"2\" width=\"1\" height=\"1\"/><rect x=\"19\" y=\"9\" width=\"1\" height=\"1\"/><rect x=\"27\" y=\"4\" width=\"1\" height=\"1\"/><rect x=\"35\" y=\"12\" width=\"1\" height=\"1\"/><rect x=\"6\" y=\"17\" width=\"1\" height=\"1\"/><rect x=\"15\" y=\"22\" width=\"1\" height=\"1\"/><rect x=\"24\" y=\"18\" width=\"1\" height=\"1\"/><rect x=\"33\" y=\"26\" width=\"1\" height=\"1\"/><rect x=\"2\" y=\"29\" width=\"1\" height=\"1\"/><rect x=\"12\" y=\"34\" width=\"1\" height=\"1\"/><rect x=\"22\" y=\"31\" width=\"1\" height=\"1\"/><rect x=\"30\" y=\"37\" width=\"1\" height=\"1\"/><rect x=\"38\" y=\"33\" width=\"1\" height=\"1\"/></g></svg>",
359
- };
360
- export const HUD_GLOW_KEYS = ['aqua', 'pink', 'warm', 'horror-red', 'gold', 'cyan', 'none'];
361
- export const HUD_ELEMENT_CLASSES = ['progressBar', 'healthBar', 'counter', 'iconText', 'timer', 'toast', 'controls', 'reticle', 'mobileControls'];
362
- // ThemeShape's field names, for the drift gate's membership check — a new shape
363
- // token added engine-side without reaching this list (and the validator, and
364
- // get-hud-catalog's ranges) is a loud CI failure instead of a knob agents
365
- // cannot see.
366
- export const HUD_SHAPE_TOKENS = ['radiusPill', 'radiusCard', 'glow', 'imageRendering', 'borderWidth', 'bevel', 'gloss', 'glowColor'];
367
- export const HUD_COLOR_TOKENS = ['primary', 'danger', 'warning', 'success', 'background', 'surface', 'text', 'textMuted', 'outline'];
368
- export const HUD_REQUIRED_COLORS = ['primary', 'danger', 'background', 'surface', 'text'];
369
- export const HUD_DECORATION_SLOTS = ['borderImage', 'backdrop', 'decorationBefore', 'decorationAfter'];
370
- // Built-in icon slots a theme can override with custom SVG markup. Each value
371
- // is inline SVG (≤16kb). SVGs may use `currentColor` so the icon follows the
372
- // surrounding text color, OR the same `__primary__` / `__danger__` / etc.
373
- // color tokens that decorations use — the engine substitutes them at apply time.
374
- export const HUD_ICON_SLOTS = [
375
- { key: 'heart', description: 'Health label icon (shown next to "HP" on the player health bar). Default: filled heart.' },
376
- { key: 'mouse', description: 'Pointer-lock overlay icon ("Click to play" screen). Default: outlined mouse.' },
377
- { key: 'arrow', description: 'Movement-key arrow used in the controls overlay. ONE SVG — CSS rotates it for down/left/right. Default: thin chevron pointing up.' },
378
- ];
379
- export const HUD_ICON_KEYS = HUD_ICON_SLOTS.map(s => s.key);
380
- // The strict validator lives next door in theme-validate.ts — everything the
381
- // old lightValidateTheme checked plus glow keys, numeric ranges, the elements
382
- // block, slot suitability and decoration size/position/repeat.
383
- //
384
- // It is deliberately NOT re-exported from here. theme-validate.ts imports this
385
- // catalog's vocabulary, so a re-export back out of the catalog closes the loop
386
- // into a circular import that the Mastra/Rollup bundler warns about on every
387
- // dev rebuild. Import validateThemeStrict, isEngineFatalIssue and
388
- // suggestClosest from './theme-validate.js' directly.
389
- //# sourceMappingURL=hud-theme-catalog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hud-theme-catalog.js","sourceRoot":"","sources":["../../src/theme/hud-theme-catalog.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,oBAAoB;AACpB,EAAE;AACF,iCAAiC;AACjC,2EAA2E;AAC3E,8CAA8C;AAC9C,0EAA0E;AAC1E,yDAAyD;AACzD,EAAE;AACF,mBAAmB;AACnB,2EAA2E;AAC3E,yFAAyF;AACzF,oCAAoC;AACpC,4DAA4D;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,aAAa;IACb,cAAc;IACd,OAAO;IACP,WAAW;IACX,QAAQ;CACF,CAAC;AAGX,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAChF,uCAAuC;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,iBAAi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AiB,CAAU,CAAC;AAEhH,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,iFAAiF;AACjF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,yFAAyF,EAAE;IACxH,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,8EAA8E,EAAE;IAC7G,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,mIAAmI,EAAE;CAC5J,CAAC;AACX,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAwD,CAAC;AAQnH,6EAA6E;AAC7E,8EAA8E;AAC9E,+DAA+D;AAC/D,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,kEAAkE;AAClE,sDAAsD"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Hand-mirror of game/src/engine/hud/colorMath.ts — the WCAG arithmetic behind
3
- * the derived HUD inks. The theme report computes its contrast pairings with
4
- * EXACTLY the maths the engine will apply, so a SUBSTITUTED line in the report
5
- * is a promise about what will render, not an estimate.
6
- *
7
- * Mirrored by hand because agent tools cannot import engine source (separate
8
- * tsconfig include sets). Drift-checked BEHAVIOURALLY by scripts/
9
- * check-hud-catalog.ts: the gate imports both copies under tsx and compares
10
- * their outputs over every preset palette plus adversarial pairs, so a changed
11
- * threshold or mix factor on either side goes red in CI.
12
- */
13
- export declare function relLuminance(hex: string): number;
14
- export declare function contrastRatio(a: string, b: string): number;
15
- export declare function mixHex(from: string, to: string, amount: number): string;
16
- export declare function readableTextColor(hex: string): string;
17
- export declare const ON_SURFACE_MIN_CONTRAST = 3;
18
- export declare function inkOnSurface(surface: string, preferred: string): string;
19
- export declare const ACCENT_INK_MIN_CONTRAST = 4.5;
20
- export declare function accentInkOn(ground: string, accent: string): string | null;
21
- export declare function mutedInkOnSurface(surface: string, prefer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AI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IACjG,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,uBAAuB;QAAE,OAAO,SAAS,CAAC;IACnF,8EAA8E;IAC9E,2EAA2E;IAC3E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,0BAA0B;IAC1B,OAAO,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * RFC 7386 JSON merge patch, for HUD theme edits.
3
- *
4
- * Why merge patch and not path-based `{path, value}` edits: a merge patch IS
5
- * the theme's own shape — `{ colors: { primary: "#FF8800" } }` — so the model
6
- * emits the one notation it already knows from reading themes, instead of
7
- * inventing dotted path strings it can typo. Deletion is `null` at the key
8
- * (RFC 7386), which is how "remove the outline" and "clear glowColor" are
9
- * expressed without a second vocabulary.
10
- *
11
- * The patch applies to a base and the MERGED result is validated as a whole
12
- * theme, so a patch can never sneak an invalid leaf past the checks that a
13
- * full write would catch.
14
- */
15
- export declare function applyMergePatch(base: unknown, patch: unknown): unknown;
16
- export interface ThemeDiffEntry {
17
- path: string;
18
- from: unknown;
19
- to: unknown;
20
- }
21
- /**
22
- * Leaf-level differences between two themes, as dotted paths. Feeds the
23
- * report's `changed:` line — the model's confirmation of what its edit
24
- * actually did (and, on a full replace, of everything it changed without
25
- * meaning to).
26
- */
27
- export declare function diffThemes(before: unknown, after: unknown, prefix?: string): ThemeDiffEntry[];
28
- /**
29
- * Delete the leaf at a dotted validator path ("elements.healthBar.colors.background").
30
- * Returns false when the path does not resolve — the caller then leaves the
31
- * error in place rather than pretending it fixed something. Companion to the
32
- * patch flows: a STORED base can carry pre-strict-era leaves the engine already
33
- * ignores, and pruning them (with a warning) is what lets an unrelated patch
34
- * apply instead of failing at paths it never touched.
35
- */
36
- export declare function deleteAtPath(target: Record<string, unknown>, dottedPath: string): boolean;
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-merge.js","sourceRoot":"","sources":["../../src/theme/theme-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,UAAU,eAAe,CAAC,IAAa,EAAE,KAAc;IACzD,iEAAiE;IACjE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtF,MAAM,MAAM,GACR,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAC7D,CAAC,CAAC,EAAE,GAAI,IAAgC,EAAE;QAC1C,CAAC,CAAC,EAAE,CAAC;IACb,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/C,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACjB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QACtD,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAQD;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe,EAAE,KAAc,EAAE,MAAM,GAAG,EAAE;IACnE,IAAI,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACxC,MAAM,WAAW,GACb,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;WACpE,OAAO,KAAK,KAAK,QAAQ,IAAI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GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QACnF,IAAI,GAAG,IAA+B,CAAC;IAC3C,CAAC;IACD,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC3C,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * The text report that rides every successful theme read/write — the model's
3
- * eyes. An LLM cannot see the rendered HUD, so the one moment it can learn
4
- * "your literal value will not render" or "your edit also changed X" is inside
5
- * the tool response, in text, immediately.
6
- *
7
- * Two sections:
8
- * changed: leaf-level diff of what the write actually did — the confirmation
9
- * of the intended edit AND of anything a full replace changed
10
- * without meaning to.
11
- * contrast: the derived-ink pairings computed with EXACTLY the engine's
12
- * arithmetic (theme-color-math mirrors engine colorMath, gate-
13
- * checked), so "SUBSTITUTED -> renders #X" is a promise about the
14
- * pixels, not an estimate.
15
- *
16
- * Deliberately report-only: the engine self-heals every pairing marked
17
- * SUBSTITUTED, so nothing here blocks a write. The report exists so the agent
18
- * can decide whether the substitute serves the user's ask — a lime accent that
19
- * renders as forest green might be exactly right, or reason to pick a colour
20
- * the ground can carry.
21
- */
22
- export interface ThemeReportOptions {
23
- /** The theme before this write, for the diff section. Omit for read-only reports. */
24
- before?: unknown;
25
- /** How the written theme was produced, e.g. `preset rift-raider + patch`. */
26
- baseLabel: string;
27
- }
28
- export declare function buildThemeReport(after: unknown, options: ThemeReportOptions): string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-report.js","sourceRoot":"","sources":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" — the
3
- * logic both lanes need before a patch (the base), a report (the `before`
4
- * side), or a verdict (`show`/`check`) can exist.
5
- *
6
- * It lived twice: the write tool's currentEffectiveTheme and the CLI's
7
- * readStoredTheme each hand-rolled the stored-value→tokens mapping, and they
8
- * had already diverged — the CLI copy named an unknown preset truthfully while
9
- * the agent copy silently folded it into "the engine default". A new stored
10
- * form (or a label fix) had to land twice with nothing watching. This file is
11
- * part of the byte-identical kit mirror, so the gate now watches.
12
- */
13
- export interface ResolvedStoredTheme {
14
- kind: 'preset' | 'custom' | 'none' | 'unknown-preset';
15
- /** The tokens the engine renders for this stored value. */
16
- tokens: Record<string, unknown>;
17
- /** Human-readable description of where `tokens` came from. */
18
- label: string;
19
- }
20
- /** Resolve a raw `worldProfileData.hud.theme` value to what the engine renders. */
21
- export declare function resolveStoredTheme(stored: unknown): ResolvedStoredTheme;
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme-stored.js","sourceRoot":"","sources":["../../src/theme/theme-stored.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAC;AAU5G,mFAAmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,MAAe;IAC9C,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO;YACH,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,eAAe,CAAC,oBAAoB,CAA4B;YACxE,KAAK,EAAE,mCAAmC;SAC7C,CAAC;IACN,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAK,WAAqC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1D,OAAO;gBACH,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,WAAW,CAAC,MAAuB,CAAC;gBAC5C,KAAK,EAAE,UAAU,MAAM,EAAE;aAC5B,CAAC;QACN,CAAC;QACD,OAAO;YACH,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,eAAe,CAAC,oBAAoB,CAA4B;YACxE,KAAK,EAAE,uCAAuC,MAAM,IAAI;SAC3D,CAAC;IACN,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACvD,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAiC;YACzC,KAAK,EAAE,0BAA0B;SACpC,CAAC;IACN,CAAC;IACD,OAAO;QACH,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,eAAe,CAAC,oBAAoB,CAA4B;QACxE,KAAK,EAAE,qDAAqD,OAAO,MAAM,GAAG;KAC/E,CAAC;AACN,CAAC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * The strict write-time HUD theme validator.
3
- *
4
- * STRICTER than the engine's load-time validator on purpose, and that asymmetry
5
- * is the design: at WRITE time a bad per-element leaf is an error the agent can
6
- * fix in the same turn, while at LOAD time the engine must keep rendering
7
- * already-published themes, so it warns and drops the leaf instead. Everything
8
- * this validator accepts, the engine accepts; the reverse is not required.
9
- *
10
- * This replaced `lightValidateTheme`, which skipped glow keys, every numeric
11
- * range, the whole `elements` block, decoration slot suitability and decoration
12
- * size/position/repeat — six ways a theme could pass the write tool and then
13
- * silently render as the DEFAULT look at engine load, which reads as "theming
14
- * is broken" rather than "the value was wrong". Parity with the engine is
15
- * enforced by scripts/check-hud-catalog.ts, which runs both validators over a
16
- * fixture corpus under tsx and compares verdicts.
17
- *
18
- * Validation rules mirror game/src/engine/hud/validateTheme.ts; vocabulary
19
- * comes from the drift-checked catalog next door.
20
- */
21
- import { type CatalogValidationIssue } from './hud-theme-catalog.js';
22
- export interface StrictValidationResult {
23
- ok: boolean;
24
- errors: CatalogValidationIssue[];
25
- warnings: CatalogValidationIssue[];
26
- }
27
- export declare function suggestClosest(value: string, candidates: ReadonlyArray<string>): string | undefined;
28
- /**
29
- * Whether an issue would make the ENGINE reject the whole theme, or only drop a
30
- * leaf while the theme keeps rendering.
31
- *
32
- * This validator is deliberately stricter than the engine at two spots, and the
33
- * difference matters when DESCRIBING a stored theme: per-element
34
- * font/colors/shape leaves are warn-and-dropped at engine load (the theme still
35
- * renders minus the leaf), and unknown top-level color tokens are ignored
36
- * outright. Telling a user "the engine is falling back to the default look"
37
- * over one droppable leaf describes a fallback that is not happening — and an
38
- * agent acting on that "repairs" a theme the user is actually seeing.
39
- */
40
- export declare function isEngineFatalIssue(issue: CatalogValidationIssue): boolean;
41
- export declare function validateThemeStrict(theme: unknown): StrictValidationResult;