@ramme-io/kernel 8.1.1 → 8.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiGateway-CuGCK-V3.js → AiGateway-DgTZzu-o.js} +1 -1
- package/dist/{bodewellAdapter-IfhLfL_l.js → bodewellAdapter-yTt3lUXY.js} +1 -1
- package/dist/{deviceReadings-CGuQi8A9.js → deviceReadings-C5hJzVcz.js} +202 -198
- package/dist/index.es.js +6 -6
- package/dist/server.es.js +4 -4
- package/dist/signals.es.js +2 -2
- package/package.json +4 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { z as e } from "zod";
|
|
2
|
-
var
|
|
2
|
+
var te = Object.defineProperty, ae = (a, i) => {
|
|
3
3
|
for (var h in i)
|
|
4
|
-
|
|
5
|
-
},
|
|
4
|
+
te(a, h, { get: i[h], enumerable: !0 });
|
|
5
|
+
}, ne = e.object({
|
|
6
6
|
key: e.string(),
|
|
7
7
|
label: e.string(),
|
|
8
8
|
type: e.enum(["text", "number", "currency", "percent", "delta", "date", "boolean", "status", "email", "image", "textarea"]),
|
|
9
9
|
required: e.boolean().optional(),
|
|
10
10
|
description: e.string().optional(),
|
|
11
11
|
defaultValue: e.any().optional()
|
|
12
|
-
}),
|
|
12
|
+
}), oe = e.object({
|
|
13
13
|
id: e.string(),
|
|
14
14
|
name: e.string(),
|
|
15
|
-
fields: e.array(
|
|
15
|
+
fields: e.array(ne),
|
|
16
16
|
defaultView: e.enum(["table", "grid", "list"]).optional(),
|
|
17
17
|
features: e.object({
|
|
18
18
|
searchable: e.boolean().optional(),
|
|
@@ -21,7 +21,7 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
21
21
|
deletable: e.boolean().optional(),
|
|
22
22
|
exportable: e.boolean().optional()
|
|
23
23
|
}).optional()
|
|
24
|
-
}),
|
|
24
|
+
}), ie = e.object({
|
|
25
25
|
id: e.string().min(1, "Signal ID is required"),
|
|
26
26
|
label: e.string(),
|
|
27
27
|
description: e.string().optional(),
|
|
@@ -37,7 +37,7 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
37
37
|
unit: e.string().optional(),
|
|
38
38
|
min: e.number().optional(),
|
|
39
39
|
max: e.number().optional()
|
|
40
|
-
}),
|
|
40
|
+
}), re = e.object({
|
|
41
41
|
id: e.string(),
|
|
42
42
|
name: e.string(),
|
|
43
43
|
description: e.string().optional(),
|
|
@@ -49,11 +49,11 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
49
49
|
color: e.string().optional(),
|
|
50
50
|
dashboardComponent: e.string().optional()
|
|
51
51
|
}).optional()
|
|
52
|
-
}),
|
|
52
|
+
}), se = e.object({
|
|
53
53
|
id: e.string(),
|
|
54
54
|
type: e.enum(["signal_change", "manual_action", "schedule", "webhook"]),
|
|
55
55
|
config: e.record(e.string(), e.any())
|
|
56
|
-
}),
|
|
56
|
+
}), le = e.object({
|
|
57
57
|
id: e.string(),
|
|
58
58
|
type: e.enum([
|
|
59
59
|
"update_resource",
|
|
@@ -64,13 +64,13 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
64
64
|
"agent_task"
|
|
65
65
|
]),
|
|
66
66
|
config: e.record(e.string(), e.any())
|
|
67
|
-
}),
|
|
67
|
+
}), ue = e.object({
|
|
68
68
|
id: e.string(),
|
|
69
69
|
name: e.string(),
|
|
70
70
|
active: e.boolean().default(!0),
|
|
71
|
-
trigger:
|
|
72
|
-
actions: e.array(
|
|
73
|
-
}),
|
|
71
|
+
trigger: se,
|
|
72
|
+
actions: e.array(le)
|
|
73
|
+
}), me = e.object({
|
|
74
74
|
id: e.string(),
|
|
75
75
|
type: e.string(),
|
|
76
76
|
props: e.record(e.string(), e.any()),
|
|
@@ -78,7 +78,7 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
78
78
|
colSpan: e.number().optional(),
|
|
79
79
|
rowSpan: e.number().optional()
|
|
80
80
|
}).optional()
|
|
81
|
-
}),
|
|
81
|
+
}), ce = e.object({
|
|
82
82
|
id: e.string(),
|
|
83
83
|
title: e.string().optional(),
|
|
84
84
|
description: e.string().optional(),
|
|
@@ -86,18 +86,18 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
86
86
|
columns: e.number().optional(),
|
|
87
87
|
variant: e.enum(["grid", "stack", "split"]).optional()
|
|
88
88
|
}).optional(),
|
|
89
|
-
blocks: e.array(
|
|
90
|
-
}),
|
|
89
|
+
blocks: e.array(me)
|
|
90
|
+
}), de = e.object({
|
|
91
91
|
id: e.string(),
|
|
92
92
|
slug: e.string(),
|
|
93
93
|
title: e.string(),
|
|
94
94
|
description: e.string().optional(),
|
|
95
95
|
icon: e.string().optional(),
|
|
96
|
-
sections: e.array(
|
|
97
|
-
}),
|
|
98
|
-
strategy:
|
|
96
|
+
sections: e.array(ce)
|
|
97
|
+
}), pe = e.enum(["ENVIRONMENT", "SESSION_BYOK", "VAULT"]), he = e.object({
|
|
98
|
+
strategy: pe,
|
|
99
99
|
status: e.enum(["VALID", "KEY_EXPIRED", "BYOK_REQUIRED", "DEGRADED", "UNKNOWN"]).default("UNKNOWN")
|
|
100
|
-
}),
|
|
100
|
+
}), St = e.object({
|
|
101
101
|
meta: e.object({
|
|
102
102
|
name: e.string(),
|
|
103
103
|
version: e.string(),
|
|
@@ -110,22 +110,22 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
110
110
|
layout: e.enum(["dashboard", "explorer", "studio", "focus"]).default("dashboard"),
|
|
111
111
|
mockMode: e.boolean().default(!0),
|
|
112
112
|
brokerUrl: e.string().optional(),
|
|
113
|
-
aiKeyManifest:
|
|
113
|
+
aiKeyManifest: he.optional()
|
|
114
114
|
}),
|
|
115
115
|
modules: e.array(e.string()).optional(),
|
|
116
|
-
resources: e.array(
|
|
116
|
+
resources: e.array(oe).optional(),
|
|
117
117
|
domain: e.object({
|
|
118
|
-
signals: e.array(
|
|
119
|
-
entities: e.array(
|
|
120
|
-
workflows: e.array(
|
|
118
|
+
signals: e.array(ie),
|
|
119
|
+
entities: e.array(re),
|
|
120
|
+
workflows: e.array(ue).optional()
|
|
121
121
|
}),
|
|
122
|
-
pages: e.array(
|
|
123
|
-
}),
|
|
122
|
+
pages: e.array(de).optional()
|
|
123
|
+
}), Ct = e.object({
|
|
124
124
|
timestamp: e.number(),
|
|
125
125
|
soilMoisture: e.number().min(0).max(100),
|
|
126
126
|
ambientLight: e.number().min(0).max(1e5),
|
|
127
127
|
temperature: e.number().min(-40).max(125)
|
|
128
|
-
}),
|
|
128
|
+
}), xe = e.object({
|
|
129
129
|
id: e.string(),
|
|
130
130
|
source: e.enum(["mqtt", "http", "ws", "mock"]),
|
|
131
131
|
domain: e.string(),
|
|
@@ -135,13 +135,13 @@ var ee = Object.defineProperty, te = (a, i) => {
|
|
|
135
135
|
timestamp: e.number(),
|
|
136
136
|
meta: e.record(e.unknown()).optional()
|
|
137
137
|
});
|
|
138
|
-
e.array(
|
|
139
|
-
var
|
|
138
|
+
e.array(xe);
|
|
139
|
+
var ge = {
|
|
140
140
|
AGRICULTURE: "agriculture",
|
|
141
141
|
// Derived — Methodology Engine outputs
|
|
142
142
|
ENVIRONMENT: "environment"
|
|
143
143
|
// A device's surroundings — temperature, humidity, light
|
|
144
|
-
},
|
|
144
|
+
}, be = e.enum(["telemetry", "market", "system", "logic"]), fe = e.enum(["mqtt", "http", "ws", "mock"]);
|
|
145
145
|
e.object({
|
|
146
146
|
/**
|
|
147
147
|
* Globally unique signal identifier.
|
|
@@ -153,7 +153,7 @@ e.object({
|
|
|
153
153
|
* The semantic category of this signal.
|
|
154
154
|
* Determines which Methodology Engine processes it.
|
|
155
155
|
*/
|
|
156
|
-
kind:
|
|
156
|
+
kind: be,
|
|
157
157
|
/**
|
|
158
158
|
* The specific measurement or metric key within its kind.
|
|
159
159
|
* RULE: Keys MUST be abstract and domain-agnostic where possible.
|
|
@@ -181,7 +181,7 @@ e.object({
|
|
|
181
181
|
/**
|
|
182
182
|
* The transport source that produced this signal.
|
|
183
183
|
*/
|
|
184
|
-
source:
|
|
184
|
+
source: fe.optional(),
|
|
185
185
|
/**
|
|
186
186
|
* Optional domain namespace for grouping related signals.
|
|
187
187
|
* Examples: 'bodewell', 'finance', 'infrastructure', 'user_behavior'
|
|
@@ -195,11 +195,11 @@ e.object({
|
|
|
195
195
|
*/
|
|
196
196
|
meta: e.record(e.unknown()).optional()
|
|
197
197
|
});
|
|
198
|
-
var
|
|
199
|
-
|
|
200
|
-
BodewellCommandSchema: () =>
|
|
198
|
+
var ve = {};
|
|
199
|
+
ae(ve, {
|
|
200
|
+
BodewellCommandSchema: () => we,
|
|
201
201
|
BodewellDeviceID: () => T,
|
|
202
|
-
BodewellTelemetrySchema: () =>
|
|
202
|
+
BodewellTelemetrySchema: () => ye
|
|
203
203
|
});
|
|
204
204
|
var T = e.enum([
|
|
205
205
|
"STK-V1-001",
|
|
@@ -207,7 +207,7 @@ var T = e.enum([
|
|
|
207
207
|
"STK-V1-003",
|
|
208
208
|
"STK-PRO-001",
|
|
209
209
|
"STK-VIS-001"
|
|
210
|
-
]),
|
|
210
|
+
]), ye = e.object({
|
|
211
211
|
device_id: T,
|
|
212
212
|
stick_id: e.string().optional().describe("Firmware alias for device_id"),
|
|
213
213
|
timestamp: e.number().optional().describe("Epoch timestamp from NTP"),
|
|
@@ -222,25 +222,25 @@ var T = e.enum([
|
|
|
222
222
|
soil_moisture: e.number().optional().describe("Firmware alias for raw capacitance"),
|
|
223
223
|
soil_moisture_raw: e.number().optional().describe("Unscaled capacitance (300-1100)"),
|
|
224
224
|
fw_version: e.string().max(40).optional().describe("Firmware build the board is running; absent on v4 sketches, which cannot be updated over the air")
|
|
225
|
-
}).passthrough(),
|
|
225
|
+
}).passthrough(), we = e.object({
|
|
226
226
|
stick_id: T,
|
|
227
227
|
// Note: Your API uses stick_id here, not device_id
|
|
228
228
|
type: e.enum(["dry", "wet"]),
|
|
229
229
|
value: e.number()
|
|
230
|
-
}),
|
|
230
|
+
}), Ae = e.enum([
|
|
231
231
|
"esp32-touch-28",
|
|
232
232
|
// 2.8" 240x320 resistive touch, the workshop board
|
|
233
233
|
"esp32-headless",
|
|
234
234
|
// no display; sensor node
|
|
235
235
|
"simulator"
|
|
236
236
|
// browser-side stand-in, for building without hardware
|
|
237
|
-
]),
|
|
237
|
+
]), H = e.enum([
|
|
238
238
|
"weather",
|
|
239
239
|
"clock",
|
|
240
240
|
"aircraft",
|
|
241
241
|
"sensor",
|
|
242
242
|
"blank"
|
|
243
|
-
]),
|
|
243
|
+
]), Ee = e.object({
|
|
244
244
|
/** Postal code is what a person knows; the portal resolves it to coordinates. */
|
|
245
245
|
postalCode: e.string().min(3).max(12),
|
|
246
246
|
latitude: e.number().min(-90).max(90).optional(),
|
|
@@ -248,29 +248,29 @@ var T = e.enum([
|
|
|
248
248
|
units: e.enum(["imperial", "metric"]).default("imperial"),
|
|
249
249
|
showForecast: e.boolean().default(!0),
|
|
250
250
|
refreshSeconds: e.number().int().min(300).max(86400).default(900)
|
|
251
|
-
}),
|
|
251
|
+
}), Se = e.object({
|
|
252
252
|
/** IANA zone, e.g. "America/New_York". */
|
|
253
253
|
timezone: e.string().default("America/New_York"),
|
|
254
254
|
twentyFourHour: e.boolean().default(!1),
|
|
255
255
|
showSeconds: e.boolean().default(!1),
|
|
256
256
|
showDate: e.boolean().default(!0)
|
|
257
|
-
}),
|
|
257
|
+
}), Ce = e.object({
|
|
258
258
|
latitude: e.number().min(-90).max(90),
|
|
259
259
|
longitude: e.number().min(-180).max(180),
|
|
260
260
|
radiusKm: e.number().min(5).max(400).default(80),
|
|
261
261
|
/** Rows the list view can show before the screen runs out. */
|
|
262
262
|
maxRows: e.number().int().min(1).max(12).default(8),
|
|
263
263
|
refreshSeconds: e.number().int().min(10).max(600).default(30)
|
|
264
|
-
}),
|
|
264
|
+
}), _e = e.object({
|
|
265
265
|
/** Signal keys to display, in order. Abstract keys per the Signal contract. */
|
|
266
266
|
keys: e.array(e.string()).min(1).max(6),
|
|
267
267
|
refreshSeconds: e.number().int().min(1).max(3600).default(10)
|
|
268
|
-
}), _e = e.object({
|
|
269
|
-
weather: Ae.optional(),
|
|
270
|
-
clock: Ee.optional(),
|
|
271
|
-
aircraft: Se.optional(),
|
|
272
|
-
sensor: Ce.optional()
|
|
273
268
|
}), Be = e.object({
|
|
269
|
+
weather: Ee.optional(),
|
|
270
|
+
clock: Se.optional(),
|
|
271
|
+
aircraft: Ce.optional(),
|
|
272
|
+
sensor: _e.optional()
|
|
273
|
+
}), Fe = e.object({
|
|
274
274
|
brightness: e.number().int().min(5).max(100).default(80),
|
|
275
275
|
/** Degrees clockwise. The board can sit either way up in a case. */
|
|
276
276
|
rotation: e.union([e.literal(0), e.literal(90), e.literal(180), e.literal(270)]).default(0),
|
|
@@ -283,7 +283,7 @@ var T = e.enum([
|
|
|
283
283
|
}), E = e.string().regex(
|
|
284
284
|
/^\d{1,3} \d{1,3} \d{1,3}$/,
|
|
285
285
|
'Expected space-separated RGB integers, e.g. "13 110 253"'
|
|
286
|
-
),
|
|
286
|
+
), ke = e.object({
|
|
287
287
|
preset: e.enum(["light", "dark", "corporate", "midnight", "blueprint", "custom"]).default("dark"),
|
|
288
288
|
background: E.optional(),
|
|
289
289
|
foreground: E.optional(),
|
|
@@ -298,12 +298,12 @@ e.object({
|
|
|
298
298
|
/** Monotonic. Portal increments on write; device echoes what it is running. */
|
|
299
299
|
revision: e.number().int().nonnegative(),
|
|
300
300
|
updatedAt: e.string().datetime().optional(),
|
|
301
|
-
activeApp:
|
|
302
|
-
apps:
|
|
303
|
-
display:
|
|
304
|
-
theme:
|
|
301
|
+
activeApp: H,
|
|
302
|
+
apps: Be,
|
|
303
|
+
display: Fe,
|
|
304
|
+
theme: ke
|
|
305
305
|
});
|
|
306
|
-
var
|
|
306
|
+
var je = e.enum([
|
|
307
307
|
"unprovisioned",
|
|
308
308
|
"connecting",
|
|
309
309
|
"online",
|
|
@@ -312,19 +312,19 @@ var ke = e.enum([
|
|
|
312
312
|
]);
|
|
313
313
|
e.object({
|
|
314
314
|
deviceId: e.string().min(1),
|
|
315
|
-
kind:
|
|
315
|
+
kind: Ae,
|
|
316
316
|
firmwareVersion: e.string(),
|
|
317
317
|
/** Shown on the device's own screen at boot — how the user finds it. */
|
|
318
318
|
ipAddress: e.string().optional(),
|
|
319
|
-
provisioning:
|
|
319
|
+
provisioning: je,
|
|
320
320
|
/** Revision the device is actually running, not the one it was sent. */
|
|
321
321
|
configRevision: e.number().int().nonnegative(),
|
|
322
|
-
activeApp:
|
|
322
|
+
activeApp: H,
|
|
323
323
|
rssi: e.number().int().optional().describe("dBm"),
|
|
324
324
|
uptimeSeconds: e.number().int().nonnegative().optional(),
|
|
325
325
|
freeHeapBytes: e.number().int().nonnegative().optional()
|
|
326
326
|
});
|
|
327
|
-
var
|
|
327
|
+
var Ie = e.enum([
|
|
328
328
|
"background",
|
|
329
329
|
"foreground",
|
|
330
330
|
"muted",
|
|
@@ -332,7 +332,7 @@ var je = e.enum([
|
|
|
332
332
|
"success",
|
|
333
333
|
"warning",
|
|
334
334
|
"danger"
|
|
335
|
-
]),
|
|
335
|
+
]), De = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'RGB must be three space-separated integers, e.g. "13 110 253"'), S = e.union([Ie, De]), U = e.enum(["xs", "sm", "base", "lg", "xl", "display"]), C = e.enum(["start", "center", "end"]), Te = e.discriminatedUnion("kind", [
|
|
336
336
|
e.object({
|
|
337
337
|
kind: e.literal("weather"),
|
|
338
338
|
latitude: e.number().min(-90).max(90),
|
|
@@ -398,7 +398,7 @@ var je = e.enum([
|
|
|
398
398
|
]), I = e.union([
|
|
399
399
|
e.object({ literal: e.number() }),
|
|
400
400
|
e.object({ source: e.string().min(1), field: e.string().min(1) })
|
|
401
|
-
]),
|
|
401
|
+
]), Re = e.object({
|
|
402
402
|
compute: e.enum(["add", "subtract", "multiply", "divide"]),
|
|
403
403
|
of: e.tuple([I, I]),
|
|
404
404
|
round: e.boolean().default(!0)
|
|
@@ -410,55 +410,55 @@ var je = e.enum([
|
|
|
410
410
|
/** Field on that source, e.g. "temperature", "high", "condition". */
|
|
411
411
|
field: e.string().min(1)
|
|
412
412
|
}),
|
|
413
|
-
|
|
413
|
+
Re
|
|
414
414
|
]), _ = e.object({
|
|
415
415
|
value: I,
|
|
416
416
|
op: e.enum(["<", "<=", ">", ">=", "==", "!="]),
|
|
417
417
|
than: e.union([e.number(), e.string(), e.boolean()])
|
|
418
|
-
}),
|
|
418
|
+
}), K = e.object({
|
|
419
419
|
when: _,
|
|
420
420
|
color: S.optional(),
|
|
421
|
-
size:
|
|
421
|
+
size: U.optional()
|
|
422
422
|
}), B = {
|
|
423
423
|
color: S.optional(),
|
|
424
424
|
/** Drawn only when this is false, or absent. */
|
|
425
425
|
hideWhen: _.optional(),
|
|
426
426
|
/** Conditional style. First match wins. */
|
|
427
|
-
rules: e.array(
|
|
428
|
-
},
|
|
427
|
+
rules: e.array(K).max(4).optional()
|
|
428
|
+
}, Oe = e.object({
|
|
429
429
|
type: e.literal("text"),
|
|
430
430
|
value: w,
|
|
431
|
-
size:
|
|
431
|
+
size: U.default("base"),
|
|
432
432
|
align: C.default("start"),
|
|
433
433
|
/** Printed after the value, e.g. a degree symbol. Never itself bound. */
|
|
434
434
|
/** Drawn before the value, as `suffix` is after: "H " for "H 68°". */
|
|
435
435
|
prefix: e.string().max(8).optional(),
|
|
436
436
|
suffix: e.string().max(8).optional(),
|
|
437
437
|
...B
|
|
438
|
-
}),
|
|
438
|
+
}), Me = e.object({
|
|
439
439
|
type: e.literal("dial"),
|
|
440
440
|
value: w,
|
|
441
441
|
min: e.number(),
|
|
442
442
|
max: e.number(),
|
|
443
443
|
label: e.string().max(24).optional(),
|
|
444
444
|
...B
|
|
445
|
-
}),
|
|
445
|
+
}), Ne = e.object({
|
|
446
446
|
type: e.literal("sparkline"),
|
|
447
447
|
/** A source field holding a series rather than a scalar. */
|
|
448
448
|
series: w,
|
|
449
449
|
...B
|
|
450
|
-
}),
|
|
450
|
+
}), Pe = e.object({
|
|
451
451
|
type: e.literal("bar"),
|
|
452
452
|
value: w,
|
|
453
453
|
min: e.number(),
|
|
454
454
|
max: e.number(),
|
|
455
455
|
...B
|
|
456
|
-
}),
|
|
456
|
+
}), $e = e.object({
|
|
457
457
|
type: e.literal("status"),
|
|
458
458
|
state: w,
|
|
459
459
|
label: e.string().max(24).optional(),
|
|
460
460
|
...B
|
|
461
|
-
}), F = 64,
|
|
461
|
+
}), F = 64, ze = F / 2, Le = Math.ceil(ze * F / 3) * 4, Ve = e.object({
|
|
462
462
|
type: e.literal("sprite"),
|
|
463
463
|
width: e.number().int().min(1).max(F),
|
|
464
464
|
height: e.number().int().min(1).max(F),
|
|
@@ -473,11 +473,11 @@ var je = e.enum([
|
|
|
473
473
|
*/
|
|
474
474
|
palette: e.array(S).min(1).max(16),
|
|
475
475
|
/** base64 of the packed nibbles. */
|
|
476
|
-
pixels: e.string().min(4).max(
|
|
476
|
+
pixels: e.string().min(4).max(Le),
|
|
477
477
|
align: C.default("start"),
|
|
478
478
|
/** Drawn only when this is false, or absent. */
|
|
479
479
|
hideWhen: _.optional()
|
|
480
|
-
}), D = e.string().regex(/^[0-9a-f]{64}$/, "a lowercase hex SHA-256"), f = { width: 304, height: 224 },
|
|
480
|
+
}), D = e.string().regex(/^[0-9a-f]{64}$/, "a lowercase hex SHA-256"), f = { width: 304, height: 224 }, He = 8, $ = {
|
|
481
481
|
/** "RSPR". */
|
|
482
482
|
magic: [82, 83, 80, 82],
|
|
483
483
|
version: 1,
|
|
@@ -486,13 +486,13 @@ var je = e.enum([
|
|
|
486
486
|
/** Only 4 today: two pixels per byte, high nibble first, rows padded to a byte. */
|
|
487
487
|
bitsPerPixel: 4,
|
|
488
488
|
maxColors: 16
|
|
489
|
-
},
|
|
489
|
+
}, _t = $.headerBytes + $.maxColors * 2 + Math.ceil(f.width / 2) * f.height, Ue = e.object({
|
|
490
490
|
type: e.literal("image"),
|
|
491
491
|
asset: D,
|
|
492
492
|
/** The file's own pixels, not the drawn size. */
|
|
493
493
|
width: e.number().int().min(1).max(f.width),
|
|
494
494
|
height: e.number().int().min(1).max(f.height),
|
|
495
|
-
scale: e.number().int().min(1).max(
|
|
495
|
+
scale: e.number().int().min(1).max(He).default(1),
|
|
496
496
|
/**
|
|
497
497
|
* What kind of file `asset` names: `spr`, the palette file the retro look
|
|
498
498
|
* uses, or `jpeg`, the full-colour rendition (drawn at scale 1). Absent means
|
|
@@ -502,25 +502,25 @@ var je = e.enum([
|
|
|
502
502
|
align: C.default("start"),
|
|
503
503
|
/** Drawn only when this is false, or absent. */
|
|
504
504
|
hideWhen: _.optional()
|
|
505
|
-
}),
|
|
505
|
+
}), Bt = { sm: 24, md: 48, lg: 72, xl: 96 }, Ke = e.object({
|
|
506
506
|
type: e.literal("icon"),
|
|
507
507
|
value: w,
|
|
508
508
|
size: e.enum(["sm", "md", "lg", "xl"]).default("md"),
|
|
509
509
|
align: C.default("start"),
|
|
510
510
|
color: S.default("foreground"),
|
|
511
|
-
rules: e.array(
|
|
511
|
+
rules: e.array(K).max(4).optional(),
|
|
512
512
|
/** Drawn only when this is false, or absent. */
|
|
513
513
|
hideWhen: _.optional()
|
|
514
|
-
}),
|
|
515
|
-
Re,
|
|
514
|
+
}), W = e.discriminatedUnion("type", [
|
|
516
515
|
Oe,
|
|
517
516
|
Me,
|
|
518
517
|
Ne,
|
|
519
518
|
Pe,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
Ue
|
|
523
|
-
|
|
519
|
+
$e,
|
|
520
|
+
Ve,
|
|
521
|
+
Ue,
|
|
522
|
+
Ke
|
|
523
|
+
]), We = e.object({
|
|
524
524
|
type: e.literal("group"),
|
|
525
525
|
direction: e.enum(["row", "stack"]),
|
|
526
526
|
gap: e.number().int().min(0).max(64).default(4),
|
|
@@ -536,23 +536,23 @@ var je = e.enum([
|
|
|
536
536
|
* falls back to equal cells.
|
|
537
537
|
*/
|
|
538
538
|
pack: e.boolean().optional(),
|
|
539
|
-
children: e.array(
|
|
540
|
-
}),
|
|
539
|
+
children: e.array(W).min(1).max(8)
|
|
540
|
+
}), Ge = e.union([W, We]);
|
|
541
541
|
e.enum(["landscape", "portrait"]);
|
|
542
|
-
var
|
|
542
|
+
var Ft = {
|
|
543
543
|
landscape: { width: 320, height: 240 },
|
|
544
544
|
portrait: { width: 240, height: 320 }
|
|
545
|
-
},
|
|
545
|
+
}, Ze = e.preprocess(
|
|
546
546
|
(a) => a === "240x320" ? "320x240" : a,
|
|
547
547
|
e.enum(["320x240"])
|
|
548
|
-
),
|
|
548
|
+
), G = e.object({
|
|
549
549
|
/** Bumped only for a breaking change; the device checks it before parsing. */
|
|
550
550
|
schemaVersion: e.literal(1),
|
|
551
551
|
id: e.string().regex(/^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$/, "lowercase slug"),
|
|
552
552
|
name: e.string().min(1).max(48),
|
|
553
553
|
/** Free text. Never an email or anything else identifying — see the plan. */
|
|
554
554
|
author: e.string().max(32).optional(),
|
|
555
|
-
screen:
|
|
555
|
+
screen: Ze.default("320x240"),
|
|
556
556
|
background: S.default("background"),
|
|
557
557
|
/**
|
|
558
558
|
* Where the blocks sit on the screen as a whole: from the top, or in the
|
|
@@ -583,8 +583,8 @@ var _t = {
|
|
|
583
583
|
*/
|
|
584
584
|
font: e.enum(["inter", "pixel", "tay"]).optional(),
|
|
585
585
|
/** Named so bindings can refer to them. */
|
|
586
|
-
sources: e.record(
|
|
587
|
-
blocks: e.array(
|
|
586
|
+
sources: e.record(Te).default({}),
|
|
587
|
+
blocks: e.array(Ge).min(1).max(12)
|
|
588
588
|
}).superRefine((a, i) => {
|
|
589
589
|
const h = (d) => Math.ceil(d / 2), m = (d, n) => {
|
|
590
590
|
const t = d;
|
|
@@ -621,7 +621,7 @@ var _t = {
|
|
|
621
621
|
m(s, ["blocks", n, "children", l]), b(s, ["blocks", n, "children", l]);
|
|
622
622
|
});
|
|
623
623
|
});
|
|
624
|
-
}),
|
|
624
|
+
}), Z = e.object({
|
|
625
625
|
x: e.number().min(0).max(1),
|
|
626
626
|
y: e.number().min(0).max(1),
|
|
627
627
|
w: e.number().gt(0).max(1),
|
|
@@ -633,7 +633,7 @@ e.object({
|
|
|
633
633
|
original: e.string().min(4),
|
|
634
634
|
/** The full-colour rendition (FULL_RENDITION), base64 JPEG. Optional for older clients. */
|
|
635
635
|
full: e.string().min(4).optional(),
|
|
636
|
-
crop:
|
|
636
|
+
crop: Z.optional()
|
|
637
637
|
});
|
|
638
638
|
e.object({ full: e.string().min(4) });
|
|
639
639
|
e.object({
|
|
@@ -648,10 +648,10 @@ e.object({
|
|
|
648
648
|
uploadedAt: e.number().int(),
|
|
649
649
|
/** The full-colour rendition, when one has been made. Its own hash names it. */
|
|
650
650
|
full: e.object({ hash: D, bytes: e.number().int().positive() }).optional(),
|
|
651
|
-
crop:
|
|
651
|
+
crop: Z.optional()
|
|
652
652
|
});
|
|
653
653
|
e.enum(["register", "poll", "send"]);
|
|
654
|
-
var
|
|
654
|
+
var qe = e.enum(["working", "missing", "unsupported", "fault"]), q = e.string().regex(/^[a-z][a-z0-9-]{0,23}$/), Y = e.record(q, qe).refine((a) => Object.keys(a).length <= 16, { message: "at most 16 features" });
|
|
655
655
|
e.object({
|
|
656
656
|
/** When the board last said any of this, by the server's clock. */
|
|
657
657
|
reportedAt: e.number().int().nonnegative().optional(),
|
|
@@ -681,7 +681,7 @@ e.object({
|
|
|
681
681
|
/** Why it last restarted, if it says. A board power-cycling in a loop is a fault. */
|
|
682
682
|
resetReason: e.string().max(40).optional(),
|
|
683
683
|
/** Its parts and whether each works — see `DeviceFeaturesSchema`. */
|
|
684
|
-
features:
|
|
684
|
+
features: Y.optional(),
|
|
685
685
|
/** When it last polled — finer-grained than a registration, for liveness only. */
|
|
686
686
|
lastPollAt: e.number().int().nonnegative().optional()
|
|
687
687
|
});
|
|
@@ -717,14 +717,14 @@ e.object({
|
|
|
717
717
|
*/
|
|
718
718
|
rotation: e.number().int().min(0).max(3).optional()
|
|
719
719
|
});
|
|
720
|
-
var
|
|
721
|
-
key:
|
|
720
|
+
var Ye = e.object({
|
|
721
|
+
key: q,
|
|
722
722
|
value: e.union([e.number().finite(), e.string().max(64), e.boolean()]),
|
|
723
723
|
unit: e.string().max(16).optional(),
|
|
724
724
|
at: e.number().int().nonnegative().optional()
|
|
725
725
|
});
|
|
726
726
|
e.object({
|
|
727
|
-
readings: e.array(
|
|
727
|
+
readings: e.array(Ye).min(1).max(16)
|
|
728
728
|
});
|
|
729
729
|
var x = e.string().regex(/^[0-9A-HJKMNP-TV-Z]{8}$/, "eight characters, no I L O or U"), R = e.string().regex(/^\d{4}$/);
|
|
730
730
|
e.object({
|
|
@@ -755,7 +755,7 @@ e.object({
|
|
|
755
755
|
* (DeviceFeatureStateSchema is four words). Readings, when they come, travel
|
|
756
756
|
* as Signals and are argued for on their own.
|
|
757
757
|
*/
|
|
758
|
-
features:
|
|
758
|
+
features: Y.optional()
|
|
759
759
|
});
|
|
760
760
|
e.object({
|
|
761
761
|
deviceId: x,
|
|
@@ -776,13 +776,13 @@ e.object({
|
|
|
776
776
|
createdAt: e.number().int().nonnegative(),
|
|
777
777
|
lastSeenAt: e.number().int().nonnegative()
|
|
778
778
|
});
|
|
779
|
-
var
|
|
779
|
+
var Xe = e.object({
|
|
780
780
|
version: e.string().min(1).max(40),
|
|
781
781
|
url: e.string().url().max(200),
|
|
782
782
|
sha256: e.string().regex(/^[0-9a-f]{64}$/),
|
|
783
783
|
bytes: e.number().int().positive(),
|
|
784
784
|
requestedAt: e.number().int().nonnegative()
|
|
785
|
-
}),
|
|
785
|
+
}), kt = "?", jt = {
|
|
786
786
|
// Accented Latin, CP437 0x80-0xA5 and 0xE1
|
|
787
787
|
Ç: { byte: 128, shows: "Ç" },
|
|
788
788
|
ü: { byte: 129, shows: "ü" },
|
|
@@ -854,7 +854,7 @@ var Ye = e.object({
|
|
|
854
854
|
"—": { byte: 45, shows: "-" },
|
|
855
855
|
"−": { byte: 45, shows: "-" },
|
|
856
856
|
" ": { byte: 32, shows: " " }
|
|
857
|
-
},
|
|
857
|
+
}, It = 28, Dt = {
|
|
858
858
|
background: "17 17 17",
|
|
859
859
|
foreground: "238 238 238",
|
|
860
860
|
muted: "153 153 153",
|
|
@@ -862,7 +862,7 @@ var Ye = e.object({
|
|
|
862
862
|
success: "34 197 94",
|
|
863
863
|
warning: "245 158 11",
|
|
864
864
|
danger: "220 53 69"
|
|
865
|
-
},
|
|
865
|
+
}, Tt = 48, Rt = 3, Ot = {
|
|
866
866
|
sun: [
|
|
867
867
|
[32, 24, 32, 26, 30, 29, 29, 30, 26, 32, 22, 32, 19, 30, 18, 29, 16, 26, 16, 22, 18, 19, 19, 18, 22, 16, 26, 16, 29, 18, 30, 19, 32, 22, 32, 24],
|
|
868
868
|
[37, 24, 43, 24],
|
|
@@ -910,8 +910,8 @@ var Ye = e.object({
|
|
|
910
910
|
[41, 25, 37, 29, 35, 30, 13, 30, 10, 29, 9, 27, 9, 22, 10, 20, 14, 18, 15, 15, 15, 13, 19, 9, 21, 8, 26, 8, 29, 9, 31, 11, 33, 15, 36, 16, 38, 17, 40, 19, 41, 22, 41, 24],
|
|
911
911
|
[26, 33, 20, 41, 27, 41, 22, 47]
|
|
912
912
|
]
|
|
913
|
-
}, k = 8,
|
|
914
|
-
apps: e.array(
|
|
913
|
+
}, k = 8, Je = e.object({
|
|
914
|
+
apps: e.array(G).min(1).max(k),
|
|
915
915
|
/** Which app to show — an index into `apps`. */
|
|
916
916
|
show: e.number().int().min(0).max(k - 1),
|
|
917
917
|
/** Move to the next app every this many minutes; 0 holds still. */
|
|
@@ -959,31 +959,35 @@ var v = e.string().regex(/^\d{1,3} \d{1,3} \d{1,3}$/, 'Must be "R G B", e.g. "13
|
|
|
959
959
|
success: v,
|
|
960
960
|
warning: v,
|
|
961
961
|
danger: v
|
|
962
|
-
}),
|
|
962
|
+
}), X = e.enum(["inter", "tay", "pixel"]), Qe = ["0rem", "0.25rem", "0.5rem", "0.75rem", "1rem"], L = e.string().trim().min(1).max(60).regex(/^[A-Za-z0-9 ]+$/), et = e.object({
|
|
963
|
+
heading: L.optional(),
|
|
964
|
+
body: L.optional()
|
|
965
|
+
});
|
|
963
966
|
e.object({
|
|
964
967
|
name: e.string().trim().min(1).max(40),
|
|
965
968
|
/** The preset it started from, when it started from one. */
|
|
966
969
|
base: e.string().max(40).optional(),
|
|
967
970
|
light: z,
|
|
968
971
|
dark: z,
|
|
969
|
-
lettering:
|
|
970
|
-
radius: e.enum(
|
|
972
|
+
lettering: X,
|
|
973
|
+
radius: e.enum(Qe),
|
|
974
|
+
fonts: et.optional()
|
|
971
975
|
});
|
|
972
976
|
e.object({
|
|
973
977
|
text: e.string().max(2e3)
|
|
974
978
|
});
|
|
975
|
-
var
|
|
979
|
+
var tt = e.string().regex(/^[0-9a-f]{42}$/), at = e.union([e.literal("auto"), X]);
|
|
976
980
|
e.object({
|
|
977
981
|
revision: e.number().int().nonnegative(),
|
|
978
982
|
sentAt: e.number().int().nonnegative().optional(),
|
|
979
|
-
document:
|
|
980
|
-
shelf:
|
|
981
|
-
update:
|
|
983
|
+
document: G.optional(),
|
|
984
|
+
shelf: Je.optional(),
|
|
985
|
+
update: Xe.optional(),
|
|
982
986
|
screen: e.object({ invert: e.boolean() }).optional(),
|
|
983
|
-
palette:
|
|
984
|
-
font:
|
|
987
|
+
palette: tt.optional(),
|
|
988
|
+
font: at.optional()
|
|
985
989
|
});
|
|
986
|
-
var
|
|
990
|
+
var Mt = { inter: { family: "Inter", weight: 500, caps: !1 }, tay: { family: "TAY Dreamboat", weight: 400, caps: !0 } }, Nt = { inter: { 10: { 0: 6, 1: 4, 2: 6, 3: 6, 4: 7, 5: 6, 6: 6, 7: 6, 8: 6, 9: 6, " ": 3, "!": 3, '"': 5, "#": 6, $: 6, "%": 10, "&": 7, "'": 3, "(": 4, ")": 4, "*": 5, "+": 7, ",": 3, "-": 5, ".": 3, "/": 4, ":": 3, ";": 3, "<": 7, "=": 7, ">": 7, "?": 5, "@": 10, A: 7, B: 7, C: 7, D: 7, E: 6, F: 6, G: 7, H: 7, I: 3, J: 6, K: 7, L: 6, M: 9, N: 8, O: 8, P: 6, Q: 8, R: 6, S: 6, T: 7, U: 7, V: 7, W: 10, X: 7, Y: 7, Z: 6, "[": 4, "\\": 4, "]": 4, "^": 5, _: 5, "`": 3, a: 6, b: 6, c: 6, d: 6, e: 6, f: 4, g: 6, h: 6, i: 3, j: 3, k: 6, l: 3, m: 9, n: 6, o: 6, p: 6, q: 6, r: 4, s: 5, t: 3, u: 6, v: 6, w: 8, x: 6, y: 6, z: 6, "{": 4, "|": 3, "}": 4, "~": 7, " ": 3, "¡": 3, "¢": 6, "£": 6, "¥": 6, ª: 5, "«": 6, "¬": 7, "°": 5, "±": 7, "²": 4, µ: 6, "·": 3, º: 5, "»": 6, "¼": 8, "½": 9, "¿": 5, Ä: 7, Å: 7, Æ: 10, Ç: 7, É: 6, Ñ: 8, Ö: 8, Ü: 7, ß: 6, à: 6, á: 6, â: 6, ä: 6, å: 6, æ: 9, ç: 6, è: 6, é: 6, ê: 6, ë: 6, ì: 3, í: 3, î: 3, ï: 3, ñ: 6, ò: 6, ó: 6, ô: 6, ö: 6, "÷": 7, ù: 6, ú: 6, û: 6, ü: 6, ÿ: 6, ƒ: 5, Ω: 8, π: 5, "–": 5, "—": 10, "‘": 3, "’": 3, "“": 5, "”": 5, "−": 7, "√": 5, "∞": 7, "≈": 5, "≤": 5, "≥": 5 }, 12: { 0: 8, 1: 5, 2: 7, 3: 8, 4: 8, 5: 7, 6: 8, 7: 7, 8: 8, 9: 8, " ": 3, "!": 4, '"': 6, "#": 8, $: 8, "%": 12, "&": 8, "'": 4, "(": 4, ")": 4, "*": 6, "+": 8, ",": 4, "-": 6, ".": 4, "/": 4, ":": 4, ";": 4, "<": 8, "=": 8, ">": 8, "?": 6, "@": 12, A: 9, B: 8, C: 9, D: 9, E: 7, F: 7, G: 9, H: 9, I: 3, J: 7, K: 8, L: 7, M: 11, N: 9, O: 9, P: 8, Q: 9, R: 8, S: 8, T: 8, U: 9, V: 9, W: 12, X: 8, Y: 8, Z: 8, "[": 4, "\\": 4, "]": 4, "^": 6, _: 6, "`": 4, a: 7, b: 7, c: 7, d: 7, e: 7, f: 5, g: 7, h: 7, i: 3, j: 3, k: 7, l: 3, m: 11, n: 7, o: 7, p: 7, q: 7, r: 5, s: 6, t: 4, u: 7, v: 7, w: 10, x: 7, y: 7, z: 7, "{": 5, "|": 4, "}": 5, "~": 8, " ": 3, "¡": 4, "¢": 7, "£": 7, "¥": 7, ª: 5, "«": 7, "¬": 8, "°": 5, "±": 8, "²": 5, µ: 7, "·": 4, º: 6, "»": 7, "¼": 10, "½": 10, "¿": 6, Ä: 9, Å: 9, Æ: 12, Ç: 9, É: 7, Ñ: 9, Ö: 9, Ü: 9, ß: 8, à: 7, á: 7, â: 7, ä: 7, å: 7, æ: 11, ç: 7, è: 7, é: 7, ê: 7, ë: 7, ì: 3, í: 3, î: 3, ï: 3, ñ: 7, ò: 7, ó: 7, ô: 7, ö: 7, "÷": 8, ù: 7, ú: 7, û: 7, ü: 7, ÿ: 7, ƒ: 6, Ω: 9, π: 7, "–": 6, "—": 12, "‘": 3, "’": 3, "“": 6, "”": 6, "−": 8, "√": 7, "∞": 9, "≈": 7, "≤": 7, "≥": 7 }, 16: { 0: 10, 1: 7, 2: 10, 3: 10, 4: 11, 5: 10, 6: 10, 7: 9, 8: 10, 9: 10, " ": 4, "!": 5, '"': 8, "#": 10, $: 10, "%": 16, "&": 10, "'": 5, "(": 6, ")": 6, "*": 8, "+": 11, ",": 5, "-": 7, ".": 5, "/": 6, ":": 5, ";": 5, "<": 11, "=": 11, ">": 11, "?": 8, "@": 16, A: 11, B: 11, C: 12, D: 12, E: 10, F: 9, G: 12, H: 12, I: 4, J: 9, K: 11, L: 9, M: 15, N: 12, O: 12, P: 10, Q: 12, R: 10, S: 10, T: 10, U: 12, V: 11, W: 16, X: 11, Y: 11, Z: 10, "[": 6, "\\": 6, "]": 6, "^": 8, _: 7, "`": 5, a: 9, b: 10, c: 9, d: 10, e: 9, f: 6, g: 10, h: 10, i: 4, j: 4, k: 9, l: 4, m: 14, n: 10, o: 10, p: 10, q: 10, r: 6, s: 9, t: 5, u: 10, v: 9, w: 13, x: 9, y: 9, z: 9, "{": 7, "|": 6, "}": 7, "~": 11, " ": 4, "¡": 5, "¢": 9, "£": 10, "¥": 9, ª: 7, "«": 10, "¬": 11, "°": 7, "±": 11, "²": 7, µ: 10, "·": 5, º: 8, "»": 10, "¼": 13, "½": 14, "¿": 8, Ä: 11, Å: 11, Æ: 16, Ç: 12, É: 10, Ñ: 12, Ö: 12, Ü: 12, ß: 10, à: 9, á: 9, â: 9, ä: 9, å: 9, æ: 15, ç: 9, è: 9, é: 9, ê: 9, ë: 9, ì: 4, í: 4, î: 4, ï: 4, ñ: 10, ò: 10, ó: 10, ô: 10, ö: 10, "÷": 11, ù: 10, ú: 10, û: 10, ü: 10, ÿ: 9, ƒ: 8, Ω: 12, π: 9, "–": 8, "—": 16, "‘": 4, "’": 4, "“": 8, "”": 8, "−": 11, "√": 9, "∞": 11, "≈": 9, "≤": 9, "≥": 9 }, 20: { 0: 13, 1: 8, 2: 12, 3: 13, 4: 13, 5: 12, 6: 13, 7: 11, 8: 13, 9: 13, " ": 5, "!": 6, '"': 10, "#": 13, $: 13, "%": 20, "&": 13, "'": 6, "(": 7, ")": 7, "*": 10, "+": 13, ",": 6, "-": 9, ".": 6, "/": 7, ":": 6, ";": 6, "<": 13, "=": 13, ">": 13, "?": 11, "@": 20, A: 14, B: 13, C: 15, D: 14, E: 12, F: 12, G: 15, H: 15, I: 5, J: 12, K: 14, L: 11, M: 18, N: 15, O: 15, P: 13, Q: 15, R: 13, S: 13, T: 13, U: 15, V: 14, W: 20, X: 14, Y: 14, Z: 13, "[": 7, "\\": 7, "]": 7, "^": 10, _: 9, "`": 7, a: 11, b: 12, c: 12, d: 12, e: 12, f: 8, g: 12, h: 12, i: 5, j: 5, k: 11, l: 5, m: 18, n: 12, o: 12, p: 12, q: 12, r: 8, s: 11, t: 7, u: 12, v: 11, w: 17, x: 11, y: 12, z: 11, "{": 9, "|": 7, "}": 9, "~": 13, " ": 5, "¡": 6, "¢": 12, "£": 12, "¥": 11, ª: 9, "«": 12, "¬": 13, "°": 9, "±": 13, "²": 9, µ: 12, "·": 6, º: 10, "»": 12, "¼": 16, "½": 17, "¿": 11, Ä: 14, Å: 14, Æ: 20, Ç: 15, É: 12, Ñ: 15, Ö: 15, Ü: 15, ß: 13, à: 11, á: 11, â: 11, ä: 11, å: 11, æ: 18, ç: 12, è: 12, é: 12, ê: 12, ë: 12, ì: 5, í: 5, î: 5, ï: 5, ñ: 12, ò: 12, ó: 12, ô: 12, ö: 12, "÷": 13, ù: 12, ú: 12, û: 12, ü: 12, ÿ: 12, ƒ: 10, Ω: 15, π: 11, "–": 10, "—": 20, "‘": 6, "’": 6, "“": 9, "”": 9, "−": 13, "√": 11, "∞": 14, "≈": 11, "≤": 11, "≥": 11 }, 28: { 0: 18, 1: 12, 2: 17, 3: 18, 4: 18, 5: 17, 6: 18, 7: 16, 8: 18, 9: 18, " ": 7, "!": 9, '"': 14, "#": 18, $: 18, "%": 28, "&": 18, "'": 9, "(": 10, ")": 10, "*": 15, "+": 19, ",": 8, "-": 13, ".": 8, "/": 10, ":": 8, ";": 9, "<": 19, "=": 19, ">": 19, "?": 15, "@": 28, A: 20, B: 18, C: 21, D: 20, E: 17, F: 17, G: 21, H: 21, I: 8, J: 16, K: 19, L: 16, M: 26, N: 21, O: 21, P: 18, Q: 22, R: 18, S: 18, T: 18, U: 21, V: 20, W: 28, X: 20, Y: 19, Z: 18, "[": 10, "\\": 10, "]": 10, "^": 13, _: 13, "`": 9, a: 16, b: 17, c: 16, d: 17, e: 16, f: 11, g: 17, h: 17, i: 7, j: 7, k: 16, l: 7, m: 25, n: 17, o: 17, p: 17, q: 17, r: 11, s: 15, t: 10, u: 17, v: 16, w: 23, x: 16, y: 16, z: 16, "{": 12, "|": 10, "}": 12, "~": 19, " ": 7, "¡": 9, "¢": 16, "£": 17, "¥": 16, ª: 13, "«": 17, "¬": 19, "°": 13, "±": 19, "²": 13, µ: 17, "·": 8, º: 14, "»": 17, "¼": 23, "½": 24, "¿": 15, Ä: 20, Å: 20, Æ: 28, Ç: 21, É: 17, Ñ: 21, Ö: 21, Ü: 21, ß: 18, à: 16, á: 16, â: 16, ä: 16, å: 16, æ: 26, ç: 16, è: 16, é: 16, ê: 16, ë: 16, ì: 7, í: 7, î: 7, ï: 7, ñ: 17, ò: 17, ó: 17, ô: 17, ö: 17, "÷": 19, ù: 17, ú: 17, û: 17, ü: 17, ÿ: 16, ƒ: 14, Ω: 22, π: 15, "–": 14, "—": 28, "‘": 8, "’": 8, "“": 13, "”": 13, "−": 19, "√": 15, "∞": 20, "≈": 15, "≤": 15, "≥": 15 }, 56: { 0: 36, 1: 23, 2: 35, 3: 35, 4: 37, 5: 34, 6: 35, 7: 32, 8: 35, 9: 35, " ": 15, "!": 17, '"': 28, "#": 36, $: 36, "%": 56, "&": 37, "'": 18, "(": 21, ")": 21, "*": 29, "+": 37, ",": 17, "-": 26, ".": 17, "/": 21, ":": 17, ";": 18, "<": 37, "=": 37, ">": 37, "?": 30, "@": 55, A: 40, B: 37, C: 41, D: 40, E: 34, F: 33, G: 42, H: 42, I: 15, J: 32, K: 39, L: 32, M: 51, N: 42, O: 43, P: 36, Q: 43, R: 36, S: 36, T: 37, U: 41, V: 40, W: 56, X: 39, Y: 39, Z: 36, "[": 21, "\\": 21, "]": 21, "^": 27, _: 26, "`": 19, a: 32, b: 35, c: 32, d: 35, e: 33, f: 21, g: 35, h: 34, i: 14, j: 14, k: 31, l: 14, m: 50, n: 34, o: 34, p: 35, q: 35, r: 22, s: 30, t: 19, u: 34, v: 32, w: 46, x: 31, y: 32, z: 31, "{": 25, "|": 19, "}": 25, "~": 37, "°": 26 } }, tay: { 28: { 0: 29, 1: 16, 2: 28, 3: 28, 4: 30, 5: 27, 6: 28, 7: 26, 8: 29, 9: 29, " ": 12, "!": 16, '"': 12, "#": 27, $: 27, "%": 29, "&": 33, "'": 9, "(": 20, ")": 20, "*": 14, "+": 21, ",": 10, "-": 16, ".": 10, "/": 19, ":": 13, ";": 12, "<": 18, "=": 22, ">": 18, "?": 27, "@": 31, A: 28, B: 32, C: 28, D: 30, E: 30, F: 29, G: 29, H: 32, I: 16, J: 27, K: 29, L: 27, M: 36, N: 32, O: 29, P: 30, Q: 30, R: 30, S: 29, T: 31, U: 29, V: 28, W: 40, X: 29, Y: 29, Z: 30, "[": 17, "\\": 19, "]": 17, "^": 13, _: 19, "`": 9, "{": 13, "|": 6, "}": 13, "~": 15, " ": 8, "¡": 15, "¢": 14, "£": 26, "¥": 31, ª: 8, "«": 14, "¬": 16, "°": 14, "±": 15, "²": 8, "·": 7, º: 9, "»": 14, "¼": 21, "½": 21, "¿": 26, Ä: 28, Å: 28, Æ: 25, Ç: 28, É: 30, Ñ: 32, Ö: 29, Ü: 29, "÷": 15, Ω: 22, "–": 14, "—": 28, "‘": 9, "’": 9, "“": 12, "”": 12, "−": 16, "√": 15, "∞": 20, "≈": 15, "≤": 15, "≥": 15 }, 56: { 0: 58, 1: 33, 2: 56, 3: 57, 4: 60, 5: 55, 6: 57, 7: 51, 8: 58, 9: 59, " ": 24, "!": 32, '"': 23, "#": 55, $: 55, "%": 59, "&": 66, "'": 18, "(": 39, ")": 39, "*": 28, "+": 43, ",": 20, "-": 31, ".": 20, "/": 38, ":": 26, ";": 23, "<": 37, "=": 44, ">": 37, "?": 54, "@": 61, A: 56, B: 63, C: 56, D: 60, E: 60, F: 58, G: 58, H: 63, I: 33, J: 55, K: 58, L: 53, M: 72, N: 65, O: 59, P: 60, Q: 59, R: 61, S: 58, T: 62, U: 58, V: 56, W: 79, X: 58, Y: 58, Z: 59, "[": 34, "\\": 38, "]": 34, "^": 26, _: 39, "`": 19, "{": 27, "|": 11, "}": 27, "~": 30, "°": 27 } } };
|
|
987
991
|
e.object({
|
|
988
992
|
deviceId: e.string().min(1, "Device ID is required"),
|
|
989
993
|
timeRange: e.enum(["1h", "24h", "7d"], {
|
|
@@ -993,17 +997,17 @@ e.object({
|
|
|
993
997
|
e.enum(["temperature", "humidity", "vwc", "ec", "ph", "pressure", "co2"])
|
|
994
998
|
).min(1, "At least one metric is required").max(4, "Maximum 4 metrics per graph")
|
|
995
999
|
});
|
|
996
|
-
var j = "gemini-2.5-flash",
|
|
1000
|
+
var j = "gemini-2.5-flash", nt = "gemini-2.5-flash", ot = "gemini-2.5-pro", Pt = {
|
|
997
1001
|
"google-gemini": "gemini-2.5-flash",
|
|
998
1002
|
openai: "gpt-4o-mini",
|
|
999
1003
|
anthropic: "claude-haiku-4-5-20251001",
|
|
1000
1004
|
grok: "grok-2-1212",
|
|
1001
1005
|
deepseek: "deepseek-chat",
|
|
1002
1006
|
ollama: "llama3.3"
|
|
1003
|
-
},
|
|
1007
|
+
}, $t = {
|
|
1004
1008
|
/** The Strategist: high creativity, exploratory conversation */
|
|
1005
1009
|
STRATEGIST: {
|
|
1006
|
-
model:
|
|
1010
|
+
model: nt,
|
|
1007
1011
|
provider: "google-gemini",
|
|
1008
1012
|
temperature: 0.7
|
|
1009
1013
|
},
|
|
@@ -1023,7 +1027,7 @@ var j = "gemini-2.5-flash", tt = "gemini-2.5-flash", at = "gemini-2.5-pro", Mt =
|
|
|
1023
1027
|
* Uses the Pro tier for superior reasoning on complex structured tasks.
|
|
1024
1028
|
*/
|
|
1025
1029
|
REVIEWER: {
|
|
1026
|
-
model:
|
|
1030
|
+
model: ot,
|
|
1027
1031
|
provider: "google-gemini",
|
|
1028
1032
|
temperature: 0.2
|
|
1029
1033
|
},
|
|
@@ -1033,7 +1037,7 @@ var j = "gemini-2.5-flash", tt = "gemini-2.5-flash", at = "gemini-2.5-pro", Mt =
|
|
|
1033
1037
|
provider: "google-gemini",
|
|
1034
1038
|
temperature: 0.2
|
|
1035
1039
|
}
|
|
1036
|
-
},
|
|
1040
|
+
}, zt = `
|
|
1037
1041
|
You write tiny apps for a small desk device whose screen is 320 pixels wide and
|
|
1038
1042
|
240 pixels high — landscape.
|
|
1039
1043
|
|
|
@@ -1196,10 +1200,10 @@ RULES
|
|
|
1196
1200
|
closest thing it can and do not invent a component.
|
|
1197
1201
|
6. Prefer a rule over a fixed colour whenever the request ties appearance to a
|
|
1198
1202
|
value. "Red when cold" is a rule; "red" is not.
|
|
1199
|
-
`.trim(),
|
|
1203
|
+
`.trim(), Lt = "Here is the current app. Change only what is asked:", o = e.string().regex(
|
|
1200
1204
|
/^\d{1,3}\s+\d{1,3}\s+\d{1,3}$/,
|
|
1201
1205
|
'Must be space-separated RGB integers (e.g. "13 110 253")'
|
|
1202
|
-
),
|
|
1206
|
+
), it = e.object({
|
|
1203
1207
|
// ── Core Brand ───────────────────────────────────────────────────────────
|
|
1204
1208
|
"--app-primary-color": o.optional(),
|
|
1205
1209
|
"--app-primary-foreground-color": o.optional(),
|
|
@@ -1230,7 +1234,7 @@ RULES
|
|
|
1230
1234
|
"--app-chart-3": o.optional(),
|
|
1231
1235
|
"--app-chart-4": o.optional(),
|
|
1232
1236
|
"--app-chart-5": o.optional()
|
|
1233
|
-
}).strict(),
|
|
1237
|
+
}).strict(), rt = e.object({
|
|
1234
1238
|
/** Google Font name for headings (h1–h4, .font-serif). Example: "Playfair Display" */
|
|
1235
1239
|
heading: e.string(),
|
|
1236
1240
|
/** Google Font name for body text. Example: "Inter" */
|
|
@@ -1244,13 +1248,13 @@ e.object({
|
|
|
1244
1248
|
/** One-sentence vibe description. Example: "Dark indigo with golden accents." */
|
|
1245
1249
|
description: e.string(),
|
|
1246
1250
|
/** Google Font pairing for heading and body text. */
|
|
1247
|
-
fonts:
|
|
1251
|
+
fonts: rt.optional(),
|
|
1248
1252
|
/**
|
|
1249
1253
|
* CSS variable overrides.
|
|
1250
1254
|
* Every key must match an --app-* variable name.
|
|
1251
1255
|
* All color values must be space-separated RGB integers.
|
|
1252
1256
|
*/
|
|
1253
|
-
cssVars:
|
|
1257
|
+
cssVars: it
|
|
1254
1258
|
});
|
|
1255
1259
|
e.object({
|
|
1256
1260
|
primary: o,
|
|
@@ -1260,14 +1264,14 @@ e.object({
|
|
|
1260
1264
|
destructive: o,
|
|
1261
1265
|
radius: e.enum(["none", "sm", "md", "lg", "full"])
|
|
1262
1266
|
});
|
|
1263
|
-
var
|
|
1267
|
+
var Vt = {
|
|
1264
1268
|
primary: "13 110 253",
|
|
1265
1269
|
neutral: "24 24 27",
|
|
1266
1270
|
success: "34 197 94",
|
|
1267
1271
|
warning: "234 179 8",
|
|
1268
1272
|
destructive: "239 68 68",
|
|
1269
1273
|
radius: "md"
|
|
1270
|
-
}, p = e.number().finite(), r = p.positive(), g = p.nonnegative(),
|
|
1274
|
+
}, p = e.number().finite(), r = p.positive(), g = p.nonnegative(), st = e.object({
|
|
1271
1275
|
name: e.string().min(1).default("Bambu Lab X1 Carbon"),
|
|
1272
1276
|
/** Walls are whole multiples of this. */
|
|
1273
1277
|
nozzle: r.default(0.4),
|
|
@@ -1275,17 +1279,17 @@ var zt = {
|
|
|
1275
1279
|
clearance_slip: g.default(0.2),
|
|
1276
1280
|
/** Gap for a friction fit. */
|
|
1277
1281
|
clearance_press: g.default(0.1)
|
|
1278
|
-
}),
|
|
1282
|
+
}), lt = e.enum(["east", "west", "north", "south", "top", "bottom"]), ut = e.object({
|
|
1279
1283
|
/** The tongue's length, from its free end to where it joins the floor. */
|
|
1280
1284
|
length: r.default(12),
|
|
1281
1285
|
/** Its width. */
|
|
1282
1286
|
width: r.default(5),
|
|
1283
1287
|
/** The way from the switch to where the tongue joins the floor. */
|
|
1284
1288
|
hinge: e.enum(["east", "west", "north", "south"])
|
|
1285
|
-
}),
|
|
1289
|
+
}), mt = e.object({
|
|
1286
1290
|
/** usb_c, screen, reset_button, status_led, sd_card… */
|
|
1287
1291
|
name: e.string().min(1),
|
|
1288
|
-
edge:
|
|
1292
|
+
edge: lt,
|
|
1289
1293
|
/** From the centre of that face — see COORDINATES above. */
|
|
1290
1294
|
offset_from_center: e.tuple([p, p]).default([0, 0]),
|
|
1291
1295
|
/**
|
|
@@ -1300,7 +1304,7 @@ var zt = {
|
|
|
1300
1304
|
/** A wider recess on the outside face, [width, height, depth], for a thick cable boot. */
|
|
1301
1305
|
outer_recess: e.tuple([r, r, r]).optional(),
|
|
1302
1306
|
/** Press it through the floor instead of opening a hole — see FlexButtonSchema. */
|
|
1303
|
-
flex_button:
|
|
1307
|
+
flex_button: ut.optional(),
|
|
1304
1308
|
/**
|
|
1305
1309
|
* A 45° ramp this deep round the opening at the outside face, widening it
|
|
1306
1310
|
* by this much a side there. For a screen set back behind a bezel: the
|
|
@@ -1308,7 +1312,7 @@ var zt = {
|
|
|
1308
1312
|
* openings only.
|
|
1309
1313
|
*/
|
|
1310
1314
|
chamfer: g.optional()
|
|
1311
|
-
}),
|
|
1315
|
+
}), ct = e.object({
|
|
1312
1316
|
/** Four holes, this far in from each corner: [east-west, north-south]. */
|
|
1313
1317
|
inset_from_corners: e.tuple([r, r]).optional(),
|
|
1314
1318
|
/** Or exactly where they are: [east, north] from the footprint centre. */
|
|
@@ -1319,14 +1323,14 @@ var zt = {
|
|
|
1319
1323
|
insert_depth: r.optional()
|
|
1320
1324
|
}).refine((a) => (a.inset_from_corners ? 1 : 0) + (a.positions ? 1 : 0) == 1, {
|
|
1321
1325
|
message: "give either inset_from_corners or positions, not both or neither"
|
|
1322
|
-
}),
|
|
1326
|
+
}), dt = e.object({
|
|
1323
1327
|
relative_to: e.string().min(1),
|
|
1324
1328
|
where: e.enum(["below", "above", "east", "west", "north", "south"]),
|
|
1325
1329
|
/** Space between the two keep-outs. */
|
|
1326
1330
|
gap: g.default(1),
|
|
1327
1331
|
/** Moved this far [east, north] from centred on the other, once placed. */
|
|
1328
1332
|
offset: e.tuple([p, p]).default([0, 0])
|
|
1329
|
-
}),
|
|
1333
|
+
}), J = e.object({
|
|
1330
1334
|
id: e.string().regex(/^[a-z][a-z0-9_]*$/, "lowercase letters, digits and underscores"),
|
|
1331
1335
|
type: e.enum(["pcb", "display", "battery", "speaker", "module"]),
|
|
1332
1336
|
/** [east, north, up] — see COORDINATES. */
|
|
@@ -1344,12 +1348,12 @@ var zt = {
|
|
|
1344
1348
|
clearance_z_bottom: g.default(0),
|
|
1345
1349
|
/** Quarter turns about Z, applied before placement. */
|
|
1346
1350
|
rotation: e.union([e.literal(0), e.literal(90), e.literal(180), e.literal(270)]).default(0),
|
|
1347
|
-
placement:
|
|
1348
|
-
mount_holes:
|
|
1349
|
-
interfaces: e.array(
|
|
1351
|
+
placement: dt.optional(),
|
|
1352
|
+
mount_holes: ct.optional(),
|
|
1353
|
+
interfaces: e.array(mt).default([]),
|
|
1350
1354
|
/** How it is held if it has no screw holes. */
|
|
1351
1355
|
retention: e.enum(["none", "cradle_ribs"]).default("none")
|
|
1352
|
-
}),
|
|
1356
|
+
}), pt = e.object({
|
|
1353
1357
|
/** The SVG file, relative to the manifest. Filled paths only; strokes are ignored. */
|
|
1354
1358
|
svg: e.string().min(1),
|
|
1355
1359
|
face: e.enum(["top", "bottom"]).default("bottom"),
|
|
@@ -1398,9 +1402,9 @@ e.object({
|
|
|
1398
1402
|
size: r,
|
|
1399
1403
|
soften: g.default(0)
|
|
1400
1404
|
}).optional(),
|
|
1401
|
-
printer:
|
|
1402
|
-
components: e.array(
|
|
1403
|
-
emblem:
|
|
1405
|
+
printer: st.default({}),
|
|
1406
|
+
components: e.array(J).min(1),
|
|
1407
|
+
emblem: pt.optional()
|
|
1404
1408
|
}).superRefine((a, i) => {
|
|
1405
1409
|
const h = a.wall_thickness / a.printer.nozzle;
|
|
1406
1410
|
Math.abs(h - Math.round(h)) > 1e-6 && i.addIssue({
|
|
@@ -1460,12 +1464,12 @@ e.object({
|
|
|
1460
1464
|
u && (u[0] * 2 >= s || u[1] * 2 >= l) && i.addIssue({ code: e.ZodIssueCode.custom, path: ["components", t, "mount_holes", "inset_from_corners"], message: `insets [${u}] meet in the middle of a ${s}×${l} footprint` });
|
|
1461
1465
|
});
|
|
1462
1466
|
});
|
|
1463
|
-
var
|
|
1467
|
+
var ht = e.object({
|
|
1464
1468
|
label: e.string().min(1),
|
|
1465
1469
|
/** One sentence: what it is for. */
|
|
1466
1470
|
description: e.string().optional(),
|
|
1467
1471
|
/** Components added to the base manifest's. */
|
|
1468
|
-
components: e.array(
|
|
1472
|
+
components: e.array(J).default([]),
|
|
1469
1473
|
/** Top-level manifest fields this choice sets: wall_thickness, emblem… */
|
|
1470
1474
|
set: e.record(e.unknown()).default({}),
|
|
1471
1475
|
/**
|
|
@@ -1475,16 +1479,16 @@ var dt = e.object({
|
|
|
1475
1479
|
* clearance and widens its screen opening to the glass.
|
|
1476
1480
|
*/
|
|
1477
1481
|
patch: e.record(e.record(e.unknown())).default({})
|
|
1478
|
-
}),
|
|
1482
|
+
}), xt = e.object({
|
|
1479
1483
|
label: e.string().min(1),
|
|
1480
1484
|
/** In order; the first is the default. Ids are lowercase words and dashes. */
|
|
1481
|
-
choices: e.array(
|
|
1485
|
+
choices: e.array(ht.extend({ id: e.string().regex(/^[a-z0-9][a-z0-9-]*$/) })).min(1)
|
|
1482
1486
|
});
|
|
1483
1487
|
e.object({
|
|
1484
1488
|
/** The base manifest, relative to this file. */
|
|
1485
1489
|
manifest: e.string().min(1),
|
|
1486
1490
|
/** Option groups, in the order they are offered: base, top… */
|
|
1487
|
-
options: e.record(e.string().regex(/^[a-z][a-z0-9-]*$/),
|
|
1491
|
+
options: e.record(e.string().regex(/^[a-z][a-z0-9-]*$/), xt)
|
|
1488
1492
|
});
|
|
1489
1493
|
e.object({
|
|
1490
1494
|
id: e.string().default(""),
|
|
@@ -1497,7 +1501,7 @@ e.object({
|
|
|
1497
1501
|
lastActive: e.string().optional(),
|
|
1498
1502
|
avatarUrl: e.string().optional()
|
|
1499
1503
|
});
|
|
1500
|
-
var y = e.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits"), O = e.enum(["member", "admin"]),
|
|
1504
|
+
var y = e.string().regex(/^acct_[0-9a-f]{12}$/, "acct_ and 12 hex digits"), O = e.enum(["member", "admin"]), Q = e.enum(["active", "suspended"]), gt = e.object({
|
|
1501
1505
|
algo: e.literal("scrypt"),
|
|
1502
1506
|
n: e.number().int().positive(),
|
|
1503
1507
|
r: e.number().int().positive(),
|
|
@@ -1512,23 +1516,23 @@ e.object({
|
|
|
1512
1516
|
email: e.string().email().max(254),
|
|
1513
1517
|
name: e.string().min(1).max(64),
|
|
1514
1518
|
role: O,
|
|
1515
|
-
status:
|
|
1516
|
-
password:
|
|
1519
|
+
status: Q,
|
|
1520
|
+
password: gt,
|
|
1517
1521
|
createdAt: e.number().int().nonnegative(),
|
|
1518
1522
|
lastLoginAt: e.number().int().nonnegative().nullable().default(null),
|
|
1519
1523
|
/** Which admin approved this, or null for the bootstrap account. */
|
|
1520
1524
|
invitedBy: y.nullable().default(null)
|
|
1521
1525
|
});
|
|
1522
|
-
var
|
|
1526
|
+
var V = 40;
|
|
1523
1527
|
e.string().transform((a) => a.trim().replace(/\s+/g, " ")).pipe(
|
|
1524
|
-
e.string().min(1, "Give a name.").max(
|
|
1528
|
+
e.string().min(1, "Give a name.").max(V, `At most ${V} characters.`).refine((a) => !/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028-\u202e\u2066-\u2069]/.test(a), "Letters, numbers, spaces and punctuation only.")
|
|
1525
1529
|
);
|
|
1526
1530
|
e.object({
|
|
1527
1531
|
accountId: y,
|
|
1528
1532
|
email: e.string().email(),
|
|
1529
1533
|
name: e.string(),
|
|
1530
1534
|
role: O,
|
|
1531
|
-
status:
|
|
1535
|
+
status: Q
|
|
1532
1536
|
});
|
|
1533
1537
|
e.object({
|
|
1534
1538
|
accountId: y,
|
|
@@ -1549,41 +1553,41 @@ e.object({
|
|
|
1549
1553
|
/** Optional, and never shown publicly. Long enough to be useful, short enough not to be an essay. */
|
|
1550
1554
|
reason: e.string().max(500).optional()
|
|
1551
1555
|
});
|
|
1552
|
-
var
|
|
1556
|
+
var bt = e.enum(["pending", "approved", "denied"]);
|
|
1553
1557
|
e.object({
|
|
1554
1558
|
requestId: e.string().regex(/^req_[0-9a-f]{12}$/, "req_ and 12 hex digits"),
|
|
1555
1559
|
email: e.string().email().max(254),
|
|
1556
1560
|
name: e.string().min(1).max(64),
|
|
1557
1561
|
reason: e.string().max(500).optional(),
|
|
1558
|
-
status:
|
|
1562
|
+
status: bt,
|
|
1559
1563
|
createdAt: e.number().int().nonnegative(),
|
|
1560
1564
|
decidedAt: e.number().int().nonnegative().nullable().default(null),
|
|
1561
1565
|
decidedBy: y.nullable().default(null)
|
|
1562
1566
|
});
|
|
1563
|
-
var
|
|
1567
|
+
var ft = ["boards:read", "boards:send", "boards:configure"], ee = e.enum(ft), vt = [7, 30, 90, 365], yt = e.object({
|
|
1564
1568
|
/** The first 12 hex digits of the hash: what the owner sees and revokes by. */
|
|
1565
1569
|
tokenId: e.string().regex(/^[0-9a-f]{12}$/),
|
|
1566
1570
|
accountId: y,
|
|
1567
1571
|
/** What the owner called it: "laptop", "Claude Code". */
|
|
1568
1572
|
name: e.string().trim().min(1).max(60),
|
|
1569
|
-
scopes: e.array(
|
|
1573
|
+
scopes: e.array(ee).min(1),
|
|
1570
1574
|
createdAt: e.number().int().nonnegative(),
|
|
1571
1575
|
expiresAt: e.number().int().nonnegative(),
|
|
1572
1576
|
/** Moved forward at most once a day, so using a token is not a write per request. */
|
|
1573
1577
|
lastUsedAt: e.number().int().nonnegative().nullable().default(null)
|
|
1574
1578
|
});
|
|
1575
|
-
|
|
1579
|
+
yt.omit({ accountId: !0 });
|
|
1576
1580
|
e.object({
|
|
1577
1581
|
name: e.string().trim().min(1, "Give it a name.").max(60),
|
|
1578
|
-
scopes: e.array(
|
|
1579
|
-
days: e.union(
|
|
1582
|
+
scopes: e.array(ee).min(1, "Choose at least one thing it can do."),
|
|
1583
|
+
days: e.union(vt.map((a) => e.literal(a)))
|
|
1580
1584
|
});
|
|
1581
|
-
const
|
|
1582
|
-
const b = m.at !== void 0 && m.at >=
|
|
1585
|
+
const wt = Date.UTC(2024, 0, 1), At = 24 * 60 * 60 * 1e3, Ht = (a, i, h) => i.map((m) => {
|
|
1586
|
+
const b = m.at !== void 0 && m.at >= wt && m.at <= h + At ? m.at : h;
|
|
1583
1587
|
return {
|
|
1584
1588
|
id: `${a}:${m.key}`,
|
|
1585
1589
|
source: "http",
|
|
1586
|
-
domain:
|
|
1590
|
+
domain: ge.ENVIRONMENT,
|
|
1587
1591
|
key: m.key,
|
|
1588
1592
|
value: m.value,
|
|
1589
1593
|
...m.unit ? { unit: m.unit } : {},
|
|
@@ -1591,40 +1595,40 @@ const vt = Date.UTC(2024, 0, 1), yt = 24 * 60 * 60 * 1e3, Lt = (a, i, h) => i.ma
|
|
|
1591
1595
|
};
|
|
1592
1596
|
});
|
|
1593
1597
|
export {
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1598
|
+
$t as A,
|
|
1599
|
+
me as B,
|
|
1600
|
+
nt as D,
|
|
1601
|
+
re as E,
|
|
1602
|
+
ne as F,
|
|
1603
|
+
Bt as I,
|
|
1604
|
+
ce as P,
|
|
1605
|
+
oe as R,
|
|
1606
|
+
xe as S,
|
|
1607
|
+
se as T,
|
|
1608
|
+
ue as W,
|
|
1605
1609
|
j as a,
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1610
|
+
zt as b,
|
|
1611
|
+
Lt as c,
|
|
1612
|
+
Ht as d,
|
|
1613
|
+
G as e,
|
|
1614
|
+
le as f,
|
|
1615
|
+
de as g,
|
|
1616
|
+
St as h,
|
|
1617
|
+
ge as i,
|
|
1618
|
+
Pt as j,
|
|
1615
1619
|
$ as k,
|
|
1616
|
-
|
|
1620
|
+
_t as l,
|
|
1617
1621
|
F as m,
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1622
|
+
Vt as n,
|
|
1623
|
+
Dt as o,
|
|
1624
|
+
jt as p,
|
|
1625
|
+
kt as q,
|
|
1626
|
+
It as r,
|
|
1627
|
+
Mt as s,
|
|
1628
|
+
Ft as t,
|
|
1629
|
+
Ot as u,
|
|
1630
|
+
Tt as v,
|
|
1631
|
+
Rt as w,
|
|
1632
|
+
Nt as x,
|
|
1633
|
+
Ct as y
|
|
1630
1634
|
};
|
package/dist/index.es.js
CHANGED
|
@@ -13,13 +13,13 @@ var Xr = (e, t, n, r) => ({
|
|
|
13
13
|
return q(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { P as Ar, b as El, t as ES, c as kr, i as SS, l as er, a as wS } from "./AiGateway-
|
|
17
|
-
import { A as e0, r as t0, g as n0, d as r0, D as i0, G as a0, f as o0, I as s0, O as l0, e as u0, h as c0, j as d0, q as p0, m as f0, n as h0, u as g0, s as m0, k as b0, o as y0, p as E0 } from "./AiGateway-
|
|
16
|
+
import { P as Ar, b as El, t as ES, c as kr, i as SS, l as er, a as wS } from "./AiGateway-DgTZzu-o.js";
|
|
17
|
+
import { A as e0, r as t0, g as n0, d as r0, D as i0, G as a0, f as o0, I as s0, O as l0, e as u0, h as c0, j as d0, q as p0, m as f0, n as h0, u as g0, s as m0, k as b0, o as y0, p as E0 } from "./AiGateway-DgTZzu-o.js";
|
|
18
18
|
import at, { useState as Ge, useRef as _n, useEffect as wt, createContext as Ki, useContext as Ur, useCallback as gt, useMemo as qt, forwardRef as jm, createElement as Va } from "react";
|
|
19
|
-
import { S as vS, n as Zr, D as _S, o as Yi, p as AS, q as kS, r as TS, s as Ka, t as $m, I as zm, u as ah, v as oh, w as IS, x as Gm, y as xS } from "./deviceReadings-
|
|
20
|
-
import { f as w0, h as v0, B as _0, E as A0, F as k0, g as T0, P as I0, R as x0, T as R0, W as N0, d as C0 } from "./deviceReadings-
|
|
21
|
-
import { u as Hm, s as RS, i as Xi } from "./bodewellAdapter-
|
|
22
|
-
import { b as L0, d as D0, e as M0, a as F0, B as P0, g as U0, j as B0, k as j0, h as $0, c as z0, f as G0, t as H0 } from "./bodewellAdapter-
|
|
19
|
+
import { S as vS, n as Zr, D as _S, o as Yi, p as AS, q as kS, r as TS, s as Ka, t as $m, I as zm, u as ah, v as oh, w as IS, x as Gm, y as xS } from "./deviceReadings-C5hJzVcz.js";
|
|
20
|
+
import { f as w0, h as v0, B as _0, E as A0, F as k0, g as T0, P as I0, R as x0, T as R0, W as N0, d as C0 } from "./deviceReadings-C5hJzVcz.js";
|
|
21
|
+
import { u as Hm, s as RS, i as Xi } from "./bodewellAdapter-yTt3lUXY.js";
|
|
22
|
+
import { b as L0, d as D0, e as M0, a as F0, B as P0, g as U0, j as B0, k as j0, h as $0, c as z0, f as G0, t as H0 } from "./bodewellAdapter-yTt3lUXY.js";
|
|
23
23
|
import { Drawer as Wm, FormTemplate as NS, Button as en, useToast as qm, Card as Bi, Icon as _t, SearchInput as CS, DataTable as OS, formatValue as sh, Badge as LS, LineChart as DS, BarChart as MS, DeviceCard as FS, StatCard as PS, THEME_TOKEN_VARS as US, applyThemeToDom as Ya, tokensToVars as Xa, isCustomTheme as Vm, Sparkline as BS, CircularDial as jS, Input as Ln, generateFromPrompt as lh, lightToDark as $S, generateFromProfile as Qn, PageContainer as zS, PageHeader as GS, SettingsContainer as Km, ThemeLab as Ym, AESTHETIC_PROFILES as Xm, Label as ji, useTheme as Zm, useIsMobile as HS, RammeInspectorTrigger as WS, Sheet as qS, AIChatThread as VS, LoginPage as KS, SignupPage as YS, Modal as XS } from "@ramme-io/ui";
|
|
24
24
|
import { Link as ZS, Navigate as Qm, Outlet as QS, useNavigate as Jm, useLocation as JS, Route as _a } from "react-router-dom";
|
|
25
25
|
const eb = "RAMME_SYNC_MANIFEST", ew = "*", Sl = () => {
|
package/dist/server.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as E } from "./AiGateway-
|
|
2
|
-
import { A as k, c as x, g as J, a as L, d as M, D as F, G as Y, f as U, I as B, O as H, e as q, h as z, b as V, i as W, j as C, s as X, k as Q } from "./AiGateway-
|
|
1
|
+
import { n as E } from "./AiGateway-DgTZzu-o.js";
|
|
2
|
+
import { A as k, c as x, g as J, a as L, d as M, D as F, G as Y, f as U, I as B, O as H, e as q, h as z, b as V, i as W, j as C, s as X, k as Q } from "./AiGateway-DgTZzu-o.js";
|
|
3
3
|
import { streamText as O, generateObject as g } from "ai";
|
|
4
4
|
import { createGoogleGenerativeAI as u } from "@ai-sdk/google";
|
|
5
|
-
import { A as S, D as G, a as T, b as y, c as _, e as f } from "./deviceReadings-
|
|
6
|
-
import { f as ee, h as te, B as ae, E as se, F as re, g as oe, P as ne, R as ce, S as ie, T as me, W as le, d as pe } from "./deviceReadings-
|
|
5
|
+
import { A as S, D as G, a as T, b as y, c as _, e as f } from "./deviceReadings-C5hJzVcz.js";
|
|
6
|
+
import { f as ee, h as te, B as ae, E as se, F as re, g as oe, P as ne, R as ce, S as ie, T as me, W as le, d as pe } from "./deviceReadings-C5hJzVcz.js";
|
|
7
7
|
function h(e) {
|
|
8
8
|
const a = typeof process < "u" ? process.env.GOOGLE_GENERATIVE_AI_API_KEY : void 0, s = e || a;
|
|
9
9
|
if (!s)
|
package/dist/signals.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as o, d as s, e as l, a as d, B as L, g as E, h as i, c as B, f as S, t as _ } from "./bodewellAdapter-
|
|
2
|
-
import { d as D } from "./deviceReadings-
|
|
1
|
+
import { b as o, d as s, e as l, a as d, B as L, g as E, h as i, c as B, f as S, t as _ } from "./bodewellAdapter-yTt3lUXY.js";
|
|
2
|
+
import { d as D } from "./deviceReadings-C5hJzVcz.js";
|
|
3
3
|
export {
|
|
4
4
|
o as BODEWELL_HARDWARE_ONLY_FIELDS,
|
|
5
5
|
s as BODEWELL_HISTORY_FIELDS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ramme-io/kernel",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@ai-sdk/google": ">=0.0.1",
|
|
35
|
-
"@ramme-io/ui": ">=5.0.
|
|
35
|
+
"@ramme-io/ui": ">=5.0.3",
|
|
36
36
|
"ai": ">=4.0.0",
|
|
37
37
|
"react": ">=18.2.0",
|
|
38
38
|
"react-dom": ">=18.2.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"vite-plugin-dts": "^3.9.1",
|
|
57
57
|
"vitest": "^2.1.9",
|
|
58
58
|
"zod": "^3.23.8",
|
|
59
|
-
"@ramme-io/ui": "5.0
|
|
59
|
+
"@ramme-io/ui": "5.1.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"remark-gfm": "^4.0.1",
|
|
68
68
|
"zod-to-json-schema": "^3.23.0",
|
|
69
69
|
"zustand": "^5.0.0",
|
|
70
|
-
"@ramme-io/shared": "4.
|
|
70
|
+
"@ramme-io/shared": "4.3.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "vite build",
|