@ramme-io/shared 3.7.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -166,8 +166,10 @@ var SIGNAL_DOMAINS = {
166
166
  // Track C — latency, uptime, queue depth
167
167
  USER_BEHAVIOR: "user_behavior",
168
168
  // Track D — engagement, conversion, NPS
169
- LOGIC: "logic"
169
+ LOGIC: "logic",
170
170
  // Derived — Methodology Engine outputs
171
+ ENVIRONMENT: "environment"
172
+ // A device's surroundings — temperature, humidity, light
171
173
  };
172
174
 
173
175
  // src/signals/base.schema.ts
@@ -458,7 +460,30 @@ var AppSourceSchema = z6.discriminatedUnion("kind", [
458
460
  z6.object({
459
461
  kind: z6.literal("cycle"),
460
462
  count: z6.number().int().min(2).max(12),
461
- minutes: z6.number().int().min(1).max(1440).default(5)
463
+ minutes: z6.number().int().min(1).max(1440).default(5),
464
+ /**
465
+ * A turn shorter than a minute — a slideshow at 5, 15 or 30 seconds. Wins
466
+ * over `minutes` where it is given; `minutes` stays the nearest whole
467
+ * minute, so a board whose firmware predates this still takes turns,
468
+ * once a minute. Counted the same way: seconds since 1970, in turns.
469
+ */
470
+ seconds: z6.number().int().min(5).max(86400).optional()
471
+ }),
472
+ /**
473
+ * The board's own parts: what a sensor plugged into the board it is drawn
474
+ * on is reading right now (docs/superpowers/specs/ramme-lab.md, "The
475
+ * differentiator"). Fields: `temperature`, from a temperature probe, a
476
+ * whole number in `units` like the weather's; and `connected`, whether a
477
+ * probe is plugged in at all. A board with nothing plugged in has no
478
+ * `temperature`, so a binding to it draws the placeholder.
479
+ *
480
+ * The board fills it from the probe (drawApp() in the sketch); a page
481
+ * previewing that board fills it from the readings the board reported
482
+ * (useAppData); the Studio, with no board, shows the placeholder.
483
+ */
484
+ z6.object({
485
+ kind: z6.literal("board"),
486
+ units: z6.enum(["imperial", "metric"]).default("imperial")
462
487
  })
463
488
  ]);
