@camstack/addon-training 0.1.78 → 0.1.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/dist/{MotionZonesSettings-jORey4uC.mjs → MotionZonesSettings-BliuxpCH.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-P24unULW.mjs → PrivacyMaskSettings-CKL9xV-S.mjs} +2 -2
  3. package/dist/{SceneMonitorEditor-CkLN8Kee.mjs → SceneMonitorEditor-BE7rVggL.mjs} +1 -1
  4. package/dist/_stub.js +5354 -5218
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-BbQzUVOo.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DyaQwk4k.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DKoALssM.mjs +26 -0
  7. package/dist/addon-training.css +1 -1
  8. package/dist/{dist-DeD2tKQ2.mjs → dist-BCUHufOe.mjs} +590 -75
  9. package/dist/{dist-CKiSDi2Y.js → dist-FpC7GFu_.js} +590 -75
  10. package/dist/{hostInit-ndHJ_k8s.mjs → hostInit-DxnxYPQ_.mjs} +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/orchestrator/training.addon.js +1 -1
  13. package/dist/orchestrator/training.addon.mjs +1 -1
  14. package/dist/{player-overlays-CD0eup2L.mjs → player-overlays-1cASdLh_.mjs} +1 -1
  15. package/dist/providers/modal/training-modal.addon.js +1 -1
  16. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  17. package/dist/remoteEntry.js +1 -1
  18. package/dist/{responsive-CBG3O0ME.mjs → responsive-Ctl0WYwk.mjs} +1 -1
  19. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-X4iAyyQb.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-C_798y4H.mjs} +1 -1
  20. package/package.json +1 -1
  21. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DiRkx0UL.mjs +0 -26
@@ -9148,7 +9148,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
9148
9148
  return DeviceRole;
9149
9149
  }({});
9150
9150
  //#endregion
9151
- //#region ../types/dist/composition-xz-ud5EQ.mjs
9151
+ //#region ../types/dist/composition-BJ8iAZb3.mjs
9152
9152
  /**
9153
9153
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9154
9154
  *
@@ -9208,7 +9208,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
9208
9208
  * ONE table for everyone who asks "is this device HIGH?": the
9209
9209
  * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
9210
9210
  * sensor markers, the orchestrator's camera-sensors bridge and
9211
- * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
9211
+ * the sources of a pulse (`compilePulseOverride`, D936).
9212
9212
  * A second copy would diverge at the first cap added, and the symptom — "the
9213
9213
  * sensor rings the doorbell but does not record" — is exactly D62.
9214
9214
  *
@@ -16277,6 +16277,13 @@ var ComposerUnreadableBlockSchema = object({
16277
16277
  /** The parse error, in the operator's words. */
16278
16278
  error: string()
16279
16279
  });
