@ramme-io/kernel 8.1.4 → 8.1.6

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.
@@ -1,18 +1,18 @@
1
1
  import { z as e } from "zod";
2
- var te = Object.defineProperty, ae = (a, i) => {
3
- for (var h in i)
4
- te(a, h, { get: i[h], enumerable: !0 });
5
- }, ne = e.object({
2
+ var ne = Object.defineProperty, oe = (a, i) => {
3
+ for (var x in i)
4
+ ne(a, x, { get: i[x], enumerable: !0 });
5
+ }, ie = e.object({
6
6
  key: e.string(),
7
7
  label: e.string(),
8
8
  type: e.enum(["text", "number", "currency", "percent", "delta", "date", "boolean", "status", "email", "image", "textarea"]),
9
9
  required: e.boolean().optional(),
10
10
  description: e.string().optional(),
11
11
  defaultValue: e.any().optional()
12
- }), oe = e.object({
12
+ }), re = e.object({
13
13
  id: e.string(),
14
14
  name: e.string(),
15
- fields: e.array(ne),
15
+ fields: e.array(ie),
16
16
  defaultView: e.enum(["table", "grid", "list"]).optional(),
17
17
  features: e.object({
18
18
  searchable: e.boolean().optional(),
@@ -21,7 +21,7 @@ var te = Object.defineProperty, ae = (a, i) => {
21
21
  deletable: e.boolean().optional(),
22
22
  exportable: e.boolean().optional()
23
23
  }).optional()
24
- }), ie = e.object({
24
+ }), se = e.object({
25
25
  id: e.string().min(1, "Signal ID is required"),
26
26
  label: e.string(),
27
27
  description: e.string().optional(),
@@ -37,7 +37,7 @@ var te = Object.defineProperty, ae = (a, i) => {
37
37
  unit: e.string().optional(),
38
38
  min: e.number().optional(),
39
39
  max: e.number().optional()
40
- }), re = e.object({
40
+ }), le = e.object({
41
41
  id: e.string(),
42
42
  name: e.string(),
43
43
  description: e.string().optional(),
@@ -49,11 +49,11 @@ var te = Object.defineProperty, ae = (a, i) => {
49
49
  color: e.string().optional(),
50
50
  dashboardComponent: e.string().optional()
51
51
  }).optional()
52
- }), se = e.object({
52
+ }), ue = e.object({
53
53
  id: e.string(),
54
54
  type: e.enum(["signal_change", "manual_action", "schedule", "webhook"]),
55
55
  config: e.record(e.string(), e.any())
56
- }), le = e.object({
56
+ }), me = e.object({
57
57
  id: e.string(),
58
58
  type: e.enum([
59
59
  "update_resource",
@@ -64,13 +64,13 @@ var te = Object.defineProperty, ae = (a, i) => {
64
64
  "agent_task"
65
65
  ]),
66
66
  config: e.record(e.string(), e.any())
67
- }), ue = e.object({
67
+ }), ce = e.object({
68
68
  id: e.string(),
69
69
  name: e.string(),
70
70
  active: e.boolean().default(!0),
71
- trigger: se,
72
- actions: e.array(le)
73
- }), me = e.object({
71
+ trigger: ue,
72
+ actions: e.array(me)
73
+ }), de = e.object({
74
74
  id: e.string(),
75
75
  type: e.string(),
76
76
  props: e.record(e.string(), e.any()),
@@ -78,7 +78,7 @@ var te = Object.defineProperty, ae = (a, i) => {
78
78
  colSpan: e.number().optional(),
79
79
  rowSpan: e.number().optional()
80
80
  }).optional()
81
- }), ce = e.object({
81
+ }), pe = e.object({
82
82
  id: e.string(),
83
83
  title: e.string().optional(),
84
84
  description: e.string().optional(),
@@ -86,18 +86,18 @@ var te = Object.defineProperty, ae = (a, i) => {
86
86
  columns: e.number().optional(),
87
87
  variant: e.enum(["grid", "stack", "split"]).optional()
88
88
  }).optional(),
89
- blocks: e.array(me)
90
- }), de = e.object({
89
+ blocks: e.array(de)
90
+ }), he = e.object({
91
91
  id: e.string(),
92
92
  slug: e.string(),
93
93
  title: e.string(),
94
94
  description: e.string().optional(),
95
95
  icon: e.string().optional(),
96
- sections: e.array(ce)
97
- }), pe = e.enum(["ENVIRONMENT", "SESSION_BYOK", "VAULT"]), he = e.object({
98
- strategy: pe,
96
+ sections: e.array(pe)
97
+ }), xe = e.enum(["ENVIRONMENT", "SESSION_BYOK", "VAULT"]), ge = e.object({
98
+ strategy: xe,
99
99
  status: e.enum(["VALID", "KEY_EXPIRED", "BYOK_REQUIRED", "DEGRADED", "UNKNOWN"]).default("UNKNOWN")
100
- }), St = e.object({
100
+ }), kt = e.object({
101
101
  meta: e.object({
102
102
  name: e.string(),
103
103
  version: e.string(),
@@ -110,22 +110,22 @@ var te = Object.defineProperty, ae = (a, i) => {
110
110
  layout: e.enum(["dashboard", "explorer", "studio", "focus"]).default("dashboard"),
111
111
  mockMode: e.boolean().default(!0),
112
112
  brokerUrl: e.string().optional(),
113
- aiKeyManifest: he.optional()
113
+ aiKeyManifest: ge.optional()
114
114
  }),
115
115
  modules: e.array(e.string()).optional(),
116
- resources: e.array(oe).optional(),
116
+ resources: e.array(re).optional(),
117
117
  domain: e.object({
118
- signals: e.array(ie),
119
- entities: e.array(re),
120
- workflows: e.array(ue).optional()
118
+ signals: e.array(se),
119
+ entities: e.array(le),
120
+ workflows: e.array(ce).optional()
121
121
  }),
122
- pages: e.array(de).optional()
123
- }), Ct = e.object({
122
+ pages: e.array(he).optional()
123
+ }), jt = e.object({
124
124
  timestamp: e.number(),
125
125
  soilMoisture: e.number().min(0).max(100),
126
126
  ambientLight: e.number().min(0).max(1e5),
127
127
  temperature: e.number().min(-40).max(125)
128
- }), xe = e.object({
128
+ }), be = e.object({
129
129
  id: e.string(),
130
130
  source: e.enum(["mqtt", "http", "ws", "mock"]),
131
131
  domain: e.string(),
@@ -135,13 +135,13 @@ var te = Object.defineProperty, ae = (a, i) => {
135
135
  timestamp: e.number(),
136
136
  meta: e.record(e.unknown()).optional()
137
137
  });
138
- e.array(xe);
139
- var ge = {
138
+ e.array(be);
139
+ var fe = {
140
140
  AGRICULTURE: "agriculture",
141
141
  // Derived — Methodology Engine outputs
142
142
  ENVIRONMENT: "environment"
143
143
  // A device's surroundings — temperature, humidity, light
144
- }, be = e.enum(["telemetry", "market", "system", "logic"]), fe = e.enum(["mqtt", "http", "ws", "mock"]);
144
+ }, ve = e.enum(["telemetry", "market", "system", "logic"]), ye = e.enum(["mqtt", "http", "ws", "mock"]);
145
145
  e.object({
146
146
  /**
147
147
  * Globally unique signal identifier.
@@ -153,7 +153,7 @@ e.object({
153
153
  * The semantic category of this signal.
154
154
  * Determines which Methodology Engine processes it.
155
155
  */
156
- kind: be,
156
+ kind: ve,
157
157
  /**
158
158
  * The specific measurement or metric key within its kind.
159
159
  * RULE: Keys MUST be abstract and domain-agnostic where possible.
@@ -181,7 +181,7 @@ e.object({
181
181
  /**
182
182
  * The transport source that produced this signal.
183
183
  */
184
- source: fe.optional(),
184
+ source: ye.optional(),
185
185
  /**
186
186
  * Optional domain namespace for grouping related signals.
187
187
  * Examples: 'bodewell', 'finance', 'infrastructure', 'user_behavior'
@@ -195,11 +195,11 @@ e.object({
195
195
  */
196
196
  meta: e.record(e.unknown()).optional()
197
197
  });
198
- var ve = {};
199
- ae(ve, {
200
- BodewellCommandSchema: () => we,
198
+ var we = {};
199
+ oe(we, {
200
+ BodewellCommandSchema: () => Ee,
201
201
  BodewellDeviceID: () => T,
202
- BodewellTelemetrySchema: () => ye
202
+ BodewellTelemetrySchema: () => Ae
203
203
  });
204
204
  var T = e.enum([
205
205
  "STK-V1-001",
@@ -207,7 +207,7 @@ var T = e.enum([
207
207
  "STK-V1-003",
208
208
  "STK-PRO-001",
209
209
  "STK-VIS-001"
210
- ]), ye = e.object({
210
+ ]), Ae = e.object({
211
211
  device_id: T,
212
212
  stick_id: e.string().optional().describe("Firmware alias for device_id"),
213
213
  timestamp: e.number().optional().describe("Epoch timestamp from NTP"),
@@ -222,25 +222,25 @@ var T = e.enum([
222
222
  soil_moisture: e.number().optional().describe("Firmware alias for raw capacitance"),
223
223
  soil_moisture_raw: e.number().optional().describe("Unscaled capacitance (300-1100)"),
224
224
  fw_version: e.string().max(40).optional().describe("Firmware build the board is running; absent on v4 sketches, which cannot be updated over the air")
225
- }).passthrough(), we = e.object({
225
+ }).passthrough(), Ee = e.object({
226
226
  stick_id: T,
227
227
  // Note: Your API uses stick_id here, not device_id
228
228
  type: e.enum(["dry", "wet"]),
229
229
  value: e.number()
230
- }), Ae = e.enum([
230
+ }), Se = e.enum([
231
231
  "esp32-touch-28",
232
232
  // 2.8" 240x320 resistive touch, the workshop board
233
233
  "esp32-headless",
234
234
  // no display; sensor node
235
235
  "simulator"
236
236
  // browser-side stand-in, for building without hardware
237
- ]), H = e.enum([
237
+ ]), U = e.enum([
238
238
  "weather",
239
239
  "clock",
240
240
  "aircraft",
241
241
  "sensor",
242
242
  "blank"
243
- ]), Ee = e.object({
243
+ ]), Ce = e.object({
244
244
  /** Postal code is what a person knows; the portal resolves it to coordinates. */
245
245
  postalCode: e.string().min(3).max(12),
246
246
  latitude: e.number().min(-90).max(90).optional(),
@@ -248,29 +248,29 @@ var T = e.enum([
248
248
  units: e.enum(["imperial", "metric"]).default("imperial"),
249
249
  showForecast: e.boolean().default(!0),
250
250
  refreshSeconds: e.number().int().min(300).max(86400).default(900)
251
- }), Se = e.object({
251
+ }), _e = e.object({
252
252
  /** IANA zone, e.g. "America/New_York". */
253
253
  timezone: e.string().default("America/New_York"),
254
254
  twentyFourHour: e.boolean().default(!1),
255
255
  showSeconds: e.boolean().default(!1),
256
256
  showDate: e.boolean().default(!0)
257
- }), Ce = e.object({
257
+ }), Be = e.object({
258
258
  latitude: e.number().min(-90).max(90),
259
259
  longitude: e.number().min(-180).max(180),
260
260
  radiusKm: e.number().min(5).max(400).default(80),
261
261
  /** Rows the list view can show before the screen runs out. */
262
262
  maxRows: e.number().int().min(1).max(12).default(8),
263
263
  refreshSeconds: e.number().int().min(10).max(600).default(30)
264
- }), _e = e.object({
264
+ }), Fe = e.object({
265
265
  /** Signal keys to display, in order. Abstract keys per the Signal contract. */
266
266
  keys: e.array(e.string()).min(1).max(6),
267
267
  refreshSeconds: e.number().int().min(1).max(3600).default(10)
268
- }), Be = e.object({
269
- weather: Ee.optional(),
270
- clock: Se.optional(),
271
- aircraft: Ce.optional(),
272
- sensor: _e.optional()
273
- }), Fe = e.object({
268
+ }), ke = e.object({
269
+ weather: Ce.optional(),
270
+ clock: _e.optional(),
271
+ aircraft: Be.optional(),
272
+ sensor: Fe.optional()
273
+ }), je = e.object({
274
274
  brightness: e.number().int().min(5).max(100).default(80),
275
275
  /** Degrees clockwise. The board can sit either way up in a case. */
276
276
  rotation: e.union([e.literal(0), e.literal(90), e.literal(180), e.literal(270)]).default(0),
@@ -283,7 +283,7 @@ var T = e.enum([
283
283
  }), E = e.string().regex(
284
284
  /^\d{1,3} \d{1,3} \d{1,3}$/,
285
285
  'Expected space-separated RGB integers, e.g. "13 110 253"'
286
- ), ke = e.object({
286
+ ), Ie = e.object({
287
287
  preset: e.enum(["light", "dark", "corporate", "midnight", "blueprint", "custom"]).default("dark"),
288
288
  background: E.optional(),
289
289
  foreground: E.optional(),
@@ -298,12 +298,12 @@ e.object({
298
298
  /** Monotonic. Portal increments on write; device echoes what it is running. */
299
299
  revision: e.number().int().nonnegative(),
300
300
  updatedAt: e.string().datetime().optional(),
301
- activeApp: H,
302
- apps: Be,
303
- display: Fe,
304
- theme: ke
301
+ activeApp: U,
302
+ apps: ke,
303
+ display: je,
304
+ theme: Ie
305
305
  });
306
- var je = e.enum([
306
+ var De = e.enum([
307
307
  "unprovisioned",
308
308
  "connecting",
309
309
  "online",
@@ -312,19 +312,19 @@ var je = e.enum([
312
312
  ]);
313
313
  e.object({
314
314
  deviceId: e.string().min(1),
315
- kind: Ae,
315
+ kind: Se,
316
316
  firmwareVersion: e.string(),
317
317
  /** Shown on the device's own screen at boot — how the user finds it. */
318
318
  ipAddress: e.string().optional(),
319
- provisioning: je,
319
+ provisioning: De,
320
320
  /** Revision the device is actually running, not the one it was sent. */
321
321
  configRevision: e.number().int().nonnegative(),
322
- activeApp: H,
322
+ activeApp: U,
323
323
  rssi: e.number().int().optional().describe("dBm"),
324
324
  uptimeSeconds: e.number().int().nonnegative().optional(),
325
325
  freeHeapBytes: e.number().int().nonnegative().optional()
326
326
  });
327
- var Ie = e.enum([
327
+ var Te = e.enum([
328
328
  "background",
329
329
  "foreground",
330
330
  "muted",
@@ -332,7 +332,7 @@ var Ie = e.enum([
332
332
  "success",
333
333
  "warning",
334
334
  "danger"
335
- ]), De = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'RGB must be three space-separated integers, e.g. "13 110 253"'), S = e.union([Ie, De]), U = e.enum(["xs", "sm", "base", "lg", "xl", "display"]), C = e.enum(["start", "center", "end"]), Te = e.discriminatedUnion("kind", [
335
+ ]), Re = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'RGB must be three space-separated integers, e.g. "13 110 253"'), S = e.union([Te, Re]), K = e.enum(["xs", "sm", "base", "lg", "xl", "display"]), C = e.enum(["start", "center", "end"]), Me = e.discriminatedUnion("kind", [
336
336
  e.object({
337
337
  kind: e.literal("weather"),
338
338
  latitude: e.number().min(-90).max(90),
@@ -398,7 +398,7 @@ var Ie = e.enum([
398
398
  ]), I = e.union([
399
399
  e.object({ literal: e.number() }),
400
400
  e.object({ source: e.string().min(1), field: e.string().min(1) })
401
- ]), Re = e.object({
401
+ ]), Oe = e.object({
402
402
  compute: e.enum(["add", "subtract", "multiply", "divide"]),
403
403
  of: e.tuple([I, I]),
404
404
  round: e.boolean().default(!0)
@@ -410,55 +410,55 @@ var Ie = e.enum([
410
410
  /** Field on that source, e.g. "temperature", "high", "condition". */
411
411
  field: e.string().min(1)
412
412
  }),
413
- Re
413
+ Oe
414
414
  ]), _ = e.object({
415
415
  value: I,
416
416
  op: e.enum(["<", "<=", ">", ">=", "==", "!="]),
417
417
  than: e.union([e.number(), e.string(), e.boolean()])
418
- }), K = e.object({
418
+ }), W = e.object({
419
419
  when: _,
420
420
  color: S.optional(),
421
- size: U.optional()
421
+ size: K.optional()
422
422
  }), B = {
423
423
  color: S.optional(),
424
424
  /** Drawn only when this is false, or absent. */
425
425
  hideWhen: _.optional(),
426
426
  /** Conditional style. First match wins. */
427
- rules: e.array(K).max(4).optional()
428
- }, Oe = e.object({
427
+ rules: e.array(W).max(4).optional()
428
+ }, Ne = e.object({
429
429
  type: e.literal("text"),
430
430
  value: w,
431
- size: U.default("base"),
431
+ size: K.default("base"),
432
432
  align: C.default("start"),
433
433
  /** Printed after the value, e.g. a degree symbol. Never itself bound. */
434
434
  /** Drawn before the value, as `suffix` is after: "H " for "H 68°". */
435
435
  prefix: e.string().max(8).optional(),
436
436
  suffix: e.string().max(8).optional(),
437
437
  ...B
438
- }), Me = e.object({
438
+ }), Pe = e.object({
439
439
  type: e.literal("dial"),
440
440
  value: w,
441
441
  min: e.number(),
442
442
  max: e.number(),
443
443
  label: e.string().max(24).optional(),
444
444
  ...B
445
- }), Ne = e.object({
445
+ }), $e = e.object({
446
446
  type: e.literal("sparkline"),
447
447
  /** A source field holding a series rather than a scalar. */
448
448
  series: w,
449
449
  ...B
450
- }), Pe = e.object({
450
+ }), ze = e.object({
451
451
  type: e.literal("bar"),
452
452
  value: w,
453
453
  min: e.number(),
454
454
  max: e.number(),
455
455
  ...B
456
- }), $e = e.object({
456
+ }), Le = e.object({
457
457
  type: e.literal("status"),
458
458
  state: w,
459
459
  label: e.string().max(24).optional(),
460
460
  ...B
461
- }), F = 64, ze = F / 2, Le = Math.ceil(ze * F / 3) * 4, Ve = e.object({
461
+ }), F = 64, Ve = F / 2, He = Math.ceil(Ve * F / 3) * 4, Ue = e.object({
462
462
  type: e.literal("sprite"),
463
463
  width: e.number().int().min(1).max(F),
464
464
  height: e.number().int().min(1).max(F),
@@ -473,11 +473,11 @@ var Ie = e.enum([
473
473
  */
474
474
  palette: e.array(S).min(1).max(16),
475
475
  /** base64 of the packed nibbles. */
476
- pixels: e.string().min(4).max(Le),
476
+ pixels: e.string().min(4).max(He),
477
477
  align: C.default("start"),
478
478
  /** Drawn only when this is false, or absent. */
479
479
  hideWhen: _.optional()
480
- }), D = e.string().regex(/^[0-9a-f]{64}$/, "a lowercase hex SHA-256"), f = { width: 304, height: 224 }, He = 8, $ = {
480
+ }), D = e.string().regex(/^[0-9a-f]{64}$/, "a lowercase hex SHA-256"), f = { width: 304, height: 224 }, Ke = 8, z = {
481
481
  /** "RSPR". */
482
482
  magic: [82, 83, 80, 82],
483
483
  version: 1,
@@ -486,13 +486,13 @@ var Ie = e.enum([
486
486
  /** Only 4 today: two pixels per byte, high nibble first, rows padded to a byte. */
487
487
  bitsPerPixel: 4,
488
488
  maxColors: 16
489
- }, _t = $.headerBytes + $.maxColors * 2 + Math.ceil(f.width / 2) * f.height, Ue = e.object({
489
+ }, It = z.headerBytes + z.maxColors * 2 + Math.ceil(f.width / 2) * f.height, We = e.object({
490
490
  type: e.literal("image"),
491
491
  asset: D,
492
492
  /** The file's own pixels, not the drawn size. */
493
493
  width: e.number().int().min(1).max(f.width),
494
494
  height: e.number().int().min(1).max(f.height),
495
- scale: e.number().int().min(1).max(He).default(1),
495
+ scale: e.number().int().min(1).max(Ke).default(1),
496
496
  /**
497
497
  * What kind of file `asset` names: `spr`, the palette file the retro look
498
498
  * uses, or `jpeg`, the full-colour rendition (drawn at scale 1). Absent means
@@ -502,25 +502,25 @@ var Ie = e.enum([
502
502
  align: C.default("start"),
503
503
  /** Drawn only when this is false, or absent. */
504
504
  hideWhen: _.optional()
505
- }), Bt = { sm: 24, md: 48, lg: 72, xl: 96 }, Ke = e.object({
505
+ }), Dt = { sm: 24, md: 48, lg: 72, xl: 96 }, Ge = e.object({
506
506
  type: e.literal("icon"),
507
507
  value: w,
508
508
  size: e.enum(["sm", "md", "lg", "xl"]).default("md"),
509
509
  align: C.default("start"),
510
510
  color: S.default("foreground"),
511
- rules: e.array(K).max(4).optional(),
511
+ rules: e.array(W).max(4).optional(),
512
512
  /** Drawn only when this is false, or absent. */
513
513
  hideWhen: _.optional()
514
- }), W = e.discriminatedUnion("type", [
515
- Oe,
516
- Me,
514
+ }), G = e.discriminatedUnion("type", [
517
515
  Ne,
518
516
  Pe,
519
517
  $e,
520
- Ve,
518
+ ze,
519
+ Le,
521
520
  Ue,
522
- Ke
523
- ]), We = e.object({
521
+ We,
522
+ Ge
523
+ ]), Ze = e.object({
524
524
  type: e.literal("group"),
525
525
  direction: e.enum(["row", "stack"]),
526
526
  gap: e.number().int().min(0).max(64).default(4),
@@ -536,23 +536,23 @@ var Ie = e.enum([
536
536
  * falls back to equal cells.
537
537
  */
538
538
  pack: e.boolean().optional(),
539
- children: e.array(W).min(1).max(8)
540
- }), Ge = e.union([W, We]);
539
+ children: e.array(G).min(1).max(8)
540
+ }), qe = e.union([G, Ze]);
541
541
  e.enum(["landscape", "portrait"]);
542
- var Ft = {
542
+ var Tt = {
543
543
  landscape: { width: 320, height: 240 },
544
544
  portrait: { width: 240, height: 320 }
545
- }, Ze = e.preprocess(
545
+ }, Ye = e.preprocess(
546
546
  (a) => a === "240x320" ? "320x240" : a,
547
547
  e.enum(["320x240"])
548
- ), G = e.object({
548
+ ), R = e.object({
549
549
  /** Bumped only for a breaking change; the device checks it before parsing. */
550
550
  schemaVersion: e.literal(1),
551
551
  id: e.string().regex(/^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$/, "lowercase slug"),
552
552
  name: e.string().min(1).max(48),
553
553
  /** Free text. Never an email or anything else identifying — see the plan. */
554
554
  author: e.string().max(32).optional(),
555
- screen: Ze.default("320x240"),
555
+ screen: Ye.default("320x240"),
556
556
  background: S.default("background"),
557
557
  /**
558
558
  * Where the blocks sit on the screen as a whole: from the top, or in the
@@ -583,13 +583,13 @@ var Ft = {
583
583
  */
584
584
  font: e.enum(["inter", "pixel", "tay"]).optional(),
585
585
  /** Named so bindings can refer to them. */
586
- sources: e.record(Te).default({}),
587
- blocks: e.array(Ge).min(1).max(12)
586
+ sources: e.record(Me).default({}),
587
+ blocks: e.array(qe).min(1).max(12)
588
588
  }).superRefine((a, i) => {
589
- const h = (d) => Math.ceil(d / 2), m = (d, n) => {
589
+ const x = (d) => Math.ceil(d / 2), m = (d, n) => {
590
590
  const t = d;
591
591
  if ((t == null ? void 0 : t.type) !== "sprite" || !t.width || !t.height || typeof t.pixels != "string") return;
592
- const s = h(t.width) * t.height, l = Math.floor(t.pixels.replace(/=+$/, "").length * 3 / 4);
592
+ const s = x(t.width) * t.height, l = Math.floor(t.pixels.replace(/=+$/, "").length * 3 / 4);
593
593
  l !== s && i.addIssue({
594
594
  code: e.ZodIssueCode.custom,
595
595
  path: [...n, "pixels"],
@@ -651,7 +651,7 @@ e.object({
651
651
  crop: Z.optional()
652
652
  });
653
653
  e.enum(["register", "poll", "send"]);
654
- var qe = e.enum(["working", "missing", "unsupported", "fault"]), q = e.string().regex(/^[a-z][a-z0-9-]{0,23}$/), Y = e.record(q, qe).refine((a) => Object.keys(a).length <= 16, { message: "at most 16 features" });
654
+ var Xe = e.enum(["working", "missing", "unsupported", "fault"]), q = e.string().regex(/^[a-z][a-z0-9-]{0,23}$/), Y = e.record(q, Xe).refine((a) => Object.keys(a).length <= 16, { message: "at most 16 features" });
655
655
  e.object({
656
656
  /** When the board last said any of this, by the server's clock. */
657
657
  reportedAt: e.number().int().nonnegative().optional(),
@@ -717,19 +717,19 @@ e.object({
717
717
  */
718
718
  rotation: e.number().int().min(0).max(3).optional()
719
719
  });
720
- var Ye = e.object({
720
+ var Je = e.object({
721
721
  key: q,
722
722
  value: e.union([e.number().finite(), e.string().max(64), e.boolean()]),
723
723
  unit: e.string().max(16).optional(),
724
724
  at: e.number().int().nonnegative().optional()
725
725
  });
726
726
  e.object({
727
- readings: e.array(Ye).min(1).max(16)
727
+ readings: e.array(Je).min(1).max(16)
728
728
  });
729
- var x = e.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U"), R = e.string().regex(/^\d{4}$/);
729
+ var p = e.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U"), M = e.string().regex(/^\d{4}$/);
730
730
  e.object({
731
- deviceId: x,
732
- code: R,
731
+ deviceId: p,
732
+ code: M,
733
733
  /** Firmware build, so a support question has an answer. */
734
734
  version: e.string().max(40).optional(),
735
735
  /** Which board this is, from Boards.h — the two variants need different firmware. */
@@ -758,31 +758,31 @@ e.object({
758
758
  features: Y.optional()
759
759
  });
760
760
  e.object({
761
- deviceId: x,
762
- code: R
761
+ deviceId: p,
762
+ code: M
763
763
  });
764
764
  e.object({
765
- deviceId: x
765
+ deviceId: p
766
766
  });
767
767
  e.object({
768
768
  revision: e.number().int().nonnegative(),
769
769
  sentAt: e.number().int().nonnegative()
770
770
  });
771
771
  e.object({
772
- deviceId: x,
773
- code: R,
772
+ deviceId: p,
773
+ code: M,
774
774
  ownerId: e.string().nullable().default(null),
775
775
  version: e.string().max(40).optional(),
776
776
  createdAt: e.number().int().nonnegative(),
777
777
  lastSeenAt: e.number().int().nonnegative()
778
778
  });
779
- var Xe = e.object({
779
+ var Qe = e.object({
780
780
  version: e.string().min(1).max(40),
781
781
  url: e.string().url().max(200),
782
782
  sha256: e.string().regex(/^[0-9a-f]{64}$/),
783
783
  bytes: e.number().int().positive(),
784
784
  requestedAt: e.number().int().nonnegative()
785
- }), kt = "?", jt = {
785
+ }), Rt = "?", Mt = {
786
786
  // Accented Latin, CP437 0x80-0xA5 and 0xE1
787
787
  Ç: { byte: 128, shows: "Ç" },
788
788
  ü: { byte: 129, shows: "ü" },
@@ -854,7 +854,7 @@ var Xe = e.object({
854
854
  "—": { byte: 45, shows: "-" },
855
855
  "−": { byte: 45, shows: "-" },
856
856
  " ": { byte: 32, shows: " " }
857
- }, It = 28, Dt = {
857
+ }, Ot = 28, Nt = {
858
858
  background: "17 17 17",
859
859
  foreground: "238 238 238",
860
860
  muted: "153 153 153",
@@ -862,7 +862,7 @@ var Xe = e.object({
862
862
  success: "34 197 94",
863
863
  warning: "245 158 11",
864
864
  danger: "220 53 69"
865
- }, Tt = 48, Rt = 3, Ot = {
865
+ }, Pt = 48, $t = 3, zt = {
866
866
  sun: [
867
867
  [32, 24, 32, 26, 30, 29, 29, 30, 26, 32, 22, 32, 19, 30, 18, 29, 16, 26, 16, 22, 18, 19, 19, 18, 22, 16, 26, 16, 29, 18, 30, 19, 32, 22, 32, 24],
868
868
  [37, 24, 43, 24],
@@ -910,8 +910,8 @@ var Xe = e.object({
910
910
  [41, 25, 37, 29, 35, 30, 13, 30, 10, 29, 9, 27, 9, 22, 10, 20, 14, 18, 15, 15, 15, 13, 19, 9, 21, 8, 26, 8, 29, 9, 31, 11, 33, 15, 36, 16, 38, 17, 40, 19, 41, 22, 41, 24],
911
911
  [26, 33, 20, 41, 27, 41, 22, 47]
912
912
  ]
913
- }, k = 8, Je = e.object({
914
- apps: e.array(G).min(1).max(k),
913
+ }, k = 8, et = e.object({
914
+ apps: e.array(R).min(1).max(k),
915
915
  /** Which app to show — an index into `apps`. */
916
916
  show: e.number().int().min(0).max(k - 1),
917
917
  /** Move to the next app every this many minutes; 0 holds still. */
@@ -922,17 +922,29 @@ var Xe = e.object({
922
922
  * sent longest ago, so sending always works. Missing reads as oldest.
923
923
  */
924
924
  added: e.array(e.number().int().nonnegative()).max(k).optional()
925
- });
925
+ }), X = e.union([e.literal(10), e.literal(30), e.literal(60), e.literal(0)]), tt = [
926
+ "podcasts",
927
+ "radio",
928
+ "music",
929
+ "snake",
930
+ "menu",
931
+ "settings",
932
+ "home",
933
+ "next",
934
+ "quieter",
935
+ "louder",
936
+ "sleep"
937
+ ], J = e.enum(tt), at = 8, nt = e.object({ n: e.number().int().positive(), do: J });
926
938
  e.discriminatedUnion("op", [
927
- e.object({ op: e.literal("show"), deviceId: x, index: e.number().int().min(0) }),
928
- e.object({ op: e.literal("remove"), deviceId: x, index: e.number().int().min(0) }),
939
+ e.object({ op: e.literal("show"), deviceId: p, index: e.number().int().min(0) }),
940
+ e.object({ op: e.literal("remove"), deviceId: p, index: e.number().int().min(0) }),
929
941
  e.object({
930
942
  op: e.literal("move"),
931
- deviceId: x,
943
+ deviceId: p,
932
944
  from: e.number().int().min(0),
933
945
  to: e.number().int().min(0)
934
946
  }),
935
- e.object({ op: e.literal("rotate"), deviceId: x, minutes: e.number().int().min(0).max(1440) }),
947
+ e.object({ op: e.literal("rotate"), deviceId: p, minutes: e.number().int().min(0).max(1440) }),
936
948
  /**
937
949
  * Swap the panel's light and dark. Not about apps, but it rides the same
938
950
  * route and the same poll: some units of the same board carry a panel wired
@@ -940,15 +952,28 @@ e.discriminatedUnion("op", [
940
952
  * from identical firmware. It is a fact about one board's glass, so it is a
941
953
  * per-board setting rather than a build.
942
954
  */
943
- e.object({ op: e.literal("screen"), deviceId: x, invert: e.boolean() }),
955
+ e.object({ op: e.literal("screen"), deviceId: p, invert: e.boolean() }),
956
+ /**
957
+ * How long the board may be left alone on its battery before it sleeps,
958
+ * 0 for never. Beside the panel setting, and for the same reason: it is
959
+ * about one board, not the apps on it.
960
+ */
961
+ e.object({ op: e.literal("sleep"), deviceId: p, minutes: X }),
962
+ /** A press from the page's Remote; see BOARD_REMOTE_COMMANDS. */
963
+ e.object({ op: e.literal("remote"), deviceId: p, do: J }),
944
964
  /**
945
965
  * Remove one entry from the list of apps sent to this board, by the revision
946
966
  * it was sent as. The record only: what the board holds is the shelf's
947
967
  * business, and `remove` above is how an app comes off it.
948
968
  */
949
- e.object({ op: e.literal("forget"), deviceId: x, revision: e.number().int().min(1) })
969
+ e.object({ op: e.literal("forget"), deviceId: p, revision: e.number().int().min(1) })
950
970
  ]);
951
- var v = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'Must be "R G B", e.g. "13 110 253"').refine((a) => a.split(" ").every((i) => Number(i) <= 255), "Each channel is 0–255"), z = e.object({
971
+ e.object({
972
+ document: R,
973
+ savedAt: e.number().int().nonnegative(),
974
+ updatedAt: e.number().int().nonnegative()
975
+ });
976
+ var v = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'Must be "R G B", e.g. "13 110 253"').refine((a) => a.split(" ").every((i) => Number(i) <= 255), "Each channel is 0–255"), L = e.object({
952
977
  background: v,
953
978
  /** Text. */
954
979
  foreground: v,
@@ -959,35 +984,37 @@ var v = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'Must be "R G B", e.g. "13
959
984
  success: v,
960
985
  warning: v,
961
986
  danger: v
962
- }), X = e.enum(["inter", "tay", "pixel"]), Qe = ["0rem", "0.25rem", "0.5rem", "0.75rem", "1rem"], L = e.string().trim().min(1).max(60).regex(/^[A-Za-z0-9 ]+$/), et = e.object({
963
- heading: L.optional(),
964
- body: L.optional()
987
+ }), Q = e.enum(["inter", "tay", "pixel"]), ot = ["0rem", "0.25rem", "0.5rem", "0.75rem", "1rem"], V = e.string().trim().min(1).max(60).regex(/^[A-Za-z0-9 ]+$/), it = e.object({
988
+ heading: V.optional(),
989
+ body: V.optional()
965
990
  });
966
991
  e.object({
967
992
  name: e.string().trim().min(1).max(40),
968
993
  /** The preset it started from, when it started from one. */
969
994
  base: e.string().max(40).optional(),
970
- light: z,
971
- dark: z,
972
- lettering: X,
973
- radius: e.enum(Qe),
974
- fonts: et.optional()
995
+ light: L,
996
+ dark: L,
997
+ lettering: Q,
998
+ radius: e.enum(ot),
999
+ fonts: it.optional()
975
1000
  });
976
1001
  e.object({
977
1002
  text: e.string().max(2e3)
978
1003
  });
979
- var tt = e.string().regex(/^[0-9a-f]{42}$/), at = e.union([e.literal("auto"), X]);
1004
+ var rt = e.string().regex(/^[0-9a-f]{42}$/), st = e.union([e.literal("auto"), Q]);
980
1005
  e.object({
981
1006
  revision: e.number().int().nonnegative(),
982
1007
  sentAt: e.number().int().nonnegative().optional(),
983
- document: G.optional(),
984
- shelf: Je.optional(),
985
- update: Xe.optional(),
986
- screen: e.object({ invert: e.boolean() }).optional(),
987
- palette: tt.optional(),
988
- font: at.optional()
1008
+ document: R.optional(),
1009
+ shelf: et.optional(),
1010
+ update: Qe.optional(),
1011
+ screen: e.object({ invert: e.boolean(), sleepMinutes: X.optional() }).optional(),
1012
+ palette: rt.optional(),
1013
+ font: st.optional(),
1014
+ hiddenApps: e.string().regex(/^([a-z]+(,[a-z]+)*)?$/).optional(),
1015
+ remote: e.array(nt).max(at).optional()
989
1016
  });
990
- var Mt = { inter: { family: "Inter", weight: 500, caps: !1 }, tay: { family: "TAY Dreamboat", weight: 400, caps: !0 } }, Nt = { inter: { 10: { 0: 6, 1: 4, 2: 6, 3: 6, 4: 7, 5: 6, 6: 6, 7: 6, 8: 6, 9: 6, " ": 3, "!": 3, '"': 5, "#": 6, $: 6, "%": 10, "&": 7, "'": 3, "(": 4, ")": 4, "*": 5, "+": 7, ",": 3, "-": 5, ".": 3, "/": 4, ":": 3, ";": 3, "<": 7, "=": 7, ">": 7, "?": 5, "@": 10, A: 7, B: 7, C: 7, D: 7, E: 6, F: 6, G: 7, H: 7, I: 3, J: 6, K: 7, L: 6, M: 9, N: 8, O: 8, P: 6, Q: 8, R: 6, S: 6, T: 7, U: 7, V: 7, W: 10, X: 7, Y: 7, Z: 6, "[": 4, "\\": 4, "]": 4, "^": 5, _: 5, "`": 3, a: 6, b: 6, c: 6, d: 6, e: 6, f: 4, g: 6, h: 6, i: 3, j: 3, k: 6, l: 3, m: 9, n: 6, o: 6, p: 6, q: 6, r: 4, s: 5, t: 3, u: 6, v: 6, w: 8, x: 6, y: 6, z: 6, "{": 4, "|": 3, "}": 4, "~": 7, " ": 3, "¡": 3, "¢": 6, "£": 6, "¥": 6, ª: 5, "«": 6, "¬": 7, "°": 5, "±": 7, "²": 4, µ: 6, "·": 3, º: 5, "»": 6, "¼": 8, "½": 9, "¿": 5, Ä: 7, Å: 7, Æ: 10, Ç: 7, É: 6, Ñ: 8, Ö: 8, Ü: 7, ß: 6, à: 6, á: 6, â: 6, ä: 6, å: 6, æ: 9, ç: 6, è: 6, é: 6, ê: 6, ë: 6, ì: 3, í: 3, î: 3, ï: 3, ñ: 6, ò: 6, ó: 6, ô: 6, ö: 6, "÷": 7, ù: 6, ú: 6, û: 6, ü: 6, ÿ: 6, ƒ: 5, Ω: 8, π: 5, "–": 5, "—": 10, "‘": 3, "’": 3, "“": 5, "”": 5, "−": 7, "√": 5, "∞": 7, "≈": 5, "≤": 5, "≥": 5 }, 12: { 0: 8, 1: 5, 2: 7, 3: 8, 4: 8, 5: 7, 6: 8, 7: 7, 8: 8, 9: 8, " ": 3, "!": 4, '"': 6, "#": 8, $: 8, "%": 12, "&": 8, "'": 4, "(": 4, ")": 4, "*": 6, "+": 8, ",": 4, "-": 6, ".": 4, "/": 4, ":": 4, ";": 4, "<": 8, "=": 8, ">": 8, "?": 6, "@": 12, A: 9, B: 8, C: 9, D: 9, E: 7, F: 7, G: 9, H: 9, I: 3, J: 7, K: 8, L: 7, M: 11, N: 9, O: 9, P: 8, Q: 9, R: 8, S: 8, T: 8, U: 9, V: 9, W: 12, X: 8, Y: 8, Z: 8, "[": 4, "\\": 4, "]": 4, "^": 6, _: 6, "`": 4, a: 7, b: 7, c: 7, d: 7, e: 7, f: 5, g: 7, h: 7, i: 3, j: 3, k: 7, l: 3, m: 11, n: 7, o: 7, p: 7, q: 7, r: 5, s: 6, t: 4, u: 7, v: 7, w: 10, x: 7, y: 7, z: 7, "{": 5, "|": 4, "}": 5, "~": 8, " ": 3, "¡": 4, "¢": 7, "£": 7, "¥": 7, ª: 5, "«": 7, "¬": 8, "°": 5, "±": 8, "²": 5, µ: 7, "·": 4, º: 6, "»": 7, "¼": 10, "½": 10, "¿": 6, Ä: 9, Å: 9, Æ: 12, Ç: 9, É: 7, Ñ: 9, Ö: 9, Ü: 9, ß: 8, à: 7, á: 7, â: 7, ä: 7, å: 7, æ: 11, ç: 7, è: 7, é: 7, ê: 7, ë: 7, ì: 3, í: 3, î: 3, ï: 3, ñ: 7, ò: 7, ó: 7, ô: 7, ö: 7, "÷": 8, ù: 7, ú: 7, û: 7, ü: 7, ÿ: 7, ƒ: 6, Ω: 9, π: 7, "–": 6, "—": 12, "‘": 3, "’": 3, "“": 6, "”": 6, "−": 8, "√": 7, "∞": 9, "≈": 7, "≤": 7, "≥": 7 }, 16: { 0: 10, 1: 7, 2: 10, 3: 10, 4: 11, 5: 10, 6: 10, 7: 9, 8: 10, 9: 10, " ": 4, "!": 5, '"': 8, "#": 10, $: 10, "%": 16, "&": 10, "'": 5, "(": 6, ")": 6, "*": 8, "+": 11, ",": 5, "-": 7, ".": 5, "/": 6, ":": 5, ";": 5, "<": 11, "=": 11, ">": 11, "?": 8, "@": 16, A: 11, B: 11, C: 12, D: 12, E: 10, F: 9, G: 12, H: 12, I: 4, J: 9, K: 11, L: 9, M: 15, N: 12, O: 12, P: 10, Q: 12, R: 10, S: 10, T: 10, U: 12, V: 11, W: 16, X: 11, Y: 11, Z: 10, "[": 6, "\\": 6, "]": 6, "^": 8, _: 7, "`": 5, a: 9, b: 10, c: 9, d: 10, e: 9, f: 6, g: 10, h: 10, i: 4, j: 4, k: 9, l: 4, m: 14, n: 10, o: 10, p: 10, q: 10, r: 6, s: 9, t: 5, u: 10, v: 9, w: 13, x: 9, y: 9, z: 9, "{": 7, "|": 6, "}": 7, "~": 11, " ": 4, "¡": 5, "¢": 9, "£": 10, "¥": 9, ª: 7, "«": 10, "¬": 11, "°": 7, "±": 11, "²": 7, µ: 10, "·": 5, º: 8, "»": 10, "¼": 13, "½": 14, "¿": 8, Ä: 11, Å: 11, Æ: 16, Ç: 12, É: 10, Ñ: 12, Ö: 12, Ü: 12, ß: 10, à: 9, á: 9, â: 9, ä: 9, å: 9, æ: 15, ç: 9, è: 9, é: 9, ê: 9, ë: 9, ì: 4, í: 4, î: 4, ï: 4, ñ: 10, ò: 10, ó: 10, ô: 10, ö: 10, "÷": 11, ù: 10, ú: 10, û: 10, ü: 10, ÿ: 9, ƒ: 8, Ω: 12, π: 9, "–": 8, "—": 16, "‘": 4, "’": 4, "“": 8, "”": 8, "−": 11, "√": 9, "∞": 11, "≈": 9, "≤": 9, "≥": 9 }, 20: { 0: 13, 1: 8, 2: 12, 3: 13, 4: 13, 5: 12, 6: 13, 7: 11, 8: 13, 9: 13, " ": 5, "!": 6, '"': 10, "#": 13, $: 13, "%": 20, "&": 13, "'": 6, "(": 7, ")": 7, "*": 10, "+": 13, ",": 6, "-": 9, ".": 6, "/": 7, ":": 6, ";": 6, "<": 13, "=": 13, ">": 13, "?": 11, "@": 20, A: 14, B: 13, C: 15, D: 14, E: 12, F: 12, G: 15, H: 15, I: 5, J: 12, K: 14, L: 11, M: 18, N: 15, O: 15, P: 13, Q: 15, R: 13, S: 13, T: 13, U: 15, V: 14, W: 20, X: 14, Y: 14, Z: 13, "[": 7, "\\": 7, "]": 7, "^": 10, _: 9, "`": 7, a: 11, b: 12, c: 12, d: 12, e: 12, f: 8, g: 12, h: 12, i: 5, j: 5, k: 11, l: 5, m: 18, n: 12, o: 12, p: 12, q: 12, r: 8, s: 11, t: 7, u: 12, v: 11, w: 17, x: 11, y: 12, z: 11, "{": 9, "|": 7, "}": 9, "~": 13, " ": 5, "¡": 6, "¢": 12, "£": 12, "¥": 11, ª: 9, "«": 12, "¬": 13, "°": 9, "±": 13, "²": 9, µ: 12, "·": 6, º: 10, "»": 12, "¼": 16, "½": 17, "¿": 11, Ä: 14, Å: 14, Æ: 20, Ç: 15, É: 12, Ñ: 15, Ö: 15, Ü: 15, ß: 13, à: 11, á: 11, â: 11, ä: 11, å: 11, æ: 18, ç: 12, è: 12, é: 12, ê: 12, ë: 12, ì: 5, í: 5, î: 5, ï: 5, ñ: 12, ò: 12, ó: 12, ô: 12, ö: 12, "÷": 13, ù: 12, ú: 12, û: 12, ü: 12, ÿ: 12, ƒ: 10, Ω: 15, π: 11, "–": 10, "—": 20, "‘": 6, "’": 6, "“": 9, "”": 9, "−": 13, "√": 11, "∞": 14, "≈": 11, "≤": 11, "≥": 11 }, 28: { 0: 18, 1: 12, 2: 17, 3: 18, 4: 18, 5: 17, 6: 18, 7: 16, 8: 18, 9: 18, " ": 7, "!": 9, '"': 14, "#": 18, $: 18, "%": 28, "&": 18, "'": 9, "(": 10, ")": 10, "*": 15, "+": 19, ",": 8, "-": 13, ".": 8, "/": 10, ":": 8, ";": 9, "<": 19, "=": 19, ">": 19, "?": 15, "@": 28, A: 20, B: 18, C: 21, D: 20, E: 17, F: 17, G: 21, H: 21, I: 8, J: 16, K: 19, L: 16, M: 26, N: 21, O: 21, P: 18, Q: 22, R: 18, S: 18, T: 18, U: 21, V: 20, W: 28, X: 20, Y: 19, Z: 18, "[": 10, "\\": 10, "]": 10, "^": 13, _: 13, "`": 9, a: 16, b: 17, c: 16, d: 17, e: 16, f: 11, g: 17, h: 17, i: 7, j: 7, k: 16, l: 7, m: 25, n: 17, o: 17, p: 17, q: 17, r: 11, s: 15, t: 10, u: 17, v: 16, w: 23, x: 16, y: 16, z: 16, "{": 12, "|": 10, "}": 12, "~": 19, " ": 7, "¡": 9, "¢": 16, "£": 17, "¥": 16, ª: 13, "«": 17, "¬": 19, "°": 13, "±": 19, "²": 13, µ: 17, "·": 8, º: 14, "»": 17, "¼": 23, "½": 24, "¿": 15, Ä: 20, Å: 20, Æ: 28, Ç: 21, É: 17, Ñ: 21, Ö: 21, Ü: 21, ß: 18, à: 16, á: 16, â: 16, ä: 16, å: 16, æ: 26, ç: 16, è: 16, é: 16, ê: 16, ë: 16, ì: 7, í: 7, î: 7, ï: 7, ñ: 17, ò: 17, ó: 17, ô: 17, ö: 17, "÷": 19, ù: 17, ú: 17, û: 17, ü: 17, ÿ: 16, ƒ: 14, Ω: 22, π: 15, "–": 14, "—": 28, "‘": 8, "’": 8, "“": 13, "”": 13, "−": 19, "√": 15, "∞": 20, "≈": 15, "≤": 15, "≥": 15 }, 56: { 0: 36, 1: 23, 2: 35, 3: 35, 4: 37, 5: 34, 6: 35, 7: 32, 8: 35, 9: 35, " ": 15, "!": 17, '"': 28, "#": 36, $: 36, "%": 56, "&": 37, "'": 18, "(": 21, ")": 21, "*": 29, "+": 37, ",": 17, "-": 26, ".": 17, "/": 21, ":": 17, ";": 18, "<": 37, "=": 37, ">": 37, "?": 30, "@": 55, A: 40, B: 37, C: 41, D: 40, E: 34, F: 33, G: 42, H: 42, I: 15, J: 32, K: 39, L: 32, M: 51, N: 42, O: 43, P: 36, Q: 43, R: 36, S: 36, T: 37, U: 41, V: 40, W: 56, X: 39, Y: 39, Z: 36, "[": 21, "\\": 21, "]": 21, "^": 27, _: 26, "`": 19, a: 32, b: 35, c: 32, d: 35, e: 33, f: 21, g: 35, h: 34, i: 14, j: 14, k: 31, l: 14, m: 50, n: 34, o: 34, p: 35, q: 35, r: 22, s: 30, t: 19, u: 34, v: 32, w: 46, x: 31, y: 32, z: 31, "{": 25, "|": 19, "}": 25, "~": 37, "°": 26 } }, tay: { 28: { 0: 29, 1: 16, 2: 28, 3: 28, 4: 30, 5: 27, 6: 28, 7: 26, 8: 29, 9: 29, " ": 12, "!": 16, '"': 12, "#": 27, $: 27, "%": 29, "&": 33, "'": 9, "(": 20, ")": 20, "*": 14, "+": 21, ",": 10, "-": 16, ".": 10, "/": 19, ":": 13, ";": 12, "<": 18, "=": 22, ">": 18, "?": 27, "@": 31, A: 28, B: 32, C: 28, D: 30, E: 30, F: 29, G: 29, H: 32, I: 16, J: 27, K: 29, L: 27, M: 36, N: 32, O: 29, P: 30, Q: 30, R: 30, S: 29, T: 31, U: 29, V: 28, W: 40, X: 29, Y: 29, Z: 30, "[": 17, "\\": 19, "]": 17, "^": 13, _: 19, "`": 9, "{": 13, "|": 6, "}": 13, "~": 15, " ": 8, "¡": 15, "¢": 14, "£": 26, "¥": 31, ª: 8, "«": 14, "¬": 16, "°": 14, "±": 15, "²": 8, "·": 7, º: 9, "»": 14, "¼": 21, "½": 21, "¿": 26, Ä: 28, Å: 28, Æ: 25, Ç: 28, É: 30, Ñ: 32, Ö: 29, Ü: 29, "÷": 15, Ω: 22, "–": 14, "—": 28, "‘": 9, "’": 9, "“": 12, "”": 12, "−": 16, "√": 15, "∞": 20, "≈": 15, "≤": 15, "≥": 15 }, 56: { 0: 58, 1: 33, 2: 56, 3: 57, 4: 60, 5: 55, 6: 57, 7: 51, 8: 58, 9: 59, " ": 24, "!": 32, '"': 23, "#": 55, $: 55, "%": 59, "&": 66, "'": 18, "(": 39, ")": 39, "*": 28, "+": 43, ",": 20, "-": 31, ".": 20, "/": 38, ":": 26, ";": 23, "<": 37, "=": 44, ">": 37, "?": 54, "@": 61, A: 56, B: 63, C: 56, D: 60, E: 60, F: 58, G: 58, H: 63, I: 33, J: 55, K: 58, L: 53, M: 72, N: 65, O: 59, P: 60, Q: 59, R: 61, S: 58, T: 62, U: 58, V: 56, W: 79, X: 58, Y: 58, Z: 59, "[": 34, "\\": 38, "]": 34, "^": 26, _: 39, "`": 19, "{": 27, "|": 11, "}": 27, "~": 30, "°": 27 } } };
1017
+ var Lt = { inter: { family: "Inter", weight: 500, caps: !1 }, tay: { family: "TAY Dreamboat", weight: 400, caps: !0 } }, Vt = { inter: { 10: { 0: 6, 1: 4, 2: 6, 3: 6, 4: 7, 5: 6, 6: 6, 7: 6, 8: 6, 9: 6, " ": 3, "!": 3, '"': 5, "#": 6, $: 6, "%": 10, "&": 7, "'": 3, "(": 4, ")": 4, "*": 5, "+": 7, ",": 3, "-": 5, ".": 3, "/": 4, ":": 3, ";": 3, "<": 7, "=": 7, ">": 7, "?": 5, "@": 10, A: 7, B: 7, C: 7, D: 7, E: 6, F: 6, G: 7, H: 7, I: 3, J: 6, K: 7, L: 6, M: 9, N: 8, O: 8, P: 6, Q: 8, R: 6, S: 6, T: 7, U: 7, V: 7, W: 10, X: 7, Y: 7, Z: 6, "[": 4, "\\": 4, "]": 4, "^": 5, _: 5, "`": 3, a: 6, b: 6, c: 6, d: 6, e: 6, f: 4, g: 6, h: 6, i: 3, j: 3, k: 6, l: 3, m: 9, n: 6, o: 6, p: 6, q: 6, r: 4, s: 5, t: 3, u: 6, v: 6, w: 8, x: 6, y: 6, z: 6, "{": 4, "|": 3, "}": 4, "~": 7, " ": 3, "¡": 3, "¢": 6, "£": 6, "¥": 6, ª: 5, "«": 6, "¬": 7, "°": 5, "±": 7, "²": 4, µ: 6, "·": 3, º: 5, "»": 6, "¼": 8, "½": 9, "¿": 5, Ä: 7, Å: 7, Æ: 10, Ç: 7, É: 6, Ñ: 8, Ö: 8, Ü: 7, ß: 6, à: 6, á: 6, â: 6, ä: 6, å: 6, æ: 9, ç: 6, è: 6, é: 6, ê: 6, ë: 6, ì: 3, í: 3, î: 3, ï: 3, ñ: 6, ò: 6, ó: 6, ô: 6, ö: 6, "÷": 7, ù: 6, ú: 6, û: 6, ü: 6, ÿ: 6, ƒ: 5, Ω: 8, π: 5, "–": 5, "—": 10, "‘": 3, "’": 3, "“": 5, "”": 5, "−": 7, "√": 5, "∞": 7, "≈": 5, "≤": 5, "≥": 5 }, 12: { 0: 8, 1: 5, 2: 7, 3: 8, 4: 8, 5: 7, 6: 8, 7: 7, 8: 8, 9: 8, " ": 3, "!": 4, '"': 6, "#": 8, $: 8, "%": 12, "&": 8, "'": 4, "(": 4, ")": 4, "*": 6, "+": 8, ",": 4, "-": 6, ".": 4, "/": 4, ":": 4, ";": 4, "<": 8, "=": 8, ">": 8, "?": 6, "@": 12, A: 9, B: 8, C: 9, D: 9, E: 7, F: 7, G: 9, H: 9, I: 3, J: 7, K: 8, L: 7, M: 11, N: 9, O: 9, P: 8, Q: 9, R: 8, S: 8, T: 8, U: 9, V: 9, W: 12, X: 8, Y: 8, Z: 8, "[": 4, "\\": 4, "]": 4, "^": 6, _: 6, "`": 4, a: 7, b: 7, c: 7, d: 7, e: 7, f: 5, g: 7, h: 7, i: 3, j: 3, k: 7, l: 3, m: 11, n: 7, o: 7, p: 7, q: 7, r: 5, s: 6, t: 4, u: 7, v: 7, w: 10, x: 7, y: 7, z: 7, "{": 5, "|": 4, "}": 5, "~": 8, " ": 3, "¡": 4, "¢": 7, "£": 7, "¥": 7, ª: 5, "«": 7, "¬": 8, "°": 5, "±": 8, "²": 5, µ: 7, "·": 4, º: 6, "»": 7, "¼": 10, "½": 10, "¿": 6, Ä: 9, Å: 9, Æ: 12, Ç: 9, É: 7, Ñ: 9, Ö: 9, Ü: 9, ß: 8, à: 7, á: 7, â: 7, ä: 7, å: 7, æ: 11, ç: 7, è: 7, é: 7, ê: 7, ë: 7, ì: 3, í: 3, î: 3, ï: 3, ñ: 7, ò: 7, ó: 7, ô: 7, ö: 7, "÷": 8, ù: 7, ú: 7, û: 7, ü: 7, ÿ: 7, ƒ: 6, Ω: 9, π: 7, "–": 6, "—": 12, "‘": 3, "’": 3, "“": 6, "”": 6, "−": 8, "√": 7, "∞": 9, "≈": 7, "≤": 7, "≥": 7 }, 16: { 0: 10, 1: 7, 2: 10, 3: 10, 4: 11, 5: 10, 6: 10, 7: 9, 8: 10, 9: 10, " ": 4, "!": 5, '"': 8, "#": 10, $: 10, "%": 16, "&": 10, "'": 5, "(": 6, ")": 6, "*": 8, "+": 11, ",": 5, "-": 7, ".": 5, "/": 6, ":": 5, ";": 5, "<": 11, "=": 11, ">": 11, "?": 8, "@": 16, A: 11, B: 11, C: 12, D: 12, E: 10, F: 9, G: 12, H: 12, I: 4, J: 9, K: 11, L: 9, M: 15, N: 12, O: 12, P: 10, Q: 12, R: 10, S: 10, T: 10, U: 12, V: 11, W: 16, X: 11, Y: 11, Z: 10, "[": 6, "\\": 6, "]": 6, "^": 8, _: 7, "`": 5, a: 9, b: 10, c: 9, d: 10, e: 9, f: 6, g: 10, h: 10, i: 4, j: 4, k: 9, l: 4, m: 14, n: 10, o: 10, p: 10, q: 10, r: 6, s: 9, t: 5, u: 10, v: 9, w: 13, x: 9, y: 9, z: 9, "{": 7, "|": 6, "}": 7, "~": 11, " ": 4, "¡": 5, "¢": 9, "£": 10, "¥": 9, ª: 7, "«": 10, "¬": 11, "°": 7, "±": 11, "²": 7, µ: 10, "·": 5, º: 8, "»": 10, "¼": 13, "½": 14, "¿": 8, Ä: 11, Å: 11, Æ: 16, Ç: 12, É: 10, Ñ: 12, Ö: 12, Ü: 12, ß: 10, à: 9, á: 9, â: 9, ä: 9, å: 9, æ: 15, ç: 9, è: 9, é: 9, ê: 9, ë: 9, ì: 4, í: 4, î: 4, ï: 4, ñ: 10, ò: 10, ó: 10, ô: 10, ö: 10, "÷": 11, ù: 10, ú: 10, û: 10, ü: 10, ÿ: 9, ƒ: 8, Ω: 12, π: 9, "–": 8, "—": 16, "‘": 4, "’": 4, "“": 8, "”": 8, "−": 11, "√": 9, "∞": 11, "≈": 9, "≤": 9, "≥": 9 }, 20: { 0: 13, 1: 8, 2: 12, 3: 13, 4: 13, 5: 12, 6: 13, 7: 11, 8: 13, 9: 13, " ": 5, "!": 6, '"': 10, "#": 13, $: 13, "%": 20, "&": 13, "'": 6, "(": 7, ")": 7, "*": 10, "+": 13, ",": 6, "-": 9, ".": 6, "/": 7, ":": 6, ";": 6, "<": 13, "=": 13, ">": 13, "?": 11, "@": 20, A: 14, B: 13, C: 15, D: 14, E: 12, F: 12, G: 15, H: 15, I: 5, J: 12, K: 14, L: 11, M: 18, N: 15, O: 15, P: 13, Q: 15, R: 13, S: 13, T: 13, U: 15, V: 14, W: 20, X: 14, Y: 14, Z: 13, "[": 7, "\\": 7, "]": 7, "^": 10, _: 9, "`": 7, a: 11, b: 12, c: 12, d: 12, e: 12, f: 8, g: 12, h: 12, i: 5, j: 5, k: 11, l: 5, m: 18, n: 12, o: 12, p: 12, q: 12, r: 8, s: 11, t: 7, u: 12, v: 11, w: 17, x: 11, y: 12, z: 11, "{": 9, "|": 7, "}": 9, "~": 13, " ": 5, "¡": 6, "¢": 12, "£": 12, "¥": 11, ª: 9, "«": 12, "¬": 13, "°": 9, "±": 13, "²": 9, µ: 12, "·": 6, º: 10, "»": 12, "¼": 16, "½": 17, "¿": 11, Ä: 14, Å: 14, Æ: 20, Ç: 15, É: 12, Ñ: 15, Ö: 15, Ü: 15, ß: 13, à: 11, á: 11, â: 11, ä: 11, å: 11, æ: 18, ç: 12, è: 12, é: 12, ê: 12, ë: 12, ì: 5, í: 5, î: 5, ï: 5, ñ: 12, ò: 12, ó: 12, ô: 12, ö: 12, "÷": 13, ù: 12, ú: 12, û: 12, ü: 12, ÿ: 12, ƒ: 10, Ω: 15, π: 11, "–": 10, "—": 20, "‘": 6, "’": 6, "“": 9, "”": 9, "−": 13, "√": 11, "∞": 14, "≈": 11, "≤": 11, "≥": 11 }, 28: { 0: 18, 1: 12, 2: 17, 3: 18, 4: 18, 5: 17, 6: 18, 7: 16, 8: 18, 9: 18, " ": 7, "!": 9, '"': 14, "#": 18, $: 18, "%": 28, "&": 18, "'": 9, "(": 10, ")": 10, "*": 15, "+": 19, ",": 8, "-": 13, ".": 8, "/": 10, ":": 8, ";": 9, "<": 19, "=": 19, ">": 19, "?": 15, "@": 28, A: 20, B: 18, C: 21, D: 20, E: 17, F: 17, G: 21, H: 21, I: 8, J: 16, K: 19, L: 16, M: 26, N: 21, O: 21, P: 18, Q: 22, R: 18, S: 18, T: 18, U: 21, V: 20, W: 28, X: 20, Y: 19, Z: 18, "[": 10, "\\": 10, "]": 10, "^": 13, _: 13, "`": 9, a: 16, b: 17, c: 16, d: 17, e: 16, f: 11, g: 17, h: 17, i: 7, j: 7, k: 16, l: 7, m: 25, n: 17, o: 17, p: 17, q: 17, r: 11, s: 15, t: 10, u: 17, v: 16, w: 23, x: 16, y: 16, z: 16, "{": 12, "|": 10, "}": 12, "~": 19, " ": 7, "¡": 9, "¢": 16, "£": 17, "¥": 16, ª: 13, "«": 17, "¬": 19, "°": 13, "±": 19, "²": 13, µ: 17, "·": 8, º: 14, "»": 17, "¼": 23, "½": 24, "¿": 15, Ä: 20, Å: 20, Æ: 28, Ç: 21, É: 17, Ñ: 21, Ö: 21, Ü: 21, ß: 18, à: 16, á: 16, â: 16, ä: 16, å: 16, æ: 26, ç: 16, è: 16, é: 16, ê: 16, ë: 16, ì: 7, í: 7, î: 7, ï: 7, ñ: 17, ò: 17, ó: 17, ô: 17, ö: 17, "÷": 19, ù: 17, ú: 17, û: 17, ü: 17, ÿ: 16, ƒ: 14, Ω: 22, π: 15, "–": 14, "—": 28, "‘": 8, "’": 8, "“": 13, "”": 13, "−": 19, "√": 15, "∞": 20, "≈": 15, "≤": 15, "≥": 15 }, 56: { 0: 36, 1: 23, 2: 35, 3: 35, 4: 37, 5: 34, 6: 35, 7: 32, 8: 35, 9: 35, " ": 15, "!": 17, '"': 28, "#": 36, $: 36, "%": 56, "&": 37, "'": 18, "(": 21, ")": 21, "*": 29, "+": 37, ",": 17, "-": 26, ".": 17, "/": 21, ":": 17, ";": 18, "<": 37, "=": 37, ">": 37, "?": 30, "@": 55, A: 40, B: 37, C: 41, D: 40, E: 34, F: 33, G: 42, H: 42, I: 15, J: 32, K: 39, L: 32, M: 51, N: 42, O: 43, P: 36, Q: 43, R: 36, S: 36, T: 37, U: 41, V: 40, W: 56, X: 39, Y: 39, Z: 36, "[": 21, "\\": 21, "]": 21, "^": 27, _: 26, "`": 19, a: 32, b: 35, c: 32, d: 35, e: 33, f: 21, g: 35, h: 34, i: 14, j: 14, k: 31, l: 14, m: 50, n: 34, o: 34, p: 35, q: 35, r: 22, s: 30, t: 19, u: 34, v: 32, w: 46, x: 31, y: 32, z: 31, "{": 25, "|": 19, "}": 25, "~": 37, "°": 26 } }, tay: { 28: { 0: 29, 1: 16, 2: 28, 3: 28, 4: 30, 5: 27, 6: 28, 7: 26, 8: 29, 9: 29, " ": 12, "!": 16, '"': 12, "#": 27, $: 27, "%": 29, "&": 33, "'": 9, "(": 20, ")": 20, "*": 14, "+": 21, ",": 10, "-": 16, ".": 10, "/": 19, ":": 13, ";": 12, "<": 18, "=": 22, ">": 18, "?": 27, "@": 31, A: 28, B: 32, C: 28, D: 30, E: 30, F: 29, G: 29, H: 32, I: 16, J: 27, K: 29, L: 27, M: 36, N: 32, O: 29, P: 30, Q: 30, R: 30, S: 29, T: 31, U: 29, V: 28, W: 40, X: 29, Y: 29, Z: 30, "[": 17, "\\": 19, "]": 17, "^": 13, _: 19, "`": 9, "{": 13, "|": 6, "}": 13, "~": 15, " ": 8, "¡": 15, "¢": 14, "£": 26, "¥": 31, ª: 8, "«": 14, "¬": 16, "°": 14, "±": 15, "²": 8, "·": 7, º: 9, "»": 14, "¼": 21, "½": 21, "¿": 26, Ä: 28, Å: 28, Æ: 25, Ç: 28, É: 30, Ñ: 32, Ö: 29, Ü: 29, "÷": 15, Ω: 22, "–": 14, "—": 28, "‘": 9, "’": 9, "“": 12, "”": 12, "−": 16, "√": 15, "∞": 20, "≈": 15, "≤": 15, "≥": 15 }, 56: { 0: 58, 1: 33, 2: 56, 3: 57, 4: 60, 5: 55, 6: 57, 7: 51, 8: 58, 9: 59, " ": 24, "!": 32, '"': 23, "#": 55, $: 55, "%": 59, "&": 66, "'": 18, "(": 39, ")": 39, "*": 28, "+": 43, ",": 20, "-": 31, ".": 20, "/": 38, ":": 26, ";": 23, "<": 37, "=": 44, ">": 37, "?": 54, "@": 61, A: 56, B: 63, C: 56, D: 60, E: 60, F: 58, G: 58, H: 63, I: 33, J: 55, K: 58, L: 53, M: 72, N: 65, O: 59, P: 60, Q: 59, R: 61, S: 58, T: 62, U: 58, V: 56, W: 79, X: 58, Y: 58, Z: 59, "[": 34, "\\": 38, "]": 34, "^": 26, _: 39, "`": 19, "{": 27, "|": 11, "}": 27, "~": 30, "°": 27 } } };
991
1018
  e.object({
992
1019
  deviceId: e.string().min(1, "Device ID is required"),
993
1020
  timeRange: e.enum(["1h", "24h", "7d"], {
@@ -997,17 +1024,17 @@ e.object({
997
1024
  e.enum(["temperature", "humidity", "vwc", "ec", "ph", "pressure", "co2"])
998
1025
  ).min(1, "At least one metric is required").max(4, "Maximum 4 metrics per graph")
999
1026
  });
1000
- var j = "gemini-2.5-flash", nt = "gemini-2.5-flash", ot = "gemini-2.5-pro", Pt = {
1027
+ var j = "gemini-2.5-flash", lt = "gemini-2.5-flash", ut = "gemini-2.5-pro", Ht = {
1001
1028
  "google-gemini": "gemini-2.5-flash",
1002
1029
  openai: "gpt-4o-mini",
1003
1030
  anthropic: "claude-haiku-4-5-20251001",
1004
1031
  grok: "grok-2-1212",
1005
1032
  deepseek: "deepseek-chat",
1006
1033
  ollama: "llama3.3"
1007
- }, $t = {
1034
+ }, Ut = {
1008
1035
  /** The Strategist: high creativity, exploratory conversation */
1009
1036
  STRATEGIST: {
1010
- model: nt,
1037
+ model: lt,
1011
1038
  provider: "google-gemini",
1012
1039
  temperature: 0.7
1013
1040
  },
@@ -1027,7 +1054,7 @@ var j = "gemini-2.5-flash", nt = "gemini-2.5-flash", ot = "gemini-2.5-pro", Pt =
1027
1054
  * Uses the Pro tier for superior reasoning on complex structured tasks.
1028
1055
  */
1029
1056
  REVIEWER: {
1030
- model: ot,
1057
+ model: ut,
1031
1058
  provider: "google-gemini",
1032
1059
  temperature: 0.2
1033
1060
  },
@@ -1037,7 +1064,7 @@ var j = "gemini-2.5-flash", nt = "gemini-2.5-flash", ot = "gemini-2.5-pro", Pt =
1037
1064
  provider: "google-gemini",
1038
1065
  temperature: 0.2
1039
1066
  }
1040
- }, zt = `
1067
+ }, Kt = `
1041
1068
  You write tiny apps for a small desk device whose screen is 320 pixels wide and
1042
1069
  240 pixels high — landscape.
1043
1070
 
@@ -1200,10 +1227,10 @@ RULES
1200
1227
  closest thing it can and do not invent a component.
1201
1228
  6. Prefer a rule over a fixed colour whenever the request ties appearance to a
1202
1229
  value. "Red when cold" is a rule; "red" is not.
1203
- `.trim(), Lt = "Here is the current app. Change only what is asked:", o = e.string().regex(
1230
+ `.trim(), Wt = "Here is the current app. Change only what is asked:", o = e.string().regex(
1204
1231
  /^\d{1,3}\s+\d{1,3}\s+\d{1,3}$/,
1205
1232
  'Must be space-separated RGB integers (e.g. "13 110 253")'
1206
- ), it = e.object({
1233
+ ), mt = e.object({
1207
1234
  // ── Core Brand ───────────────────────────────────────────────────────────
1208
1235
  "--app-primary-color": o.optional(),
1209
1236
  "--app-primary-foreground-color": o.optional(),
@@ -1234,7 +1261,7 @@ RULES
1234
1261
  "--app-chart-3": o.optional(),
1235
1262
  "--app-chart-4": o.optional(),
1236
1263
  "--app-chart-5": o.optional()
1237
- }).strict(), rt = e.object({
1264
+ }).strict(), ct = e.object({
1238
1265
  /** Google Font name for headings (h1–h4, .font-serif). Example: "Playfair Display" */
1239
1266
  heading: e.string(),
1240
1267
  /** Google Font name for body text. Example: "Inter" */
@@ -1248,13 +1275,13 @@ e.object({
1248
1275
  /** One-sentence vibe description. Example: "Dark indigo with golden accents." */
1249
1276
  description: e.string(),
1250
1277
  /** Google Font pairing for heading and body text. */
1251
- fonts: rt.optional(),
1278
+ fonts: ct.optional(),
1252
1279
  /**
1253
1280
  * CSS variable overrides.
1254
1281
  * Every key must match an --app-* variable name.
1255
1282
  * All color values must be space-separated RGB integers.
1256
1283
  */
1257
- cssVars: it
1284
+ cssVars: mt
1258
1285
  });
1259
1286
  e.object({
1260
1287
  primary: o,
@@ -1264,14 +1291,14 @@ e.object({
1264
1291
  destructive: o,
1265
1292
  radius: e.enum(["none", "sm", "md", "lg", "full"])
1266
1293
  });
1267
- var Vt = {
1294
+ var Gt = {
1268
1295
  primary: "13 110 253",
1269
1296
  neutral: "24 24 27",
1270
1297
  success: "34 197 94",
1271
1298
  warning: "234 179 8",
1272
1299
  destructive: "239 68 68",
1273
1300
  radius: "md"
1274
- }, p = e.number().finite(), r = p.positive(), g = p.nonnegative(), st = e.object({
1301
+ }, h = e.number().finite(), r = h.positive(), g = h.nonnegative(), dt = e.object({
1275
1302
  name: e.string().min(1).default("Bambu Lab X1 Carbon"),
1276
1303
  /** Walls are whole multiples of this. */
1277
1304
  nozzle: r.default(0.4),
@@ -1279,19 +1306,19 @@ var Vt = {
1279
1306
  clearance_slip: g.default(0.2),
1280
1307
  /** Gap for a friction fit. */
1281
1308
  clearance_press: g.default(0.1)
1282
- }), lt = e.enum(["east", "west", "north", "south", "top", "bottom"]), ut = e.object({
1309
+ }), pt = e.enum(["east", "west", "north", "south", "top", "bottom"]), ht = e.object({
1283
1310
  /** The tongue's length, from its free end to where it joins the floor. */
1284
1311
  length: r.default(12),
1285
1312
  /** Its width. */
1286
1313
  width: r.default(5),
1287
1314
  /** The way from the switch to where the tongue joins the floor. */
1288
1315
  hinge: e.enum(["east", "west", "north", "south"])
1289
- }), mt = e.object({
1316
+ }), xt = e.object({
1290
1317
  /** usb_c, screen, reset_button, status_led, sd_card… */
1291
1318
  name: e.string().min(1),
1292
- edge: lt,
1319
+ edge: pt,
1293
1320
  /** From the centre of that face — see COORDINATES above. */
1294
- offset_from_center: e.tuple([p, p]).default([0, 0]),
1321
+ offset_from_center: e.tuple([h, h]).default([0, 0]),
1295
1322
  /**
1296
1323
  * A grille is a field of small round holes filling an ellipse of
1297
1324
  * `cutout_size` — a speaker's — on a top or bottom face only.
@@ -1304,7 +1331,7 @@ var Vt = {
1304
1331
  /** A wider recess on the outside face, [width, height, depth], for a thick cable boot. */
1305
1332
  outer_recess: e.tuple([r, r, r]).optional(),
1306
1333
  /** Press it through the floor instead of opening a hole — see FlexButtonSchema. */
1307
- flex_button: ut.optional(),
1334
+ flex_button: ht.optional(),
1308
1335
  /**
1309
1336
  * A 45° ramp this deep round the opening at the outside face, widening it
1310
1337
  * by this much a side there. For a screen set back behind a bezel: the
@@ -1312,25 +1339,25 @@ var Vt = {
1312
1339
  * openings only.
1313
1340
  */
1314
1341
  chamfer: g.optional()
1315
- }), ct = e.object({
1342
+ }), gt = e.object({
1316
1343
  /** Four holes, this far in from each corner: [east-west, north-south]. */
1317
1344
  inset_from_corners: e.tuple([r, r]).optional(),
1318
1345
  /** Or exactly where they are: [east, north] from the footprint centre. */
1319
- positions: e.array(e.tuple([p, p])).min(1).optional(),
1346
+ positions: e.array(e.tuple([h, h])).min(1).optional(),
1320
1347
  thread: e.enum(["M2", "M2.5", "M3"]),
1321
1348
  /** Heat-set insert outer diameter and depth. split_shell_lip only: tray_bezel's screws cut their own thread. */
1322
1349
  insert_od: r.optional(),
1323
1350
  insert_depth: r.optional()
1324
1351
  }).refine((a) => (a.inset_from_corners ? 1 : 0) + (a.positions ? 1 : 0) == 1, {
1325
1352
  message: "give either inset_from_corners or positions, not both or neither"
1326
- }), dt = e.object({
1353
+ }), bt = e.object({
1327
1354
  relative_to: e.string().min(1),
1328
1355
  where: e.enum(["below", "above", "east", "west", "north", "south"]),
1329
1356
  /** Space between the two keep-outs. */
1330
1357
  gap: g.default(1),
1331
1358
  /** Moved this far [east, north] from centred on the other, once placed. */
1332
- offset: e.tuple([p, p]).default([0, 0])
1333
- }), J = e.object({
1359
+ offset: e.tuple([h, h]).default([0, 0])
1360
+ }), ee = e.object({
1334
1361
  id: e.string().regex(/^[a-z][a-z0-9_]*$/, "lowercase letters, digits and underscores"),
1335
1362
  type: e.enum(["pcb", "display", "battery", "speaker", "module"]),
1336
1363
  /** [east, north, up] — see COORDINATES. */
@@ -1348,12 +1375,12 @@ var Vt = {
1348
1375
  clearance_z_bottom: g.default(0),
1349
1376
  /** Quarter turns about Z, applied before placement. */
1350
1377
  rotation: e.union([e.literal(0), e.literal(90), e.literal(180), e.literal(270)]).default(0),
1351
- placement: dt.optional(),
1352
- mount_holes: ct.optional(),
1353
- interfaces: e.array(mt).default([]),
1378
+ placement: bt.optional(),
1379
+ mount_holes: gt.optional(),
1380
+ interfaces: e.array(xt).default([]),
1354
1381
  /** How it is held if it has no screw holes. */
1355
1382
  retention: e.enum(["none", "cradle_ribs"]).default("none")
1356
- }), pt = e.object({
1383
+ }), ft = e.object({
1357
1384
  /** The SVG file, relative to the manifest. Filled paths only; strokes are ignored. */
1358
1385
  svg: e.string().min(1),
1359
1386
  face: e.enum(["top", "bottom"]).default("bottom"),
@@ -1362,7 +1389,7 @@ var Vt = {
1362
1389
  /** How deep it is pressed in. */
1363
1390
  depth: r.default(0.6),
1364
1391
  /** From the centre of the case's footprint, [east, north]. */
1365
- offset: e.tuple([p, p]).default([0, 0]),
1392
+ offset: e.tuple([h, h]).default([0, 0]),
1366
1393
  /**
1367
1394
  * Cut it right through the face instead, as a stencil — a speaker's grille
1368
1395
  * in the shape of the mark. Whatever its lines enclose would fall out, so
@@ -1373,7 +1400,7 @@ var Vt = {
1373
1400
  * check, by where it is.
1374
1401
  */
1375
1402
  stencil: e.object({
1376
- bridges: e.array(e.object({ at: e.tuple([p, p]), angle: e.number().default(0), length: r.default(3) })).default([])
1403
+ bridges: e.array(e.object({ at: e.tuple([h, h]), angle: e.number().default(0), length: r.default(3) })).default([])
1377
1404
  }).optional()
1378
1405
  });
1379
1406
  e.object({
@@ -1402,15 +1429,15 @@ e.object({
1402
1429
  size: r,
1403
1430
  soften: g.default(0)
1404
1431
  }).optional(),
1405
- printer: st.default({}),
1406
- components: e.array(J).min(1),
1407
- emblem: pt.optional()
1432
+ printer: dt.default({}),
1433
+ components: e.array(ee).min(1),
1434
+ emblem: ft.optional()
1408
1435
  }).superRefine((a, i) => {
1409
- const h = a.wall_thickness / a.printer.nozzle;
1410
- Math.abs(h - Math.round(h)) > 1e-6 && i.addIssue({
1436
+ const x = a.wall_thickness / a.printer.nozzle;
1437
+ Math.abs(x - Math.round(x)) > 1e-6 && i.addIssue({
1411
1438
  code: e.ZodIssueCode.custom,
1412
1439
  path: ["wall_thickness"],
1413
- message: `${a.wall_thickness}mm is not a whole number of ${a.printer.nozzle}mm lines — try ${(Math.round(h) * a.printer.nozzle).toFixed(2)}`
1440
+ message: `${a.wall_thickness}mm is not a whole number of ${a.printer.nozzle}mm lines — try ${(Math.round(x) * a.printer.nozzle).toFixed(2)}`
1414
1441
  });
1415
1442
  for (const [n, t] of Object.entries(a.walls)) {
1416
1443
  if (t === void 0) continue;
@@ -1452,24 +1479,24 @@ e.object({
1452
1479
  l.add(u.id);
1453
1480
  }
1454
1481
  }), a.components.forEach((n, t) => {
1455
- var M, N, P;
1482
+ var N, P, $;
1456
1483
  a.enclosure_style === "split_shell_lip" && n.mount_holes && (!n.mount_holes.insert_od || !n.mount_holes.insert_depth) && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "mount_holes"], message: "a split_shell_lip case holds boards on heat-set inserts: give insert_od and insert_depth" }), n.interfaces.forEach((c, A) => {
1457
1484
  c.chamfer && c.edge !== "top" && c.edge !== "bottom" && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "interfaces", A, "chamfer"], message: `a chamfer ramps an opening in the bezel or the floor: its edge must be top or bottom, not ${c.edge}` }), c.cutout_shape === "grille" && c.edge !== "top" && c.edge !== "bottom" && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "interfaces", A, "cutout_shape"], message: `a grille is a field of holes in the bezel or the floor: its edge must be top or bottom, not ${c.edge}` }), c.flex_button && c.edge !== "bottom" && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "interfaces", A, "flex_button"], message: `a flex button is pressed through the floor: its edge must be bottom, not ${c.edge}` });
1458
1485
  });
1459
1486
  const [s, l] = n.dimensions;
1460
- (N = (M = n.mount_holes) == null ? void 0 : M.positions) == null || N.forEach((c, A) => {
1487
+ (P = (N = n.mount_holes) == null ? void 0 : N.positions) == null || P.forEach((c, A) => {
1461
1488
  (Math.abs(c[0]) > s / 2 || Math.abs(c[1]) > l / 2) && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "mount_holes", "positions", A], message: `hole at [${c}] is outside the ${s}×${l} footprint` });
1462
1489
  });
1463
- const u = (P = n.mount_holes) == null ? void 0 : P.inset_from_corners;
1490
+ const u = ($ = n.mount_holes) == null ? void 0 : $.inset_from_corners;
1464
1491
  u && (u[0] * 2 >= s || u[1] * 2 >= l) && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "mount_holes", "inset_from_corners"], message: `insets [${u}] meet in the middle of a ${s}×${l} footprint` });
1465
1492
  });
1466
1493
  });
1467
- var ht = e.object({
1494
+ var vt = e.object({
1468
1495
  label: e.string().min(1),
1469
1496
  /** One sentence: what it is for. */
1470
1497
  description: e.string().optional(),
1471
1498
  /** Components added to the base manifest's. */
1472
- components: e.array(J).default([]),
1499
+ components: e.array(ee).default([]),
1473
1500
  /** Top-level manifest fields this choice sets: wall_thickness, emblem… */
1474
1501
  set: e.record(e.unknown()).default({}),
1475
1502
  /**
@@ -1479,16 +1506,16 @@ var ht = e.object({
1479
1506
  * clearance and widens its screen opening to the glass.
1480
1507
  */
1481
1508
  patch: e.record(e.record(e.unknown())).default({})
1482
- }), xt = e.object({
1509
+ }), yt = e.object({
1483
1510
  label: e.string().min(1),
1484
1511
  /** In order; the first is the default. Ids are lowercase words and dashes. */
1485
- choices: e.array(ht.extend({ id: e.string().regex(/^[a-z0-9][a-z0-9-]*$/) })).min(1)
1512
+ choices: e.array(vt.extend({ id: e.string().regex(/^[a-z0-9][a-z0-9-]*$/) })).min(1)
1486
1513
  });
1487
1514
  e.object({
1488
1515
  /** The base manifest, relative to this file. */
1489
1516
  manifest: e.string().min(1),
1490
1517
  /** Option groups, in the order they are offered: base, top… */
1491
- options: e.record(e.string().regex(/^[a-z][a-z0-9-]*$/), xt)
1518
+ options: e.record(e.string().regex(/^[a-z][a-z0-9-]*$/), yt)
1492
1519
  });
1493
1520
  e.object({
1494
1521
  id: e.string().default(""),
@@ -1501,7 +1528,7 @@ e.object({
1501
1528
  lastActive: e.string().optional(),
1502
1529
  avatarUrl: e.string().optional()
1503
1530
  });
1504
- var y = e.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits"), O = e.enum(["member", "admin"]), Q = e.enum(["active", "suspended"]), gt = e.object({
1531
+ var y = e.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits"), O = e.enum(["member", "admin"]), te = e.enum(["active", "suspended"]), wt = e.object({
1505
1532
  algo: e.literal("scrypt"),
1506
1533
  n: e.number().int().positive(),
1507
1534
  r: e.number().int().positive(),
@@ -1516,23 +1543,23 @@ e.object({
1516
1543
  email: e.string().email().max(254),
1517
1544
  name: e.string().min(1).max(64),
1518
1545
  role: O,
1519
- status: Q,
1520
- password: gt,
1546
+ status: te,
1547
+ password: wt,
1521
1548
  createdAt: e.number().int().nonnegative(),
1522
1549
  lastLoginAt: e.number().int().nonnegative().nullable().default(null),
1523
1550
  /** Which admin approved this, or null for the bootstrap account. */
1524
1551
  invitedBy: y.nullable().default(null)
1525
1552
  });
1526
- var V = 40;
1553
+ var H = 40;
1527
1554
  e.string().transform((a) => a.trim().replace(/\s+/g, " ")).pipe(
1528
- e.string().min(1, "Give a name.").max(V, `At most ${V} characters.`).refine((a) => !/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028-\u202e\u2066-\u2069]/.test(a), "Letters, numbers, spaces and punctuation only.")
1555
+ e.string().min(1, "Give a name.").max(H, `At most ${H} characters.`).refine((a) => !/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028-\u202e\u2066-\u2069]/.test(a), "Letters, numbers, spaces and punctuation only.")
1529
1556
  );
1530
1557
  e.object({
1531
1558
  accountId: y,
1532
1559
  email: e.string().email(),
1533
1560
  name: e.string(),
1534
1561
  role: O,
1535
- status: Q
1562
+ status: te
1536
1563
  });
1537
1564
  e.object({
1538
1565
  accountId: y,
@@ -1553,41 +1580,41 @@ e.object({
1553
1580
  /** Optional, and never shown publicly. Long enough to be useful, short enough not to be an essay. */
1554
1581
  reason: e.string().max(500).optional()
1555
1582
  });
1556
- var bt = e.enum(["pending", "approved", "denied"]);
1583
+ var At = e.enum(["pending", "approved", "denied"]);
1557
1584
  e.object({
1558
1585
  requestId: e.string().regex(/^req_[0-9a-f]{12}$/, "req_ and 12 hex digits"),
1559
1586
  email: e.string().email().max(254),
1560
1587
  name: e.string().min(1).max(64),
1561
1588
  reason: e.string().max(500).optional(),
1562
- status: bt,
1589
+ status: At,
1563
1590
  createdAt: e.number().int().nonnegative(),
1564
1591
  decidedAt: e.number().int().nonnegative().nullable().default(null),
1565
1592
  decidedBy: y.nullable().default(null)
1566
1593
  });
1567
- var ft = ["boards:read", "boards:send", "boards:configure"], ee = e.enum(ft), vt = [7, 30, 90, 365], yt = e.object({
1594
+ var Et = ["boards:read", "boards:send", "boards:configure", "apps:read", "apps:write"], ae = e.enum(Et), St = [7, 30, 90, 365], Ct = e.object({
1568
1595
  /** The first 12 hex digits of the hash: what the owner sees and revokes by. */
1569
1596
  tokenId: e.string().regex(/^[0-9a-f]{12}$/),
1570
1597
  accountId: y,
1571
1598
  /** What the owner called it: "laptop", "Claude Code". */
1572
1599
  name: e.string().trim().min(1).max(60),
1573
- scopes: e.array(ee).min(1),
1600
+ scopes: e.array(ae).min(1),
1574
1601
  createdAt: e.number().int().nonnegative(),
1575
1602
  expiresAt: e.number().int().nonnegative(),
1576
1603
  /** Moved forward at most once a day, so using a token is not a write per request. */
1577
1604
  lastUsedAt: e.number().int().nonnegative().nullable().default(null)
1578
1605
  });
1579
- yt.omit({ accountId: !0 });
1606
+ Ct.omit({ accountId: !0 });
1580
1607
  e.object({
1581
1608
  name: e.string().trim().min(1, "Give it a name.").max(60),
1582
- scopes: e.array(ee).min(1, "Choose at least one thing it can do."),
1583
- days: e.union(vt.map((a) => e.literal(a)))
1609
+ scopes: e.array(ae).min(1, "Choose at least one thing it can do."),
1610
+ days: e.union(St.map((a) => e.literal(a)))
1584
1611
  });
1585
- const wt = Date.UTC(2024, 0, 1), At = 24 * 60 * 60 * 1e3, Ht = (a, i, h) => i.map((m) => {
1586
- const b = m.at !== void 0 && m.at >= wt && m.at <= h + At ? m.at : h;
1612
+ const _t = Date.UTC(2024, 0, 1), Bt = 24 * 60 * 60 * 1e3, Zt = (a, i, x) => i.map((m) => {
1613
+ const b = m.at !== void 0 && m.at >= _t && m.at <= x + Bt ? m.at : x;
1587
1614
  return {
1588
1615
  id: `${a}:${m.key}`,
1589
1616
  source: "http",
1590
- domain: ge.ENVIRONMENT,
1617
+ domain: fe.ENVIRONMENT,
1591
1618
  key: m.key,
1592
1619
  value: m.value,
1593
1620
  ...m.unit ? { unit: m.unit } : {},
@@ -1595,40 +1622,40 @@ const wt = Date.UTC(2024, 0, 1), At = 24 * 60 * 60 * 1e3, Ht = (a, i, h) => i.ma
1595
1622
  };
1596
1623
  });
1597
1624
  export {
1598
- $t as A,
1599
- me as B,
1600
- nt as D,
1601
- re as E,
1602
- ne as F,
1603
- Bt as I,
1604
- ce as P,
1605
- oe as R,
1606
- xe as S,
1607
- se as T,
1608
- ue as W,
1625
+ Ut as A,
1626
+ de as B,
1627
+ lt as D,
1628
+ le as E,
1629
+ ie as F,
1630
+ Dt as I,
1631
+ pe as P,
1632
+ re as R,
1633
+ be as S,
1634
+ ue as T,
1635
+ ce as W,
1609
1636
  j as a,
1610
- zt as b,
1611
- Lt as c,
1612
- Ht as d,
1613
- G as e,
1614
- le as f,
1615
- de as g,
1616
- St as h,
1617
- ge as i,
1618
- Pt as j,
1619
- $ as k,
1620
- _t as l,
1637
+ Kt as b,
1638
+ Wt as c,
1639
+ Zt as d,
1640
+ R as e,
1641
+ me as f,
1642
+ he as g,
1643
+ kt as h,
1644
+ fe as i,
1645
+ Ht as j,
1646
+ z as k,
1647
+ It as l,
1621
1648
  F as m,
1622
- Vt as n,
1623
- Dt as o,
1624
- jt as p,
1625
- kt as q,
1626
- It as r,
1627
- Mt as s,
1628
- Ft as t,
1629
- Ot as u,
1630
- Tt as v,
1631
- Rt as w,
1632
- Nt as x,
1633
- Ct as y
1649
+ Gt as n,
1650
+ Nt as o,
1651
+ Mt as p,
1652
+ Rt as q,
1653
+ Ot as r,
1654
+ Lt as s,
1655
+ Tt as t,
1656
+ zt as u,
1657
+ Pt as v,
1658
+ $t as w,
1659
+ Vt as x,
1660
+ jt as y
1634
1661
  };