464
489
  var AppOperandSchema = z6.union([
@@ -631,6 +656,11 @@ var AppGroupSchema = z6.object({
631
656
  children: z6.array(AppLeafSchema).min(1).max(8)
632
657
  });
633
658
  var AppBlockSchema = z6.union([AppLeafSchema, AppGroupSchema]);
659
+ var PanelOrientationSchema = z6.enum(["landscape", "portrait"]);
660
+ var PANEL_SIZE = {
661
+ landscape: { width: 320, height: 240 },
662
+ portrait: { width: 240, height: 320 }
663
+ };
634
664
  var AppScreenSizeSchema = z6.preprocess(
635
665
  (value) => value === "240x320" ? "320x240" : value,
636
666
  z6.enum(["320x240"])
@@ -661,6 +691,17 @@ var AppDocumentSchema = z6.object({
661
691
  * Older firmware draws from the left.
662
692
  */
663
693
  halign: z6.enum(["start", "center"]).optional(),
694
+ /**
695
+ * The lettering. `inter` (the default) is Inter, anti-aliased, drawn at
696
+ * each text size from its own font — SMOOTH_FONT_ADVANCES in
697
+ * ./deviceFonts.generated.ts are its widths. `pixel` is the board's
698
+ * built-in 5x7 bitmap font scaled up: the retro look, chunky on purpose.
699
+ * `tay` is TAY Dreamboat, the Ramme display face — capitals only, so
700
+ * lowercase is drawn as capitals; best for signs, times and numbers.
701
+ * Firmware older than 2026-10-18 draws everything in pixel, and older than
702
+ * 2026-10-20 draws `tay` as Inter.
703
+ */
704
+ font: z6.enum(["inter", "pixel", "tay"]).optional(),
664
705
  /** Named so bindings can refer to them. */
665
706
  sources: z6.record(AppSourceSchema).default({}),
666
707
  blocks: z6.array(AppBlockSchema).min(1).max(12)
@@ -750,82 +791,32 @@ var PhotoSummarySchema = z7.object({
750
791
  });
751
792
 
752
793
  // src/apps/delivery.ts
753
- import { z as z8 } from "zod";
754
- var DeviceIdSchema = z8.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U");
755
- var PairCodeSchema = z8.string().regex(/^\d{4}$/);
756
- var DeviceRegistrationSchema = z8.object({
757
- deviceId: DeviceIdSchema,
758
- code: PairCodeSchema,
759
- /** Firmware build, so a support question has an answer. */
760
- version: z8.string().max(40).optional(),
761
- /** Which board this is, from Boards.h — the two variants need different firmware. */
762
- board: z8.string().max(40).optional(),
763
- /** dBm, always negative. -50 is across the room; -85 is a complaint. */
764
- rssi: z8.number().int().min(-127).max(0).optional(),
765
- /** On the owner's own network. Long enough for IPv6, which this does not send yet. */
766
- ip: z8.string().max(45).optional(),
767
- /** Seconds since boot. Not growing between check-ins means it is restarting. */
768
- uptime: z8.number().int().nonnegative().optional(),
769
- /** Free heap in bytes. */
770
- heap: z8.number().int().nonnegative().optional(),
771
- /** The app revision the board has actually drawn. */
772
- drew: z8.number().int().nonnegative().optional(),
773
- /** Why it last restarted, already mapped to a word by the firmware. */
774
- reset: z8.string().max(40).optional()
775
- });
776
- var SendRequestSchema = z8.object({
777
- deviceId: DeviceIdSchema,
778
- code: PairCodeSchema
779
- });
780
- var OwnedSendRequestSchema = z8.object({
781
- deviceId: DeviceIdSchema
782
- });
783
- var DeliveredAppSchema = z8.object({
784
- revision: z8.number().int().nonnegative(),
785
- sentAt: z8.number().int().nonnegative()
786
- });
787
- var DeviceRecordSchema = z8.object({
788
- deviceId: DeviceIdSchema,
789
- code: PairCodeSchema,
790
- ownerId: z8.string().nullable().default(null),
791
- version: z8.string().max(40).optional(),
792
- createdAt: z8.number().int().nonnegative(),
793
- lastSeenAt: z8.number().int().nonnegative()
794
- });
795
- var DEVICE_LABEL_MAX = 48;
796
- var DEVICE_TTL_SECONDS = 60 * 60 * 24 * 30;
797
- var CLAIMED_DEVICE_TTL_SECONDS = 60 * 60 * 24 * 400;
798
- var FirmwareUpdateSchema = z8.object({
799
- version: z8.string().min(1).max(40),
800
- url: z8.string().url().max(200),
801
- sha256: z8.string().regex(/^[0-9a-f]{64}$/),
802
- bytes: z8.number().int().positive(),
803
- requestedAt: z8.number().int().nonnegative()
804
- });
805
- var FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
806
- var FIRMWARE_UPDATE_ATTEMPTS = 3;
794
+ import { z as z9 } from "zod";
807
795
 
808
796
  // src/apps/vitals.ts
809
- import { z as z9 } from "zod";
810
- var VitalSourceSchema = z9.enum(["register", "poll", "send"]);
811
- var DeviceVitalsSchema = z9.object({
797
+ import { z as z8 } from "zod";
798
+ var VitalSourceSchema = z8.enum(["register", "poll", "send"]);
799
+ var DeviceFeatureStateSchema = z8.enum(["working", "missing", "unsupported", "fault"]);
800
+ var DeviceFeatureKeySchema = z8.string().regex(/^[a-z][a-z0-9-]{0,23}$/);
801
+ var DeviceFeaturesSchema = z8.record(DeviceFeatureKeySchema, DeviceFeatureStateSchema).refine((f) => Object.keys(f).length <= 16, { message: "at most 16 features" });
802
+ var DeviceVitalsSchema = z8.object({
812
803
  /** When the board last said any of this, by the server's clock. */
813
- reportedAt: z9.number().int().nonnegative().optional(),
804
+ reportedAt: z8.number().int().nonnegative().optional(),
814
805
  /**
815
806
  * The firmware build. Today every board sends the literal "doc-1", which is a
816
807
  * protocol marker rather than a build id — so this is shown as reported and
817
808
  * labelled as not yet a version. The real value lives in the published
818
809
  * manifest until firmware carries it.
819
810
  */
820
- firmwareVersion: z9.string().max(40).optional(),
811
+ firmwareVersion: z8.string().max(40).optional(),
821
812
  /** Which board this is. Nothing distinguishes a CYD from a Freenove S3 yet. */
822
- board: z9.string().max(40).optional(),
813
+ board: z8.string().max(40).optional(),
823
814
  /** dBm, negative. -50 is across the room, -85 is a complaint. */
824
- rssi: z9.number().int().min(-127).max(0).optional(),
815
+ rssi: z8.number().int().min(-127).max(0).optional(),
825
816
  /** The board's address on its own network, as the board sees it. */
826
- ip: z9.string().max(45).optional(),
827
- uptimeSeconds: z9.number().int().nonnegative().optional(),
828
- freeHeapBytes: z9.number().int().nonnegative().optional(),
817
+ ip: z8.string().max(45).optional(),
818
+ uptimeSeconds: z8.number().int().nonnegative().optional(),
819
+ freeHeapBytes: z8.number().int().nonnegative().optional(),
829
820
  /**
830
821
  * The revision the board is actually showing.
831
822
  *
@@ -833,30 +824,69 @@ var DeviceVitalsSchema = z9.object({
833
824
  * value: a send that was never drawn looks identical to a successful one until
834
825
  * these two numbers disagree.
835
826
  */
836
- drewRevision: z9.number().int().nonnegative().optional(),
827
+ drewRevision: z8.number().int().nonnegative().optional(),
837
828
  /** Why it last restarted, if it says. A board power-cycling in a loop is a fault. */
838
- resetReason: z9.string().max(40).optional(),
829
+ resetReason: z8.string().max(40).optional(),
830
+ /** Its parts and whether each works — see `DeviceFeaturesSchema`. */
831
+ features: DeviceFeaturesSchema.optional(),
839
832
  /** When it last polled — finer-grained than a registration, for liveness only. */
840
- lastPollAt: z9.number().int().nonnegative().optional()
833
+ lastPollAt: z8.number().int().nonnegative().optional()
841
834
  });
842
- var DeviceSeenSchema = z9.object({
835
+ var DeviceSeenSchema = z8.object({
843
836
  /** When the board last asked for its app. The freshest signal this system has. */
844
- lastPollAt: z9.number().int().nonnegative(),
837
+ lastPollAt: z8.number().int().nonnegative(),
845
838
  /** The revision it reported drawing at that moment. */
846
- drewRevision: z9.number().int().nonnegative().optional(),
839
+ drewRevision: z8.number().int().nonnegative().optional(),
847
840
  /**
848
841
  * The firmware it is running, sent on every poll by builds that can update
849
842
  * remotely — so its presence is also the answer to "can this board be
850
843
  * updated from its page?". Registration reports the version too, but only
851
844
  * every six hours; after a remote update this is what shows it took.
852
845
  */
853
- firmware: z9.string().max(40).optional(),
846
+ firmware: z8.string().max(40).optional(),
854
847
  /** Photos its app names, and how many of those it holds in flash. */
855
- photosWanted: z9.number().int().nonnegative().optional(),
856
- photosHeld: z9.number().int().nonnegative().optional(),
848
+ photosWanted: z8.number().int().nonnegative().optional(),
849
+ photosHeld: z8.number().int().nonnegative().optional(),
857
850
  /** What happened to the last firmware update it tried, in a few words. */
858
- updateResult: z9.string().max(80).optional()
859
- });
851
+ updateResult: z8.string().max(80).optional(),
852
+ /**
853
+ * What the battery line reads, in millivolts — S3 boards only, which have a
854
+ * divider on GPIO9; a CYD has no way to measure a battery. Shown raw on the
855
+ * board's page until it has been checked against a real battery, and only
856
+ * then turned into an icon and a percentage on the glass.
857
+ */
858
+ batteryMv: z8.number().int().min(0).max(1e4).optional(),
859
+ /**
860
+ * The quarter turn its screen is set to (Settings → Turn), 0-3 as LovyanGFX
861
+ * counts them: even is upright, odd is sideways, the board's 240x320 panel
862
+ * turned. Its page previews apps the way the board stands (PANEL_SIZE).
863
+ * Absent from a board older than 2026-10-28, which only ever stood sideways.
864
+ */
865
+ rotation: z8.number().int().min(0).max(3).optional()
866
+ });
867
+ var DeviceReadingSchema = z8.object({
868
+ key: DeviceFeatureKeySchema,
869
+ value: z8.union([z8.number().finite(), z8.string().max(64), z8.boolean()]),
870
+ unit: z8.string().max(16).optional(),
871
+ at: z8.number().int().nonnegative().optional()
872
+ });
873
+ var DeviceReportSchema = z8.object({
874
+ readings: z8.array(DeviceReadingSchema).min(1).max(16)
875
+ });
876
+ var DEVICE_FEATURES = [
877
+ { key: "screen", label: "Screen" },
878
+ { key: "touch", label: "Touch" },
879
+ { key: "speaker", label: "Speaker" },
880
+ { key: "microphone", label: "Microphone" },
881
+ { key: "battery", label: "Battery" },
882
+ { key: "temperature", label: "Temperature probe" }
883
+ ];
884
+ var DEVICE_FEATURE_STATE_LABELS = {
885
+ working: "Working",
886
+ missing: "None on this board",
887
+ unsupported: "Not supported yet",
888
+ fault: "Not working"
889
+ };
860
890
  var DEVICE_VITALS_FIELDS = [
861
891
  {
862
892
  key: "firmwareVersion",
@@ -877,11 +907,84 @@ var DEVICE_VITALS_FIELDS = [
877
907
  source: "register",
878
908
  reportedByFirmware: true
879
909
  },
880
- { key: "resetReason", label: "Last restart", source: "register", reportedByFirmware: true }
910
+ { key: "resetReason", label: "Last restart", source: "register", reportedByFirmware: true },
911
+ {
912
+ key: "batteryMv",
913
+ label: "Battery line",
914
+ unit: "mV",
915
+ source: "poll",
916
+ reportedByFirmware: true,
917
+ note: "Black (S3) boards only, raw and not yet calibrated. A yellow board cannot measure a battery."
918
+ }
881
919
  ];
882
920
  var DEVICE_FRESH_MS = 7 * 60 * 60 * 1e3;
883
921
  var DEVICE_STALE_MS = 30 * 24 * 60 * 60 * 1e3;
884
922
 
923
+ // src/apps/delivery.ts
924
+ var DeviceIdSchema = z9.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U");
925
+ var PairCodeSchema = z9.string().regex(/^\d{4}$/);
926
+ var DeviceRegistrationSchema = z9.object({
927
+ deviceId: DeviceIdSchema,
928
+ code: PairCodeSchema,
929
+ /** Firmware build, so a support question has an answer. */
930
+ version: z9.string().max(40).optional(),
931
+ /** Which board this is, from Boards.h — the two variants need different firmware. */
932
+ board: z9.string().max(40).optional(),
933
+ /** dBm, always negative. -50 is across the room; -85 is a complaint. */
934
+ rssi: z9.number().int().min(-127).max(0).optional(),
935
+ /** On the owner's own network. Long enough for IPv6, which this does not send yet. */
936
+ ip: z9.string().max(45).optional(),
937
+ /** Seconds since boot. Not growing between check-ins means it is restarting. */
938
+ uptime: z9.number().int().nonnegative().optional(),
939
+ /** Free heap in bytes. */
940
+ heap: z9.number().int().nonnegative().optional(),
941
+ /** The app revision the board has actually drawn. */
942
+ drew: z9.number().int().nonnegative().optional(),
943
+ /** Why it last restarted, already mapped to a word by the firmware. */
944
+ reset: z9.string().max(40).optional(),
945
+ /**
946
+ * What the board has and whether each part works: "speaker: working",
947
+ * "battery: missing". This describes the device — its own hardware, as its
948
+ * own check screen reports it — and never the room: a state, not a reading.
949
+ * What the microphone heard, a sensor's value, or anything a part could
950
+ * learn about its surroundings does not belong here and is not representable
951
+ * (DeviceFeatureStateSchema is four words). Readings, when they come, travel
952
+ * as Signals and are argued for on their own.
953
+ */
954
+ features: DeviceFeaturesSchema.optional()
955
+ });
956
+ var SendRequestSchema = z9.object({
957
+ deviceId: DeviceIdSchema,
958
+ code: PairCodeSchema
959
+ });
960
+ var OwnedSendRequestSchema = z9.object({
961
+ deviceId: DeviceIdSchema
962
+ });
963
+ var DeliveredAppSchema = z9.object({
964
+ revision: z9.number().int().nonnegative(),
965
+ sentAt: z9.number().int().nonnegative()
966
+ });
967
+ var DeviceRecordSchema = z9.object({
968
+ deviceId: DeviceIdSchema,
969
+ code: PairCodeSchema,
970
+ ownerId: z9.string().nullable().default(null),
971
+ version: z9.string().max(40).optional(),
972
+ createdAt: z9.number().int().nonnegative(),
973
+ lastSeenAt: z9.number().int().nonnegative()
974
+ });
975
+ var DEVICE_LABEL_MAX = 48;
976
+ var DEVICE_TTL_SECONDS = 60 * 60 * 24 * 30;
977
+ var CLAIMED_DEVICE_TTL_SECONDS = 60 * 60 * 24 * 400;
978
+ var FirmwareUpdateSchema = z9.object({
979
+ version: z9.string().min(1).max(40),
980
+ url: z9.string().url().max(200),
981
+ sha256: z9.string().regex(/^[0-9a-f]{64}$/),
982
+ bytes: z9.number().int().positive(),
983
+ requestedAt: z9.number().int().nonnegative()
984
+ });
985
+ var FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
986
+ var FIRMWARE_UPDATE_ATTEMPTS = 3;
987
+
885
988
  // src/apps/glyphs.ts
886
989
  var DEVICE_UNKNOWN_GLYPH = "?";
887
990
  var DEVICE_GLYPHS = {
@@ -957,6 +1060,7 @@ var DEVICE_GLYPHS = {
957
1060
  "\u2212": { byte: 45, shows: "-" },
958
1061
  "\xA0": { byte: 32, shows: " " }
959
1062
  };
1063
+ var DISPLAY_FACE_MIN_PX = 28;
960
1064
  var DEVICE_PALETTE = {
961
1065
  background: "17 17 17",
962
1066
  foreground: "238 238 238",
@@ -1087,74 +1191,158 @@ var WEATHER_ICONS = {
1087
1191
  ]
1088
1192
  };
1089
1193
 
1090
- // src/ai/tools.ts
1194
+ // src/apps/shelf.ts
1091
1195
  import { z as z10 } from "zod";
1092
- var telemetryGraphParameters = z10.object({
1093
- deviceId: z10.string().min(1, "Device ID is required"),
1094
- timeRange: z10.enum(["1h", "24h", "7d"], {
1196
+ var SHELF_MAX_APPS = 8;
1197
+ var SHELF_MAX_BYTES = 24e3;
1198
+ var SHELF_ROTATE_MINUTES = [0, 1, 5, 15, 30, 60];
1199
+ var ShelfSchema = z10.object({
1200
+ apps: z10.array(AppDocumentSchema).min(1).max(SHELF_MAX_APPS),
1201
+ /** Which app to show — an index into `apps`. */
1202
+ show: z10.number().int().min(0).max(SHELF_MAX_APPS - 1),
1203
+ /** Move to the next app every this many minutes; 0 holds still. */
1204
+ rotateMinutes: z10.number().int().min(0).max(1440).default(0),
1205
+ /**
1206
+ * When each app was last sent, aligned with `apps`. The server's
1207
+ * bookkeeping, not the board's: a send to a full shelf takes off the app
1208
+ * sent longest ago, so sending always works. Missing reads as oldest.
1209
+ */
1210
+ added: z10.array(z10.number().int().nonnegative()).max(SHELF_MAX_APPS).optional()
1211
+ });
1212
+ var ShelfEditSchema = z10.discriminatedUnion("op", [
1213
+ z10.object({ op: z10.literal("show"), deviceId: DeviceIdSchema, index: z10.number().int().min(0) }),
1214
+ z10.object({ op: z10.literal("remove"), deviceId: DeviceIdSchema, index: z10.number().int().min(0) }),
1215
+ z10.object({
1216
+ op: z10.literal("move"),
1217
+ deviceId: DeviceIdSchema,
1218
+ from: z10.number().int().min(0),
1219
+ to: z10.number().int().min(0)
1220
+ }),
1221
+ z10.object({ op: z10.literal("rotate"), deviceId: DeviceIdSchema, minutes: z10.number().int().min(0).max(1440) }),
1222
+ /**
1223
+ * Swap the panel's light and dark. Not about apps, but it rides the same
1224
+ * route and the same poll: some units of the same board carry a panel wired
1225
+ * the other way, so one shows white on black and its twin black on white
1226
+ * from identical firmware. It is a fact about one board's glass, so it is a
1227
+ * per-board setting rather than a build.
1228
+ */
1229
+ z10.object({ op: z10.literal("screen"), deviceId: DeviceIdSchema, invert: z10.boolean() }),
1230
+ /**
1231
+ * Remove one entry from the list of apps sent to this board, by the revision
1232
+ * it was sent as. The record only: what the board holds is the shelf's
1233
+ * business, and `remove` above is how an app comes off it.
1234
+ */
1235
+ z10.object({ op: z10.literal("forget"), deviceId: DeviceIdSchema, revision: z10.number().int().min(1) })
1236
+ ]);
1237
+
1238
+ // src/apps/protocol.ts
1239
+ import { z as z12 } from "zod";
1240
+
1241
+ // src/theme/account.ts
1242
+ import { z as z11 } from "zod";
1243
+ var ThemeRgbSchema = z11.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'Must be "R G B", e.g. "13 110 253"').refine((v) => v.split(" ").every((n) => Number(n) <= 255), "Each channel is 0\u2013255");
1244
+ var ThemePaletteSchema = z11.object({
1245
+ background: ThemeRgbSchema,
1246
+ /** Text. */
1247
+ foreground: ThemeRgbSchema,
1248
+ /** Quieter text: labels, captions, the second line. */
1249
+ muted: ThemeRgbSchema,
1250
+ /** The brand colour: buttons and links on the site, highlights on a board. */
1251
+ accent: ThemeRgbSchema,
1252
+ success: ThemeRgbSchema,
1253
+ warning: ThemeRgbSchema,
1254
+ danger: ThemeRgbSchema
1255
+ });
1256
+ var THEME_PALETTE_TOKENS = [
1257
+ "background",
1258
+ "foreground",
1259
+ "muted",
1260
+ "accent",
1261
+ "success",
1262
+ "warning",
1263
+ "danger"
1264
+ ];
1265
+ var ThemeLetteringSchema = z11.enum(["inter", "tay", "pixel"]);
1266
+ var THEME_RADII = ["0rem", "0.25rem", "0.5rem", "0.75rem", "1rem"];
1267
+ var AccountThemeSchema = z11.object({
1268
+ name: z11.string().trim().min(1).max(40),
1269
+ /** The preset it started from, when it started from one. */
1270
+ base: z11.string().max(40).optional(),
1271
+ light: ThemePaletteSchema,
1272
+ dark: ThemePaletteSchema,
1273
+ lettering: ThemeLetteringSchema,
1274
+ radius: z11.enum(THEME_RADII)
1275
+ });
1276
+
1277
+ // src/apps/protocol.ts
1278
+ var DEVICE_PROTOCOL = {
1279
+ /** POST `DeviceRegistration` → 200. On boot and every six hours. */
1280
+ register: { method: "POST", path: "/api/device/register" },
1281
+ /**
1282
+ * GET `?id=&since=<revision>` plus what the board says about itself
1283
+ * (`DEVICE_POLL_QUERY`) → 200 `DevicePollReply`, 304 when nothing is newer
1284
+ * than `since`, 204 when nothing has ever been sent.
1285
+ */
1286
+ poll: { method: "GET", path: "/api/device/app" },
1287
+ /** POST `DeviceReport` → 202. Only while the board has readings to give. */
1288
+ report: { method: "POST", path: "/api/device/report" },
1289
+ /**
1290
+ * GET `?id=&hash=<sha256>` → 200 raw bytes, 404 for anything it may not
1291
+ * have. Only a hash an app on the board names; the board keeps the file.
1292
+ */
1293
+ photo: { method: "GET", path: "/api/device/photo" }
1294
+ };
1295
+ var DEVICE_POLL_QUERY = {
1296
+ id: "the board id (required)",
1297
+ since: "the revision on the glass now",
1298
+ v: "the firmware version it runs",
1299
+ ph: 'photos held / photos wanted, as "3/4"',
1300
+ sh: '"1" when it can hold a shelf of apps rather than one',
1301
+ inv: 'its light/dark panel setting, "0" or "1"',
1302
+ rot: "which way it stands, 0\u20133",
1303
+ pl: "the palette it draws in, as 42 hex digits",
1304
+ fn: "the lettering it draws in",
1305
+ bt: "battery millivolts",
1306
+ u: "what happened to the last update it was asked to install"
1307
+ };
1308
+ var BoardPaletteHexSchema = z12.string().regex(/^[0-9a-f]{42}$/);
1309
+ var BoardFontSchema = z12.union([z12.literal("auto"), ThemeLetteringSchema]);
1310
+ var DevicePollReplySchema = z12.object({
1311
+ revision: z12.number().int().nonnegative(),
1312
+ sentAt: z12.number().int().nonnegative().optional(),
1313
+ document: AppDocumentSchema.optional(),
1314
+ shelf: ShelfSchema.optional(),
1315
+ update: FirmwareUpdateSchema.optional(),
1316
+ screen: z12.object({ invert: z12.boolean() }).optional(),
1317
+ palette: BoardPaletteHexSchema.optional(),
1318
+ font: BoardFontSchema.optional()
1319
+ });
1320
+
1321
+ // src/apps/deviceFonts.generated.ts
1322
+ var SMOOTH_FACES = { "inter": { "family": "Inter", "weight": 500, "caps": false }, "tay": { "family": "TAY Dreamboat", "weight": 400, "caps": true } };
1323
+ var SMOOTH_FONT_ADVANCES = { "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, "\xA0": 3, "\xA1": 3, "\xA2": 6, "\xA3": 6, "\xA5": 6, "\xAA": 5, "\xAB": 6, "\xAC": 7, "\xB0": 5, "\xB1": 7, "\xB2": 4, "\xB5": 6, "\xB7": 3, "\xBA": 5, "\xBB": 6, "\xBC": 8, "\xBD": 9, "\xBF": 5, "\xC4": 7, "\xC5": 7, "\xC6": 10, "\xC7": 7, "\xC9": 6, "\xD1": 8, "\xD6": 8, "\xDC": 7, "\xDF": 6, "\xE0": 6, "\xE1": 6, "\xE2": 6, "\xE4": 6, "\xE5": 6, "\xE6": 9, "\xE7": 6, "\xE8": 6, "\xE9": 6, "\xEA": 6, "\xEB": 6, "\xEC": 3, "\xED": 3, "\xEE": 3, "\xEF": 3, "\xF1": 6, "\xF2": 6, "\xF3": 6, "\xF4": 6, "\xF6": 6, "\xF7": 7, "\xF9": 6, "\xFA": 6, "\xFB": 6, "\xFC": 6, "\xFF": 6, "\u0192": 5, "\u03A9": 8, "\u03C0": 5, "\u2013": 5, "\u2014": 10, "\u2018": 3, "\u2019": 3, "\u201C": 5, "\u201D": 5, "\u2212": 7, "\u221A": 5, "\u221E": 7, "\u2248": 5, "\u2264": 5, "\u2265": 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, "\xA0": 3, "\xA1": 4, "\xA2": 7, "\xA3": 7, "\xA5": 7, "\xAA": 5, "\xAB": 7, "\xAC": 8, "\xB0": 5, "\xB1": 8, "\xB2": 5, "\xB5": 7, "\xB7": 4, "\xBA": 6, "\xBB": 7, "\xBC": 10, "\xBD": 10, "\xBF": 6, "\xC4": 9, "\xC5": 9, "\xC6": 12, "\xC7": 9, "\xC9": 7, "\xD1": 9, "\xD6": 9, "\xDC": 9, "\xDF": 8, "\xE0": 7, "\xE1": 7, "\xE2": 7, "\xE4": 7, "\xE5": 7, "\xE6": 11, "\xE7": 7, "\xE8": 7, "\xE9": 7, "\xEA": 7, "\xEB": 7, "\xEC": 3, "\xED": 3, "\xEE": 3, "\xEF": 3, "\xF1": 7, "\xF2": 7, "\xF3": 7, "\xF4": 7, "\xF6": 7, "\xF7": 8, "\xF9": 7, "\xFA": 7, "\xFB": 7, "\xFC": 7, "\xFF": 7, "\u0192": 6, "\u03A9": 9, "\u03C0": 7, "\u2013": 6, "\u2014": 12, "\u2018": 3, "\u2019": 3, "\u201C": 6, "\u201D": 6, "\u2212": 8, "\u221A": 7, "\u221E": 9, "\u2248": 7, "\u2264": 7, "\u2265": 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, "\xA0": 4, "\xA1": 5, "\xA2": 9, "\xA3": 10, "\xA5": 9, "\xAA": 7, "\xAB": 10, "\xAC": 11, "\xB0": 7, "\xB1": 11, "\xB2": 7, "\xB5": 10, "\xB7": 5, "\xBA": 8, "\xBB": 10, "\xBC": 13, "\xBD": 14, "\xBF": 8, "\xC4": 11, "\xC5": 11, "\xC6": 16, "\xC7": 12, "\xC9": 10, "\xD1": 12, "\xD6": 12, "\xDC": 12, "\xDF": 10, "\xE0": 9, "\xE1": 9, "\xE2": 9, "\xE4": 9, "\xE5": 9, "\xE6": 15, "\xE7": 9, "\xE8": 9, "\xE9": 9, "\xEA": 9, "\xEB": 9, "\xEC": 4, "\xED": 4, "\xEE": 4, "\xEF": 4, "\xF1": 10, "\xF2": 10, "\xF3": 10, "\xF4": 10, "\xF6": 10, "\xF7": 11, "\xF9": 10, "\xFA": 10, "\xFB": 10, "\xFC": 10, "\xFF": 9, "\u0192": 8, "\u03A9": 12, "\u03C0": 9, "\u2013": 8, "\u2014": 16, "\u2018": 4, "\u2019": 4, "\u201C": 8, "\u201D": 8, "\u2212": 11, "\u221A": 9, "\u221E": 11, "\u2248": 9, "\u2264": 9, "\u2265": 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, "\xA0": 5, "\xA1": 6, "\xA2": 12, "\xA3": 12, "\xA5": 11, "\xAA": 9, "\xAB": 12, "\xAC": 13, "\xB0": 9, "\xB1": 13, "\xB2": 9, "\xB5": 12, "\xB7": 6, "\xBA": 10, "\xBB": 12, "\xBC": 16, "\xBD": 17, "\xBF": 11, "\xC4": 14, "\xC5": 14, "\xC6": 20, "\xC7": 15, "\xC9": 12, "\xD1": 15, "\xD6": 15, "\xDC": 15, "\xDF": 13, "\xE0": 11, "\xE1": 11, "\xE2": 11, "\xE4": 11, "\xE5": 11, "\xE6": 18, "\xE7": 12, "\xE8": 12, "\xE9": 12, "\xEA": 12, "\xEB": 12, "\xEC": 5, "\xED": 5, "\xEE": 5, "\xEF": 5, "\xF1": 12, "\xF2": 12, "\xF3": 12, "\xF4": 12, "\xF6": 12, "\xF7": 13, "\xF9": 12, "\xFA": 12, "\xFB": 12, "\xFC": 12, "\xFF": 12, "\u0192": 10, "\u03A9": 15, "\u03C0": 11, "\u2013": 10, "\u2014": 20, "\u2018": 6, "\u2019": 6, "\u201C": 9, "\u201D": 9, "\u2212": 13, "\u221A": 11, "\u221E": 14, "\u2248": 11, "\u2264": 11, "\u2265": 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, "\xA0": 7, "\xA1": 9, "\xA2": 16, "\xA3": 17, "\xA5": 16, "\xAA": 13, "\xAB": 17, "\xAC": 19, "\xB0": 13, "\xB1": 19, "\xB2": 13, "\xB5": 17, "\xB7": 8, "\xBA": 14, "\xBB": 17, "\xBC": 23, "\xBD": 24, "\xBF": 15, "\xC4": 20, "\xC5": 20, "\xC6": 28, "\xC7": 21, "\xC9": 17, "\xD1": 21, "\xD6": 21, "\xDC": 21, "\xDF": 18, "\xE0": 16, "\xE1": 16, "\xE2": 16, "\xE4": 16, "\xE5": 16, "\xE6": 26, "\xE7": 16, "\xE8": 16, "\xE9": 16, "\xEA": 16, "\xEB": 16, "\xEC": 7, "\xED": 7, "\xEE": 7, "\xEF": 7, "\xF1": 17, "\xF2": 17, "\xF3": 17, "\xF4": 17, "\xF6": 17, "\xF7": 19, "\xF9": 17, "\xFA": 17, "\xFB": 17, "\xFC": 17, "\xFF": 16, "\u0192": 14, "\u03A9": 22, "\u03C0": 15, "\u2013": 14, "\u2014": 28, "\u2018": 8, "\u2019": 8, "\u201C": 13, "\u201D": 13, "\u2212": 19, "\u221A": 15, "\u221E": 20, "\u2248": 15, "\u2264": 15, "\u2265": 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, "\xB0": 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, "\xA0": 8, "\xA1": 15, "\xA2": 14, "\xA3": 26, "\xA5": 31, "\xAA": 8, "\xAB": 14, "\xAC": 16, "\xB0": 14, "\xB1": 15, "\xB2": 8, "\xB7": 7, "\xBA": 9, "\xBB": 14, "\xBC": 21, "\xBD": 21, "\xBF": 26, "\xC4": 28, "\xC5": 28, "\xC6": 25, "\xC7": 28, "\xC9": 30, "\xD1": 32, "\xD6": 29, "\xDC": 29, "\xF7": 15, "\u03A9": 22, "\u2013": 14, "\u2014": 28, "\u2018": 9, "\u2019": 9, "\u201C": 12, "\u201D": 12, "\u2212": 16, "\u221A": 15, "\u221E": 20, "\u2248": 15, "\u2264": 15, "\u2265": 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, "\xB0": 27 } } };
1324
+
1325
+ // src/ai/tools.ts
1326
+ import { z as z13 } from "zod";
1327
+ var telemetryGraphParameters = z13.object({
1328
+ deviceId: z13.string().min(1, "Device ID is required"),
1329
+ timeRange: z13.enum(["1h", "24h", "7d"], {
1095
1330
  errorMap: () => ({ message: "Time range must be 1h, 24h, or 7d" })
1096
1331
  }),
1097
- metrics: z10.array(
1098
- z10.enum(["temperature", "humidity", "vwc", "ec", "ph", "pressure", "co2"])
1332
+ metrics: z13.array(
1333
+ z13.enum(["temperature", "humidity", "vwc", "ec", "ph", "pressure", "co2"])
1099
1334
  ).min(1, "At least one metric is required").max(4, "Maximum 4 metrics per graph")
1100
1335
  });
1101
- var stockChartParameters = z10.object({
1102
- ticker: z10.string().min(1).describe("The stock ticker symbol explicitly requested by the user. YOU MUST EXTRACT AND PROVIDE THIS (e.g., 'AAPL', 'MSFT')."),
1103
- timeRange: z10.enum(["1D", "1W", "1M", "1Y"], {
1104
- errorMap: () => ({ message: "Time range must be 1D, 1W, 1M, or 1Y" })
1105
- }).describe("The time range for the chart. Choose based on user request or default to '1M'."),
1106
- metrics: z10.array(z10.enum(["price", "volume", "moving_average"])).min(1, "At least one metric is required").describe("Array of metrics to display. Always include 'price' and 'volume' unless user specifies otherwise.")
1107
- });
1108
- var tickerParam = z10.string().min(1).describe("The stock ticker symbol (e.g., 'AAPL', 'TSLA', 'MSFT').");
1109
- var liveQuoteParameters = z10.object({ ticker: tickerParam });
1110
- var companyNewsParameters = z10.object({ ticker: tickerParam });
1111
- var companyProfileParameters = z10.object({ ticker: tickerParam });
1112
- var counterpartyGraphParameters = z10.object({
1113
- ticker: tickerParam,
1114
- hops: z10.number().int().min(1).max(2).optional().describe("How many relationship hops to traverse (1 = direct counterparties only, 2 = counterparties-of-counterparties too). Defaults to 1 if omitted.")
1115
- });
1116
- var divergenceMetricsParameters = z10.object({ ticker: tickerParam });
1117
- var architectureReferenceParameters = z10.object({});
1118
1336
  var AI_TOOLS = {
1119
1337
  get_telemetry_graph: {
1120
1338
  name: "get_telemetry_graph",
1121
1339
  description: "Displays an interactive line chart of historical sensor telemetry data. Use this when the user asks to visualize trends, compare metrics over time, or analyze device performance. Supports temperature, humidity, VWC (volumetric water content), EC (electrical conductivity), pH, pressure, and CO2.",
1122
- parameters: telemetryGraphParameters
1123
- },
1124
- get_stock_chart: {
1125
- name: "get_stock_chart",
1126
- description: "Displays an interactive financial chart with price movements, volume, and technical indicators. Use this when the user asks to visualize stock performance, analyze price trends, or compare financial metrics over time. Supports daily (1D), weekly (1W), monthly (1M), and yearly (1Y) time ranges.",
1127
- parameters: stockChartParameters
1128
- },
1129
- get_live_quote: {
1130
- name: "get_live_quote",
1131
- description: "Fetches and displays the real-time stock price and daily change percentage for a given company ticker symbol.",
1132
- parameters: liveQuoteParameters
1133
- },
1134
- get_company_news: {
1135
- name: "get_company_news",
1136
- description: "Fetches and displays the 5 most recent news headlines and sentiment impact scores for a given company ticker symbol.",
1137
- parameters: companyNewsParameters
1138
- },
1139
- get_company_profile: {
1140
- name: "get_company_profile",
1141
- description: "Fetches fundamental company data including the business description, sector, industry, market cap, and P/E ratio.",
1142
- parameters: companyProfileParameters
1143
- },
1144
- get_counterparty_graph: {
1145
- name: "get_counterparty_graph",
1146
- description: "Displays the inferred counterparty relationship graph for a company \u2014 suppliers, customers, partners, competitors, regulators, and investment/acquisition relationships that Fleet-Brain-Deep has extracted from alternative signals. Use this when the user asks about a company's business relationships, supply chain, competitors, or who it partners/invests with. Not for corporate ownership structure (parent/subsidiary) \u2014 use company profile data for that.",
1147
- parameters: counterpartyGraphParameters
1148
- },
1149
- get_divergence_metrics: {
1150
- name: "get_divergence_metrics",
1151
- description: "Displays Fleet-Brain-Deep's operational and customer divergence scores for a company \u2014 a signed delta between expected (baseline) and observed performance, inferred from recent signals. Use this when the user asks whether something is going better or worse than expected operationally or from a customer-experience standpoint.",
1152
- parameters: divergenceMetricsParameters
1153
- },
1154
- get_architecture_reference: {
1155
- name: "get_architecture_reference",
1156
- description: "Explains THIS PLATFORM'S OWN data architecture \u2014 its tech stack, database schema and data modeling, AI/LLM integration points, and background worker (sentinel) fleet. Use this for questions about how the system itself is built, not about a company or the market. Takes no parameters.",
1157
- parameters: architectureReferenceParameters
1340
+ parameters: telemetryGraphParameters,
1341
+ promptParameters: `{
1342
+ "deviceId": "string (required)",
1343
+ "timeRange": "enum: '1h' | '24h' | '7d' (required)",
1344
+ "metrics": "array of enum: 'temperature' | 'humidity' | 'vwc' | 'ec' | 'ph' | 'pressure' | 'co2' (1-4 items required)"
1345
+ }`
1158
1346
  }
1159
1347
  };
1160
1348
 
@@ -1386,6 +1574,9 @@ A row splits the width into equal cells. Add "pack": true and each child takes
1386
1574
  only its own width, "gap" apart \u2014 a number with its icon right beside it, or
1387
1575
  "H 68\xB0 L 56\xB0" as one line. Put "valign": "center" at the top level of the
1388
1576
  document to centre the blocks on the screen rather than start at the top, and
1577
+ "font": "pixel" for chunky retro lettering or "font": "tay" for the Ramme
1578
+ display face, all capitals, good for signs and big numbers (the default is a
1579
+ smooth plain face), and
1389
1580
  "halign": "center" to centre them across it \u2014 the lines keep their own
1390
1581
  alignment inside a column as wide as the widest, and the column is centred.
1391
1582
 
@@ -1487,6 +1678,14 @@ SOURCES \u2014 declare what the app reads, then bind to it by name:
1487
1678
  For things that take turns: give each block "hideWhen": { "value":
1488
1679
  { "source": "turn", "field": "index" }, "op": "!=", "than": N } so only
1489
1680
  block N shows on turn N. The board changes at most once a minute.
1681
+ "probe": { "kind": "board", "units": "imperial" }
1682
+ fields: temperature, connected
1683
+ What a sensor plugged into the board itself is reading: a temperature
1684
+ probe's temperature, a whole number in units, updated about once a
1685
+ second. connected is false when nothing is plugged in, and temperature
1686
+ is then missing (it draws "--"): use hideWhen on connected to show
1687
+ "Plug in the probe" instead. Use this, not weather, for "my sensor",
1688
+ "the probe", "water temperature" and the like.
1490
1689
 
1491
1690
  RULES
1492
1691
 
@@ -1506,12 +1705,12 @@ RULES
1506
1705
  var APP_DOCUMENT_EDIT_PREFIX = "Here is the current app. Change only what is asked:";
1507
1706
 
1508
1707
  // src/theme/schema.ts
1509
- import { z as z11 } from "zod";
1510
- var RGBString = z11.string().regex(
1708
+ import { z as z14 } from "zod";
1709
+ var RGBString = z14.string().regex(
1511
1710
  /^\d{1,3}\s+\d{1,3}\s+\d{1,3}$/,
1512
1711
  'Must be space-separated RGB integers (e.g. "13 110 253")'
1513
1712
  );
1514
- var ThemeOverridesSchema = z11.object({
1713
+ var ThemeOverridesSchema = z14.object({
1515
1714
  // ── Core Brand ───────────────────────────────────────────────────────────
1516
1715
  "--app-primary-color": RGBString.optional(),
1517
1716
  "--app-primary-foreground-color": RGBString.optional(),
@@ -1527,9 +1726,9 @@ var ThemeOverridesSchema = z11.object({
1527
1726
  "--app-muted-bg": RGBString.optional(),
1528
1727
  "--app-muted-text": RGBString.optional(),
1529
1728
  // ── Shape ────────────────────────────────────────────────────────────────
1530
- "--app-border-radius-sm": z11.string().optional(),
1531
- "--app-border-radius-md": z11.string().optional(),
1532
- "--app-border-radius-lg": z11.string().optional(),
1729
+ "--app-border-radius-sm": z14.string().optional(),
1730
+ "--app-border-radius-md": z14.string().optional(),
1731
+ "--app-border-radius-lg": z14.string().optional(),
1533
1732
  // ── Form Controls ────────────────────────────────────────────────────────
1534
1733
  "--app-input-bg-color": RGBString.optional(),
1535
1734
  "--app-input-text-color": RGBString.optional(),
@@ -1543,19 +1742,19 @@ var ThemeOverridesSchema = z11.object({
1543
1742
  "--app-chart-4": RGBString.optional(),
1544
1743
  "--app-chart-5": RGBString.optional()
1545
1744
  }).strict();
1546
- var ThemeFontsSchema = z11.object({
1745
+ var ThemeFontsSchema = z14.object({
1547
1746
  /** Google Font name for headings (h1–h4, .font-serif). Example: "Playfair Display" */
1548
- heading: z11.string(),
1747
+ heading: z14.string(),
1549
1748
  /** Google Font name for body text. Example: "Inter" */
1550
- body: z11.string(),
1749
+ body: z14.string(),
1551
1750
  /** Optional monospace font. Example: "Roboto Mono" */
1552
- mono: z11.string().optional()
1751
+ mono: z14.string().optional()
1553
1752
  });
1554
- var AIThemeSchema = z11.object({
1753
+ var AIThemeSchema = z14.object({
1555
1754
  /** Short descriptive theme name. Example: "Midnight Garden" */
1556
- name: z11.string(),
1755
+ name: z14.string(),
1557
1756
  /** One-sentence vibe description. Example: "Dark indigo with golden accents." */
1558
- description: z11.string(),
1757
+ description: z14.string(),
1559
1758
  /** Google Font pairing for heading and body text. */
1560
1759
  fonts: ThemeFontsSchema.optional(),
1561
1760
  /**
@@ -1566,13 +1765,13 @@ var AIThemeSchema = z11.object({
1566
1765
  cssVars: ThemeOverridesSchema
1567
1766
  });
1568
1767
  var THEME_PRESETS = ["light", "dark", "system", "corporate", "midnight", "blueprint"];
1569
- var ThemeTokensSchema = z11.object({
1768
+ var ThemeTokensSchema = z14.object({
1570
1769
  primary: RGBString,
1571
1770
  neutral: RGBString,
1572
1771
  success: RGBString,
1573
1772
  warning: RGBString,
1574
1773
  destructive: RGBString,
1575
- radius: z11.enum(["none", "sm", "md", "lg", "full"])
1774
+ radius: z14.enum(["none", "sm", "md", "lg", "full"])
1576
1775
  });
1577
1776
  var DEFAULT_THEME_TOKENS = {
1578
1777
  primary: "13 110 253",
@@ -1583,82 +1782,355 @@ var DEFAULT_THEME_TOKENS = {
1583
1782
  radius: "md"
1584
1783
  };
1585
1784
 
1785
+ // src/theme/controls.ts
1786
+ var CONTROL_STATES = ["rest", "pressed", "busy", "disabled", "focused"];
1787
+ var CONTROL_STATE_MEANINGS = {
1788
+ rest: { means: "The control, in the theme\u2019s surface or accent.", web: "default" },
1789
+ pressed: { means: "Lit the moment a finger lands on it.", web: ":active" },
1790
+ busy: { means: "Stays lit while its action runs; nothing else on screen moves.", web: "loading" },
1791
+ disabled: { means: "Muted, and a tap does nothing.", web: "disabled" },
1792
+ focused: { means: "Highlighted by a knob or a key: the control choosing would press.", web: ":focus-visible" }
1793
+ };
1794
+
1795
+ // src/enclosures/schema.ts
1796
+ import { z as z15 } from "zod";
1797
+ var Mm = z15.number().finite();
1798
+ var PositiveMm = Mm.positive();
1799
+ var NonNegativeMm = Mm.nonnegative();
1800
+ var PrinterProfileSchema = z15.object({
1801
+ name: z15.string().min(1).default("Bambu Lab X1 Carbon"),
1802
+ /** Walls are whole multiples of this. */
1803
+ nozzle: PositiveMm.default(0.4),
1804
+ /** Gap for parts that slide together: the case's lip, a lid. */
1805
+ clearance_slip: NonNegativeMm.default(0.2),
1806
+ /** Gap for a friction fit. */
1807
+ clearance_press: NonNegativeMm.default(0.1)
1808
+ });
1809
+ var EdgeSchema = z15.enum(["east", "west", "north", "south", "top", "bottom"]);
1810
+ var FlexButtonSchema = z15.object({
1811
+ /** The tongue's length, from its free end to where it joins the floor. */
1812
+ length: PositiveMm.default(12),
1813
+ /** Its width. */
1814
+ width: PositiveMm.default(5),
1815
+ /** The way from the switch to where the tongue joins the floor. */
1816
+ hinge: z15.enum(["east", "west", "north", "south"])
1817
+ });
1818
+ var InterfaceSchema = z15.object({
1819
+ /** usb_c, screen, reset_button, status_led, sd_card… */
1820
+ name: z15.string().min(1),
1821
+ edge: EdgeSchema,
1822
+ /** From the centre of that face — see COORDINATES above. */
1823
+ offset_from_center: z15.tuple([Mm, Mm]).default([0, 0]),
1824
+ /**
1825
+ * A grille is a field of small round holes filling an ellipse of
1826
+ * `cutout_size` — a speaker's — on a top or bottom face only.
1827
+ */
1828
+ cutout_shape: z15.enum(["rect", "rounded_rect", "circle", "grille"]),
1829
+ /** [width, height] of the opening, including room for a plug's boot. A circle uses the first as its diameter. */
1830
+ cutout_size: z15.tuple([PositiveMm, PositiveMm]),
1831
+ /** How far the part sticks out past the component's edge. */
1832
+ protrusion: NonNegativeMm.default(0),
1833
+ /** A wider recess on the outside face, [width, height, depth], for a thick cable boot. */
1834
+ outer_recess: z15.tuple([PositiveMm, PositiveMm, PositiveMm]).optional(),
1835
+ /** Press it through the floor instead of opening a hole — see FlexButtonSchema. */
1836
+ flex_button: FlexButtonSchema.optional(),
1837
+ /**
1838
+ * A 45° ramp this deep round the opening at the outside face, widening it
1839
+ * by this much a side there. For a screen set back behind a bezel: the
1840
+ * picture's edges stay in view and a fingertip reaches them. Top or bottom
1841
+ * openings only.
1842
+ */
1843
+ chamfer: NonNegativeMm.optional()
1844
+ });
1845
+ var MountHolesSchema = z15.object({
1846
+ /** Four holes, this far in from each corner: [east-west, north-south]. */
1847
+ inset_from_corners: z15.tuple([PositiveMm, PositiveMm]).optional(),
1848
+ /** Or exactly where they are: [east, north] from the footprint centre. */
1849
+ positions: z15.array(z15.tuple([Mm, Mm])).min(1).optional(),
1850
+ thread: z15.enum(["M2", "M2.5", "M3"]),
1851
+ /** Heat-set insert outer diameter and depth. split_shell_lip only: tray_bezel's screws cut their own thread. */
1852
+ insert_od: PositiveMm.optional(),
1853
+ insert_depth: PositiveMm.optional()
1854
+ }).refine((m) => (m.inset_from_corners ? 1 : 0) + (m.positions ? 1 : 0) === 1, {
1855
+ message: "give either inset_from_corners or positions, not both or neither"
1856
+ });
1857
+ var PlacementSchema = z15.object({
1858
+ relative_to: z15.string().min(1),
1859
+ where: z15.enum(["below", "above", "east", "west", "north", "south"]),
1860
+ /** Space between the two keep-outs. */
1861
+ gap: NonNegativeMm.default(1),
1862
+ /** Moved this far [east, north] from centred on the other, once placed. */
1863
+ offset: z15.tuple([Mm, Mm]).default([0, 0])
1864
+ });
1865
+ var ComponentSchema = z15.object({
1866
+ id: z15.string().regex(/^[a-z][a-z0-9_]*$/, "lowercase letters, digits and underscores"),
1867
+ type: z15.enum(["pcb", "display", "battery", "speaker", "module"]),
1868
+ /** [east, north, up] — see COORDINATES. */
1869
+ dimensions: z15.tuple([PositiveMm, PositiveMm, PositiveMm]),
1870
+ /**
1871
+ * Radius of the footprint's corners: most boards are rounded. The case's
1872
+ * inside corners follow it, so a rounded board gets a rounded tray without
1873
+ * the tray growing wider. Leave it at 0 for a square one, or when unsure —
1874
+ * assuming sharper than the part is safe, rounder is not.
1875
+ */
1876
+ corner_radius: NonNegativeMm.default(0),
1877
+ /** Height of the tallest part on top (headers, capacitors, a connector), kept clear. */
1878
+ clearance_z_top: NonNegativeMm.default(0),
1879
+ /** Height of what is underneath (solder joints, a microSD socket), kept clear. */
1880
+ clearance_z_bottom: NonNegativeMm.default(0),
1881
+ /** Quarter turns about Z, applied before placement. */
1882
+ rotation: z15.union([z15.literal(0), z15.literal(90), z15.literal(180), z15.literal(270)]).default(0),
1883
+ placement: PlacementSchema.optional(),
1884
+ mount_holes: MountHolesSchema.optional(),
1885
+ interfaces: z15.array(InterfaceSchema).default([]),
1886
+ /** How it is held if it has no screw holes. */
1887
+ retention: z15.enum(["none", "cradle_ribs"]).default("none")
1888
+ });
1889
+ var EmblemSchema = z15.object({
1890
+ /** The SVG file, relative to the manifest. Filled paths only; strokes are ignored. */
1891
+ svg: z15.string().min(1),
1892
+ face: z15.enum(["top", "bottom"]).default("bottom"),
1893
+ /** Height of the mark on the face, along north. Its width follows the SVG's proportions. */
1894
+ height: PositiveMm,
1895
+ /** How deep it is pressed in. */
1896
+ depth: PositiveMm.default(0.6),
1897
+ /** From the centre of the case's footprint, [east, north]. */
1898
+ offset: z15.tuple([Mm, Mm]).default([0, 0]),
1899
+ /**
1900
+ * Cut it right through the face instead, as a stencil — a speaker's grille
1901
+ * in the shape of the mark. Whatever its lines enclose would fall out, so
1902
+ * each enclosed piece is held by bridges across a line: give them here, in
1903
+ * millimetres from the mark's centre as it reads (y up), each turned
1904
+ * `angle` degrees from running east-west. Pieces too small to hold
1905
+ * (STENCIL_SPECK) are cut away; a larger one with no bridge fails the fit
1906
+ * check, by where it is.
1907
+ */
1908
+ stencil: z15.object({
1909
+ bridges: z15.array(z15.object({ at: z15.tuple([Mm, Mm]), angle: z15.number().default(0), length: PositiveMm.default(3) })).default([])
1910
+ }).optional()
1911
+ });
1912
+ var HardwareManifestSchema = z15.object({
1913
+ project: z15.string().regex(/^[a-z0-9][a-z0-9_-]*$/, "lowercase, digits, - and _"),
1914
+ /** How the case goes together — see TWO STYLES above. */
1915
+ enclosure_style: z15.enum(["split_shell_lip", "tray_bezel"]).default("split_shell_lip"),
1916
+ wall_thickness: PositiveMm.default(2.4),
1917
+ /**
1918
+ * Thicker walls on chosen sides, in place of `wall_thickness` there. A
1919
+ * screen whose glass is as wide as its board otherwise gets 2.4mm of frame
1920
+ * along its sides and 11mm at its ends, which looks off balance (the
1921
+ * black ESP32-S3 board's flush case, 2026-10-25). Each is a whole number
1922
+ * of nozzle lines, and no thinner than `wall_thickness`.
1923
+ */
1924
+ walls: z15.object({ east: PositiveMm, west: PositiveMm, north: PositiveMm, south: PositiveMm }).partial().default({}),
1925
+ /** Radius of the vertical outside corners. */
1926
+ corner_radius: NonNegativeMm.default(2),
1927
+ /**
1928
+ * The outside's front and back edges — where the face meets the sides.
1929
+ * `chamfer` bevels them flat at 45°, `round` rounds them; `soften` then
1930
+ * rounds every edge the bevel leaves, so nothing on the outside is sharp.
1931
+ * Without it they are square, and a case reads as a printed box.
1932
+ */
1933
+ edges: z15.object({
1934
+ style: z15.enum(["chamfer", "round"]),
1935
+ size: PositiveMm,
1936
+ soften: NonNegativeMm.default(0)
1937
+ }).optional(),
1938
+ printer: PrinterProfileSchema.default({}),
1939
+ components: z15.array(ComponentSchema).min(1),
1940
+ emblem: EmblemSchema.optional()
1941
+ }).superRefine((m, ctx) => {
1942
+ const lines = m.wall_thickness / m.printer.nozzle;
1943
+ if (Math.abs(lines - Math.round(lines)) > 1e-6) {
1944
+ ctx.addIssue({
1945
+ code: z15.ZodIssueCode.custom,
1946
+ path: ["wall_thickness"],
1947
+ message: `${m.wall_thickness}mm is not a whole number of ${m.printer.nozzle}mm lines \u2014 try ${(Math.round(lines) * m.printer.nozzle).toFixed(2)}`
1948
+ });
1949
+ }
1950
+ for (const [side, t] of Object.entries(m.walls)) {
1951
+ if (t === void 0) continue;
1952
+ const n = t / m.printer.nozzle;
1953
+ if (Math.abs(n - Math.round(n)) > 1e-6) {
1954
+ ctx.addIssue({
1955
+ code: z15.ZodIssueCode.custom,
1956
+ path: ["walls", side],
1957
+ message: `${t}mm is not a whole number of ${m.printer.nozzle}mm lines \u2014 try ${(Math.round(n) * m.printer.nozzle).toFixed(2)}`
1958
+ });
1959
+ }
1960
+ if (t < m.wall_thickness) {
1961
+ ctx.addIssue({
1962
+ code: z15.ZodIssueCode.custom,
1963
+ path: ["walls", side],
1964
+ message: `${t}mm is thinner than wall_thickness (${m.wall_thickness}mm): walls only thicken on chosen sides`
1965
+ });
1966
+ }
1967
+ }
1968
+ const ids = m.components.map((c) => c.id);
1969
+ ids.forEach((id, i) => {
1970
+ if (ids.indexOf(id) !== i) {
1971
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "id"], message: `"${id}" is used twice` });
1972
+ }
1973
+ });
1974
+ const roots = m.components.filter((c) => !c.placement);
1975
+ if (roots.length !== 1) {
1976
+ ctx.addIssue({
1977
+ code: z15.ZodIssueCode.custom,
1978
+ path: ["components"],
1979
+ message: `exactly one component must have no placement (the origin); found ${roots.length}: ${roots.map((r) => r.id).join(", ") || "none"}`
1980
+ });
1981
+ }
1982
+ const byId = new Map(m.components.map((c) => [c.id, c]));
1983
+ m.components.forEach((c, i) => {
1984
+ if (!c.placement) return;
1985
+ const target = c.placement.relative_to;
1986
+ if (!byId.has(target)) {
1987
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "placement", "relative_to"], message: `no component "${target}"` });
1988
+ return;
1989
+ }
1990
+ const seen = /* @__PURE__ */ new Set([c.id]);
1991
+ for (let at = byId.get(target); at?.placement; at = byId.get(at.placement.relative_to)) {
1992
+ if (seen.has(at.id)) {
1993
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "placement"], message: `placement loops back to "${at.id}"` });
1994
+ return;
1995
+ }
1996
+ seen.add(at.id);
1997
+ }
1998
+ });
1999
+ m.components.forEach((c, i) => {
2000
+ if (m.enclosure_style === "split_shell_lip" && c.mount_holes && (!c.mount_holes.insert_od || !c.mount_holes.insert_depth)) {
2001
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "mount_holes"], message: "a split_shell_lip case holds boards on heat-set inserts: give insert_od and insert_depth" });
2002
+ }
2003
+ c.interfaces.forEach((f, j) => {
2004
+ if (f.chamfer && f.edge !== "top" && f.edge !== "bottom") {
2005
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "interfaces", j, "chamfer"], message: `a chamfer ramps an opening in the bezel or the floor: its edge must be top or bottom, not ${f.edge}` });
2006
+ }
2007
+ if (f.cutout_shape === "grille" && f.edge !== "top" && f.edge !== "bottom") {
2008
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "interfaces", j, "cutout_shape"], message: `a grille is a field of holes in the bezel or the floor: its edge must be top or bottom, not ${f.edge}` });
2009
+ }
2010
+ if (f.flex_button && f.edge !== "bottom") {
2011
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "interfaces", j, "flex_button"], message: `a flex button is pressed through the floor: its edge must be bottom, not ${f.edge}` });
2012
+ }
2013
+ });
2014
+ const [x, y] = c.dimensions;
2015
+ c.mount_holes?.positions?.forEach((p, j) => {
2016
+ if (Math.abs(p[0]) > x / 2 || Math.abs(p[1]) > y / 2) {
2017
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "mount_holes", "positions", j], message: `hole at [${p}] is outside the ${x}\xD7${y} footprint` });
2018
+ }
2019
+ });
2020
+ const inset = c.mount_holes?.inset_from_corners;
2021
+ if (inset && (inset[0] * 2 >= x || inset[1] * 2 >= y)) {
2022
+ ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["components", i, "mount_holes", "inset_from_corners"], message: `insets [${inset}] meet in the middle of a ${x}\xD7${y} footprint` });
2023
+ }
2024
+ });
2025
+ });
2026
+ var FamilyChoiceSchema = z15.object({
2027
+ label: z15.string().min(1),
2028
+ /** One sentence: what it is for. */
2029
+ description: z15.string().optional(),
2030
+ /** Components added to the base manifest's. */
2031
+ components: z15.array(ComponentSchema).default([]),
2032
+ /** Top-level manifest fields this choice sets: wall_thickness, emblem… */
2033
+ set: z15.record(z15.unknown()).default({}),
2034
+ /**
2035
+ * Changes to the base's own components, by id: fields to set, null to
2036
+ * remove one, and `interfaces` by name the same way — a null interface is
2037
+ * removed, an unknown one added. How a flush top lowers the board's
2038
+ * clearance and widens its screen opening to the glass.
2039
+ */
2040
+ patch: z15.record(z15.record(z15.unknown())).default({})
2041
+ });
2042
+ var FamilyOptionSchema = z15.object({
2043
+ label: z15.string().min(1),
2044
+ /** In order; the first is the default. Ids are lowercase words and dashes. */
2045
+ choices: z15.array(FamilyChoiceSchema.extend({ id: z15.string().regex(/^[a-z0-9][a-z0-9-]*$/) })).min(1)
2046
+ });
2047
+ var CaseFamilySchema = z15.object({
2048
+ /** The base manifest, relative to this file. */
2049
+ manifest: z15.string().min(1),
2050
+ /** Option groups, in the order they are offered: base, top… */
2051
+ options: z15.record(z15.string().regex(/^[a-z][a-z0-9-]*$/), FamilyOptionSchema)
2052
+ });
2053
+
1586
2054
  // src/auth/schema.ts