16280
+ /** A confirmed release the hub did not accept. `deviceId` is the claim's device. */
16281
+ var UnreleasedClaimSchema = object({
16282
+ deviceId: number().int(),
16283
+ capName: string(),
16284
+ owner: string(),
16285
+ error: string()
16286
+ });
16280
16287
  method(object({
16281
16288
  /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
16282
16289
  integrationId: string().nullable(),
@@ -16286,7 +16293,13 @@ method(object({
16286
16293
  /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
16287
16294
  restartBlockIds: array(string()),
16288
16295
  /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
16289
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
16296
+ unreadableBlocks: array(ComposerUnreadableBlockSchema),
16297
+ /**
16298
+ * Operator-confirmed deletions. Their claims are released on this apply,
16299
+ * before any replacement block claims. A block that merely vanished from the
16300
+ * snapshot is not listed here and still waits for two applies (D49).
16301
+ */
16302
+ retiredBlockIds: array(string()).optional()
16290
16303
  }), object({
16291
16304
  blocks: array(object({
16292
16305
  blockId: string(),
@@ -16298,7 +16311,13 @@ method(object({
16298
16311
  * integration unknown, its own rows unread or read empty once). An empty
16299
16312
  * apply the caller owes is paid off only by one the composer acted on (D49).
16300
16313
  */
16301
- acted: boolean()
16314
+ acted: boolean(),
16315
+ /**
16316
+ * Confirmed releases this apply tried and the hub did not accept. Empty when
16317
+ * every one landed (or there was nothing to hand back). Absent on a result
16318
+ * that never got that far.
16319
+ */
16320
+ unreleasedClaims: array(UnreleasedClaimSchema).optional()
16302
16321
  }), {
16303
16322
  kind: "mutation",
16304
16323
  auth: "admin"
@@ -42161,6 +42180,381 @@ var _macroLookup = /* @__PURE__ */ new Map();
42161
42180
  for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
42162
42181
  for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
42163
42182
  /**
42183
+ * Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
42184
+ * not entries. `heatmapScrub` is a mark, not an event kind.
42185
+ */
42186
+ var PALETTE_ENTRY_IDS = [
42187
+ "motion",
42188
+ "audio",
42189
+ "recording",
42190
+ "live",
42191
+ "heatmapScrub",
42192
+ "person",
42193
+ "vehicle",
42194
+ "animal",
42195
+ "package",
42196
+ "sensor",
42197
+ "control",
42198
+ "face",
42199
+ "plate",
42200
+ "car",
42201
+ "truck",
42202
+ "bus",
42203
+ "motorcycle",
42204
+ "bicycle",
42205
+ "airplane",
42206
+ "boat",
42207
+ "train",
42208
+ "bird",
42209
+ "dog",
42210
+ "cat",
42211
+ "horse",
42212
+ "sheep",
42213
+ "cow",
42214
+ "elephant",
42215
+ "bear",
42216
+ "zebra",
42217
+ "giraffe",
42218
+ "package-delivered",
42219
+ "package-picked-up",
42220
+ "suitcase",
42221
+ "backpack",
42222
+ "handbag",
42223
+ "contact",
42224
+ "motion-sensor",
42225
+ "smoke",
42226
+ "flood",
42227
+ "gas",
42228
+ "carbon-monoxide",
42229
+ "vibration",
42230
+ "tamper",
42231
+ "presence",
42232
+ "enum-sensor",
42233
+ "device-event",
42234
+ "lock",
42235
+ "cover",
42236
+ "switch",
42237
+ "siren",
42238
+ "button",
42239
+ "doorbell"
42240
+ ];
42241
+ var AUDIO_ENTRY_ID = "audio";
42242
+ /** Six rungs, quiet → loud. The opaque end is the entry's hex. */
42243
+ var AUDIO_GRADIENT_ALPHAS = [
42244
+ .3,
42245
+ .42,
42246
+ .55,
42247
+ .7,
42248
+ .85,
42249
+ 1
42250
+ ];
42251
+ var PALETTE_PRESET_IDS = [
42252
+ "camstack",
42253
+ "high-contrast",
42254
+ "okabe-ito"
42255
+ ];
42256
+ /** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
42257
+ var CAMSTACK_HEX = {
42258
+ motion: "#d946ef",
42259
+ audio: "#059eb8",
42260
+ recording: "#ef4444",
42261
+ live: "#8d7a00",
42262
+ heatmapScrub: "#4b32ff",
42263
+ person: "#11a64c",
42264
+ vehicle: "#3b82f6",
42265
+ animal: "#ea6a09",
42266
+ package: "#924667",
42267
+ sensor: "#624bbc",
42268
+ control: "#944d24",
42269
+ face: "#ed4f8d",
42270
+ plate: "#4b7027",
42271
+ car: "#9684cf",
42272
+ truck: "#0f9b89",
42273
+ bus: "#a734a9",
42274
+ motorcycle: "#c1133a",
42275
+ bicycle: "#0e6a9b",
42276
+ airplane: "#7c9928",
42277
+ boat: "#b17933",
42278
+ train: "#ad6ca3",
42279
+ bird: "#0f7c55",
42280
+ dog: "#c82700",
42281
+ cat: "#7268f2",
42282
+ horse: "#cb795e",
42283
+ sheep: "#b8636b",
42284
+ cow: "#cb2969",
42285
+ elephant: "#1158d2",
42286
+ bear: "#8d5e00",
42287
+ zebra: "#0097d6",
42288
+ giraffe: "#8f61bb",
42289
+ "package-delivered": "#cd3f9b",
42290
+ "package-picked-up": "#388a08",
42291
+ suitcase: "#666800",
42292
+ backpack: "#ec5022",
42293
+ handbag: "#a76ef8",
42294
+ contact: "#ab5a49",
42295
+ "motion-sensor": "#b95d1a",
42296
+ smoke: "#dd3858",
42297
+ flood: "#b31e7d",
42298
+ gas: "#5b70b5",
42299
+ "carbon-monoxide": "#7b4e8e",
42300
+ vibration: "#e65bba",
42301
+ tamper: "#98464b",
42302
+ presence: "#3a9468",
42303
+ "enum-sensor": "#7885f8",
42304
+ "device-event": "#8c43c8",
42305
+ lock: "#649653",
42306
+ cover: "#c67597",
42307
+ switch: "#7a812a",
42308
+ siren: "#ac5d7f",
42309
+ button: "#b276cd",
42310
+ doorbell: "#0087ab"
42311
+ };
42312
+ var CAMSTACK_FALLBACK = [
42313
+ "#b34dc7",
42314
+ "#1d7d34",
42315
+ "#db6b6c",
42316
+ "#a43d29",
42317
+ "#0e6ee6",
42318
+ "#29a10b",
42319
+ "#a98731",
42320
+ "#0181c6"
42321
+ ];
42322
+ var HIGH_CONTRAST_HEX = {
42323
+ motion: "#964360",
42324
+ audio: "#23a132",
42325
+ recording: "#2494ca",
42326
+ live: "#bd7e2b",
42327
+ heatmapScrub: "#ad6eea",
42328
+ person: "#62611e",
42329
+ vehicle: "#f4534c",
42330
+ animal: "#1556cd",
42331
+ package: "#9c4415",
42332
+ sensor: "#066c48",
42333
+ control: "#f2479f",
42334
+ face: "#139d8a",
42335
+ plate: "#909024",
42336
+ car: "#8e35ab",
42337
+ truck: "#bd0b2b",
42338
+ bus: "#7a88ca",
42339
+ motorcycle: "#e26725",
42340
+ bicycle: "#a6679b",
42341
+ airplane: "#7c5720",
42342
+ boat: "#467a1b",
42343
+ train: "#6f65a4",
42344
+ bird: "#cb717f",
42345
+ dog: "#c62490",
42346
+ cat: "#b36850",
42347
+ horse: "#1872ac",
42348
+ sheep: "#927939",
42349
+ cow: "#428a5c",
42350
+ elephant: "#d41160",
42351
+ bear: "#799453",
42352
+ zebra: "#a85455",
42353
+ giraffe: "#746be8",
42354
+ "package-delivered": "#824a80",
42355
+ "package-picked-up": "#614ac1",
42356
+ suitcase: "#2f77f3",
42357
+ backpack: "#fa476d",
42358
+ handbag: "#c14cbe",
42359
+ contact: "#c83921",
42360
+ "motion-sensor": "#a07ebd",
42361
+ smoke: "#a25b13",
42362
+ flood: "#526bab",
42363
+ gas: "#924938",
42364
+ "carbon-monoxide": "#bb7e53",
42365
+ vibration: "#b66182",
42366
+ tamper: "#3c6931",
42367
+ presence: "#6c851d",
42368
+ "enum-sensor": "#ad2d48",
42369
+ "device-event": "#5e9b04",
42370
+ lock: "#00a062",
42371
+ cover: "#ad8624",
42372
+ switch: "#d05259",
42373
+ siren: "#cd67b3",
42374
+ button: "#c9746a",
42375
+ doorbell: "#338eeb"
42376
+ };
42377
+ var HIGH_CONTRAST_FALLBACK = [
42378
+ "#817f3b",
42379
+ "#a0733e",
42380
+ "#8658b2",
42381
+ "#956301",
42382
+ "#bc652d",
42383
+ "#647331",
42384
+ "#a14c9e",
42385
+ "#d14e71"
42386
+ ];
42387
+ var OKABE_ITO_HEX = {
42388
+ motion: "#b88128",
42389
+ audio: "#1096c8",
42390
+ recording: "#009e73",
42391
+ live: "#9c8c22",
42392
+ heatmapScrub: "#0072b2",
42393
+ person: "#d55e00",
42394
+ vehicle: "#c0739f",
42395
+ animal: "#226d18",
42396
+ package: "#91446c",
42397
+ sensor: "#217b56",
42398
+ control: "#648647",
42399
+ face: "#c22998",
42400
+ plate: "#fa4575",
42401
+ car: "#956301",
42402
+ truck: "#2f77f3",
42403
+ bus: "#7a4e86",
42404
+ motorcycle: "#f54597",
42405
+ bicycle: "#bb3e75",
42406
+ airplane: "#e054c0",
42407
+ boat: "#457942",
42408
+ train: "#867afa",
42409
+ bird: "#88914c",
42410
+ dog: "#1556cd",
42411
+ cat: "#71702c",
42412
+ horse: "#9b4fa4",
42413
+ sheep: "#c0559d",
42414
+ cow: "#d14f65",
42415
+ elephant: "#98470f",
42416
+ bear: "#595896",
42417
+ zebra: "#96790e",
42418
+ giraffe: "#cb717b",
42419
+ "package-delivered": "#139d8a",
42420
+ "package-picked-up": "#906ead",
42421
+ suitcase: "#d02939",
42422
+ backpack: "#d41160",
42423
+ handbag: "#f64f54",
42424
+ contact: "#7258d2",
42425
+ "motion-sensor": "#b66182",
42426
+ smoke: "#627abb",
42427
+ flood: "#b86ae4",
42428
+ gas: "#a95261",
42429
+ "carbon-monoxide": "#c65d3c",
42430
+ vibration: "#7a40b7",
42431
+ tamper: "#914b34",
42432
+ presence: "#9481c3",
42433
+ "enum-sensor": "#ac6d47",
42434
+ "device-event": "#7b6fce",
42435
+ lock: "#c67662",
42436
+ cover: "#a6564d",
42437
+ switch: "#ad2c4e",
42438
+ siren: "#348e08",
42439
+ button: "#d27303",
42440
+ doorbell: "#55770f"
42441
+ };
42442
+ var OKABE_ITO_FALLBACK = [
42443
+ "#9a3784",
42444
+ "#a7392c",
42445
+ "#409d50",
42446
+ "#6987e7",
42447
+ "#ee5b3d",
42448
+ "#c0430d",
42449
+ "#af79b3",
42450
+ "#4b6628"
42451
+ ];
42452
+ /**
42453
+ * The display palette (D939). One table of colours, three presets, one
42454
+ * validator. Taxonomy colours and every consumer read this — there is no
42455
+ * second hex table.
42456
+ */
42457
+ var paletteHexSchema = string().regex(/^#[0-9a-f]{6}$/);
42458
+ var paletteSwatchSchema = discriminatedUnion("form", [object({
42459
+ form: literal("solid"),
42460
+ hex: paletteHexSchema
42461
+ }), object({
42462
+ form: literal("gradient"),
42463
+ hex: paletteHexSchema,
42464
+ alphas: array(number().gt(0).lte(1)).length(AUDIO_GRADIENT_ALPHAS.length)
42465
+ })]);
42466
+ var paletteReadySchema = object({
42467
+ status: literal("ready"),
42468
+ presetId: _enum(PALETTE_PRESET_IDS),
42469
+ customized: boolean(),
42470
+ source: _enum(["stored", "unconfigured"]),
42471
+ swatches: record(string(), paletteSwatchSchema),
42472
+ fallbacks: array(paletteHexSchema).length(8)
42473
+ });
42474
+ var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, object({
42475
+ status: literal("unknown"),
42476
+ reason: string()
42477
+ })]);
42478
+ var setPaletteInputSchema = union([object({ presetId: string() }), object({
42479
+ presetId: string(),
42480
+ overrides: record(string(), paletteSwatchSchema)
42481
+ })]);
42482
+ object({
42483
+ presetId: string(),
42484
+ overrides: record(string(), paletteSwatchSchema)
42485
+ });
42486
+ function solid(hex) {
42487
+ return {
42488
+ form: "solid",
42489
+ hex
42490
+ };
42491
+ }
42492
+ function audioGradient(hex) {
42493
+ return {
42494
+ form: "gradient",
42495
+ hex,
42496
+ alphas: [...AUDIO_GRADIENT_ALPHAS]
42497
+ };
42498
+ }
42499
+ function swatchesFrom(hexes) {
42500
+ const out = {};
42501
+ for (const id of PALETTE_ENTRY_IDS) {
42502
+ const hex = hexes[id];
42503
+ if (hex === void 0) throw new Error(`palette table missing ${id}`);
42504
+ out[id] = id === "audio" ? audioGradient(hex) : solid(hex);
42505
+ }
42506
+ return out;
42507
+ }
42508
+ function preset(id, name, hexes, fallbacks) {
42509
+ return {
42510
+ id,
42511
+ name,
42512
+ swatches: swatchesFrom(hexes),
42513
+ fallbacks
42514
+ };
42515
+ }
42516
+ var DISPLAY_PRESETS = [
42517
+ preset("camstack", "CamStack", CAMSTACK_HEX, CAMSTACK_FALLBACK),
42518
+ preset("high-contrast", "High contrast", HIGH_CONTRAST_HEX, HIGH_CONTRAST_FALLBACK),
42519
+ preset("okabe-ito", "Colour-blind safe", OKABE_ITO_HEX, OKABE_ITO_FALLBACK)
42520
+ ];
42521
+ function presetById(id) {
42522
+ return DISPLAY_PRESETS.find((item) => item.id === id);
42523
+ }
42524
+ function bundledCamstack() {
42525
+ const presetRow = presetById("camstack");
42526
+ if (presetRow === void 0) throw new Error("CamStack preset missing");
42527
+ return readyOf(presetRow, "unconfigured", false);
42528
+ }
42529
+ function readyOf(row, source, customized) {
42530
+ return {
42531
+ status: "ready",
42532
+ presetId: row.id,
42533
+ customized,
42534
+ source,
42535
+ swatches: row.swatches,
42536
+ fallbacks: [...row.fallbacks]
42537
+ };
42538
+ }
42539
+ function hashFallback(kind, fallbacks) {
42540
+ let hash = 0;
42541
+ for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
42542
+ const hex = fallbacks[hash % fallbacks.length];
42543
+ if (hex === void 0) throw new Error("display palette has no fallback colour");
42544
+ return hex;
42545
+ }
42546
+ /** Colour a kind paints with. Audio leaves share the audio gradient's hex. */
42547
+ function paintHex(swatches, fallbacks, kind) {
42548
+ const key = kind.trim().toLowerCase();
42549
+ if (key.startsWith("audio-")) {
42550
+ const audio = swatches[AUDIO_ENTRY_ID];
42551
+ return audio !== void 0 ? audio.hex : hashFallback(key, fallbacks);
42552
+ }
42553
+ const direct = swatches[key];
42554
+ if (direct !== void 0) return direct.hex;
42555
+ return hashFallback(key, fallbacks);
42556
+ }
42557
+ /**
42164
42558
  * Unified event-kind taxonomy — THE single source of truth for
42165
42559
  * `kind → { parentKind, category, level, color, iconId, labelKey, label,
42166
42560
  * icon }`.
@@ -42174,109 +42568,88 @@ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set
42174
42568
  * - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
42175
42569
  * - the COCO / audio class maps (macro ↔ sub relationships)
42176
42570
  *
42177
- * The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
42178
- * `@camstack/types`. The UI-side mapping `iconId → lucide component` and
42179
- * `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
42180
- * color or an icon: they read this dictionary (server descriptors carry the
42181
- * fields inline; the client resolves color/icon/label from `iconId`/`kind`).
42571
+ * The DATA (serializable — parentKind / iconId / labelKey) lives here in
42572
+ * `@camstack/types`. Colour is NOT a second table: each entry's `color` is
42573
+ * the bundled CamStack display palette (D939). The effective cluster palette
42574
+ * is the `display-palette` capability. The UI-side mapping `iconId → lucide
42575
+ * component` and `labelKey → t()` lives in `@camstack/ui-library`.
42182
42576
  *
42183
42577
  * Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
42184
42578
  */
42185
- var TAXONOMY_COLORS = {
42186
- motion: "#f59e0b",
42187
- audio: "#06b6d4",
42188
- person: "#22c55e",
42189
- vehicle: "#3b82f6",
42190
- animal: "#f97316",
42191
- package: "#a855f7",
42192
- sensor: "#8b5cf6",
42193
- control: "#10b981",
42194
- genericDetection: "#64748b"
42195
- };
42196
- var DETECTION_SUB_COLORS = {
42197
- car: "#f59e0b",
42198
- truck: "#d97706",
42199
- bus: "#b45309",
42200
- motorcycle: "#eab308",
42201
- bicycle: "#ca8a04",
42202
- airplane: "#60a5fa",
42203
- boat: "#2563eb",
42204
- train: "#1d4ed8",
42205
- bird: "#14b8a6",
42206
- dog: "#84cc16",
42207
- cat: "#f97316",
42208
- horse: "#a16207",
42209
- sheep: "#a3a3a3",
42210
- cow: "#78716c",
42211
- elephant: "#6b7280",
42212
- bear: "#7c2d12",
42213
- zebra: "#404040",
42214
- giraffe: "#d4a373"
42215
- };
42579
+ var BUNDLED_PALETTE = bundledCamstack();
42580
+ function kindColor(kind) {
42581
+ return paintHex(BUNDLED_PALETTE.swatches, BUNDLED_PALETTE.fallbacks, kind);
42582
+ }
42583
+ function firstFallback(fallbacks) {
42584
+ const hex = fallbacks[0];
42585
+ if (hex === void 0) throw new Error("display palette has no fallback colour");
42586
+ return hex;
42587
+ }
42588
+ firstFallback(BUNDLED_PALETTE.fallbacks);
42216
42589
  function titleCase(id) {
42217
42590
  return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
42218
42591
  }
42219
42592
  var entries = /* @__PURE__ */ new Map();
42220
- function macro(kind, category, color, iconId, label) {
42593
+ function macro(kind, category, iconId, label) {
42221
42594
  entries.set(kind, {
42222
42595
  kind,
42223
42596
  parentKind: null,
42224
42597
  level: "macro",
42225
42598
  category,
42226
- color,
42599
+ color: kindColor(kind),
42227
42600
  iconId,
42228
42601
  labelKey: `eventKind.${kind}`,
42229
42602
  label
42230
42603
  });
42231
42604
  }
42232
- function sub(kind, parentKind, category, color, iconId, label) {
42605
+ function sub(kind, parentKind, category, iconId, label) {
42233
42606
  entries.set(kind, {
42234
42607
  kind,
42235
42608
  parentKind,
42236
42609
  level: "sub",
42237
42610
  category,
42238
- color,
42611
+ color: kindColor(kind),
42239
42612
  iconId,
42240
42613
  labelKey: `eventKind.${kind}`,
42241
42614
  label
42242
42615
  });
42243
42616
  }
42244
- macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
42245
- macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
42246
- macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
42247
- macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
42248
- macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
42249
- macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
42250
- macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
42251
- macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
42617
+ macro("motion", "motion", "motion", "Motion");
42618
+ macro("audio", "audio", "audio", "Audio");
42619
+ macro("person", "detection", "person", "Person");
42620
+ macro("vehicle", "detection", "vehicle", "Vehicle");
42621
+ macro("animal", "detection", "animal", "Animal");
42622
+ macro("package", "package", "package", "Package");
42623
+ macro("sensor", "sensor", "sensor", "Sensor");
42624
+ macro("control", "control", "control", "Control");
42252
42625
  for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
42253
42626
  if (macroClass !== "vehicle" && macroClass !== "animal") continue;
42254
42627
  if (entries.has(cocoClass)) continue;
42255
- sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
42628
+ sub(cocoClass, macroClass, "detection", cocoClass, titleCase(cocoClass));
42256
42629
  }
42257
- sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
42258
- sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
42259
- sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
42260
- sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
42261
- sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
42262
- sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
42263
- sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
42264
- sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
42265
- sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
42266
- sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
42267
- sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
42268
- sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
42269
- sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
42270
- sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
42271
- sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
42272
- sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
42273
- sub("siren", "control", "control", "#dc2626", "siren", "Siren");
42274
- sub("button", "control", "control", "#10b981", "button", "Button");
42275
- sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
42630
+ sub("package-delivered", "package", "package", "package", "Package delivered");
42631
+ sub("package-picked-up", "package", "package", "package", "Package picked up");
42632
+ sub("contact", "sensor", "sensor", "door", "Contact");
42633
+ sub("motion-sensor", "sensor", "sensor", "pir", "Motion sensor");
42634
+ sub("smoke", "sensor", "sensor", "smoke", "Smoke");
42635
+ sub("flood", "sensor", "sensor", "water", "Water leak");
42636
+ sub("gas", "sensor", "sensor", "gas", "Gas");
42637
+ sub("carbon-monoxide", "sensor", "sensor", "smoke", "Carbon monoxide");
42638
+ sub("vibration", "sensor", "sensor", "vibration", "Vibration");
42639
+ sub("tamper", "sensor", "sensor", "tamper", "Tamper");
42640
+ sub("presence", "sensor", "sensor", "presence", "Presence");
42641
+ sub("enum-sensor", "sensor", "sensor", "generic", "Sensor state");
42642
+ sub("device-event", "sensor", "sensor", "button", "Device event");
42643
+ sub("lock", "control", "control", "lock", "Lock");
42644
+ sub("cover", "control", "control", "door", "Cover");
42645
+ sub("switch", "control", "control", "switch", "Switch");
42646
+ sub("siren", "control", "control", "siren", "Siren");
42647
+ sub("button", "control", "control", "button", "Button");
42648
+ sub("doorbell", "control", "control", "doorbell", "Doorbell");
42276
42649
  for (const l of AUDIO_MACRO_LABELS) {
42277
42650
  const kind = `audio-${l.id}`;
42278
42651
  if (entries.has(kind)) continue;
42279
- sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
42652
+ sub(kind, "audio", "audio", kind, l.name);
42280
42653
  }
42281
42654
  /** The complete taxonomy dictionary, keyed by kind. */
42282
42655
  var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
@@ -54083,7 +54456,8 @@ var BatteryStatusSchema = object({
54083
54456
  */
54084
54457
  binary: boolean().optional()
54085
54458
  });
54086
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, method(object({
54459
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
54460
+ method(object({
54087
54461
  deviceId: number(),
54088
54462
  /** Bound on the wait. Sensible range 3000–10000ms. */
54089
54463
  timeoutMs: number().int().min(500).max(3e4).default(8e3)
@@ -54792,6 +55166,7 @@ var ConsumablesStatusSchema = object({
54792
55166
  })),
54793
55167
  lastChangedAt: number()
54794
55168
  });
55169
+ Object.values(DeviceType), [...ConsumableRemainingUnitSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
54795
55170
  Object.values(DeviceType), method(object({
54796
55171
  deviceId: number().int().nonnegative(),
54797
55172
  key: string().min(1)
@@ -54984,6 +55359,30 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
54984
55359
  auth: "admin"
54985
55360
  });
54986
55361
  /**
55362
+ * display-palette — the cluster's one colour table (D939).
55363
+ *
55364
+ * Hub singleton. `getPalette` reports `unknown` when the settings store
55365
+ * cannot be read; it does not pretend the bundled preset was stored.
55366
+ * `setPalette` refuses a palette that fails the ΔE / contrast rule and names
55367
+ * the pairs.
55368
+ */
55369
+ var presetSummarySchema = object({
55370
+ id: string(),
55371
+ name: string(),
55372
+ swatches: record(string(), paletteSwatchSchema),
55373
+ fallbacks: array(string())
55374
+ });
55375
+ method(_void(), paletteResultSchema, {
55376
+ auth: "protected",
55377
+ role: "viewer"
55378
+ }), method(_void(), array(presetSummarySchema).readonly(), {
55379
+ auth: "protected",
55380
+ role: "viewer"
55381
+ }), method(setPaletteInputSchema, paletteReadySchema, {
55382
+ kind: "mutation",
55383
+ auth: "admin"
55384
+ });
55385
+ /**
54987
55386
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
54988
55387
  * for every device, regardless of provider — the kernel needs a uniform
54989
55388
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -55263,6 +55662,7 @@ DeviceType.Dishwasher, method(object({
55263
55662
  kind: "mutation",
55264
55663
  auth: "protected"
55265
55664
  }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
55665
+ DeviceType.Camera;
55266
55666
  object({
55267
55667
  /** Ms epoch of the last press. null = never observed since this provider started. */
55268
55668
  lastPressedAt: number().nullable(),
@@ -57055,6 +57455,7 @@ authKey: string().optional() }), object({
57055
57455
  /** Human-readable error when `ok: false`. */
57056
57456
  error: string().optional()
57057
57457
  }), { kind: "mutation" });
57458
+ DeviceType.Camera;
57058
57459
  object({
57059
57460
  detected: boolean(),
57060
57461
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -59126,7 +59527,8 @@ object({
59126
59527
  since: number().nullable(),
59127
59528
  source: RunningStateSourceSchema,
59128
59529
  phase: string().nullable(),
59129
- lastFetchedAt: number()
59530
+ /** null until a reading has been published (D393). */
59531
+ lastFetchedAt: number().nullable()
59130
59532
  });
59131
59533
  object({
59132
59534
  deviceId: number(),
@@ -59134,6 +59536,7 @@ object({
59134
59536
  phase: string().nullable()
59135
59537
  });
59136
59538
  Object.values(DeviceType);
59539
+ DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
59137
59540
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
59138
59541
  kind: "mutation",
59139
59542
  auth: "admin"
@@ -65980,6 +66383,27 @@ Object.freeze({
65980
66383
  access: "create",
65981
66384
  role: "viewer"
65982
66385
  },
66386
+ "displayPalette.getPalette": {
66387
+ capName: "display-palette",
66388
+ capScope: "system",
66389
+ addonId: null,
66390
+ access: "view",
66391
+ role: "viewer"
66392
+ },
66393
+ "displayPalette.listPresets": {
66394
+ capName: "display-palette",
66395
+ capScope: "system",
66396
+ addonId: null,
66397
+ access: "view",
66398
+ role: "viewer"
66399
+ },
66400
+ "displayPalette.setPalette": {
66401
+ capName: "display-palette",
66402
+ capScope: "system",
66403
+ addonId: null,
66404
+ access: "create",
66405
+ role: "admin"
66406
+ },
65983
66407
  "doorbell.getStatus": {
65984
66408
  capName: "doorbell",
65985
66409
  capScope: "device",
@@ -76436,6 +76860,7 @@ var SYSTEM_CAP_VOCABULARY = {
76436
76860
  "device-provider": system(INTERNAL),
76437
76861
  "device-removal-hook": system(INTERNAL),
76438
76862
  "device-state": system("the runtime-state mirror every trigger already reads through"),
76863
+ "display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
76439
76864
  "embedding-encoder": system(ML),
76440
76865
  "face-gallery": system("the face gallery — curated on its own page"),
76441
76866
  "failure-contribution": system(INTERNAL),
@@ -79320,6 +79745,96 @@ Object.freeze({
79320
79745
  "smtp-provider": "email"
79321
79746
  });
79322
79747
  DeviceType.Camera;
79748
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
79749
+ /**
79750
+ * A saved Customize assignment (D936). The schema is the type: callers use
79751
+ * `z.infer`, they do not restate the shape.
79752
+ */
79753
+ var OverrideSourceSchema = object({
79754
+ addonId: string().min(1),
79755
+ stableId: string().min(1),
79756
+ cap: string().min(1),
79757
+ fieldPath: string().min(1)
79758
+ });
79759
+ var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
79760
+ object({ kind: literal("identity") }),
79761
+ object({ kind: literal("invert") }),
79762
+ object({
79763
+ kind: literal("threshold"),
79764
+ comparison: _enum(["gte", "lte"]),
79765
+ threshold: number(),
79766
+ startDwellMs: number().nonnegative(),
79767
+ stopDwellMs: number().nonnegative()
79768
+ }),
79769
+ object({
79770
+ kind: literal("linear"),
79771
+ scale: number(),
79772
+ offset: number(),
79773
+ clampMin: number().optional(),
79774
+ clampMax: number().optional()
79775
+ }),
79776
+ object({
79777
+ kind: literal("enum-map"),
79778
+ mapping: record(string(), string().nullable())
79779
+ }),
79780
+ object({ kind: literal("number") })
79781
+ ]);
79782
+ var ScalarOverrideDraftSchema = object({
79783
+ kind: literal("scalar"),
79784
+ cap: string().min(1),
79785
+ targetId: string().min(1),
79786
+ source: OverrideSourceSchema,
79787
+ transform: CustomizeTransformDraftSchema
79788
+ });
79789
+ var KeyedArrayOverrideDraftSchema = object({
79790
+ kind: literal("keyedArray"),
79791
+ cap: string().min(1),
79792
+ targetId: string().min(1),
79793
+ key: string().min(1),
79794
+ label: string().min(1),
79795
+ fieldPath: string().min(1),
79796
+ source: OverrideSourceSchema,
79797
+ transform: CustomizeTransformDraftSchema
79798
+ });
79799
+ var PulseOverrideDraftSchema = object({
79800
+ kind: literal("pulse"),
79801
+ cap: string().min(1),
79802
+ targetId: string().min(1),
79803
+ enabled: boolean(),
79804
+ debounceMs: number().nonnegative(),
79805
+ sources: array(OverrideSourceSchema).min(1)
79806
+ });
79807
+ var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
79808
+ "in-addition",
79809
+ "confirm",
79810
+ "replace"
79811
+ ]).optional() });
79812
+ discriminatedUnion("kind", [
79813
+ ScalarOverrideDraftSchema,
79814
+ KeyedArrayOverrideDraftSchema,
79815
+ PulseOverrideDraftSchema,
79816
+ object({
79817
+ kind: literal("span"),
79818
+ cap: string().min(1),
79819
+ targetId: string().min(1),
79820
+ timeoutMs: number().nonnegative(),
79821
+ cooldownMs: number().nonnegative().optional(),
79822
+ sources: array(SpanSourceDraftSchema)
79823
+ })
79824
+ ]);
79825
+ object({
79826
+ targetId: string().min(1),
79827
+ configured: boolean(),
79828
+ source: _enum(["native", "assigned"]),
79829
+ state: _enum([
79830
+ "active",
79831
+ "stale",
79832
+ "released",
79833
+ "unavailable"
79834
+ ]),
79835
+ reason: string().nullable()
79836
+ });
79837
+ String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
79323
79838
  var G711_SCALE_CORRECTION_DB = {
79324
79839
  PCMU: 20 * Math.log10(4),
79325
79840
  PCMA: 20 * Math.log10(8)