@ramme-io/shared 3.7.0 → 4.1.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.cjs CHANGED
@@ -21,6 +21,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  ACCESS_REQUEST_TTL_SECONDS: () => ACCESS_REQUEST_TTL_SECONDS,
24
+ ACCESS_TOKEN_LIFETIMES_DAYS: () => ACCESS_TOKEN_LIFETIMES_DAYS,
25
+ ACCESS_TOKEN_MAX_PER_ACCOUNT: () => ACCESS_TOKEN_MAX_PER_ACCOUNT,
26
+ ACCESS_TOKEN_PREFIX: () => ACCESS_TOKEN_PREFIX,
27
+ ACCESS_TOKEN_RATE_PER_MINUTE: () => ACCESS_TOKEN_RATE_PER_MINUTE,
28
+ ACCESS_TOKEN_SCOPES: () => ACCESS_TOKEN_SCOPES,
29
+ ACCESS_TOKEN_SCOPE_LABELS: () => ACCESS_TOKEN_SCOPE_LABELS,
24
30
  ACCOUNT_TTL_SECONDS: () => ACCOUNT_TTL_SECONDS,
25
31
  AIKeyManifestSchema: () => AIKeyManifestSchema,
26
32
  AIThemeSchema: () => AIThemeSchema,
@@ -33,10 +39,13 @@ __export(index_exports, {
33
39
  AccessRequestRecordSchema: () => AccessRequestRecordSchema,
34
40
  AccessRequestSchema: () => AccessRequestSchema,
35
41
  AccessRequestStatusSchema: () => AccessRequestStatusSchema,
42
+ AccessTokenRecordSchema: () => AccessTokenRecordSchema,
43
+ AccessTokenScopeSchema: () => AccessTokenScopeSchema,
36
44
  AccountIdSchema: () => AccountIdSchema,
37
45
  AccountRecordSchema: () => AccountRecordSchema,
38
46
  AccountRoleSchema: () => AccountRoleSchema,
39
47
  AccountStatusSchema: () => AccountStatusSchema,
48
+ AccountThemeSchema: () => AccountThemeSchema,
40
49
  ActionSchema: () => ActionSchema,
41
50
  AircraftAppConfigSchema: () => AircraftAppConfigSchema,
42
51
  AppAlignSchema: () => AppAlignSchema,
@@ -68,106 +77,122 @@ __export(index_exports, {
68
77
  AssetHashSchema: () => AssetHashSchema,
69
78
  AuthStrategySchema: () => AuthStrategySchema,
70
79
  BlockSchema: () => BlockSchema,
80
+ BoardFontSchema: () => BoardFontSchema,
81
+ BoardPaletteHexSchema: () => BoardPaletteHexSchema,
71
82
  Bodewell: () => schema_exports,
72
83
  CLAIMED_DEVICE_TTL_SECONDS: () => CLAIMED_DEVICE_TTL_SECONDS,
84
+ CONTROL_STATES: () => CONTROL_STATES,
85
+ CONTROL_STATE_MEANINGS: () => CONTROL_STATE_MEANINGS,
86
+ CaseFamilySchema: () => CaseFamilySchema,
73
87
  ClockAppConfigSchema: () => ClockAppConfigSchema,
74
- CounterpartyNodeSchema: () => CounterpartyNodeSchema,
75
- CounterpartyResolutionSchema: () => CounterpartyResolutionSchema,
76
- CounterpartyTypeSchema: () => CounterpartyTypeSchema,
88
+ ComponentSchema: () => ComponentSchema,
77
89
  DEFAULT_CHAT_MODEL: () => DEFAULT_CHAT_MODEL,
78
90
  DEFAULT_DEVICE_CONFIG: () => DEFAULT_DEVICE_CONFIG,
79
- DEFAULT_HORIZON_QUARTERS: () => DEFAULT_HORIZON_QUARTERS,
80
91
  DEFAULT_PRO_MODEL: () => DEFAULT_PRO_MODEL,
81
92
  DEFAULT_SCHEMA_MODEL: () => DEFAULT_SCHEMA_MODEL,
82
93
  DEFAULT_THEME_TOKENS: () => DEFAULT_THEME_TOKENS,
83
94
  DEVICE_AP_SSID_PREFIX: () => DEVICE_AP_SSID_PREFIX,
84
95
  DEVICE_ENDPOINTS: () => DEVICE_ENDPOINTS,
96
+ DEVICE_FEATURES: () => DEVICE_FEATURES,
97
+ DEVICE_FEATURE_STATE_LABELS: () => DEVICE_FEATURE_STATE_LABELS,
85
98
  DEVICE_FRESH_MS: () => DEVICE_FRESH_MS,
86
99
  DEVICE_GLYPHS: () => DEVICE_GLYPHS,
87
100
  DEVICE_LABEL_MAX: () => DEVICE_LABEL_MAX,
88
101
  DEVICE_PALETTE: () => DEVICE_PALETTE,
102
+ DEVICE_POLL_QUERY: () => DEVICE_POLL_QUERY,
103
+ DEVICE_PROTOCOL: () => DEVICE_PROTOCOL,
89
104
  DEVICE_STALE_MS: () => DEVICE_STALE_MS,
90
105
  DEVICE_TIMEZONES: () => DEVICE_TIMEZONES,
91
106
  DEVICE_TIMEZONE_FALLBACK: () => DEVICE_TIMEZONE_FALLBACK,
92
107
  DEVICE_TTL_SECONDS: () => DEVICE_TTL_SECONDS,
93
108
  DEVICE_UNKNOWN_GLYPH: () => DEVICE_UNKNOWN_GLYPH,
94
109
  DEVICE_VITALS_FIELDS: () => DEVICE_VITALS_FIELDS,
95
- DailyPricePointSchema: () => DailyPricePointSchema,
110
+ DEVICE_VOICE_CLIP: () => DEVICE_VOICE_CLIP,
111
+ DISPLAY_FACE_MIN_PX: () => DISPLAY_FACE_MIN_PX,
112
+ DISPLAY_NAME_MAX: () => DISPLAY_NAME_MAX,
96
113
  DeliveredAppSchema: () => DeliveredAppSchema,
97
114
  DeviceAppIdSchema: () => DeviceAppIdSchema,
98
115
  DeviceAppsSchema: () => DeviceAppsSchema,
99
116
  DeviceConfigSchema: () => DeviceConfigSchema,
100
117
  DeviceDisplayConfigSchema: () => DeviceDisplayConfigSchema,
118
+ DeviceFeatureKeySchema: () => DeviceFeatureKeySchema,
119
+ DeviceFeatureStateSchema: () => DeviceFeatureStateSchema,
120
+ DeviceFeaturesSchema: () => DeviceFeaturesSchema,
101
121
  DeviceIdSchema: () => DeviceIdSchema,
102
122
  DeviceKindSchema: () => DeviceKindSchema,
123
+ DevicePollReplySchema: () => DevicePollReplySchema,
124
+ DeviceReadingSchema: () => DeviceReadingSchema,
103
125
  DeviceRecordSchema: () => DeviceRecordSchema,
104
126
  DeviceRegistrationSchema: () => DeviceRegistrationSchema,
127
+ DeviceReportSchema: () => DeviceReportSchema,
105
128
  DeviceSeenSchema: () => DeviceSeenSchema,
106
129
  DeviceStatusSchema: () => DeviceStatusSchema,
107
130
  DeviceThemeSchema: () => DeviceThemeSchema,
108
131
  DeviceVitalsSchema: () => DeviceVitalsSchema,
109
- DivergenceMetricSchema: () => DivergenceMetricSchema,
110
- EVENT_KIND_LABELS: () => EVENT_KIND_LABELS,
111
- EXCLUDED_SOURCES: () => EXCLUDED_SOURCES,
112
- EntityEventDensityBucketSchema: () => EntityEventDensityBucketSchema,
113
- EntityEventDensitySchema: () => EntityEventDensitySchema,
114
- EntityEventFacetSchema: () => EntityEventFacetSchema,
115
- EntityEventFacetsSchema: () => EntityEventFacetsSchema,
116
- EntityEventKindSchema: () => EntityEventKindSchema,
117
- EntityEventSchema: () => EntityEventSchema,
118
- EntityPriceSeriesSchema: () => EntityPriceSeriesSchema,
132
+ DeviceVoiceReplySchema: () => DeviceVoiceReplySchema,
133
+ DisplayNameSchema: () => DisplayNameSchema,
134
+ EdgeSchema: () => EdgeSchema,
135
+ EmblemSchema: () => EmblemSchema,
119
136
  EntitySchema: () => EntitySchema,
120
- EventBucketSizeSchema: () => EventBucketSizeSchema,
121
- EventSourceSchema: () => EventSourceSchema,
122
137
  FIRMWARE_UPDATE_ATTEMPTS: () => FIRMWARE_UPDATE_ATTEMPTS,
123
138
  FIRMWARE_UPDATE_PREFIX: () => FIRMWARE_UPDATE_PREFIX,
124
139
  FULL_COLOUR_FRAME_MAX: () => FULL_COLOUR_FRAME_MAX,
125
140
  FULL_RENDITION: () => FULL_RENDITION,
141
+ FamilyChoiceSchema: () => FamilyChoiceSchema,
142
+ FamilyOptionSchema: () => FamilyOptionSchema,
126
143
  FieldSchema: () => FieldSchema,
127
144
  FirmwareUpdateSchema: () => FirmwareUpdateSchema,
145
+ FlexButtonSchema: () => FlexButtonSchema,
128
146
  FloraTelemetrySchema: () => FloraTelemetrySchema,
129
147
  GENESIS_LIBRARY_CONTEXT: () => GENESIS_LIBRARY_CONTEXT,
130
148
  GENESIS_VALID_COMPONENTS: () => GENESIS_VALID_COMPONENTS,
149
+ HardwareManifestSchema: () => HardwareManifestSchema,
131
150
  ICON_GRID: () => ICON_GRID,
132
151
  ICON_SIZE_PX: () => ICON_SIZE_PX,
133
152
  ICON_STROKE: () => ICON_STROKE,
134
153
  IMAGE_MAX_DRAWN: () => IMAGE_MAX_DRAWN,
135
154
  IMAGE_MAX_SCALE: () => IMAGE_MAX_SCALE,
136
- IMPACT_FLAG_THRESHOLD: () => IMPACT_FLAG_THRESHOLD,
137
155
  INVITE_TTL_SECONDS: () => INVITE_TTL_SECONDS,
138
- ImpactScaleSchema: () => ImpactScaleSchema,
156
+ InterfaceSchema: () => InterfaceSchema,
139
157
  InviteRecordSchema: () => InviteRecordSchema,
140
158
  MAX_PASSWORD_LENGTH: () => MAX_PASSWORD_LENGTH,
141
159
  MIN_PASSWORD_LENGTH: () => MIN_PASSWORD_LENGTH,
142
- NonPublicEntitySchema: () => NonPublicEntitySchema,
160
+ MountHolesSchema: () => MountHolesSchema,
161
+ NewAccessTokenSchema: () => NewAccessTokenSchema,
143
162
  ORIGINAL_MAX_BYTES: () => ORIGINAL_MAX_BYTES,
144
163
  ORIGINAL_MAX_SIDE: () => ORIGINAL_MAX_SIDE,
145
164
  OwnedSendRequestSchema: () => OwnedSendRequestSchema,
165
+ PANEL_SIZE: () => PANEL_SIZE,
146
166
  PHOTOS_PER_ACCOUNT: () => PHOTOS_PER_ACCOUNT,
147
167
  PHOTO_UPLOADS_PER_HOUR: () => PHOTO_UPLOADS_PER_HOUR,
148
168
  PROVIDER_DEFAULT_MODEL: () => PROVIDER_DEFAULT_MODEL,
149
169
  PageSchema: () => PageSchema,
150
170
  PageSectionSchema: () => PageSectionSchema,
151
- PaginatedEntityEventsSchema: () => PaginatedEntityEventsSchema,
152
171
  PairCodeSchema: () => PairCodeSchema,
172
+ PanelOrientationSchema: () => PanelOrientationSchema,
153
173
  PhotoCropSchema: () => PhotoCropSchema,
154
174
  PhotoFullSchema: () => PhotoFullSchema,
155
175
  PhotoSummarySchema: () => PhotoSummarySchema,
156
176
  PhotoUploadSchema: () => PhotoUploadSchema,
177
+ PlacementSchema: () => PlacementSchema,
178
+ PrinterProfileSchema: () => PrinterProfileSchema,
157
179
  ProvisioningStateSchema: () => ProvisioningStateSchema,
180
+ PublicAccessTokenSchema: () => PublicAccessTokenSchema,
158
181
  PublicAccountSchema: () => PublicAccountSchema,
159
182
  RETRO_RENDITION: () => RETRO_RENDITION,
160
- RelationshipEdgeSchema: () => RelationshipEdgeSchema,
161
- RelationshipEdgeTypeSchema: () => RelationshipEdgeTypeSchema,
162
183
  ResourceSchema: () => ResourceSchema,
163
184
  SCRYPT_PARAMS: () => SCRYPT_PARAMS,
164
- SENTIMENT_NEUTRAL: () => SENTIMENT_NEUTRAL,
165
185
  SESSION_COOKIE_NAME: () => SESSION_COOKIE_NAME,
166
186
  SESSION_TTL_SECONDS: () => SESSION_TTL_SECONDS,
187
+ SHELF_MAX_APPS: () => SHELF_MAX_APPS,
188
+ SHELF_MAX_BYTES: () => SHELF_MAX_BYTES,
189
+ SHELF_ROTATE_MINUTES: () => SHELF_ROTATE_MINUTES,
167
190
  SIGNAL_DOMAINS: () => SIGNAL_DOMAINS,
168
191
  SIGNAL_KINDS: () => SIGNAL_KINDS,
169
192
  SIGNAL_KIND_LABELS: () => SIGNAL_KIND_LABELS,
170
193
  SIGNAL_SOURCES: () => SIGNAL_SOURCES,
194
+ SMOOTH_FACES: () => SMOOTH_FACES,
195
+ SMOOTH_FONT_ADVANCES: () => SMOOTH_FONT_ADVANCES,
171
196
  SPRITE_MAX_BASE64: () => SPRITE_MAX_BASE64,
172
197
  SPRITE_MAX_ROW_BYTES: () => SPRITE_MAX_ROW_BYTES,
173
198
  SPRITE_MAX_SIDE: () => SPRITE_MAX_SIDE,
@@ -177,18 +202,23 @@ __export(index_exports, {
177
202
  SendRequestSchema: () => SendRequestSchema,
178
203
  SensorAppConfigSchema: () => SensorAppConfigSchema,
179
204
  SessionRecordSchema: () => SessionRecordSchema,
205
+ ShelfEditSchema: () => ShelfEditSchema,
206
+ ShelfSchema: () => ShelfSchema,
180
207
  SignalArraySchema: () => SignalArraySchema,
181
208
  SignalKindSchema: () => SignalKindSchema,
182
209
  SignalPacketSchema: () => SignalPacketSchema,
183
210
  SignalSchema: () => SignalSchema,
184
211
  SignalSourceSchema: () => SignalSourceSchema,
185
- SignalWeightSchema: () => SignalWeightSchema,
212
+ THEME_PALETTE_TOKENS: () => THEME_PALETTE_TOKENS,
186
213
  THEME_PRESETS: () => THEME_PRESETS,
214
+ THEME_RADII: () => THEME_RADII,
187
215
  THEME_SYSTEM_PROMPT: () => THEME_SYSTEM_PROMPT,
188
216
  ThemeFontsSchema: () => ThemeFontsSchema,
217
+ ThemeLetteringSchema: () => ThemeLetteringSchema,
189
218
  ThemeOverridesSchema: () => ThemeOverridesSchema,
219
+ ThemePaletteSchema: () => ThemePaletteSchema,
220
+ ThemeRgbSchema: () => ThemeRgbSchema,
190
221
  ThemeTokensSchema: () => ThemeTokensSchema,
191
- TimestampPrecisionSchema: () => TimestampPrecisionSchema,
192
222
  TriggerSchema: () => TriggerSchema,
193
223
  UserSchema: () => UserSchema,
194
224
  VitalSourceSchema: () => VitalSourceSchema,
@@ -197,13 +227,6 @@ __export(index_exports, {
197
227
  WEATHER_ICON_NAMES: () => WEATHER_ICON_NAMES,
198
228
  WeatherAppConfigSchema: () => WeatherAppConfigSchema,
199
229
  WorkflowSchema: () => WorkflowSchema,
200
- architectureReferenceParameters: () => architectureReferenceParameters,
201
- companyNewsParameters: () => companyNewsParameters,
202
- companyProfileParameters: () => companyProfileParameters,
203
- counterpartyGraphParameters: () => counterpartyGraphParameters,
204
- divergenceMetricsParameters: () => divergenceMetricsParameters,
205
- liveQuoteParameters: () => liveQuoteParameters,
206
- stockChartParameters: () => stockChartParameters,
207
230
  telemetryGraphParameters: () => telemetryGraphParameters
208
231
  });
209
232
  module.exports = __toCommonJS(index_exports);
@@ -370,8 +393,10 @@ var SIGNAL_DOMAINS = {
370
393
  // Track C — latency, uptime, queue depth
371
394
  USER_BEHAVIOR: "user_behavior",
372
395
  // Track D — engagement, conversion, NPS
373
- LOGIC: "logic"
396
+ LOGIC: "logic",
374
397
  // Derived — Methodology Engine outputs
398
+ ENVIRONMENT: "environment"
399
+ // A device's surroundings — temperature, humidity, light
375
400
  };
376
401
 
377
402
  // src/signals/base.schema.ts
@@ -662,7 +687,30 @@ var AppSourceSchema = import_zod6.z.discriminatedUnion("kind", [
662
687
  import_zod6.z.object({
663
688
  kind: import_zod6.z.literal("cycle"),
664
689
  count: import_zod6.z.number().int().min(2).max(12),
665
- minutes: import_zod6.z.number().int().min(1).max(1440).default(5)
690
+ minutes: import_zod6.z.number().int().min(1).max(1440).default(5),
691
+ /**
692
+ * A turn shorter than a minute — a slideshow at 5, 15 or 30 seconds. Wins
693
+ * over `minutes` where it is given; `minutes` stays the nearest whole
694
+ * minute, so a board whose firmware predates this still takes turns,
695
+ * once a minute. Counted the same way: seconds since 1970, in turns.
696
+ */
697
+ seconds: import_zod6.z.number().int().min(5).max(86400).optional()
698
+ }),
699
+ /**
700
+ * The board's own parts: what a sensor plugged into the board it is drawn
701
+ * on is reading right now (docs/superpowers/specs/ramme-lab.md, "The
702
+ * differentiator"). Fields: `temperature`, from a temperature probe, a
703
+ * whole number in `units` like the weather's; and `connected`, whether a
704
+ * probe is plugged in at all. A board with nothing plugged in has no
705
+ * `temperature`, so a binding to it draws the placeholder.
706
+ *
707
+ * The board fills it from the probe (drawApp() in the sketch); a page
708
+ * previewing that board fills it from the readings the board reported
709
+ * (useAppData); the Studio, with no board, shows the placeholder.
710
+ */
711
+ import_zod6.z.object({
712
+ kind: import_zod6.z.literal("board"),
713
+ units: import_zod6.z.enum(["imperial", "metric"]).default("imperial")
666
714
  })
667
715
  ]);
668
716
  var AppOperandSchema = import_zod6.z.union([
@@ -835,6 +883,11 @@ var AppGroupSchema = import_zod6.z.object({
835
883
  children: import_zod6.z.array(AppLeafSchema).min(1).max(8)
836
884
  });
837
885
  var AppBlockSchema = import_zod6.z.union([AppLeafSchema, AppGroupSchema]);
886
+ var PanelOrientationSchema = import_zod6.z.enum(["landscape", "portrait"]);
887
+ var PANEL_SIZE = {
888
+ landscape: { width: 320, height: 240 },
889
+ portrait: { width: 240, height: 320 }
890
+ };
838
891
  var AppScreenSizeSchema = import_zod6.z.preprocess(
839
892
  (value) => value === "240x320" ? "320x240" : value,
840
893
  import_zod6.z.enum(["320x240"])
@@ -865,6 +918,17 @@ var AppDocumentSchema = import_zod6.z.object({
865
918
  * Older firmware draws from the left.
866
919
  */
867
920
  halign: import_zod6.z.enum(["start", "center"]).optional(),
921
+ /**
922
+ * The lettering. `inter` (the default) is Inter, anti-aliased, drawn at
923
+ * each text size from its own font — SMOOTH_FONT_ADVANCES in
924
+ * ./deviceFonts.generated.ts are its widths. `pixel` is the board's
925
+ * built-in 5x7 bitmap font scaled up: the retro look, chunky on purpose.
926
+ * `tay` is TAY Dreamboat, the Ramme display face — capitals only, so
927
+ * lowercase is drawn as capitals; best for signs, times and numbers.
928
+ * Firmware older than 2026-10-18 draws everything in pixel, and older than
929
+ * 2026-10-20 draws `tay` as Inter.
930
+ */
931
+ font: import_zod6.z.enum(["inter", "pixel", "tay"]).optional(),
868
932
  /** Named so bindings can refer to them. */
869
933
  sources: import_zod6.z.record(AppSourceSchema).default({}),
870
934
  blocks: import_zod6.z.array(AppBlockSchema).min(1).max(12)
@@ -954,82 +1018,32 @@ var PhotoSummarySchema = import_zod7.z.object({
954
1018
  });
955
1019
 
956
1020
  // src/apps/delivery.ts
957
- var import_zod8 = require("zod");
958
- var DeviceIdSchema = import_zod8.z.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U");
959
- var PairCodeSchema = import_zod8.z.string().regex(/^\d{4}$/);
960
- var DeviceRegistrationSchema = import_zod8.z.object({
961
- deviceId: DeviceIdSchema,
962
- code: PairCodeSchema,
963
- /** Firmware build, so a support question has an answer. */
964
- version: import_zod8.z.string().max(40).optional(),
965
- /** Which board this is, from Boards.h — the two variants need different firmware. */
966
- board: import_zod8.z.string().max(40).optional(),
967
- /** dBm, always negative. -50 is across the room; -85 is a complaint. */
968
- rssi: import_zod8.z.number().int().min(-127).max(0).optional(),
969
- /** On the owner's own network. Long enough for IPv6, which this does not send yet. */
970
- ip: import_zod8.z.string().max(45).optional(),
971
- /** Seconds since boot. Not growing between check-ins means it is restarting. */
972
- uptime: import_zod8.z.number().int().nonnegative().optional(),
973
- /** Free heap in bytes. */
974
- heap: import_zod8.z.number().int().nonnegative().optional(),
975
- /** The app revision the board has actually drawn. */
976
- drew: import_zod8.z.number().int().nonnegative().optional(),
977
- /** Why it last restarted, already mapped to a word by the firmware. */
978
- reset: import_zod8.z.string().max(40).optional()
979
- });
980
- var SendRequestSchema = import_zod8.z.object({
981
- deviceId: DeviceIdSchema,
982
- code: PairCodeSchema
983
- });
984
- var OwnedSendRequestSchema = import_zod8.z.object({
985
- deviceId: DeviceIdSchema
986
- });
987
- var DeliveredAppSchema = import_zod8.z.object({
988
- revision: import_zod8.z.number().int().nonnegative(),
989
- sentAt: import_zod8.z.number().int().nonnegative()
990
- });
991
- var DeviceRecordSchema = import_zod8.z.object({
992
- deviceId: DeviceIdSchema,
993
- code: PairCodeSchema,
994
- ownerId: import_zod8.z.string().nullable().default(null),
995
- version: import_zod8.z.string().max(40).optional(),
996
- createdAt: import_zod8.z.number().int().nonnegative(),
997
- lastSeenAt: import_zod8.z.number().int().nonnegative()
998
- });
999
- var DEVICE_LABEL_MAX = 48;
1000
- var DEVICE_TTL_SECONDS = 60 * 60 * 24 * 30;
1001
- var CLAIMED_DEVICE_TTL_SECONDS = 60 * 60 * 24 * 400;
1002
- var FirmwareUpdateSchema = import_zod8.z.object({
1003
- version: import_zod8.z.string().min(1).max(40),
1004
- url: import_zod8.z.string().url().max(200),
1005
- sha256: import_zod8.z.string().regex(/^[0-9a-f]{64}$/),
1006
- bytes: import_zod8.z.number().int().positive(),
1007
- requestedAt: import_zod8.z.number().int().nonnegative()
1008
- });
1009
- var FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
1010
- var FIRMWARE_UPDATE_ATTEMPTS = 3;
1021
+ var import_zod9 = require("zod");
1011
1022
 
1012
1023
  // src/apps/vitals.ts
1013
- var import_zod9 = require("zod");
1014
- var VitalSourceSchema = import_zod9.z.enum(["register", "poll", "send"]);
1015
- var DeviceVitalsSchema = import_zod9.z.object({
1024
+ var import_zod8 = require("zod");
1025
+ var VitalSourceSchema = import_zod8.z.enum(["register", "poll", "send"]);
1026
+ var DeviceFeatureStateSchema = import_zod8.z.enum(["working", "missing", "unsupported", "fault"]);
1027
+ var DeviceFeatureKeySchema = import_zod8.z.string().regex(/^[a-z][a-z0-9-]{0,23}$/);
1028
+ var DeviceFeaturesSchema = import_zod8.z.record(DeviceFeatureKeySchema, DeviceFeatureStateSchema).refine((f) => Object.keys(f).length <= 16, { message: "at most 16 features" });
1029
+ var DeviceVitalsSchema = import_zod8.z.object({
1016
1030
  /** When the board last said any of this, by the server's clock. */
1017
- reportedAt: import_zod9.z.number().int().nonnegative().optional(),
1031
+ reportedAt: import_zod8.z.number().int().nonnegative().optional(),
1018
1032
  /**
1019
1033
  * The firmware build. Today every board sends the literal "doc-1", which is a
1020
1034
  * protocol marker rather than a build id — so this is shown as reported and
1021
1035
  * labelled as not yet a version. The real value lives in the published
1022
1036
  * manifest until firmware carries it.
1023
1037
  */
1024
- firmwareVersion: import_zod9.z.string().max(40).optional(),
1038
+ firmwareVersion: import_zod8.z.string().max(40).optional(),
1025
1039
  /** Which board this is. Nothing distinguishes a CYD from a Freenove S3 yet. */
1026
- board: import_zod9.z.string().max(40).optional(),
1040
+ board: import_zod8.z.string().max(40).optional(),
1027
1041
  /** dBm, negative. -50 is across the room, -85 is a complaint. */
1028
- rssi: import_zod9.z.number().int().min(-127).max(0).optional(),
1042
+ rssi: import_zod8.z.number().int().min(-127).max(0).optional(),
1029
1043
  /** The board's address on its own network, as the board sees it. */
1030
- ip: import_zod9.z.string().max(45).optional(),
1031
- uptimeSeconds: import_zod9.z.number().int().nonnegative().optional(),
1032
- freeHeapBytes: import_zod9.z.number().int().nonnegative().optional(),
1044
+ ip: import_zod8.z.string().max(45).optional(),
1045
+ uptimeSeconds: import_zod8.z.number().int().nonnegative().optional(),
1046
+ freeHeapBytes: import_zod8.z.number().int().nonnegative().optional(),
1033
1047
  /**
1034
1048
  * The revision the board is actually showing.
1035
1049
  *
@@ -1037,30 +1051,69 @@ var DeviceVitalsSchema = import_zod9.z.object({
1037
1051
  * value: a send that was never drawn looks identical to a successful one until
1038
1052
  * these two numbers disagree.
1039
1053
  */
1040
- drewRevision: import_zod9.z.number().int().nonnegative().optional(),
1054
+ drewRevision: import_zod8.z.number().int().nonnegative().optional(),
1041
1055
  /** Why it last restarted, if it says. A board power-cycling in a loop is a fault. */
1042
- resetReason: import_zod9.z.string().max(40).optional(),
1056
+ resetReason: import_zod8.z.string().max(40).optional(),
1057
+ /** Its parts and whether each works — see `DeviceFeaturesSchema`. */
1058
+ features: DeviceFeaturesSchema.optional(),
1043
1059
  /** When it last polled — finer-grained than a registration, for liveness only. */
1044
- lastPollAt: import_zod9.z.number().int().nonnegative().optional()
1060
+ lastPollAt: import_zod8.z.number().int().nonnegative().optional()
1045
1061
  });
1046
- var DeviceSeenSchema = import_zod9.z.object({
1062
+ var DeviceSeenSchema = import_zod8.z.object({
1047
1063
  /** When the board last asked for its app. The freshest signal this system has. */
1048
- lastPollAt: import_zod9.z.number().int().nonnegative(),
1064
+ lastPollAt: import_zod8.z.number().int().nonnegative(),
1049
1065
  /** The revision it reported drawing at that moment. */
1050
- drewRevision: import_zod9.z.number().int().nonnegative().optional(),
1066
+ drewRevision: import_zod8.z.number().int().nonnegative().optional(),
1051
1067
  /**
1052
1068
  * The firmware it is running, sent on every poll by builds that can update
1053
1069
  * remotely — so its presence is also the answer to "can this board be
1054
1070
  * updated from its page?". Registration reports the version too, but only
1055
1071
  * every six hours; after a remote update this is what shows it took.
1056
1072
  */
1057
- firmware: import_zod9.z.string().max(40).optional(),
1073
+ firmware: import_zod8.z.string().max(40).optional(),
1058
1074
  /** Photos its app names, and how many of those it holds in flash. */
1059
- photosWanted: import_zod9.z.number().int().nonnegative().optional(),
1060
- photosHeld: import_zod9.z.number().int().nonnegative().optional(),
1075
+ photosWanted: import_zod8.z.number().int().nonnegative().optional(),
1076
+ photosHeld: import_zod8.z.number().int().nonnegative().optional(),
1061
1077
  /** What happened to the last firmware update it tried, in a few words. */
1062
- updateResult: import_zod9.z.string().max(80).optional()
1063
- });
1078
+ updateResult: import_zod8.z.string().max(80).optional(),
1079
+ /**
1080
+ * What the battery line reads, in millivolts — S3 boards only, which have a
1081
+ * divider on GPIO9; a CYD has no way to measure a battery. Shown raw on the
1082
+ * board's page until it has been checked against a real battery, and only
1083
+ * then turned into an icon and a percentage on the glass.
1084
+ */
1085
+ batteryMv: import_zod8.z.number().int().min(0).max(1e4).optional(),
1086
+ /**
1087
+ * The quarter turn its screen is set to (Settings → Turn), 0-3 as LovyanGFX
1088
+ * counts them: even is upright, odd is sideways, the board's 240x320 panel
1089
+ * turned. Its page previews apps the way the board stands (PANEL_SIZE).
1090
+ * Absent from a board older than 2026-10-28, which only ever stood sideways.
1091
+ */
1092
+ rotation: import_zod8.z.number().int().min(0).max(3).optional()
1093
+ });
1094
+ var DeviceReadingSchema = import_zod8.z.object({
1095
+ key: DeviceFeatureKeySchema,
1096
+ value: import_zod8.z.union([import_zod8.z.number().finite(), import_zod8.z.string().max(64), import_zod8.z.boolean()]),
1097
+ unit: import_zod8.z.string().max(16).optional(),
1098
+ at: import_zod8.z.number().int().nonnegative().optional()
1099
+ });
1100
+ var DeviceReportSchema = import_zod8.z.object({
1101
+ readings: import_zod8.z.array(DeviceReadingSchema).min(1).max(16)
1102
+ });
1103
+ var DEVICE_FEATURES = [
1104
+ { key: "screen", label: "Screen" },
1105
+ { key: "touch", label: "Touch" },
1106
+ { key: "speaker", label: "Speaker" },
1107
+ { key: "microphone", label: "Microphone" },
1108
+ { key: "battery", label: "Battery" },
1109
+ { key: "temperature", label: "Temperature probe" }
1110
+ ];
1111
+ var DEVICE_FEATURE_STATE_LABELS = {
1112
+ working: "Working",
1113
+ missing: "None on this board",
1114
+ unsupported: "Not supported yet",
1115
+ fault: "Not working"
1116
+ };
1064
1117
  var DEVICE_VITALS_FIELDS = [
1065
1118
  {
1066
1119
  key: "firmwareVersion",
@@ -1081,11 +1134,84 @@ var DEVICE_VITALS_FIELDS = [
1081
1134
  source: "register",
1082
1135
  reportedByFirmware: true
1083
1136
  },
1084
- { key: "resetReason", label: "Last restart", source: "register", reportedByFirmware: true }
1137
+ { key: "resetReason", label: "Last restart", source: "register", reportedByFirmware: true },
1138
+ {
1139
+ key: "batteryMv",
1140
+ label: "Battery line",
1141
+ unit: "mV",
1142
+ source: "poll",
1143
+ reportedByFirmware: true,
1144
+ note: "Black (S3) boards only, raw and not yet calibrated. A yellow board cannot measure a battery."
1145
+ }
1085
1146
  ];
1086
1147
  var DEVICE_FRESH_MS = 7 * 60 * 60 * 1e3;
1087
1148
  var DEVICE_STALE_MS = 30 * 24 * 60 * 60 * 1e3;
1088
1149
 
1150
+ // src/apps/delivery.ts
1151
+ var DeviceIdSchema = import_zod9.z.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U");
1152
+ var PairCodeSchema = import_zod9.z.string().regex(/^\d{4}$/);
1153
+ var DeviceRegistrationSchema = import_zod9.z.object({
1154
+ deviceId: DeviceIdSchema,
1155
+ code: PairCodeSchema,
1156
+ /** Firmware build, so a support question has an answer. */
1157
+ version: import_zod9.z.string().max(40).optional(),
1158
+ /** Which board this is, from Boards.h — the two variants need different firmware. */
1159
+ board: import_zod9.z.string().max(40).optional(),
1160
+ /** dBm, always negative. -50 is across the room; -85 is a complaint. */
1161
+ rssi: import_zod9.z.number().int().min(-127).max(0).optional(),
1162
+ /** On the owner's own network. Long enough for IPv6, which this does not send yet. */
1163
+ ip: import_zod9.z.string().max(45).optional(),
1164
+ /** Seconds since boot. Not growing between check-ins means it is restarting. */
1165
+ uptime: import_zod9.z.number().int().nonnegative().optional(),
1166
+ /** Free heap in bytes. */
1167
+ heap: import_zod9.z.number().int().nonnegative().optional(),
1168
+ /** The app revision the board has actually drawn. */
1169
+ drew: import_zod9.z.number().int().nonnegative().optional(),
1170
+ /** Why it last restarted, already mapped to a word by the firmware. */
1171
+ reset: import_zod9.z.string().max(40).optional(),
1172
+ /**
1173
+ * What the board has and whether each part works: "speaker: working",
1174
+ * "battery: missing". This describes the device — its own hardware, as its
1175
+ * own check screen reports it — and never the room: a state, not a reading.
1176
+ * What the microphone heard, a sensor's value, or anything a part could
1177
+ * learn about its surroundings does not belong here and is not representable
1178
+ * (DeviceFeatureStateSchema is four words). Readings, when they come, travel
1179
+ * as Signals and are argued for on their own.
1180
+ */
1181
+ features: DeviceFeaturesSchema.optional()
1182
+ });
1183
+ var SendRequestSchema = import_zod9.z.object({
1184
+ deviceId: DeviceIdSchema,
1185
+ code: PairCodeSchema
1186
+ });
1187
+ var OwnedSendRequestSchema = import_zod9.z.object({
1188
+ deviceId: DeviceIdSchema
1189
+ });
1190
+ var DeliveredAppSchema = import_zod9.z.object({
1191
+ revision: import_zod9.z.number().int().nonnegative(),
1192
+ sentAt: import_zod9.z.number().int().nonnegative()
1193
+ });
1194
+ var DeviceRecordSchema = import_zod9.z.object({
1195
+ deviceId: DeviceIdSchema,
1196
+ code: PairCodeSchema,
1197
+ ownerId: import_zod9.z.string().nullable().default(null),
1198
+ version: import_zod9.z.string().max(40).optional(),
1199
+ createdAt: import_zod9.z.number().int().nonnegative(),
1200
+ lastSeenAt: import_zod9.z.number().int().nonnegative()
1201
+ });
1202
+ var DEVICE_LABEL_MAX = 48;
1203
+ var DEVICE_TTL_SECONDS = 60 * 60 * 24 * 30;
1204
+ var CLAIMED_DEVICE_TTL_SECONDS = 60 * 60 * 24 * 400;
1205
+ var FirmwareUpdateSchema = import_zod9.z.object({
1206
+ version: import_zod9.z.string().min(1).max(40),
1207
+ url: import_zod9.z.string().url().max(200),
1208
+ sha256: import_zod9.z.string().regex(/^[0-9a-f]{64}$/),
1209
+ bytes: import_zod9.z.number().int().positive(),
1210
+ requestedAt: import_zod9.z.number().int().nonnegative()
1211
+ });
1212
+ var FIRMWARE_UPDATE_PREFIX = "https://www.ramme.io/firmware/weather-display/";
1213
+ var FIRMWARE_UPDATE_ATTEMPTS = 3;
1214
+
1089
1215
  // src/apps/glyphs.ts
1090
1216
  var DEVICE_UNKNOWN_GLYPH = "?";
1091
1217
  var DEVICE_GLYPHS = {
@@ -1161,6 +1287,7 @@ var DEVICE_GLYPHS = {
1161
1287
  "\u2212": { byte: 45, shows: "-" },
1162
1288
  "\xA0": { byte: 32, shows: " " }
1163
1289
  };
1290
+ var DISPLAY_FACE_MIN_PX = 28;
1164
1291
  var DEVICE_PALETTE = {
1165
1292
  background: "17 17 17",
1166
1293
  foreground: "238 238 238",
@@ -1291,74 +1418,183 @@ var WEATHER_ICONS = {
1291
1418
  ]
1292
1419
  };
1293
1420
 
1294
- // src/ai/tools.ts
1421
+ // src/apps/shelf.ts
1295
1422
  var import_zod10 = require("zod");
1296
- var telemetryGraphParameters = import_zod10.z.object({
1297
- deviceId: import_zod10.z.string().min(1, "Device ID is required"),
1298
- timeRange: import_zod10.z.enum(["1h", "24h", "7d"], {
1423
+ var SHELF_MAX_APPS = 8;
1424
+ var SHELF_MAX_BYTES = 24e3;
1425
+ var SHELF_ROTATE_MINUTES = [0, 1, 5, 15, 30, 60];
1426
+ var ShelfSchema = import_zod10.z.object({
1427
+ apps: import_zod10.z.array(AppDocumentSchema).min(1).max(SHELF_MAX_APPS),
1428
+ /** Which app to show — an index into `apps`. */
1429
+ show: import_zod10.z.number().int().min(0).max(SHELF_MAX_APPS - 1),
1430
+ /** Move to the next app every this many minutes; 0 holds still. */
1431
+ rotateMinutes: import_zod10.z.number().int().min(0).max(1440).default(0),
1432
+ /**
1433
+ * When each app was last sent, aligned with `apps`. The server's
1434
+ * bookkeeping, not the board's: a send to a full shelf takes off the app
1435
+ * sent longest ago, so sending always works. Missing reads as oldest.
1436
+ */
1437
+ added: import_zod10.z.array(import_zod10.z.number().int().nonnegative()).max(SHELF_MAX_APPS).optional()
1438
+ });
1439
+ var ShelfEditSchema = import_zod10.z.discriminatedUnion("op", [
1440
+ import_zod10.z.object({ op: import_zod10.z.literal("show"), deviceId: DeviceIdSchema, index: import_zod10.z.number().int().min(0) }),
1441
+ import_zod10.z.object({ op: import_zod10.z.literal("remove"), deviceId: DeviceIdSchema, index: import_zod10.z.number().int().min(0) }),
1442
+ import_zod10.z.object({
1443
+ op: import_zod10.z.literal("move"),
1444
+ deviceId: DeviceIdSchema,
1445
+ from: import_zod10.z.number().int().min(0),
1446
+ to: import_zod10.z.number().int().min(0)
1447
+ }),
1448
+ import_zod10.z.object({ op: import_zod10.z.literal("rotate"), deviceId: DeviceIdSchema, minutes: import_zod10.z.number().int().min(0).max(1440) }),
1449
+ /**
1450
+ * Swap the panel's light and dark. Not about apps, but it rides the same
1451
+ * route and the same poll: some units of the same board carry a panel wired
1452
+ * the other way, so one shows white on black and its twin black on white
1453
+ * from identical firmware. It is a fact about one board's glass, so it is a
1454
+ * per-board setting rather than a build.
1455
+ */
1456
+ import_zod10.z.object({ op: import_zod10.z.literal("screen"), deviceId: DeviceIdSchema, invert: import_zod10.z.boolean() }),
1457
+ /**
1458
+ * Remove one entry from the list of apps sent to this board, by the revision
1459
+ * it was sent as. The record only: what the board holds is the shelf's
1460
+ * business, and `remove` above is how an app comes off it.
1461
+ */
1462
+ import_zod10.z.object({ op: import_zod10.z.literal("forget"), deviceId: DeviceIdSchema, revision: import_zod10.z.number().int().min(1) })
1463
+ ]);
1464
+
1465
+ // src/apps/protocol.ts
1466
+ var import_zod12 = require("zod");
1467
+
1468
+ // src/theme/account.ts
1469
+ var import_zod11 = require("zod");
1470
+ var ThemeRgbSchema = import_zod11.z.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");
1471
+ var ThemePaletteSchema = import_zod11.z.object({
1472
+ background: ThemeRgbSchema,
1473
+ /** Text. */
1474
+ foreground: ThemeRgbSchema,
1475
+ /** Quieter text: labels, captions, the second line. */
1476
+ muted: ThemeRgbSchema,
1477
+ /** The brand colour: buttons and links on the site, highlights on a board. */
1478
+ accent: ThemeRgbSchema,
1479
+ success: ThemeRgbSchema,
1480
+ warning: ThemeRgbSchema,
1481
+ danger: ThemeRgbSchema
1482
+ });
1483
+ var THEME_PALETTE_TOKENS = [
1484
+ "background",
1485
+ "foreground",
1486
+ "muted",
1487
+ "accent",
1488
+ "success",
1489
+ "warning",
1490
+ "danger"
1491
+ ];
1492
+ var ThemeLetteringSchema = import_zod11.z.enum(["inter", "tay", "pixel"]);
1493
+ var THEME_RADII = ["0rem", "0.25rem", "0.5rem", "0.75rem", "1rem"];
1494
+ var AccountThemeSchema = import_zod11.z.object({
1495
+ name: import_zod11.z.string().trim().min(1).max(40),
1496
+ /** The preset it started from, when it started from one. */
1497
+ base: import_zod11.z.string().max(40).optional(),
1498
+ light: ThemePaletteSchema,
1499
+ dark: ThemePaletteSchema,
1500
+ lettering: ThemeLetteringSchema,
1501
+ radius: import_zod11.z.enum(THEME_RADII)
1502
+ });
1503
+
1504
+ // src/apps/protocol.ts
1505
+ var DEVICE_PROTOCOL = {
1506
+ /** POST `DeviceRegistration` → 200. On boot and every six hours. */
1507
+ register: { method: "POST", path: "/api/device/register" },
1508
+ /**
1509
+ * GET `?id=&since=<revision>` plus what the board says about itself
1510
+ * (`DEVICE_POLL_QUERY`) → 200 `DevicePollReply`, 304 when nothing is newer
1511
+ * than `since`, 204 when nothing has ever been sent.
1512
+ */
1513
+ poll: { method: "GET", path: "/api/device/app" },
1514
+ /** POST `DeviceReport` → 202. Only while the board has readings to give. */
1515
+ report: { method: "POST", path: "/api/device/report" },
1516
+ /**
1517
+ * GET `?id=&hash=<sha256>` → 200 raw bytes, 404 for anything it may not
1518
+ * have. Only a hash an app on the board names; the board keeps the file.
1519
+ */
1520
+ photo: { method: "GET", path: "/api/device/photo" },
1521
+ /**
1522
+ * POST `?id=` with a clip (`DEVICE_VOICE_CLIP`) as the raw body → 200
1523
+ * `DeviceVoiceReply`. Only while the talk button is held: a board never
1524
+ * listens on its own. 501 means this server has no transcriber, which a
1525
+ * board shows as "voice is off here" rather than an error; 403 that this
1526
+ * board may not use it; 413 a clip over the limit.
1527
+ *
1528
+ * Which machine turns speech into text is the server's business, not the
1529
+ * board's (docs/superpowers/specs/ramme-lab.md, "Voice"): a home server runs
1530
+ * a local model, ramme.io a metered cloud one. The board sends the same clip
1531
+ * to either.
1532
+ */
1533
+ voice: { method: "POST", path: "/api/device/voice" }
1534
+ };
1535
+ var DEVICE_VOICE_CLIP = {
1536
+ contentType: "audio/wav",
1537
+ sampleRate: 16e3,
1538
+ bitsPerSample: 16,
1539
+ channels: 1,
1540
+ maxSeconds: 15,
1541
+ /** The 44-byte header plus fifteen seconds of samples. */
1542
+ maxBytes: 44 + 16e3 * 2 * 15
1543
+ };
1544
+ var DeviceVoiceReplySchema = import_zod12.z.object({
1545
+ text: import_zod12.z.string().max(2e3)
1546
+ });
1547
+ var DEVICE_POLL_QUERY = {
1548
+ id: "the board id (required)",
1549
+ since: "the revision on the glass now",
1550
+ v: "the firmware version it runs",
1551
+ ph: 'photos held / photos wanted, as "3/4"',
1552
+ sh: '"1" when it can hold a shelf of apps rather than one',
1553
+ inv: 'its light/dark panel setting, "0" or "1"',
1554
+ rot: "which way it stands, 0\u20133",
1555
+ pl: "the palette it draws in, as 42 hex digits",
1556
+ fn: "the lettering it draws in",
1557
+ bt: "battery millivolts",
1558
+ u: "what happened to the last update it was asked to install"
1559
+ };
1560
+ var BoardPaletteHexSchema = import_zod12.z.string().regex(/^[0-9a-f]{42}$/);
1561
+ var BoardFontSchema = import_zod12.z.union([import_zod12.z.literal("auto"), ThemeLetteringSchema]);
1562
+ var DevicePollReplySchema = import_zod12.z.object({
1563
+ revision: import_zod12.z.number().int().nonnegative(),
1564
+ sentAt: import_zod12.z.number().int().nonnegative().optional(),
1565
+ document: AppDocumentSchema.optional(),
1566
+ shelf: ShelfSchema.optional(),
1567
+ update: FirmwareUpdateSchema.optional(),
1568
+ screen: import_zod12.z.object({ invert: import_zod12.z.boolean() }).optional(),
1569
+ palette: BoardPaletteHexSchema.optional(),
1570
+ font: BoardFontSchema.optional()
1571
+ });
1572
+
1573
+ // src/apps/deviceFonts.generated.ts
1574
+ var SMOOTH_FACES = { "inter": { "family": "Inter", "weight": 500, "caps": false }, "tay": { "family": "TAY Dreamboat", "weight": 400, "caps": true } };
1575
+ 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 } } };
1576
+
1577
+ // src/ai/tools.ts
1578
+ var import_zod13 = require("zod");
1579
+ var telemetryGraphParameters = import_zod13.z.object({
1580
+ deviceId: import_zod13.z.string().min(1, "Device ID is required"),
1581
+ timeRange: import_zod13.z.enum(["1h", "24h", "7d"], {
1299
1582
  errorMap: () => ({ message: "Time range must be 1h, 24h, or 7d" })
1300
1583
  }),
1301
- metrics: import_zod10.z.array(
1302
- import_zod10.z.enum(["temperature", "humidity", "vwc", "ec", "ph", "pressure", "co2"])
1584
+ metrics: import_zod13.z.array(
1585
+ import_zod13.z.enum(["temperature", "humidity", "vwc", "ec", "ph", "pressure", "co2"])
1303
1586
  ).min(1, "At least one metric is required").max(4, "Maximum 4 metrics per graph")
1304
1587
  });
1305
- var stockChartParameters = import_zod10.z.object({
1306
- ticker: import_zod10.z.string().min(1).describe("The stock ticker symbol explicitly requested by the user. YOU MUST EXTRACT AND PROVIDE THIS (e.g., 'AAPL', 'MSFT')."),
1307
- timeRange: import_zod10.z.enum(["1D", "1W", "1M", "1Y"], {
1308
- errorMap: () => ({ message: "Time range must be 1D, 1W, 1M, or 1Y" })
1309
- }).describe("The time range for the chart. Choose based on user request or default to '1M'."),
1310
- metrics: import_zod10.z.array(import_zod10.z.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.")
1311
- });
1312
- var tickerParam = import_zod10.z.string().min(1).describe("The stock ticker symbol (e.g., 'AAPL', 'TSLA', 'MSFT').");
1313
- var liveQuoteParameters = import_zod10.z.object({ ticker: tickerParam });
1314
- var companyNewsParameters = import_zod10.z.object({ ticker: tickerParam });
1315
- var companyProfileParameters = import_zod10.z.object({ ticker: tickerParam });
1316
- var counterpartyGraphParameters = import_zod10.z.object({
1317
- ticker: tickerParam,
1318
- hops: import_zod10.z.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.")
1319
- });
1320
- var divergenceMetricsParameters = import_zod10.z.object({ ticker: tickerParam });
1321
- var architectureReferenceParameters = import_zod10.z.object({});
1322
1588
  var AI_TOOLS = {
1323
1589
  get_telemetry_graph: {
1324
1590
  name: "get_telemetry_graph",
1325
1591
  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.",
1326
- parameters: telemetryGraphParameters
1327
- },
1328
- get_stock_chart: {
1329
- name: "get_stock_chart",
1330
- 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.",
1331
- parameters: stockChartParameters
1332
- },
1333
- get_live_quote: {
1334
- name: "get_live_quote",
1335
- description: "Fetches and displays the real-time stock price and daily change percentage for a given company ticker symbol.",
1336
- parameters: liveQuoteParameters
1337
- },
1338
- get_company_news: {
1339
- name: "get_company_news",
1340
- description: "Fetches and displays the 5 most recent news headlines and sentiment impact scores for a given company ticker symbol.",
1341
- parameters: companyNewsParameters
1342
- },
1343
- get_company_profile: {
1344
- name: "get_company_profile",
1345
- description: "Fetches fundamental company data including the business description, sector, industry, market cap, and P/E ratio.",
1346
- parameters: companyProfileParameters
1347
- },
1348
- get_counterparty_graph: {
1349
- name: "get_counterparty_graph",
1350
- 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.",
1351
- parameters: counterpartyGraphParameters
1352
- },
1353
- get_divergence_metrics: {
1354
- name: "get_divergence_metrics",
1355
- 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.",
1356
- parameters: divergenceMetricsParameters
1357
- },
1358
- get_architecture_reference: {
1359
- name: "get_architecture_reference",
1360
- 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.",
1361
- parameters: architectureReferenceParameters
1592
+ parameters: telemetryGraphParameters,
1593
+ promptParameters: `{
1594
+ "deviceId": "string (required)",
1595
+ "timeRange": "enum: '1h' | '24h' | '7d' (required)",
1596
+ "metrics": "array of enum: 'temperature' | 'humidity' | 'vwc' | 'ec' | 'ph' | 'pressure' | 'co2' (1-4 items required)"
1597
+ }`
1362
1598
  }
1363
1599
  };
1364
1600
 
@@ -1590,6 +1826,9 @@ A row splits the width into equal cells. Add "pack": true and each child takes
1590
1826
  only its own width, "gap" apart \u2014 a number with its icon right beside it, or
1591
1827
  "H 68\xB0 L 56\xB0" as one line. Put "valign": "center" at the top level of the
1592
1828
  document to centre the blocks on the screen rather than start at the top, and
1829
+ "font": "pixel" for chunky retro lettering or "font": "tay" for the Ramme
1830
+ display face, all capitals, good for signs and big numbers (the default is a
1831
+ smooth plain face), and
1593
1832
  "halign": "center" to centre them across it \u2014 the lines keep their own
1594
1833
  alignment inside a column as wide as the widest, and the column is centred.
1595
1834
 
@@ -1691,6 +1930,14 @@ SOURCES \u2014 declare what the app reads, then bind to it by name:
1691
1930
  For things that take turns: give each block "hideWhen": { "value":
1692
1931
  { "source": "turn", "field": "index" }, "op": "!=", "than": N } so only
1693
1932
  block N shows on turn N. The board changes at most once a minute.
1933
+ "probe": { "kind": "board", "units": "imperial" }
1934
+ fields: temperature, connected
1935
+ What a sensor plugged into the board itself is reading: a temperature
1936
+ probe's temperature, a whole number in units, updated about once a
1937
+ second. connected is false when nothing is plugged in, and temperature
1938
+ is then missing (it draws "--"): use hideWhen on connected to show
1939
+ "Plug in the probe" instead. Use this, not weather, for "my sensor",
1940
+ "the probe", "water temperature" and the like.
1694
1941
 
1695
1942
  RULES
1696
1943
 
@@ -1710,12 +1957,12 @@ RULES
1710
1957
  var APP_DOCUMENT_EDIT_PREFIX = "Here is the current app. Change only what is asked:";
1711
1958
 
1712
1959
  // src/theme/schema.ts
1713
- var import_zod11 = require("zod");
1714
- var RGBString = import_zod11.z.string().regex(
1960
+ var import_zod14 = require("zod");
1961
+ var RGBString = import_zod14.z.string().regex(
1715
1962
  /^\d{1,3}\s+\d{1,3}\s+\d{1,3}$/,
1716
1963
  'Must be space-separated RGB integers (e.g. "13 110 253")'
1717
1964
  );
1718
- var ThemeOverridesSchema = import_zod11.z.object({
1965
+ var ThemeOverridesSchema = import_zod14.z.object({
1719
1966
  // ── Core Brand ───────────────────────────────────────────────────────────
1720
1967
  "--app-primary-color": RGBString.optional(),
1721
1968
  "--app-primary-foreground-color": RGBString.optional(),
@@ -1731,9 +1978,9 @@ var ThemeOverridesSchema = import_zod11.z.object({
1731
1978
  "--app-muted-bg": RGBString.optional(),
1732
1979
  "--app-muted-text": RGBString.optional(),
1733
1980
  // ── Shape ────────────────────────────────────────────────────────────────
1734
- "--app-border-radius-sm": import_zod11.z.string().optional(),
1735
- "--app-border-radius-md": import_zod11.z.string().optional(),
1736
- "--app-border-radius-lg": import_zod11.z.string().optional(),
1981
+ "--app-border-radius-sm": import_zod14.z.string().optional(),
1982
+ "--app-border-radius-md": import_zod14.z.string().optional(),
1983
+ "--app-border-radius-lg": import_zod14.z.string().optional(),
1737
1984
  // ── Form Controls ────────────────────────────────────────────────────────
1738
1985
  "--app-input-bg-color": RGBString.optional(),
1739
1986
  "--app-input-text-color": RGBString.optional(),
@@ -1747,19 +1994,19 @@ var ThemeOverridesSchema = import_zod11.z.object({
1747
1994
  "--app-chart-4": RGBString.optional(),
1748
1995
  "--app-chart-5": RGBString.optional()
1749
1996
  }).strict();
1750
- var ThemeFontsSchema = import_zod11.z.object({
1997
+ var ThemeFontsSchema = import_zod14.z.object({
1751
1998
  /** Google Font name for headings (h1–h4, .font-serif). Example: "Playfair Display" */
1752
- heading: import_zod11.z.string(),
1999
+ heading: import_zod14.z.string(),
1753
2000
  /** Google Font name for body text. Example: "Inter" */
1754
- body: import_zod11.z.string(),
2001
+ body: import_zod14.z.string(),
1755
2002
  /** Optional monospace font. Example: "Roboto Mono" */
1756
- mono: import_zod11.z.string().optional()
2003
+ mono: import_zod14.z.string().optional()
1757
2004
  });
1758
- var AIThemeSchema = import_zod11.z.object({
2005
+ var AIThemeSchema = import_zod14.z.object({
1759
2006
  /** Short descriptive theme name. Example: "Midnight Garden" */
1760
- name: import_zod11.z.string(),
2007
+ name: import_zod14.z.string(),
1761
2008
  /** One-sentence vibe description. Example: "Dark indigo with golden accents." */
1762
- description: import_zod11.z.string(),
2009
+ description: import_zod14.z.string(),
1763
2010
  /** Google Font pairing for heading and body text. */
1764
2011
  fonts: ThemeFontsSchema.optional(),
1765
2012
  /**
@@ -1770,13 +2017,13 @@ var AIThemeSchema = import_zod11.z.object({
1770
2017
  cssVars: ThemeOverridesSchema
1771
2018
  });
1772
2019
  var THEME_PRESETS = ["light", "dark", "system", "corporate", "midnight", "blueprint"];
1773
- var ThemeTokensSchema = import_zod11.z.object({
2020
+ var ThemeTokensSchema = import_zod14.z.object({
1774
2021
  primary: RGBString,
1775
2022
  neutral: RGBString,
1776
2023
  success: RGBString,
1777
2024
  warning: RGBString,
1778
2025
  destructive: RGBString,
1779
- radius: import_zod11.z.enum(["none", "sm", "md", "lg", "full"])
2026
+ radius: import_zod14.z.enum(["none", "sm", "md", "lg", "full"])
1780
2027
  });
1781
2028
  var DEFAULT_THEME_TOKENS = {
1782
2029
  primary: "13 110 253",
@@ -1787,82 +2034,355 @@ var DEFAULT_THEME_TOKENS = {
1787
2034
  radius: "md"
1788
2035
  };
1789
2036
 
2037
+ // src/theme/controls.ts
2038
+ var CONTROL_STATES = ["rest", "pressed", "busy", "disabled", "focused"];
2039
+ var CONTROL_STATE_MEANINGS = {
2040
+ rest: { means: "The control, in the theme\u2019s surface or accent.", web: "default" },
2041
+ pressed: { means: "Lit the moment a finger lands on it.", web: ":active" },
2042
+ busy: { means: "Stays lit while its action runs; nothing else on screen moves.", web: "loading" },
2043
+ disabled: { means: "Muted, and a tap does nothing.", web: "disabled" },
2044
+ focused: { means: "Highlighted by a knob or a key: the control choosing would press.", web: ":focus-visible" }
2045
+ };
2046
+
2047
+ // src/enclosures/schema.ts
2048
+ var import_zod15 = require("zod");
2049
+ var Mm = import_zod15.z.number().finite();
2050
+ var PositiveMm = Mm.positive();
2051
+ var NonNegativeMm = Mm.nonnegative();
2052
+ var PrinterProfileSchema = import_zod15.z.object({
2053
+ name: import_zod15.z.string().min(1).default("Bambu Lab X1 Carbon"),
2054
+ /** Walls are whole multiples of this. */
2055
+ nozzle: PositiveMm.default(0.4),
2056
+ /** Gap for parts that slide together: the case's lip, a lid. */
2057
+ clearance_slip: NonNegativeMm.default(0.2),
2058
+ /** Gap for a friction fit. */
2059
+ clearance_press: NonNegativeMm.default(0.1)
2060
+ });
2061
+ var EdgeSchema = import_zod15.z.enum(["east", "west", "north", "south", "top", "bottom"]);
2062
+ var FlexButtonSchema = import_zod15.z.object({
2063
+ /** The tongue's length, from its free end to where it joins the floor. */
2064
+ length: PositiveMm.default(12),
2065
+ /** Its width. */
2066
+ width: PositiveMm.default(5),
2067
+ /** The way from the switch to where the tongue joins the floor. */
2068
+ hinge: import_zod15.z.enum(["east", "west", "north", "south"])
2069
+ });
2070
+ var InterfaceSchema = import_zod15.z.object({
2071
+ /** usb_c, screen, reset_button, status_led, sd_card… */
2072
+ name: import_zod15.z.string().min(1),
2073
+ edge: EdgeSchema,
2074
+ /** From the centre of that face — see COORDINATES above. */
2075
+ offset_from_center: import_zod15.z.tuple([Mm, Mm]).default([0, 0]),
2076
+ /**
2077
+ * A grille is a field of small round holes filling an ellipse of
2078
+ * `cutout_size` — a speaker's — on a top or bottom face only.
2079
+ */
2080
+ cutout_shape: import_zod15.z.enum(["rect", "rounded_rect", "circle", "grille"]),
2081
+ /** [width, height] of the opening, including room for a plug's boot. A circle uses the first as its diameter. */
2082
+ cutout_size: import_zod15.z.tuple([PositiveMm, PositiveMm]),
2083
+ /** How far the part sticks out past the component's edge. */
2084
+ protrusion: NonNegativeMm.default(0),
2085
+ /** A wider recess on the outside face, [width, height, depth], for a thick cable boot. */
2086
+ outer_recess: import_zod15.z.tuple([PositiveMm, PositiveMm, PositiveMm]).optional(),
2087
+ /** Press it through the floor instead of opening a hole — see FlexButtonSchema. */
2088
+ flex_button: FlexButtonSchema.optional(),
2089
+ /**
2090
+ * A 45° ramp this deep round the opening at the outside face, widening it
2091
+ * by this much a side there. For a screen set back behind a bezel: the
2092
+ * picture's edges stay in view and a fingertip reaches them. Top or bottom
2093
+ * openings only.
2094
+ */
2095
+ chamfer: NonNegativeMm.optional()
2096
+ });
2097
+ var MountHolesSchema = import_zod15.z.object({
2098
+ /** Four holes, this far in from each corner: [east-west, north-south]. */
2099
+ inset_from_corners: import_zod15.z.tuple([PositiveMm, PositiveMm]).optional(),
2100
+ /** Or exactly where they are: [east, north] from the footprint centre. */
2101
+ positions: import_zod15.z.array(import_zod15.z.tuple([Mm, Mm])).min(1).optional(),
2102
+ thread: import_zod15.z.enum(["M2", "M2.5", "M3"]),
2103
+ /** Heat-set insert outer diameter and depth. split_shell_lip only: tray_bezel's screws cut their own thread. */
2104
+ insert_od: PositiveMm.optional(),
2105
+ insert_depth: PositiveMm.optional()
2106
+ }).refine((m) => (m.inset_from_corners ? 1 : 0) + (m.positions ? 1 : 0) === 1, {
2107
+ message: "give either inset_from_corners or positions, not both or neither"
2108
+ });
2109
+ var PlacementSchema = import_zod15.z.object({
2110
+ relative_to: import_zod15.z.string().min(1),
2111
+ where: import_zod15.z.enum(["below", "above", "east", "west", "north", "south"]),
2112
+ /** Space between the two keep-outs. */
2113
+ gap: NonNegativeMm.default(1),
2114
+ /** Moved this far [east, north] from centred on the other, once placed. */
2115
+ offset: import_zod15.z.tuple([Mm, Mm]).default([0, 0])
2116
+ });
2117
+ var ComponentSchema = import_zod15.z.object({
2118
+ id: import_zod15.z.string().regex(/^[a-z][a-z0-9_]*$/, "lowercase letters, digits and underscores"),
2119
+ type: import_zod15.z.enum(["pcb", "display", "battery", "speaker", "module"]),
2120
+ /** [east, north, up] — see COORDINATES. */
2121
+ dimensions: import_zod15.z.tuple([PositiveMm, PositiveMm, PositiveMm]),
2122
+ /**
2123
+ * Radius of the footprint's corners: most boards are rounded. The case's
2124
+ * inside corners follow it, so a rounded board gets a rounded tray without
2125
+ * the tray growing wider. Leave it at 0 for a square one, or when unsure —
2126
+ * assuming sharper than the part is safe, rounder is not.
2127
+ */
2128
+ corner_radius: NonNegativeMm.default(0),
2129
+ /** Height of the tallest part on top (headers, capacitors, a connector), kept clear. */
2130
+ clearance_z_top: NonNegativeMm.default(0),
2131
+ /** Height of what is underneath (solder joints, a microSD socket), kept clear. */
2132
+ clearance_z_bottom: NonNegativeMm.default(0),
2133
+ /** Quarter turns about Z, applied before placement. */
2134
+ rotation: import_zod15.z.union([import_zod15.z.literal(0), import_zod15.z.literal(90), import_zod15.z.literal(180), import_zod15.z.literal(270)]).default(0),
2135
+ placement: PlacementSchema.optional(),
2136
+ mount_holes: MountHolesSchema.optional(),
2137
+ interfaces: import_zod15.z.array(InterfaceSchema).default([]),
2138
+ /** How it is held if it has no screw holes. */
2139
+ retention: import_zod15.z.enum(["none", "cradle_ribs"]).default("none")
2140
+ });
2141
+ var EmblemSchema = import_zod15.z.object({
2142
+ /** The SVG file, relative to the manifest. Filled paths only; strokes are ignored. */
2143
+ svg: import_zod15.z.string().min(1),
2144
+ face: import_zod15.z.enum(["top", "bottom"]).default("bottom"),
2145
+ /** Height of the mark on the face, along north. Its width follows the SVG's proportions. */
2146
+ height: PositiveMm,
2147
+ /** How deep it is pressed in. */
2148
+ depth: PositiveMm.default(0.6),
2149
+ /** From the centre of the case's footprint, [east, north]. */
2150
+ offset: import_zod15.z.tuple([Mm, Mm]).default([0, 0]),
2151
+ /**
2152
+ * Cut it right through the face instead, as a stencil — a speaker's grille
2153
+ * in the shape of the mark. Whatever its lines enclose would fall out, so
2154
+ * each enclosed piece is held by bridges across a line: give them here, in
2155
+ * millimetres from the mark's centre as it reads (y up), each turned
2156
+ * `angle` degrees from running east-west. Pieces too small to hold
2157
+ * (STENCIL_SPECK) are cut away; a larger one with no bridge fails the fit
2158
+ * check, by where it is.
2159
+ */
2160
+ stencil: import_zod15.z.object({
2161
+ bridges: import_zod15.z.array(import_zod15.z.object({ at: import_zod15.z.tuple([Mm, Mm]), angle: import_zod15.z.number().default(0), length: PositiveMm.default(3) })).default([])
2162
+ }).optional()
2163
+ });
2164
+ var HardwareManifestSchema = import_zod15.z.object({
2165
+ project: import_zod15.z.string().regex(/^[a-z0-9][a-z0-9_-]*$/, "lowercase, digits, - and _"),
2166
+ /** How the case goes together — see TWO STYLES above. */
2167
+ enclosure_style: import_zod15.z.enum(["split_shell_lip", "tray_bezel"]).default("split_shell_lip"),
2168
+ wall_thickness: PositiveMm.default(2.4),
2169
+ /**
2170
+ * Thicker walls on chosen sides, in place of `wall_thickness` there. A
2171
+ * screen whose glass is as wide as its board otherwise gets 2.4mm of frame
2172
+ * along its sides and 11mm at its ends, which looks off balance (the
2173
+ * black ESP32-S3 board's flush case, 2026-10-25). Each is a whole number
2174
+ * of nozzle lines, and no thinner than `wall_thickness`.
2175
+ */
2176
+ walls: import_zod15.z.object({ east: PositiveMm, west: PositiveMm, north: PositiveMm, south: PositiveMm }).partial().default({}),
2177
+ /** Radius of the vertical outside corners. */
2178
+ corner_radius: NonNegativeMm.default(2),
2179
+ /**
2180
+ * The outside's front and back edges — where the face meets the sides.
2181
+ * `chamfer` bevels them flat at 45°, `round` rounds them; `soften` then
2182
+ * rounds every edge the bevel leaves, so nothing on the outside is sharp.
2183
+ * Without it they are square, and a case reads as a printed box.
2184
+ */
2185
+ edges: import_zod15.z.object({
2186
+ style: import_zod15.z.enum(["chamfer", "round"]),
2187
+ size: PositiveMm,
2188
+ soften: NonNegativeMm.default(0)
2189
+ }).optional(),
2190
+ printer: PrinterProfileSchema.default({}),
2191
+ components: import_zod15.z.array(ComponentSchema).min(1),
2192
+ emblem: EmblemSchema.optional()
2193
+ }).superRefine((m, ctx) => {
2194
+ const lines = m.wall_thickness / m.printer.nozzle;
2195
+ if (Math.abs(lines - Math.round(lines)) > 1e-6) {
2196
+ ctx.addIssue({
2197
+ code: import_zod15.z.ZodIssueCode.custom,
2198
+ path: ["wall_thickness"],
2199
+ 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)}`
2200
+ });
2201
+ }
2202
+ for (const [side, t] of Object.entries(m.walls)) {
2203
+ if (t === void 0) continue;
2204
+ const n = t / m.printer.nozzle;
2205
+ if (Math.abs(n - Math.round(n)) > 1e-6) {
2206
+ ctx.addIssue({
2207
+ code: import_zod15.z.ZodIssueCode.custom,
2208
+ path: ["walls", side],
2209
+ message: `${t}mm is not a whole number of ${m.printer.nozzle}mm lines \u2014 try ${(Math.round(n) * m.printer.nozzle).toFixed(2)}`
2210
+ });
2211
+ }
2212
+ if (t < m.wall_thickness) {
2213
+ ctx.addIssue({
2214
+ code: import_zod15.z.ZodIssueCode.custom,
2215
+ path: ["walls", side],
2216
+ message: `${t}mm is thinner than wall_thickness (${m.wall_thickness}mm): walls only thicken on chosen sides`
2217
+ });
2218
+ }
2219
+ }
2220
+ const ids = m.components.map((c) => c.id);
2221
+ ids.forEach((id, i) => {
2222
+ if (ids.indexOf(id) !== i) {
2223
+ ctx.addIssue({ code: import_zod15.z.ZodIssueCode.custom, path: ["components", i, "id"], message: `"${id}" is used twice` });
2224
+ }
2225
+ });
2226
+ const roots = m.components.filter((c) => !c.placement);
2227
+ if (roots.length !== 1) {
2228
+ ctx.addIssue({
2229
+ code: import_zod15.z.ZodIssueCode.custom,
2230
+ path: ["components"],
2231
+ message: `exactly one component must have no placement (the origin); found ${roots.length}: ${roots.map((r) => r.id).join(", ") || "none"}`
2232
+ });
2233
+ }
2234
+ const byId = new Map(m.components.map((c) => [c.id, c]));
2235
+ m.components.forEach((c, i) => {
2236
+ if (!c.placement) return;
2237
+ const target = c.placement.relative_to;
2238
+ if (!byId.has(target)) {
2239
+ ctx.addIssue({ code: import_zod15.z.ZodIssueCode.custom, path: ["components", i, "placement", "relative_to"], message: `no component "${target}"` });
2240
+ return;
2241
+ }
2242
+ const seen = /* @__PURE__ */ new Set([c.id]);
2243
+ for (let at = byId.get(target); at?.placement; at = byId.get(at.placement.relative_to)) {
2244
+ if (seen.has(at.id)) {
2245
+ ctx.addIssue({ code: import_zod15.z.ZodIssueCode.custom, path: ["components", i, "placement"], message: `placement loops back to "${at.id}"` });
2246
+ return;
2247
+ }
2248
+ seen.add(at.id);
2249
+ }
2250
+ });
2251
+ m.components.forEach((c, i) => {
2252
+ if (m.enclosure_style === "split_shell_lip" && c.mount_holes && (!c.mount_holes.insert_od || !c.mount_holes.insert_depth)) {
2253
+ ctx.addIssue({ code: import_zod15.z.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" });
2254
+ }
2255
+ c.interfaces.forEach((f, j) => {
2256
+ if (f.chamfer && f.edge !== "top" && f.edge !== "bottom") {
2257
+ ctx.addIssue({ code: import_zod15.z.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}` });
2258
+ }
2259
+ if (f.cutout_shape === "grille" && f.edge !== "top" && f.edge !== "bottom") {
2260
+ ctx.addIssue({ code: import_zod15.z.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}` });
2261
+ }
2262
+ if (f.flex_button && f.edge !== "bottom") {
2263
+ ctx.addIssue({ code: import_zod15.z.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}` });
2264
+ }
2265
+ });
2266
+ const [x, y] = c.dimensions;
2267
+ c.mount_holes?.positions?.forEach((p, j) => {
2268
+ if (Math.abs(p[0]) > x / 2 || Math.abs(p[1]) > y / 2) {
2269
+ ctx.addIssue({ code: import_zod15.z.ZodIssueCode.custom, path: ["components", i, "mount_holes", "positions", j], message: `hole at [${p}] is outside the ${x}\xD7${y} footprint` });
2270
+ }
2271
+ });
2272
+ const inset = c.mount_holes?.inset_from_corners;
2273
+ if (inset && (inset[0] * 2 >= x || inset[1] * 2 >= y)) {
2274
+ ctx.addIssue({ code: import_zod15.z.ZodIssueCode.custom, path: ["components", i, "mount_holes", "inset_from_corners"], message: `insets [${inset}] meet in the middle of a ${x}\xD7${y} footprint` });
2275
+ }
2276
+ });
2277
+ });
2278
+ var FamilyChoiceSchema = import_zod15.z.object({
2279
+ label: import_zod15.z.string().min(1),
2280
+ /** One sentence: what it is for. */
2281
+ description: import_zod15.z.string().optional(),
2282
+ /** Components added to the base manifest's. */
2283
+ components: import_zod15.z.array(ComponentSchema).default([]),
2284
+ /** Top-level manifest fields this choice sets: wall_thickness, emblem… */
2285
+ set: import_zod15.z.record(import_zod15.z.unknown()).default({}),
2286
+ /**
2287
+ * Changes to the base's own components, by id: fields to set, null to
2288
+ * remove one, and `interfaces` by name the same way — a null interface is
2289
+ * removed, an unknown one added. How a flush top lowers the board's
2290
+ * clearance and widens its screen opening to the glass.
2291
+ */
2292
+ patch: import_zod15.z.record(import_zod15.z.record(import_zod15.z.unknown())).default({})
2293
+ });
2294
+ var FamilyOptionSchema = import_zod15.z.object({
2295
+ label: import_zod15.z.string().min(1),
2296
+ /** In order; the first is the default. Ids are lowercase words and dashes. */
2297
+ choices: import_zod15.z.array(FamilyChoiceSchema.extend({ id: import_zod15.z.string().regex(/^[a-z0-9][a-z0-9-]*$/) })).min(1)
2298
+ });
2299
+ var CaseFamilySchema = import_zod15.z.object({
2300
+ /** The base manifest, relative to this file. */
2301
+ manifest: import_zod15.z.string().min(1),
2302
+ /** Option groups, in the order they are offered: base, top… */
2303
+ options: import_zod15.z.record(import_zod15.z.string().regex(/^[a-z][a-z0-9-]*$/), FamilyOptionSchema)
2304
+ });
2305
+
1790
2306
  // src/auth/schema.ts
1791
- var import_zod12 = require("zod");
1792
- var UserSchema = import_zod12.z.object({
1793
- id: import_zod12.z.string().default(""),
1794
- name: import_zod12.z.string(),
1795
- email: import_zod12.z.string().email(),
1796
- password: import_zod12.z.string().optional(),
1797
- role: import_zod12.z.string(),
1798
- status: import_zod12.z.string().optional(),
1799
- joinedAt: import_zod12.z.string().optional(),
1800
- lastActive: import_zod12.z.string().optional(),
1801
- avatarUrl: import_zod12.z.string().optional()
2307
+ var import_zod16 = require("zod");
2308
+ var UserSchema = import_zod16.z.object({
2309
+ id: import_zod16.z.string().default(""),
2310
+ name: import_zod16.z.string(),
2311
+ email: import_zod16.z.string().email(),
2312
+ password: import_zod16.z.string().optional(),
2313
+ role: import_zod16.z.string(),
2314
+ status: import_zod16.z.string().optional(),
2315
+ joinedAt: import_zod16.z.string().optional(),
2316
+ lastActive: import_zod16.z.string().optional(),
2317
+ avatarUrl: import_zod16.z.string().optional()
1802
2318
  });
1803
2319
 
1804
2320
  // src/auth/accounts.ts
1805
- var import_zod13 = require("zod");
1806
- var AccountIdSchema = import_zod13.z.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits");
1807
- var AccountRoleSchema = import_zod13.z.enum(["member", "admin"]);
1808
- var AccountStatusSchema = import_zod13.z.enum(["active", "suspended"]);
1809
- var ScryptHashSchema = import_zod13.z.object({
1810
- algo: import_zod13.z.literal("scrypt"),
1811
- n: import_zod13.z.number().int().positive(),
1812
- r: import_zod13.z.number().int().positive(),
1813
- p: import_zod13.z.number().int().positive(),
1814
- keylen: import_zod13.z.number().int().positive(),
1815
- salt: import_zod13.z.string().min(16),
1816
- hash: import_zod13.z.string().min(16)
1817
- });
1818
- var AccountRecordSchema = import_zod13.z.object({
2321
+ var import_zod17 = require("zod");
2322
+ var AccountIdSchema = import_zod17.z.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits");
2323
+ var AccountRoleSchema = import_zod17.z.enum(["member", "admin"]);
2324
+ var AccountStatusSchema = import_zod17.z.enum(["active", "suspended"]);
2325
+ var ScryptHashSchema = import_zod17.z.object({
2326
+ algo: import_zod17.z.literal("scrypt"),
2327
+ n: import_zod17.z.number().int().positive(),
2328
+ r: import_zod17.z.number().int().positive(),
2329
+ p: import_zod17.z.number().int().positive(),
2330
+ keylen: import_zod17.z.number().int().positive(),
2331
+ salt: import_zod17.z.string().min(16),
2332
+ hash: import_zod17.z.string().min(16)
2333
+ });
2334
+ var AccountRecordSchema = import_zod17.z.object({
1819
2335
  accountId: AccountIdSchema,
1820
2336
  /** Lowercased on write, because a login must not depend on how it was typed. */
1821
- email: import_zod13.z.string().email().max(254),
1822
- name: import_zod13.z.string().min(1).max(64),
2337
+ email: import_zod17.z.string().email().max(254),
2338
+ name: import_zod17.z.string().min(1).max(64),
1823
2339
  role: AccountRoleSchema,
1824
2340
  status: AccountStatusSchema,
1825
2341
  password: ScryptHashSchema,
1826
- createdAt: import_zod13.z.number().int().nonnegative(),
1827
- lastLoginAt: import_zod13.z.number().int().nonnegative().nullable().default(null),
2342
+ createdAt: import_zod17.z.number().int().nonnegative(),
2343
+ lastLoginAt: import_zod17.z.number().int().nonnegative().nullable().default(null),
1828
2344
  /** Which admin approved this, or null for the bootstrap account. */
1829
2345
  invitedBy: AccountIdSchema.nullable().default(null)
1830
2346
  });
1831
- var PublicAccountSchema = import_zod13.z.object({
2347
+ var DISPLAY_NAME_MAX = 40;
2348
+ var DisplayNameSchema = import_zod17.z.string().transform((s) => s.trim().replace(/\s+/g, " ")).pipe(
2349
+ import_zod17.z.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.")
2350
+ );
2351
+ var PublicAccountSchema = import_zod17.z.object({
1832
2352
  accountId: AccountIdSchema,
1833
- email: import_zod13.z.string().email(),
1834
- name: import_zod13.z.string(),
2353
+ email: import_zod17.z.string().email(),
2354
+ name: import_zod17.z.string(),
1835
2355
  role: AccountRoleSchema,
1836
2356
  status: AccountStatusSchema
1837
2357
  });
1838
- var SessionRecordSchema = import_zod13.z.object({
2358
+ var SessionRecordSchema = import_zod17.z.object({
1839
2359
  accountId: AccountIdSchema,
1840
- createdAt: import_zod13.z.number().int().nonnegative(),
1841
- expiresAt: import_zod13.z.number().int().nonnegative(),
1842
- lastSeenAt: import_zod13.z.number().int().nonnegative()
2360
+ createdAt: import_zod17.z.number().int().nonnegative(),
2361
+ expiresAt: import_zod17.z.number().int().nonnegative(),
2362
+ lastSeenAt: import_zod17.z.number().int().nonnegative()
1843
2363
  });
1844
- var InviteRecordSchema = import_zod13.z.object({
1845
- email: import_zod13.z.string().email().max(254),
2364
+ var InviteRecordSchema = import_zod17.z.object({
2365
+ email: import_zod17.z.string().email().max(254),
1846
2366
  role: AccountRoleSchema,
1847
- createdAt: import_zod13.z.number().int().nonnegative(),
1848
- expiresAt: import_zod13.z.number().int().nonnegative(),
2367
+ createdAt: import_zod17.z.number().int().nonnegative(),
2368
+ expiresAt: import_zod17.z.number().int().nonnegative(),
1849
2369
  invitedBy: AccountIdSchema
1850
2370
  });
1851
- var AccessRequestSchema = import_zod13.z.object({
1852
- email: import_zod13.z.string().email().max(254),
1853
- name: import_zod13.z.string().min(1).max(64),
2371
+ var AccessRequestSchema = import_zod17.z.object({
2372
+ email: import_zod17.z.string().email().max(254),
2373
+ name: import_zod17.z.string().min(1).max(64),
1854
2374
  /** Optional, and never shown publicly. Long enough to be useful, short enough not to be an essay. */
1855
- reason: import_zod13.z.string().max(500).optional()
1856
- });
1857
- var AccessRequestStatusSchema = import_zod13.z.enum(["pending", "approved", "denied"]);
1858
- var AccessRequestRecordSchema = import_zod13.z.object({
1859
- requestId: import_zod13.z.string().regex(/^req_[0-9a-f]{12}$/, "req_ and 12 hex digits"),
1860
- email: import_zod13.z.string().email().max(254),
1861
- name: import_zod13.z.string().min(1).max(64),
1862
- reason: import_zod13.z.string().max(500).optional(),
2375
+ reason: import_zod17.z.string().max(500).optional()
2376
+ });
2377
+ var AccessRequestStatusSchema = import_zod17.z.enum(["pending", "approved", "denied"]);
2378
+ var AccessRequestRecordSchema = import_zod17.z.object({
2379
+ requestId: import_zod17.z.string().regex(/^req_[0-9a-f]{12}$/, "req_ and 12 hex digits"),
2380
+ email: import_zod17.z.string().email().max(254),
2381
+ name: import_zod17.z.string().min(1).max(64),
2382
+ reason: import_zod17.z.string().max(500).optional(),
1863
2383
  status: AccessRequestStatusSchema,
1864
- createdAt: import_zod13.z.number().int().nonnegative(),
1865
- decidedAt: import_zod13.z.number().int().nonnegative().nullable().default(null),
2384
+ createdAt: import_zod17.z.number().int().nonnegative(),
2385
+ decidedAt: import_zod17.z.number().int().nonnegative().nullable().default(null),
1866
2386
  decidedBy: AccountIdSchema.nullable().default(null)
1867
2387
  });
1868
2388
  var SCRYPT_PARAMS = {
@@ -1880,197 +2400,45 @@ var ACCOUNT_TTL_SECONDS = 60 * 60 * 24 * 400;
1880
2400
  var INVITE_TTL_SECONDS = 60 * 60 * 24 * 14;
1881
2401
  var ACCESS_REQUEST_TTL_SECONDS = 60 * 60 * 24 * 90;
1882
2402
 
1883
- // src/counterparty/schema.ts
1884
- var import_zod14 = require("zod");
1885
- var CounterpartyTypeSchema = import_zod14.z.enum([
1886
- "supplier",
1887
- "customer",
1888
- "partner",
1889
- "competitor",
1890
- "regulator",
1891
- "unknown"
1892
- ]);
1893
- var CounterpartyResolutionSchema = import_zod14.z.enum([
1894
- "public",
1895
- "public_uncovered",
1896
- "private",
1897
- "unresolved"
1898
- ]);
1899
- var CounterpartyNodeSchema = import_zod14.z.object({
1900
- id: import_zod14.z.string(),
1901
- ticker: import_zod14.z.string().nullable(),
1902
- /** Name as it appeared in the source signal — e.g. "Nike". Not the registered name. */
1903
- name: import_zod14.z.string(),
1904
- /** Registered legal name from `profiles` — e.g. "NIKE, Inc.". Null unless `public`. */
1905
- publicName: import_zod14.z.string().nullable(),
1906
- lei: import_zod14.z.string().nullable(),
1907
- resolution: CounterpartyResolutionSchema,
1908
- type: CounterpartyTypeSchema,
1909
- confidence: import_zod14.z.number().min(0).max(1),
1910
- sourceSignalIds: import_zod14.z.array(import_zod14.z.number()),
1911
- firstSeenAt: import_zod14.z.string().datetime(),
1912
- lastSeenAt: import_zod14.z.string().datetime()
1913
- });
1914
- var RelationshipEdgeTypeSchema = import_zod14.z.enum([
1915
- "supplies_to",
1916
- "purchases_from",
1917
- "partners_with",
1918
- "competes_with",
1919
- "regulated_by",
1920
- "invests_in",
1921
- "acquires",
1922
- /**
1923
- * Identity equivalence, not a business relationship: source and target are
1924
- * the same real-world entity under two different node ids (typically a
1925
- * slug-keyed node that predates LEI resolution, pointing at the canonical
1926
- * LEI-keyed node once resolution succeeds). Never delete/merge either
1927
- * node — this edge exists so a consumer wanting a deduped view can follow
1928
- * it to the canonical id, reversibly.
1929
- */
1930
- "same_as"
1931
- ]);
1932
- var RelationshipEdgeSchema = import_zod14.z.object({
1933
- id: import_zod14.z.string(),
1934
- sourceId: import_zod14.z.string(),
1935
- targetId: import_zod14.z.string(),
1936
- edgeType: RelationshipEdgeTypeSchema,
1937
- weight: import_zod14.z.number().min(0).max(1),
1938
- evidenceSignalIds: import_zod14.z.array(import_zod14.z.number()),
1939
- updatedAt: import_zod14.z.string().datetime(),
1940
- validFrom: import_zod14.z.string().datetime(),
1941
- /** null = currently valid. Set when a differently-typed edge supersedes this one. */
1942
- validTo: import_zod14.z.string().datetime().nullable()
1943
- });
1944
- var SignalWeightSchema = import_zod14.z.object({
1945
- signalId: import_zod14.z.number(),
1946
- weight: import_zod14.z.number().min(0).max(1),
1947
- reason: import_zod14.z.string().max(280)
1948
- });
1949
- var DivergenceMetricSchema = import_zod14.z.object({
1950
- ticker: import_zod14.z.string(),
1951
- // 'operations'/'customer' are current; 'operational'/'ux' are pre-rename
1952
- // values that still exist on rows written before the backend's rename —
1953
- // kept here so reading old rows doesn't fail validation.
1954
- metric: import_zod14.z.enum(["operations", "customer", "operational", "ux"]),
1955
- score: import_zod14.z.number(),
1956
- baseline: import_zod14.z.number(),
1957
- observed: import_zod14.z.number(),
1958
- computedAt: import_zod14.z.string().datetime(),
1959
- contributingSignals: import_zod14.z.array(SignalWeightSchema)
1960
- });
1961
-
1962
- // src/non-public-entity/schema.ts
1963
- var import_zod15 = require("zod");
1964
- var NonPublicEntitySchema = import_zod15.z.object({
1965
- lei: import_zod15.z.string().nullable(),
1966
- entityName: import_zod15.z.string(),
1967
- jurisdiction: import_zod15.z.string().nullable(),
1968
- registrationStatus: import_zod15.z.string(),
1969
- parentEntityLei: import_zod15.z.string().nullable(),
1970
- materialMetadata: import_zod15.z.record(import_zod15.z.unknown()),
1971
- discoveredAt: import_zod15.z.string().datetime()
1972
- });
1973
-
1974
- // src/events/schema.ts
1975
- var import_zod16 = require("zod");
1976
- var EventSourceSchema = import_zod16.z.enum(["db", "mock"]);
1977
- var EntityEventKindSchema = import_zod16.z.enum(["news", "filing", "report"]);
1978
- var ImpactScaleSchema = import_zod16.z.enum(["graded", "binary", "default", "none"]);
1979
- var TimestampPrecisionSchema = import_zod16.z.enum(["second", "day"]);
1980
- var EntityEventSchema = import_zod16.z.object({
1981
- /** Namespaced so ids never collide across sources: `news:1234`, `filing:AAPL:2026-07-31`. */
1982
- id: import_zod16.z.string(),
1983
- kind: EntityEventKindSchema,
1984
- /**
1985
- * The producer's own type string, unmodified — `NEWS_YAHOO FINANCE_YAHOO RSS`,
1986
- * `ANNUAL`, `SNAPSHOT`. There are 31 distinct NEWS variants in the live table,
1987
- * so this is for filtering and debugging: never render it raw to a user.
1988
- */
1989
- subtype: import_zod16.z.string().nullable(),
1990
- ticker: import_zod16.z.string(),
1991
- /** Always `YYYY-MM-DDTHH:MM:SSZ`. Fixed-width, so lexical order == chronological order. */
1992
- occurredAt: import_zod16.z.string(),
1993
- precision: TimestampPrecisionSchema,
1994
- title: import_zod16.z.string(),
1995
- summary: import_zod16.z.string().nullable(),
1996
- url: import_zod16.z.string().nullable(),
1997
- impact: import_zod16.z.number().nullable(),
1998
- impactScale: ImpactScaleSchema,
1999
- /** 0 bearish … 50 neutral … 100 bullish. */
2000
- sentiment: import_zod16.z.number().nullable(),
2001
- /** False for filings, and for any event sitting at exactly neutral. */
2002
- sentimentIsMeaningful: import_zod16.z.boolean(),
2003
- source: EventSourceSchema,
2004
- meta: import_zod16.z.record(import_zod16.z.unknown()).nullable()
2005
- });
2006
- var PaginatedEntityEventsSchema = import_zod16.z.object({
2007
- total: import_zod16.z.number(),
2008
- page: import_zod16.z.number(),
2009
- page_size: import_zod16.z.number(),
2010
- data: import_zod16.z.array(EntityEventSchema)
2011
- });
2012
- var EventBucketSizeSchema = import_zod16.z.enum(["day", "week", "month"]);
2013
- var EntityEventDensityBucketSchema = import_zod16.z.object({
2014
- bucketStart: import_zod16.z.string(),
2015
- kind: EntityEventKindSchema,
2016
- count: import_zod16.z.number(),
2017
- /** Null when no event in the bucket had meaningful sentiment. */
2018
- avgSentiment: import_zod16.z.number().nullable(),
2019
- maxImpact: import_zod16.z.number().nullable()
2020
- });
2021
- var EntityEventDensitySchema = import_zod16.z.object({
2022
- ticker: import_zod16.z.string(),
2023
- bucket: EventBucketSizeSchema,
2024
- buckets: import_zod16.z.array(EntityEventDensityBucketSchema),
2025
- /** So the client can set its time domain without a second request. */
2026
- range: import_zod16.z.object({ min: import_zod16.z.string(), max: import_zod16.z.string() }),
2027
- source: EventSourceSchema
2028
- });
2029
- var EntityEventFacetSchema = import_zod16.z.object({
2030
- kind: EntityEventKindSchema,
2031
- count: import_zod16.z.number(),
2032
- earliest: import_zod16.z.string().nullable(),
2033
- latest: import_zod16.z.string().nullable(),
2034
- impactScale: ImpactScaleSchema,
2035
- sentimentUsable: import_zod16.z.boolean()
2036
- });
2037
- var EntityEventFacetsSchema = import_zod16.z.object({
2038
- ticker: import_zod16.z.string(),
2039
- facets: import_zod16.z.array(EntityEventFacetSchema),
2040
- source: EventSourceSchema
2041
- });
2042
- var DailyPricePointSchema = import_zod16.z.object({
2043
- date: import_zod16.z.string(),
2044
- open: import_zod16.z.number().nullable(),
2045
- high: import_zod16.z.number().nullable(),
2046
- low: import_zod16.z.number().nullable(),
2047
- close: import_zod16.z.number(),
2048
- volume: import_zod16.z.number().nullable()
2049
- });
2050
- var EntityPriceSeriesSchema = import_zod16.z.object({
2051
- ticker: import_zod16.z.string(),
2052
- series: import_zod16.z.array(DailyPricePointSchema),
2053
- source: EventSourceSchema
2054
- });
2055
- var EVENT_KIND_LABELS = {
2056
- news: "News",
2057
- filing: "Filing",
2058
- report: "Analyst report"
2059
- };
2060
- var IMPACT_FLAG_THRESHOLD = 7;
2061
- var SENTIMENT_NEUTRAL = 50;
2062
- var DEFAULT_HORIZON_QUARTERS = 5;
2063
- var EXCLUDED_SOURCES = {
2064
- 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.",
2065
- divergence_metrics: "A continuously recomputed annotation, not an event: 524 AAPL rows in 2 days.",
2066
- 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.",
2067
- raw_filings: "Stale since April, superseded by signals.",
2068
- market_metrics: "Two rows total.",
2069
- job_log: "24.5M rows with no ticker index \u2014 never touch it in a request path."
2403
+ // src/auth/accessTokens.ts
2404
+ var import_zod18 = require("zod");
2405
+ var ACCESS_TOKEN_SCOPES = ["boards:read", "boards:send"];
2406
+ var AccessTokenScopeSchema = import_zod18.z.enum(ACCESS_TOKEN_SCOPES);
2407
+ var ACCESS_TOKEN_SCOPE_LABELS = {
2408
+ "boards:read": "See my boards",
2409
+ "boards:send": "Send apps to my boards"
2070
2410
  };
2411
+ var ACCESS_TOKEN_PREFIX = "rmk_";
2412
+ var ACCESS_TOKEN_LIFETIMES_DAYS = [7, 30, 90, 365];
2413
+ var ACCESS_TOKEN_MAX_PER_ACCOUNT = 20;
2414
+ var ACCESS_TOKEN_RATE_PER_MINUTE = 60;
2415
+ var AccessTokenRecordSchema = import_zod18.z.object({
2416
+ /** The first 12 hex digits of the hash: what the owner sees and revokes by. */
2417
+ tokenId: import_zod18.z.string().regex(/^[0-9a-f]{12}$/),
2418
+ accountId: AccountIdSchema,
2419
+ /** What the owner called it: "laptop", "Claude Code". */
2420
+ name: import_zod18.z.string().trim().min(1).max(60),
2421
+ scopes: import_zod18.z.array(AccessTokenScopeSchema).min(1),
2422
+ createdAt: import_zod18.z.number().int().nonnegative(),
2423
+ expiresAt: import_zod18.z.number().int().nonnegative(),
2424
+ /** Moved forward at most once a day, so using a token is not a write per request. */
2425
+ lastUsedAt: import_zod18.z.number().int().nonnegative().nullable().default(null)
2426
+ });
2427
+ var PublicAccessTokenSchema = AccessTokenRecordSchema.omit({ accountId: true });
2428
+ var NewAccessTokenSchema = import_zod18.z.object({
2429
+ name: import_zod18.z.string().trim().min(1, "Give it a name.").max(60),
2430
+ scopes: import_zod18.z.array(AccessTokenScopeSchema).min(1, "Choose at least one thing it can do."),
2431
+ days: import_zod18.z.union(ACCESS_TOKEN_LIFETIMES_DAYS.map((d) => import_zod18.z.literal(d)))
2432
+ });
2071
2433
  // Annotate the CommonJS export names for ESM import in node:
2072
2434
  0 && (module.exports = {
2073
2435
  ACCESS_REQUEST_TTL_SECONDS,
2436
+ ACCESS_TOKEN_LIFETIMES_DAYS,
2437
+ ACCESS_TOKEN_MAX_PER_ACCOUNT,
2438
+ ACCESS_TOKEN_PREFIX,
2439
+ ACCESS_TOKEN_RATE_PER_MINUTE,
2440
+ ACCESS_TOKEN_SCOPES,
2441
+ ACCESS_TOKEN_SCOPE_LABELS,
2074
2442
  ACCOUNT_TTL_SECONDS,
2075
2443
  AIKeyManifestSchema,
2076
2444
  AIThemeSchema,
@@ -2083,10 +2451,13 @@ var EXCLUDED_SOURCES = {
2083
2451
  AccessRequestRecordSchema,
2084
2452
  AccessRequestSchema,
2085
2453
  AccessRequestStatusSchema,
2454
+ AccessTokenRecordSchema,
2455
+ AccessTokenScopeSchema,
2086
2456
  AccountIdSchema,
2087
2457
  AccountRecordSchema,
2088
2458
  AccountRoleSchema,
2089
2459
  AccountStatusSchema,
2460
+ AccountThemeSchema,
2090
2461
  ActionSchema,
2091
2462
  AircraftAppConfigSchema,
2092
2463
  AppAlignSchema,
@@ -2118,106 +2489,122 @@ var EXCLUDED_SOURCES = {
2118
2489
  AssetHashSchema,
2119
2490
  AuthStrategySchema,
2120
2491
  BlockSchema,
2492
+ BoardFontSchema,
2493
+ BoardPaletteHexSchema,
2121
2494
  Bodewell,
2122
2495
  CLAIMED_DEVICE_TTL_SECONDS,
2496
+ CONTROL_STATES,
2497
+ CONTROL_STATE_MEANINGS,
2498
+ CaseFamilySchema,
2123
2499
  ClockAppConfigSchema,
2124
- CounterpartyNodeSchema,
2125
- CounterpartyResolutionSchema,
2126
- CounterpartyTypeSchema,
2500
+ ComponentSchema,
2127
2501
  DEFAULT_CHAT_MODEL,
2128
2502
  DEFAULT_DEVICE_CONFIG,
2129
- DEFAULT_HORIZON_QUARTERS,
2130
2503
  DEFAULT_PRO_MODEL,
2131
2504
  DEFAULT_SCHEMA_MODEL,
2132
2505
  DEFAULT_THEME_TOKENS,
2133
2506
  DEVICE_AP_SSID_PREFIX,
2134
2507
  DEVICE_ENDPOINTS,
2508
+ DEVICE_FEATURES,
2509
+ DEVICE_FEATURE_STATE_LABELS,
2135
2510
  DEVICE_FRESH_MS,
2136
2511
  DEVICE_GLYPHS,
2137
2512
  DEVICE_LABEL_MAX,
2138
2513
  DEVICE_PALETTE,
2514
+ DEVICE_POLL_QUERY,
2515
+ DEVICE_PROTOCOL,
2139
2516
  DEVICE_STALE_MS,
2140
2517
  DEVICE_TIMEZONES,
2141
2518
  DEVICE_TIMEZONE_FALLBACK,
2142
2519
  DEVICE_TTL_SECONDS,
2143
2520
  DEVICE_UNKNOWN_GLYPH,
2144
2521
  DEVICE_VITALS_FIELDS,
2145
- DailyPricePointSchema,
2522
+ DEVICE_VOICE_CLIP,
2523
+ DISPLAY_FACE_MIN_PX,
2524
+ DISPLAY_NAME_MAX,
2146
2525
  DeliveredAppSchema,
2147
2526
  DeviceAppIdSchema,
2148
2527
  DeviceAppsSchema,
2149
2528
  DeviceConfigSchema,
2150
2529
  DeviceDisplayConfigSchema,
2530
+ DeviceFeatureKeySchema,
2531
+ DeviceFeatureStateSchema,
2532
+ DeviceFeaturesSchema,
2151
2533
  DeviceIdSchema,
2152
2534
  DeviceKindSchema,
2535
+ DevicePollReplySchema,
2536
+ DeviceReadingSchema,
2153
2537
  DeviceRecordSchema,
2154
2538
  DeviceRegistrationSchema,
2539
+ DeviceReportSchema,
2155
2540
  DeviceSeenSchema,
2156
2541
  DeviceStatusSchema,
2157
2542
  DeviceThemeSchema,
2158
2543
  DeviceVitalsSchema,
2159
- DivergenceMetricSchema,
2160
- EVENT_KIND_LABELS,
2161
- EXCLUDED_SOURCES,
2162
- EntityEventDensityBucketSchema,
2163
- EntityEventDensitySchema,
2164
- EntityEventFacetSchema,
2165
- EntityEventFacetsSchema,
2166
- EntityEventKindSchema,
2167
- EntityEventSchema,
2168
- EntityPriceSeriesSchema,
2544
+ DeviceVoiceReplySchema,
2545
+ DisplayNameSchema,
2546
+ EdgeSchema,
2547
+ EmblemSchema,
2169
2548
  EntitySchema,
2170
- EventBucketSizeSchema,
2171
- EventSourceSchema,
2172
2549
  FIRMWARE_UPDATE_ATTEMPTS,
2173
2550
  FIRMWARE_UPDATE_PREFIX,
2174
2551
  FULL_COLOUR_FRAME_MAX,
2175
2552
  FULL_RENDITION,
2553
+ FamilyChoiceSchema,
2554
+ FamilyOptionSchema,
2176
2555
  FieldSchema,
2177
2556
  FirmwareUpdateSchema,
2557
+ FlexButtonSchema,
2178
2558
  FloraTelemetrySchema,
2179
2559
  GENESIS_LIBRARY_CONTEXT,
2180
2560
  GENESIS_VALID_COMPONENTS,
2561
+ HardwareManifestSchema,
2181
2562
  ICON_GRID,
2182
2563
  ICON_SIZE_PX,
2183
2564
  ICON_STROKE,
2184
2565
  IMAGE_MAX_DRAWN,
2185
2566
  IMAGE_MAX_SCALE,
2186
- IMPACT_FLAG_THRESHOLD,
2187
2567
  INVITE_TTL_SECONDS,
2188
- ImpactScaleSchema,
2568
+ InterfaceSchema,
2189
2569
  InviteRecordSchema,
2190
2570
  MAX_PASSWORD_LENGTH,
2191
2571
  MIN_PASSWORD_LENGTH,
2192
- NonPublicEntitySchema,
2572
+ MountHolesSchema,
2573
+ NewAccessTokenSchema,
2193
2574
  ORIGINAL_MAX_BYTES,
2194
2575
  ORIGINAL_MAX_SIDE,
2195
2576
  OwnedSendRequestSchema,
2577
+ PANEL_SIZE,
2196
2578
  PHOTOS_PER_ACCOUNT,
2197
2579
  PHOTO_UPLOADS_PER_HOUR,
2198
2580
  PROVIDER_DEFAULT_MODEL,
2199
2581
  PageSchema,
2200
2582
  PageSectionSchema,
2201
- PaginatedEntityEventsSchema,
2202
2583
  PairCodeSchema,
2584
+ PanelOrientationSchema,
2203
2585
  PhotoCropSchema,
2204
2586
  PhotoFullSchema,
2205
2587
  PhotoSummarySchema,
2206
2588
  PhotoUploadSchema,
2589
+ PlacementSchema,
2590
+ PrinterProfileSchema,
2207
2591
  ProvisioningStateSchema,
2592
+ PublicAccessTokenSchema,
2208
2593
  PublicAccountSchema,
2209
2594
  RETRO_RENDITION,
2210
- RelationshipEdgeSchema,
2211
- RelationshipEdgeTypeSchema,
2212
2595
  ResourceSchema,
2213
2596
  SCRYPT_PARAMS,
2214
- SENTIMENT_NEUTRAL,
2215
2597
  SESSION_COOKIE_NAME,
2216
2598
  SESSION_TTL_SECONDS,
2599
+ SHELF_MAX_APPS,
2600
+ SHELF_MAX_BYTES,
2601
+ SHELF_ROTATE_MINUTES,
2217
2602
  SIGNAL_DOMAINS,
2218
2603
  SIGNAL_KINDS,
2219
2604
  SIGNAL_KIND_LABELS,
2220
2605
  SIGNAL_SOURCES,
2606
+ SMOOTH_FACES,
2607
+ SMOOTH_FONT_ADVANCES,
2221
2608
  SPRITE_MAX_BASE64,
2222
2609
  SPRITE_MAX_ROW_BYTES,
2223
2610
  SPRITE_MAX_SIDE,
@@ -2227,18 +2614,23 @@ var EXCLUDED_SOURCES = {
2227
2614
  SendRequestSchema,
2228
2615
  SensorAppConfigSchema,
2229
2616
  SessionRecordSchema,
2617
+ ShelfEditSchema,
2618
+ ShelfSchema,
2230
2619
  SignalArraySchema,
2231
2620
  SignalKindSchema,
2232
2621
  SignalPacketSchema,
2233
2622
  SignalSchema,
2234
2623
  SignalSourceSchema,
2235
- SignalWeightSchema,
2624
+ THEME_PALETTE_TOKENS,
2236
2625
  THEME_PRESETS,
2626
+ THEME_RADII,
2237
2627
  THEME_SYSTEM_PROMPT,
2238
2628
  ThemeFontsSchema,
2629
+ ThemeLetteringSchema,
2239
2630
  ThemeOverridesSchema,
2631
+ ThemePaletteSchema,
2632
+ ThemeRgbSchema,
2240
2633
  ThemeTokensSchema,
2241
- TimestampPrecisionSchema,
2242
2634
  TriggerSchema,
2243
2635
  UserSchema,
2244
2636
  VitalSourceSchema,
@@ -2247,12 +2639,5 @@ var EXCLUDED_SOURCES = {
2247
2639
  WEATHER_ICON_NAMES,
2248
2640
  WeatherAppConfigSchema,
2249
2641
  WorkflowSchema,
2250
- architectureReferenceParameters,
2251
- companyNewsParameters,
2252
- companyProfileParameters,
2253
- counterpartyGraphParameters,
2254
- divergenceMetricsParameters,
2255
- liveQuoteParameters,
2256
- stockChartParameters,
2257
2642
  telemetryGraphParameters
2258
2643
  });