1587
- import { z as z12 } from "zod";
1588
- var UserSchema = z12.object({
1589
- id: z12.string().default(""),
1590
- name: z12.string(),
1591
- email: z12.string().email(),
1592
- password: z12.string().optional(),
1593
- role: z12.string(),
1594
- status: z12.string().optional(),
1595
- joinedAt: z12.string().optional(),
1596
- lastActive: z12.string().optional(),
1597
- avatarUrl: z12.string().optional()
2055
+ import { z as z16 } from "zod";
2056
+ var UserSchema = z16.object({
2057
+ id: z16.string().default(""),
2058
+ name: z16.string(),
2059
+ email: z16.string().email(),
2060
+ password: z16.string().optional(),
2061
+ role: z16.string(),
2062
+ status: z16.string().optional(),
2063
+ joinedAt: z16.string().optional(),
2064
+ lastActive: z16.string().optional(),
2065
+ avatarUrl: z16.string().optional()
1598
2066
  });
1599
2067
 
1600
2068
  // src/auth/accounts.ts
1601
- import { z as z13 } from "zod";
1602
- var AccountIdSchema = z13.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits");
1603
- var AccountRoleSchema = z13.enum(["member", "admin"]);
1604
- var AccountStatusSchema = z13.enum(["active", "suspended"]);
1605
- var ScryptHashSchema = z13.object({
1606
- algo: z13.literal("scrypt"),
1607
- n: z13.number().int().positive(),
1608
- r: z13.number().int().positive(),
1609
- p: z13.number().int().positive(),
1610
- keylen: z13.number().int().positive(),
1611
- salt: z13.string().min(16),
1612
- hash: z13.string().min(16)
1613
- });
1614
- var AccountRecordSchema = z13.object({
2069
+ import { z as z17 } from "zod";
2070
+ var AccountIdSchema = z17.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits");
2071
+ var AccountRoleSchema = z17.enum(["member", "admin"]);
2072
+ var AccountStatusSchema = z17.enum(["active", "suspended"]);
2073
+ var ScryptHashSchema = z17.object({
2074
+ algo: z17.literal("scrypt"),
2075
+ n: z17.number().int().positive(),
2076
+ r: z17.number().int().positive(),
2077
+ p: z17.number().int().positive(),
2078
+ keylen: z17.number().int().positive(),
2079
+ salt: z17.string().min(16),
2080
+ hash: z17.string().min(16)
2081
+ });
2082
+ var AccountRecordSchema = z17.object({
1615
2083
  accountId: AccountIdSchema,
1616
2084
  /** Lowercased on write, because a login must not depend on how it was typed. */
1617
- email: z13.string().email().max(254),
1618
- name: z13.string().min(1).max(64),
2085
+ email: z17.string().email().max(254),
2086
+ name: z17.string().min(1).max(64),
1619
2087
  role: AccountRoleSchema,
1620
2088
  status: AccountStatusSchema,
1621
2089
  password: ScryptHashSchema,
1622
- createdAt: z13.number().int().nonnegative(),
1623
- lastLoginAt: z13.number().int().nonnegative().nullable().default(null),
2090
+ createdAt: z17.number().int().nonnegative(),
2091
+ lastLoginAt: z17.number().int().nonnegative().nullable().default(null),
1624
2092
  /** Which admin approved this, or null for the bootstrap account. */
1625
2093
  invitedBy: AccountIdSchema.nullable().default(null)
1626
2094
  });
1627
- var PublicAccountSchema = z13.object({
2095
+ var DISPLAY_NAME_MAX = 40;
2096
+ var DisplayNameSchema = z17.string().transform((s) => s.trim().replace(/\s+/g, " ")).pipe(
2097
+ z17.string().min(1, "Give a name.").max(DISPLAY_NAME_MAX, `At most ${DISPLAY_NAME_MAX} characters.`).refine((s) => !/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028-\u202e\u2066-\u2069]/.test(s), "Letters, numbers, spaces and punctuation only.")
2098
+ );
2099
+ var PublicAccountSchema = z17.object({
1628
2100
  accountId: AccountIdSchema,
1629
- email: z13.string().email(),
1630
- name: z13.string(),
2101
+ email: z17.string().email(),
2102
+ name: z17.string(),
1631
2103
  role: AccountRoleSchema,
1632
2104
  status: AccountStatusSchema
1633
2105
  });
1634
- var SessionRecordSchema = z13.object({
2106
+ var SessionRecordSchema = z17.object({
1635
2107
  accountId: AccountIdSchema,
1636
- createdAt: z13.number().int().nonnegative(),
1637
- expiresAt: z13.number().int().nonnegative(),
1638
- lastSeenAt: z13.number().int().nonnegative()
2108
+ createdAt: z17.number().int().nonnegative(),
2109
+ expiresAt: z17.number().int().nonnegative(),
2110
+ lastSeenAt: z17.number().int().nonnegative()
1639
2111
  });
1640
- var InviteRecordSchema = z13.object({
1641
- email: z13.string().email().max(254),
2112
+ var InviteRecordSchema = z17.object({
2113
+ email: z17.string().email().max(254),
1642
2114
  role: AccountRoleSchema,
1643
- createdAt: z13.number().int().nonnegative(),
1644
- expiresAt: z13.number().int().nonnegative(),
2115
+ createdAt: z17.number().int().nonnegative(),
2116
+ expiresAt: z17.number().int().nonnegative(),
1645
2117
  invitedBy: AccountIdSchema
1646
2118
  });
1647
- var AccessRequestSchema = z13.object({
1648
- email: z13.string().email().max(254),
1649
- name: z13.string().min(1).max(64),
2119
+ var AccessRequestSchema = z17.object({
2120
+ email: z17.string().email().max(254),
2121
+ name: z17.string().min(1).max(64),
1650
2122
  /** Optional, and never shown publicly. Long enough to be useful, short enough not to be an essay. */
1651
- reason: z13.string().max(500).optional()
1652
- });
1653
- var AccessRequestStatusSchema = z13.enum(["pending", "approved", "denied"]);
1654
- var AccessRequestRecordSchema = z13.object({
1655
- requestId: z13.string().regex(/^req_[0-9a-f]{12}$/, "req_ and 12 hex digits"),
1656
- email: z13.string().email().max(254),
1657
- name: z13.string().min(1).max(64),
1658
- reason: z13.string().max(500).optional(),
2123
+ reason: z17.string().max(500).optional()
2124
+ });
2125
+ var AccessRequestStatusSchema = z17.enum(["pending", "approved", "denied"]);
2126
+ var AccessRequestRecordSchema = z17.object({
2127
+ requestId: z17.string().regex(/^req_[0-9a-f]{12}$/, "req_ and 12 hex digits"),
2128
+ email: z17.string().email().max(254),
2129
+ name: z17.string().min(1).max(64),
2130
+ reason: z17.string().max(500).optional(),
1659
2131
  status: AccessRequestStatusSchema,
1660
- createdAt: z13.number().int().nonnegative(),
1661
- decidedAt: z13.number().int().nonnegative().nullable().default(null),
2132
+ createdAt: z17.number().int().nonnegative(),
2133
+ decidedAt: z17.number().int().nonnegative().nullable().default(null),
1662
2134
  decidedBy: AccountIdSchema.nullable().default(null)
1663
2135
  });
1664
2136
  var SCRYPT_PARAMS = {
@@ -1676,196 +2148,44 @@ var ACCOUNT_TTL_SECONDS = 60 * 60 * 24 * 400;
1676
2148
  var INVITE_TTL_SECONDS = 60 * 60 * 24 * 14;
1677
2149
  var ACCESS_REQUEST_TTL_SECONDS = 60 * 60 * 24 * 90;
1678
2150
 
1679
- // src/counterparty/schema.ts
1680
- import { z as z14 } from "zod";
1681
- var CounterpartyTypeSchema = z14.enum([
1682
- "supplier",
1683
- "customer",
1684
- "partner",
1685
- "competitor",
1686
- "regulator",
1687
- "unknown"
1688
- ]);
1689
- var CounterpartyResolutionSchema = z14.enum([
1690
- "public",
1691
- "public_uncovered",
1692
- "private",
1693
- "unresolved"
1694
- ]);
1695
- var CounterpartyNodeSchema = z14.object({
1696
- id: z14.string(),
1697
- ticker: z14.string().nullable(),
1698
- /** Name as it appeared in the source signal — e.g. "Nike". Not the registered name. */
1699
- name: z14.string(),
1700
- /** Registered legal name from `profiles` — e.g. "NIKE, Inc.". Null unless `public`. */
1701
- publicName: z14.string().nullable(),
1702
- lei: z14.string().nullable(),
1703
- resolution: CounterpartyResolutionSchema,
1704
- type: CounterpartyTypeSchema,
1705
- confidence: z14.number().min(0).max(1),
1706
- sourceSignalIds: z14.array(z14.number()),
1707
- firstSeenAt: z14.string().datetime(),
1708
- lastSeenAt: z14.string().datetime()
1709
- });
1710
- var RelationshipEdgeTypeSchema = z14.enum([
1711
- "supplies_to",
1712
- "purchases_from",
1713
- "partners_with",
1714
- "competes_with",
1715
- "regulated_by",
1716
- "invests_in",
1717
- "acquires",
1718
- /**
1719
- * Identity equivalence, not a business relationship: source and target are
1720
- * the same real-world entity under two different node ids (typically a
1721
- * slug-keyed node that predates LEI resolution, pointing at the canonical
1722
- * LEI-keyed node once resolution succeeds). Never delete/merge either
1723
- * node — this edge exists so a consumer wanting a deduped view can follow
1724
- * it to the canonical id, reversibly.
1725
- */
1726
- "same_as"
1727
- ]);
1728
- var RelationshipEdgeSchema = z14.object({
1729
- id: z14.string(),
1730
- sourceId: z14.string(),
1731
- targetId: z14.string(),
1732
- edgeType: RelationshipEdgeTypeSchema,
1733
- weight: z14.number().min(0).max(1),
1734
- evidenceSignalIds: z14.array(z14.number()),
1735
- updatedAt: z14.string().datetime(),
1736
- validFrom: z14.string().datetime(),
1737
- /** null = currently valid. Set when a differently-typed edge supersedes this one. */
1738
- validTo: z14.string().datetime().nullable()
1739
- });
1740
- var SignalWeightSchema = z14.object({
1741
- signalId: z14.number(),
1742
- weight: z14.number().min(0).max(1),
1743
- reason: z14.string().max(280)
1744
- });
1745
- var DivergenceMetricSchema = z14.object({
1746
- ticker: z14.string(),
1747
- // 'operations'/'customer' are current; 'operational'/'ux' are pre-rename
1748
- // values that still exist on rows written before the backend's rename —
1749
- // kept here so reading old rows doesn't fail validation.
1750
- metric: z14.enum(["operations", "customer", "operational", "ux"]),
1751
- score: z14.number(),
1752
- baseline: z14.number(),
1753
- observed: z14.number(),
1754
- computedAt: z14.string().datetime(),
1755
- contributingSignals: z14.array(SignalWeightSchema)
1756
- });
1757
-
1758
- // src/non-public-entity/schema.ts
1759
- import { z as z15 } from "zod";
1760
- var NonPublicEntitySchema = z15.object({
1761
- lei: z15.string().nullable(),
1762
- entityName: z15.string(),
1763
- jurisdiction: z15.string().nullable(),
1764
- registrationStatus: z15.string(),
1765
- parentEntityLei: z15.string().nullable(),
1766
- materialMetadata: z15.record(z15.unknown()),
1767
- discoveredAt: z15.string().datetime()
1768
- });
1769
-
1770
- // src/events/schema.ts
1771
- import { z as z16 } from "zod";
1772
- var EventSourceSchema = z16.enum(["db", "mock"]);
1773
- var EntityEventKindSchema = z16.enum(["news", "filing", "report"]);
1774
- var ImpactScaleSchema = z16.enum(["graded", "binary", "default", "none"]);
1775
- var TimestampPrecisionSchema = z16.enum(["second", "day"]);
1776
- var EntityEventSchema = z16.object({
1777
- /** Namespaced so ids never collide across sources: `news:1234`, `filing:AAPL:2026-07-31`. */
1778
- id: z16.string(),
1779
- kind: EntityEventKindSchema,
1780
- /**
1781
- * The producer's own type string, unmodified — `NEWS_YAHOO FINANCE_YAHOO RSS`,
1782
- * `ANNUAL`, `SNAPSHOT`. There are 31 distinct NEWS variants in the live table,
1783
- * so this is for filtering and debugging: never render it raw to a user.
1784
- */
1785
- subtype: z16.string().nullable(),
1786
- ticker: z16.string(),
1787
- /** Always `YYYY-MM-DDTHH:MM:SSZ`. Fixed-width, so lexical order == chronological order. */
1788
- occurredAt: z16.string(),
1789
- precision: TimestampPrecisionSchema,
1790
- title: z16.string(),
1791
- summary: z16.string().nullable(),
1792
- url: z16.string().nullable(),
1793
- impact: z16.number().nullable(),
1794
- impactScale: ImpactScaleSchema,
1795
- /** 0 bearish … 50 neutral … 100 bullish. */
1796
- sentiment: z16.number().nullable(),
1797
- /** False for filings, and for any event sitting at exactly neutral. */
1798
- sentimentIsMeaningful: z16.boolean(),
1799
- source: EventSourceSchema,
1800
- meta: z16.record(z16.unknown()).nullable()
1801
- });
1802
- var PaginatedEntityEventsSchema = z16.object({
1803
- total: z16.number(),
1804
- page: z16.number(),
1805
- page_size: z16.number(),
1806
- data: z16.array(EntityEventSchema)
1807
- });
1808
- var EventBucketSizeSchema = z16.enum(["day", "week", "month"]);
1809
- var EntityEventDensityBucketSchema = z16.object({
1810
- bucketStart: z16.string(),
1811
- kind: EntityEventKindSchema,
1812
- count: z16.number(),
1813
- /** Null when no event in the bucket had meaningful sentiment. */
1814
- avgSentiment: z16.number().nullable(),
1815
- maxImpact: z16.number().nullable()
1816
- });
1817
- var EntityEventDensitySchema = z16.object({
1818
- ticker: z16.string(),
1819
- bucket: EventBucketSizeSchema,
1820
- buckets: z16.array(EntityEventDensityBucketSchema),
1821
- /** So the client can set its time domain without a second request. */
1822
- range: z16.object({ min: z16.string(), max: z16.string() }),
1823
- source: EventSourceSchema
1824
- });
1825
- var EntityEventFacetSchema = z16.object({
1826
- kind: EntityEventKindSchema,
1827
- count: z16.number(),
1828
- earliest: z16.string().nullable(),
1829
- latest: z16.string().nullable(),
1830
- impactScale: ImpactScaleSchema,
1831
- sentimentUsable: z16.boolean()
1832
- });
1833
- var EntityEventFacetsSchema = z16.object({
1834
- ticker: z16.string(),
1835
- facets: z16.array(EntityEventFacetSchema),
1836
- source: EventSourceSchema
1837
- });
1838
- var DailyPricePointSchema = z16.object({
1839
- date: z16.string(),
1840
- open: z16.number().nullable(),
1841
- high: z16.number().nullable(),
1842
- low: z16.number().nullable(),
1843
- close: z16.number(),
1844
- volume: z16.number().nullable()
1845
- });
1846
- var EntityPriceSeriesSchema = z16.object({
1847
- ticker: z16.string(),
1848
- series: z16.array(DailyPricePointSchema),
1849
- source: EventSourceSchema
1850
- });
1851
- var EVENT_KIND_LABELS = {
1852
- news: "News",
1853
- filing: "Filing",
1854
- report: "Analyst report"
1855
- };
1856
- var IMPACT_FLAG_THRESHOLD = 7;
1857
- var SENTIMENT_NEUTRAL = 50;
1858
- var DEFAULT_HORIZON_QUARTERS = 5;
1859
- var EXCLUDED_SOURCES = {
1860
- insights: "insights.ANALYSIS is a verbatim 1:1 mirror of signals \u2014 every AAPL ANALYSIS row contains a news description verbatim and lands within 2s of it. Including it doubles every event.",
1861
- divergence_metrics: "A continuously recomputed annotation, not an event: 524 AAPL rows in 2 days.",
1862
- counterparty_edges: "No history exists \u2014 all rows were created within a 2-day window, so nothing can be placed on a time axis without fabricating it.",
1863
- raw_filings: "Stale since April, superseded by signals.",
1864
- market_metrics: "Two rows total.",
1865
- job_log: "24.5M rows with no ticker index \u2014 never touch it in a request path."
2151
+ // src/auth/accessTokens.ts
2152
+ import { z as z18 } from "zod";
2153
+ var ACCESS_TOKEN_SCOPES = ["boards:read", "boards:send"];
2154
+ var AccessTokenScopeSchema = z18.enum(ACCESS_TOKEN_SCOPES);
2155
+ var ACCESS_TOKEN_SCOPE_LABELS = {
2156
+ "boards:read": "See my boards",
2157
+ "boards:send": "Send apps to my boards"
1866
2158
  };
2159
+ var ACCESS_TOKEN_PREFIX = "rmk_";
2160
+ var ACCESS_TOKEN_LIFETIMES_DAYS = [7, 30, 90, 365];
2161
+ var ACCESS_TOKEN_MAX_PER_ACCOUNT = 20;
2162
+ var ACCESS_TOKEN_RATE_PER_MINUTE = 60;
2163
+ var AccessTokenRecordSchema = z18.object({
2164
+ /** The first 12 hex digits of the hash: what the owner sees and revokes by. */
2165
+ tokenId: z18.string().regex(/^[0-9a-f]{12}$/),
2166
+ accountId: AccountIdSchema,
2167
+ /** What the owner called it: "laptop", "Claude Code". */
2168
+ name: z18.string().trim().min(1).max(60),
2169
+ scopes: z18.array(AccessTokenScopeSchema).min(1),
2170
+ createdAt: z18.number().int().nonnegative(),
2171
+ expiresAt: z18.number().int().nonnegative(),
2172
+ /** Moved forward at most once a day, so using a token is not a write per request. */
2173
+ lastUsedAt: z18.number().int().nonnegative().nullable().default(null)
2174
+ });
2175
+ var PublicAccessTokenSchema = AccessTokenRecordSchema.omit({ accountId: true });
2176
+ var NewAccessTokenSchema = z18.object({
2177
+ name: z18.string().trim().min(1, "Give it a name.").max(60),
2178
+ scopes: z18.array(AccessTokenScopeSchema).min(1, "Choose at least one thing it can do."),
2179
+ days: z18.union(ACCESS_TOKEN_LIFETIMES_DAYS.map((d) => z18.literal(d)))
2180
+ });
1867
2181
  export {
1868
2182
  ACCESS_REQUEST_TTL_SECONDS,
2183
+ ACCESS_TOKEN_LIFETIMES_DAYS,
2184
+ ACCESS_TOKEN_MAX_PER_ACCOUNT,
2185
+ ACCESS_TOKEN_PREFIX,
2186
+ ACCESS_TOKEN_RATE_PER_MINUTE,
2187
+ ACCESS_TOKEN_SCOPES,
2188
+ ACCESS_TOKEN_SCOPE_LABELS,
1869
2189
  ACCOUNT_TTL_SECONDS,
1870
2190
  AIKeyManifestSchema,
1871
2191
  AIThemeSchema,
@@ -1878,10 +2198,13 @@ export {
1878
2198
  AccessRequestRecordSchema,
1879
2199
  AccessRequestSchema,
1880
2200
  AccessRequestStatusSchema,
2201
+ AccessTokenRecordSchema,
2202
+ AccessTokenScopeSchema,
1881
2203
  AccountIdSchema,
1882
2204
  AccountRecordSchema,
1883
2205
  AccountRoleSchema,
1884
2206
  AccountStatusSchema,
2207
+ AccountThemeSchema,
1885
2208
  ActionSchema,
1886
2209
  AircraftAppConfigSchema,
1887
2210
  AppAlignSchema,
@@ -1913,106 +2236,120 @@ export {
1913
2236
  AssetHashSchema,
1914
2237
  AuthStrategySchema,
1915
2238
  BlockSchema,
2239
+ BoardFontSchema,
2240
+ BoardPaletteHexSchema,
1916
2241
  schema_exports as Bodewell,
1917
2242
  CLAIMED_DEVICE_TTL_SECONDS,
2243
+ CONTROL_STATES,
2244
+ CONTROL_STATE_MEANINGS,
2245
+ CaseFamilySchema,
1918
2246
  ClockAppConfigSchema,
1919
- CounterpartyNodeSchema,
1920
- CounterpartyResolutionSchema,
1921
- CounterpartyTypeSchema,
2247
+ ComponentSchema,
1922
2248
  DEFAULT_CHAT_MODEL,
1923
2249
  DEFAULT_DEVICE_CONFIG,
1924
- DEFAULT_HORIZON_QUARTERS,
1925
2250
  DEFAULT_PRO_MODEL,
1926
2251
  DEFAULT_SCHEMA_MODEL,
1927
2252
  DEFAULT_THEME_TOKENS,
1928
2253
  DEVICE_AP_SSID_PREFIX,
1929
2254
  DEVICE_ENDPOINTS,
2255
+ DEVICE_FEATURES,
2256
+ DEVICE_FEATURE_STATE_LABELS,
1930
2257
  DEVICE_FRESH_MS,
1931
2258
  DEVICE_GLYPHS,
1932
2259
  DEVICE_LABEL_MAX,
1933
2260
  DEVICE_PALETTE,
2261
+ DEVICE_POLL_QUERY,
2262
+ DEVICE_PROTOCOL,
1934
2263
  DEVICE_STALE_MS,
1935
2264
  DEVICE_TIMEZONES,
1936
2265
  DEVICE_TIMEZONE_FALLBACK,
1937
2266
  DEVICE_TTL_SECONDS,
1938
2267
  DEVICE_UNKNOWN_GLYPH,
1939
2268
  DEVICE_VITALS_FIELDS,
1940
- DailyPricePointSchema,
2269
+ DISPLAY_FACE_MIN_PX,
2270
+ DISPLAY_NAME_MAX,
1941
2271
  DeliveredAppSchema,
1942
2272
  DeviceAppIdSchema,
1943
2273
  DeviceAppsSchema,
1944
2274
  DeviceConfigSchema,
1945
2275
  DeviceDisplayConfigSchema,
2276
+ DeviceFeatureKeySchema,
2277
+ DeviceFeatureStateSchema,
2278
+ DeviceFeaturesSchema,
1946
2279
  DeviceIdSchema,
1947
2280
  DeviceKindSchema,
2281
+ DevicePollReplySchema,
2282
+ DeviceReadingSchema,
1948
2283
  DeviceRecordSchema,
1949
2284
  DeviceRegistrationSchema,
2285
+ DeviceReportSchema,
1950
2286
  DeviceSeenSchema,
1951
2287
  DeviceStatusSchema,
1952
2288
  DeviceThemeSchema,
1953
2289
  DeviceVitalsSchema,
1954
- DivergenceMetricSchema,
1955
- EVENT_KIND_LABELS,
1956
- EXCLUDED_SOURCES,
1957
- EntityEventDensityBucketSchema,
1958
- EntityEventDensitySchema,
1959
- EntityEventFacetSchema,
1960
- EntityEventFacetsSchema,
1961
- EntityEventKindSchema,
1962
- EntityEventSchema,
1963
- EntityPriceSeriesSchema,
2290
+ DisplayNameSchema,
2291
+ EdgeSchema,
2292
+ EmblemSchema,
1964
2293
  EntitySchema,
1965
- EventBucketSizeSchema,
1966
- EventSourceSchema,
1967
2294
  FIRMWARE_UPDATE_ATTEMPTS,
1968
2295
  FIRMWARE_UPDATE_PREFIX,
1969
2296
  FULL_COLOUR_FRAME_MAX,
1970
2297
  FULL_RENDITION,
2298
+ FamilyChoiceSchema,
2299
+ FamilyOptionSchema,
1971
2300
  FieldSchema,
1972
2301
  FirmwareUpdateSchema,
2302
+ FlexButtonSchema,
1973
2303
  FloraTelemetrySchema,
1974
2304
  GENESIS_LIBRARY_CONTEXT,
1975
2305
  GENESIS_VALID_COMPONENTS,
2306
+ HardwareManifestSchema,
1976
2307
  ICON_GRID,
1977
2308
  ICON_SIZE_PX,
1978
2309
  ICON_STROKE,
1979
2310
  IMAGE_MAX_DRAWN,
1980
2311
  IMAGE_MAX_SCALE,
1981
- IMPACT_FLAG_THRESHOLD,
1982
2312
  INVITE_TTL_SECONDS,
1983
- ImpactScaleSchema,
2313
+ InterfaceSchema,
1984
2314
  InviteRecordSchema,
1985
2315
  MAX_PASSWORD_LENGTH,
1986
2316
  MIN_PASSWORD_LENGTH,
1987
- NonPublicEntitySchema,
2317
+ MountHolesSchema,
2318
+ NewAccessTokenSchema,
1988
2319
  ORIGINAL_MAX_BYTES,
1989
2320
  ORIGINAL_MAX_SIDE,
1990
2321
  OwnedSendRequestSchema,
2322
+ PANEL_SIZE,
1991
2323
  PHOTOS_PER_ACCOUNT,
1992
2324
  PHOTO_UPLOADS_PER_HOUR,
1993
2325
  PROVIDER_DEFAULT_MODEL,
1994
2326
  PageSchema,
1995
2327
  PageSectionSchema,
1996
- PaginatedEntityEventsSchema,
1997
2328
  PairCodeSchema,
2329
+ PanelOrientationSchema,
1998
2330
  PhotoCropSchema,
1999
2331
  PhotoFullSchema,
2000
2332
  PhotoSummarySchema,
2001
2333
  PhotoUploadSchema,
2334
+ PlacementSchema,
2335
+ PrinterProfileSchema,
2002
2336
  ProvisioningStateSchema,
2337
+ PublicAccessTokenSchema,
2003
2338
  PublicAccountSchema,
2004
2339
  RETRO_RENDITION,
2005
- RelationshipEdgeSchema,
2006
- RelationshipEdgeTypeSchema,
2007
2340
  ResourceSchema,
2008
2341
  SCRYPT_PARAMS,
2009
- SENTIMENT_NEUTRAL,
2010
2342
  SESSION_COOKIE_NAME,
2011
2343
  SESSION_TTL_SECONDS,
2344
+ SHELF_MAX_APPS,
2345
+ SHELF_MAX_BYTES,
2346
+ SHELF_ROTATE_MINUTES,
2012
2347
  SIGNAL_DOMAINS,
2013
2348
  SIGNAL_KINDS,
2014
2349
  SIGNAL_KIND_LABELS,
2015
2350
  SIGNAL_SOURCES,
2351
+ SMOOTH_FACES,
2352
+ SMOOTH_FONT_ADVANCES,
2016
2353
  SPRITE_MAX_BASE64,
2017
2354
  SPRITE_MAX_ROW_BYTES,
2018
2355
  SPRITE_MAX_SIDE,
@@ -2022,18 +2359,23 @@ export {
2022
2359
  SendRequestSchema,
2023
2360
  SensorAppConfigSchema,
2024
2361
  SessionRecordSchema,
2362
+ ShelfEditSchema,
2363
+ ShelfSchema,
2025
2364
  SignalArraySchema,
2026
2365
  SignalKindSchema,
2027
2366
  SignalPacketSchema,
2028
2367
  SignalSchema,
2029
2368
  SignalSourceSchema,
2030
- SignalWeightSchema,
2369
+ THEME_PALETTE_TOKENS,
2031
2370
  THEME_PRESETS,
2371
+ THEME_RADII,
2032
2372
  THEME_SYSTEM_PROMPT,
2033
2373
  ThemeFontsSchema,
2374
+ ThemeLetteringSchema,
2034
2375
  ThemeOverridesSchema,
2376
+ ThemePaletteSchema,
2377
+ ThemeRgbSchema,
2035
2378
  ThemeTokensSchema,
2036
- TimestampPrecisionSchema,
2037
2379
  TriggerSchema,
2038
2380
  UserSchema,
2039
2381
  VitalSourceSchema,
@@ -2042,12 +2384,5 @@ export {
2042
2384
  WEATHER_ICON_NAMES,
2043
2385
  WeatherAppConfigSchema,
2044
2386
  WorkflowSchema,
2045
- architectureReferenceParameters,
2046
- companyNewsParameters,
2047
- companyProfileParameters,
2048
- counterpartyGraphParameters,
2049
- divergenceMetricsParameters,
2050
- liveQuoteParameters,
2051
- stockChartParameters,
2052
2387
  telemetryGraphParameters
2053
2388
  };