@camstack/addon-model-studio 1.1.291 → 1.1.293

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 (19) hide show
  1. package/dist/{MotionZonesSettings-DXxWq7vE.mjs → MotionZonesSettings-DrHyXG0G.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DvOLfWNI.mjs → PrivacyMaskSettings-CuqGSOYk.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DqBJBxj1.mjs → SceneMonitorEditor-_wt-7NOB.mjs} +3 -3
  4. package/dist/_stub.js +4256 -4135
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BPa3rRsT.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-D1kg1qk9.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BPZnyWUq.mjs +26 -0
  7. package/dist/addon-model-studio.css +1 -1
  8. package/dist/{hostInit-7KFbe0cc.mjs → hostInit-CqUjCpJe.mjs} +2 -2
  9. package/dist/model-studio.addon.js +590 -75
  10. package/dist/model-studio.addon.mjs +590 -75
  11. package/dist/{player-overlays-DfIeB2mX.mjs → player-overlays-IswZiT1v.mjs} +1 -1
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-CISBqF_G.mjs → responsive-BRDOoNTu.mjs} +1 -1
  14. package/dist/{scene-monitor-copy-CScGmaG7.mjs → scene-monitor-copy-BLrlOdpo.mjs} +1 -1
  15. package/dist/{square-BtvqwHZc.mjs → square-CqxajgGh.mjs} +1 -1
  16. package/dist/{trash-2-DIqyhuDF.mjs → trash-2-B67pP3l-.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-C-xXOFlf.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DeT4IssS.mjs} +1 -1
  18. package/package.json +1 -1
  19. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BNQVBn-8.mjs +0 -26
@@ -9210,7 +9210,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
9210
9210
  return DeviceRole;
9211
9211
  }({});
9212
9212
  //#endregion
9213
- //#region ../types/dist/composition-xz-ud5EQ.mjs
9213
+ //#region ../types/dist/composition-BJ8iAZb3.mjs
9214
9214
  /**
9215
9215
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9216
9216
  *
@@ -9270,7 +9270,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
9270
9270
  * ONE table for everyone who asks "is this device HIGH?": the
9271
9271
  * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
9272
9272
  * sensor markers, the orchestrator's camera-sensors bridge and
9273
- * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
9273
+ * the sources of a pulse (`compilePulseOverride`, D936).
9274
9274
  * A second copy would diverge at the first cap added, and the symptom — "the
9275
9275
  * sensor rings the doorbell but does not record" — is exactly D62.
9276
9276
  *
@@ -16460,6 +16460,13 @@ var ComposerUnreadableBlockSchema = object({
16460
16460
  /** The parse error, in the operator's words. */
16461
16461
  error: string()
16462
16462
  });
16463
+ /** A confirmed release the hub did not accept. `deviceId` is the claim's device. */
16464
+ var UnreleasedClaimSchema = object({
16465
+ deviceId: number().int(),
16466
+ capName: string(),
16467
+ owner: string(),
16468
+ error: string()
16469
+ });
16463
16470
  method(object({
16464
16471
  /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
16465
16472
  integrationId: string().nullable(),
@@ -16469,7 +16476,13 @@ method(object({
16469
16476
  /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
16470
16477
  restartBlockIds: array(string()),
16471
16478
  /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
16472
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
16479
+ unreadableBlocks: array(ComposerUnreadableBlockSchema),
16480
+ /**
16481
+ * Operator-confirmed deletions. Their claims are released on this apply,
16482
+ * before any replacement block claims. A block that merely vanished from the
16483
+ * snapshot is not listed here and still waits for two applies (D49).
16484
+ */
16485
+ retiredBlockIds: array(string()).optional()
16473
16486
  }), object({
16474
16487
  blocks: array(object({
16475
16488
  blockId: string(),
@@ -16481,7 +16494,13 @@ method(object({
16481
16494
  * integration unknown, its own rows unread or read empty once). An empty
16482
16495
  * apply the caller owes is paid off only by one the composer acted on (D49).
16483
16496
  */
16484
- acted: boolean()
16497
+ acted: boolean(),
16498
+ /**
16499
+ * Confirmed releases this apply tried and the hub did not accept. Empty when
16500
+ * every one landed (or there was nothing to hand back). Absent on a result
16501
+ * that never got that far.
16502
+ */
16503
+ unreleasedClaims: array(UnreleasedClaimSchema).optional()
16485
16504
  }), {
16486
16505
  kind: "mutation",
16487
16506
  auth: "admin"
@@ -42378,6 +42397,381 @@ var _macroLookup = /* @__PURE__ */ new Map();
42378
42397
  for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
42379
42398
  for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
42380
42399
  /**
42400
+ * Palette entry ids (D939). Audio is the one gradient; `audio-*` leaves are
42401
+ * not entries. `heatmapScrub` is a mark, not an event kind.
42402
+ */
42403
+ var PALETTE_ENTRY_IDS = [
42404
+ "motion",
42405
+ "audio",
42406
+ "recording",
42407
+ "live",
42408
+ "heatmapScrub",
42409
+ "person",
42410
+ "vehicle",
42411
+ "animal",
42412
+ "package",
42413
+ "sensor",
42414
+ "control",
42415
+ "face",
42416
+ "plate",
42417
+ "car",
42418
+ "truck",
42419
+ "bus",
42420
+ "motorcycle",
42421
+ "bicycle",
42422
+ "airplane",
42423
+ "boat",
42424
+ "train",
42425
+ "bird",
42426
+ "dog",
42427
+ "cat",
42428
+ "horse",
42429
+ "sheep",
42430
+ "cow",
42431
+ "elephant",
42432
+ "bear",
42433
+ "zebra",
42434
+ "giraffe",
42435
+ "package-delivered",
42436
+ "package-picked-up",
42437
+ "suitcase",
42438
+ "backpack",
42439
+ "handbag",
42440
+ "contact",
42441
+ "motion-sensor",
42442
+ "smoke",
42443
+ "flood",
42444
+ "gas",
42445
+ "carbon-monoxide",
42446
+ "vibration",
42447
+ "tamper",
42448
+ "presence",
42449
+ "enum-sensor",
42450
+ "device-event",
42451
+ "lock",
42452
+ "cover",
42453
+ "switch",
42454
+ "siren",
42455
+ "button",
42456
+ "doorbell"
42457
+ ];
42458
+ var AUDIO_ENTRY_ID = "audio";
42459
+ /** Six rungs, quiet → loud. The opaque end is the entry's hex. */
42460
+ var AUDIO_GRADIENT_ALPHAS = [
42461
+ .3,
42462
+ .42,
42463
+ .55,
42464
+ .7,
42465
+ .85,
42466
+ 1
42467
+ ];
42468
+ var PALETTE_PRESET_IDS = [
42469
+ "camstack",
42470
+ "high-contrast",
42471
+ "okabe-ito"
42472
+ ];
42473
+ /** Frozen palette tables (D939). The spec refuses a table that breaks the rule. */
42474
+ var CAMSTACK_HEX = {
42475
+ motion: "#d946ef",
42476
+ audio: "#059eb8",
42477
+ recording: "#ef4444",
42478
+ live: "#8d7a00",
42479
+ heatmapScrub: "#4b32ff",
42480
+ person: "#11a64c",
42481
+ vehicle: "#3b82f6",
42482
+ animal: "#ea6a09",
42483
+ package: "#924667",
42484
+ sensor: "#624bbc",
42485
+ control: "#944d24",
42486
+ face: "#ed4f8d",
42487
+ plate: "#4b7027",
42488
+ car: "#9684cf",
42489
+ truck: "#0f9b89",
42490
+ bus: "#a734a9",
42491
+ motorcycle: "#c1133a",
42492
+ bicycle: "#0e6a9b",
42493
+ airplane: "#7c9928",
42494
+ boat: "#b17933",
42495
+ train: "#ad6ca3",
42496
+ bird: "#0f7c55",
42497
+ dog: "#c82700",
42498
+ cat: "#7268f2",
42499
+ horse: "#cb795e",
42500
+ sheep: "#b8636b",
42501
+ cow: "#cb2969",
42502
+ elephant: "#1158d2",
42503
+ bear: "#8d5e00",
42504
+ zebra: "#0097d6",
42505
+ giraffe: "#8f61bb",
42506
+ "package-delivered": "#cd3f9b",
42507
+ "package-picked-up": "#388a08",
42508
+ suitcase: "#666800",
42509
+ backpack: "#ec5022",
42510
+ handbag: "#a76ef8",
42511
+ contact: "#ab5a49",
42512
+ "motion-sensor": "#b95d1a",
42513
+ smoke: "#dd3858",
42514
+ flood: "#b31e7d",
42515
+ gas: "#5b70b5",
42516
+ "carbon-monoxide": "#7b4e8e",
42517
+ vibration: "#e65bba",
42518
+ tamper: "#98464b",
42519
+ presence: "#3a9468",
42520
+ "enum-sensor": "#7885f8",
42521
+ "device-event": "#8c43c8",
42522
+ lock: "#649653",
42523
+ cover: "#c67597",
42524
+ switch: "#7a812a",
42525
+ siren: "#ac5d7f",
42526
+ button: "#b276cd",
42527
+ doorbell: "#0087ab"
42528
+ };
42529
+ var CAMSTACK_FALLBACK = [
42530
+ "#b34dc7",
42531
+ "#1d7d34",
42532
+ "#db6b6c",
42533
+ "#a43d29",
42534
+ "#0e6ee6",
42535
+ "#29a10b",
42536
+ "#a98731",
42537
+ "#0181c6"
42538
+ ];
42539
+ var HIGH_CONTRAST_HEX = {
42540
+ motion: "#964360",
42541
+ audio: "#23a132",
42542
+ recording: "#2494ca",
42543
+ live: "#bd7e2b",
42544
+ heatmapScrub: "#ad6eea",
42545
+ person: "#62611e",
42546
+ vehicle: "#f4534c",
42547
+ animal: "#1556cd",
42548
+ package: "#9c4415",
42549
+ sensor: "#066c48",
42550
+ control: "#f2479f",
42551
+ face: "#139d8a",
42552
+ plate: "#909024",
42553
+ car: "#8e35ab",
42554
+ truck: "#bd0b2b",
42555
+ bus: "#7a88ca",
42556
+ motorcycle: "#e26725",
42557
+ bicycle: "#a6679b",
42558
+ airplane: "#7c5720",
42559
+ boat: "#467a1b",
42560
+ train: "#6f65a4",
42561
+ bird: "#cb717f",
42562
+ dog: "#c62490",
42563
+ cat: "#b36850",
42564
+ horse: "#1872ac",
42565
+ sheep: "#927939",
42566
+ cow: "#428a5c",
42567
+ elephant: "#d41160",
42568
+ bear: "#799453",
42569
+ zebra: "#a85455",
42570
+ giraffe: "#746be8",
42571
+ "package-delivered": "#824a80",
42572
+ "package-picked-up": "#614ac1",
42573
+ suitcase: "#2f77f3",
42574
+ backpack: "#fa476d",
42575
+ handbag: "#c14cbe",
42576
+ contact: "#c83921",
42577
+ "motion-sensor": "#a07ebd",
42578
+ smoke: "#a25b13",
42579
+ flood: "#526bab",
42580
+ gas: "#924938",
42581
+ "carbon-monoxide": "#bb7e53",
42582
+ vibration: "#b66182",
42583
+ tamper: "#3c6931",
42584
+ presence: "#6c851d",
42585
+ "enum-sensor": "#ad2d48",
42586
+ "device-event": "#5e9b04",
42587
+ lock: "#00a062",
42588
+ cover: "#ad8624",
42589
+ switch: "#d05259",
42590
+ siren: "#cd67b3",
42591
+ button: "#c9746a",
42592
+ doorbell: "#338eeb"
42593
+ };
42594
+ var HIGH_CONTRAST_FALLBACK = [
42595
+ "#817f3b",
42596
+ "#a0733e",
42597
+ "#8658b2",
42598
+ "#956301",
42599
+ "#bc652d",
42600
+ "#647331",
42601
+ "#a14c9e",
42602
+ "#d14e71"
42603
+ ];
42604
+ var OKABE_ITO_HEX = {
42605
+ motion: "#b88128",
42606
+ audio: "#1096c8",
42607
+ recording: "#009e73",
42608
+ live: "#9c8c22",
42609
+ heatmapScrub: "#0072b2",
42610
+ person: "#d55e00",
42611
+ vehicle: "#c0739f",
42612
+ animal: "#226d18",
42613
+ package: "#91446c",
42614
+ sensor: "#217b56",
42615
+ control: "#648647",
42616
+ face: "#c22998",
42617
+ plate: "#fa4575",
42618
+ car: "#956301",
42619
+ truck: "#2f77f3",
42620
+ bus: "#7a4e86",
42621
+ motorcycle: "#f54597",
42622
+ bicycle: "#bb3e75",
42623
+ airplane: "#e054c0",
42624
+ boat: "#457942",
42625
+ train: "#867afa",
42626
+ bird: "#88914c",
42627
+ dog: "#1556cd",
42628
+ cat: "#71702c",
42629
+ horse: "#9b4fa4",
42630
+ sheep: "#c0559d",
42631
+ cow: "#d14f65",
42632
+ elephant: "#98470f",
42633
+ bear: "#595896",
42634
+ zebra: "#96790e",
42635
+ giraffe: "#cb717b",
42636
+ "package-delivered": "#139d8a",
42637
+ "package-picked-up": "#906ead",
42638
+ suitcase: "#d02939",
42639
+ backpack: "#d41160",
42640
+ handbag: "#f64f54",
42641
+ contact: "#7258d2",
42642
+ "motion-sensor": "#b66182",
42643
+ smoke: "#627abb",
42644
+ flood: "#b86ae4",
42645
+ gas: "#a95261",
42646
+ "carbon-monoxide": "#c65d3c",
42647
+ vibration: "#7a40b7",
42648
+ tamper: "#914b34",
42649
+ presence: "#9481c3",
42650
+ "enum-sensor": "#ac6d47",
42651
+ "device-event": "#7b6fce",
42652
+ lock: "#c67662",
42653
+ cover: "#a6564d",
42654
+ switch: "#ad2c4e",
42655
+ siren: "#348e08",
42656
+ button: "#d27303",
42657
+ doorbell: "#55770f"
42658
+ };
42659
+ var OKABE_ITO_FALLBACK = [
42660
+ "#9a3784",
42661
+ "#a7392c",
42662
+ "#409d50",
42663
+ "#6987e7",
42664
+ "#ee5b3d",
42665
+ "#c0430d",
42666
+ "#af79b3",
42667
+ "#4b6628"
42668
+ ];
42669
+ /**
42670
+ * The display palette (D939). One table of colours, three presets, one
42671
+ * validator. Taxonomy colours and every consumer read this — there is no
42672
+ * second hex table.
42673
+ */
42674
+ var paletteHexSchema = string().regex(/^#[0-9a-f]{6}$/);
42675
+ var paletteSwatchSchema = discriminatedUnion("form", [object({
42676
+ form: literal("solid"),
42677
+ hex: paletteHexSchema
42678
+ }), object({
42679
+ form: literal("gradient"),
42680
+ hex: paletteHexSchema,
42681
+ alphas: array(number().gt(0).lte(1)).length(AUDIO_GRADIENT_ALPHAS.length)
42682
+ })]);
42683
+ var paletteReadySchema = object({
42684
+ status: literal("ready"),
42685
+ presetId: _enum(PALETTE_PRESET_IDS),
42686
+ customized: boolean(),
42687
+ source: _enum(["stored", "unconfigured"]),
42688
+ swatches: record(string(), paletteSwatchSchema),
42689
+ fallbacks: array(paletteHexSchema).length(8)
42690
+ });
42691
+ var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, object({
42692
+ status: literal("unknown"),
42693
+ reason: string()
42694
+ })]);
42695
+ var setPaletteInputSchema = union([object({ presetId: string() }), object({
42696
+ presetId: string(),
42697
+ overrides: record(string(), paletteSwatchSchema)
42698
+ })]);
42699
+ object({
42700
+ presetId: string(),
42701
+ overrides: record(string(), paletteSwatchSchema)
42702
+ });
42703
+ function solid(hex) {
42704
+ return {
42705
+ form: "solid",
42706
+ hex
42707
+ };
42708
+ }
42709
+ function audioGradient(hex) {
42710
+ return {
42711
+ form: "gradient",
42712
+ hex,
42713
+ alphas: [...AUDIO_GRADIENT_ALPHAS]
42714
+ };
42715
+ }
42716
+ function swatchesFrom(hexes) {
42717
+ const out = {};
42718
+ for (const id of PALETTE_ENTRY_IDS) {
42719
+ const hex = hexes[id];
42720
+ if (hex === void 0) throw new Error(`palette table missing ${id}`);
42721
+ out[id] = id === "audio" ? audioGradient(hex) : solid(hex);
42722
+ }
42723
+ return out;
42724
+ }
42725
+ function preset(id, name, hexes, fallbacks) {
42726
+ return {
42727
+ id,
42728
+ name,
42729
+ swatches: swatchesFrom(hexes),
42730
+ fallbacks
42731
+ };
42732
+ }
42733
+ var DISPLAY_PRESETS = [
42734
+ preset("camstack", "CamStack", CAMSTACK_HEX, CAMSTACK_FALLBACK),
42735
+ preset("high-contrast", "High contrast", HIGH_CONTRAST_HEX, HIGH_CONTRAST_FALLBACK),
42736
+ preset("okabe-ito", "Colour-blind safe", OKABE_ITO_HEX, OKABE_ITO_FALLBACK)
42737
+ ];
42738
+ function presetById(id) {
42739
+ return DISPLAY_PRESETS.find((item) => item.id === id);
42740
+ }
42741
+ function bundledCamstack() {
42742
+ const presetRow = presetById("camstack");
42743
+ if (presetRow === void 0) throw new Error("CamStack preset missing");
42744
+ return readyOf(presetRow, "unconfigured", false);
42745
+ }
42746
+ function readyOf(row, source, customized) {
42747
+ return {
42748
+ status: "ready",
42749
+ presetId: row.id,
42750
+ customized,
42751
+ source,
42752
+ swatches: row.swatches,
42753
+ fallbacks: [...row.fallbacks]
42754
+ };
42755
+ }
42756
+ function hashFallback(kind, fallbacks) {
42757
+ let hash = 0;
42758
+ for (let i = 0; i < kind.length; i++) hash = hash * 31 + (kind.codePointAt(i) ?? 0) >>> 0;
42759
+ const hex = fallbacks[hash % fallbacks.length];
42760
+ if (hex === void 0) throw new Error("display palette has no fallback colour");
42761
+ return hex;
42762
+ }
42763
+ /** Colour a kind paints with. Audio leaves share the audio gradient's hex. */
42764
+ function paintHex(swatches, fallbacks, kind) {
42765
+ const key = kind.trim().toLowerCase();
42766
+ if (key.startsWith("audio-")) {
42767
+ const audio = swatches[AUDIO_ENTRY_ID];
42768
+ return audio !== void 0 ? audio.hex : hashFallback(key, fallbacks);
42769
+ }
42770
+ const direct = swatches[key];
42771
+ if (direct !== void 0) return direct.hex;
42772
+ return hashFallback(key, fallbacks);
42773
+ }
42774
+ /**
42381
42775
  * Unified event-kind taxonomy — THE single source of truth for
42382
42776
  * `kind → { parentKind, category, level, color, iconId, labelKey, label,
42383
42777
  * icon }`.
@@ -42391,109 +42785,88 @@ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set
42391
42785
  * - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
42392
42786
  * - the COCO / audio class maps (macro ↔ sub relationships)
42393
42787
  *
42394
- * The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
42395
- * `@camstack/types`. The UI-side mapping `iconId → lucide component` and
42396
- * `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
42397
- * color or an icon: they read this dictionary (server descriptors carry the
42398
- * fields inline; the client resolves color/icon/label from `iconId`/`kind`).
42788
+ * The DATA (serializable — parentKind / iconId / labelKey) lives here in
42789
+ * `@camstack/types`. Colour is NOT a second table: each entry's `color` is
42790
+ * the bundled CamStack display palette (D939). The effective cluster palette
42791
+ * is the `display-palette` capability. The UI-side mapping `iconId → lucide
42792
+ * component` and `labelKey → t()` lives in `@camstack/ui-library`.
42399
42793
  *
42400
42794
  * Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
42401
42795
  */
42402
- var TAXONOMY_COLORS = {
42403
- motion: "#f59e0b",
42404
- audio: "#06b6d4",
42405
- person: "#22c55e",
42406
- vehicle: "#3b82f6",
42407
- animal: "#f97316",
42408
- package: "#a855f7",
42409
- sensor: "#8b5cf6",
42410
- control: "#10b981",
42411
- genericDetection: "#64748b"
42412
- };
42413
- var DETECTION_SUB_COLORS = {
42414
- car: "#f59e0b",
42415
- truck: "#d97706",
42416
- bus: "#b45309",
42417
- motorcycle: "#eab308",
42418
- bicycle: "#ca8a04",
42419
- airplane: "#60a5fa",
42420
- boat: "#2563eb",
42421
- train: "#1d4ed8",
42422
- bird: "#14b8a6",
42423
- dog: "#84cc16",
42424
- cat: "#f97316",
42425
- horse: "#a16207",
42426
- sheep: "#a3a3a3",
42427
- cow: "#78716c",
42428
- elephant: "#6b7280",
42429
- bear: "#7c2d12",
42430
- zebra: "#404040",
42431
- giraffe: "#d4a373"
42432
- };
42796
+ var BUNDLED_PALETTE = bundledCamstack();
42797
+ function kindColor(kind) {
42798
+ return paintHex(BUNDLED_PALETTE.swatches, BUNDLED_PALETTE.fallbacks, kind);
42799
+ }
42800
+ function firstFallback(fallbacks) {
42801
+ const hex = fallbacks[0];
42802
+ if (hex === void 0) throw new Error("display palette has no fallback colour");
42803
+ return hex;
42804
+ }
42805
+ firstFallback(BUNDLED_PALETTE.fallbacks);
42433
42806
  function titleCase(id) {
42434
42807
  return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
42435
42808
  }
42436
42809
  var entries = /* @__PURE__ */ new Map();
42437
- function macro(kind, category, color, iconId, label) {
42810
+ function macro(kind, category, iconId, label) {
42438
42811
  entries.set(kind, {
42439
42812
  kind,
42440
42813
  parentKind: null,
42441
42814
  level: "macro",
42442
42815
  category,
42443
- color,
42816
+ color: kindColor(kind),
42444
42817
  iconId,
42445
42818
  labelKey: `eventKind.${kind}`,
42446
42819
  label
42447
42820
  });
42448
42821
  }
42449
- function sub(kind, parentKind, category, color, iconId, label) {
42822
+ function sub(kind, parentKind, category, iconId, label) {
42450
42823
  entries.set(kind, {
42451
42824
  kind,
42452
42825
  parentKind,
42453
42826
  level: "sub",
42454
42827
  category,
42455
- color,
42828
+ color: kindColor(kind),
42456
42829
  iconId,
42457
42830
  labelKey: `eventKind.${kind}`,
42458
42831
  label
42459
42832
  });
42460
42833
  }
42461
- macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
42462
- macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
42463
- macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
42464
- macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
42465
- macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
42466
- macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
42467
- macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
42468
- macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
42834
+ macro("motion", "motion", "motion", "Motion");
42835
+ macro("audio", "audio", "audio", "Audio");
42836
+ macro("person", "detection", "person", "Person");
42837
+ macro("vehicle", "detection", "vehicle", "Vehicle");
42838
+ macro("animal", "detection", "animal", "Animal");
42839
+ macro("package", "package", "package", "Package");
42840
+ macro("sensor", "sensor", "sensor", "Sensor");
42841
+ macro("control", "control", "control", "Control");
42469
42842
  for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
42470
42843
  if (macroClass !== "vehicle" && macroClass !== "animal") continue;
42471
42844
  if (entries.has(cocoClass)) continue;
42472
- sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
42845
+ sub(cocoClass, macroClass, "detection", cocoClass, titleCase(cocoClass));
42473
42846
  }
42474
- sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
42475
- sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
42476
- sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
42477
- sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
42478
- sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
42479
- sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
42480
- sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
42481
- sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
42482
- sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
42483
- sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
42484
- sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
42485
- sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
42486
- sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
42487
- sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
42488
- sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
42489
- sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
42490
- sub("siren", "control", "control", "#dc2626", "siren", "Siren");
42491
- sub("button", "control", "control", "#10b981", "button", "Button");
42492
- sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
42847
+ sub("package-delivered", "package", "package", "package", "Package delivered");
42848
+ sub("package-picked-up", "package", "package", "package", "Package picked up");
42849
+ sub("contact", "sensor", "sensor", "door", "Contact");
42850
+ sub("motion-sensor", "sensor", "sensor", "pir", "Motion sensor");
42851
+ sub("smoke", "sensor", "sensor", "smoke", "Smoke");
42852
+ sub("flood", "sensor", "sensor", "water", "Water leak");
42853
+ sub("gas", "sensor", "sensor", "gas", "Gas");
42854
+ sub("carbon-monoxide", "sensor", "sensor", "smoke", "Carbon monoxide");
42855
+ sub("vibration", "sensor", "sensor", "vibration", "Vibration");
42856
+ sub("tamper", "sensor", "sensor", "tamper", "Tamper");
42857
+ sub("presence", "sensor", "sensor", "presence", "Presence");
42858
+ sub("enum-sensor", "sensor", "sensor", "generic", "Sensor state");
42859
+ sub("device-event", "sensor", "sensor", "button", "Device event");
42860
+ sub("lock", "control", "control", "lock", "Lock");
42861
+ sub("cover", "control", "control", "door", "Cover");
42862
+ sub("switch", "control", "control", "switch", "Switch");
42863
+ sub("siren", "control", "control", "siren", "Siren");
42864
+ sub("button", "control", "control", "button", "Button");
42865
+ sub("doorbell", "control", "control", "doorbell", "Doorbell");
42493
42866
  for (const l of AUDIO_MACRO_LABELS) {
42494
42867
  const kind = `audio-${l.id}`;
42495
42868
  if (entries.has(kind)) continue;
42496
- sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
42869
+ sub(kind, "audio", "audio", kind, l.name);
42497
42870
  }
42498
42871
  /** The complete taxonomy dictionary, keyed by kind. */
42499
42872
  var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
@@ -54300,7 +54673,8 @@ var BatteryStatusSchema = object({
54300
54673
  */
54301
54674
  binary: boolean().optional()
54302
54675
  });
54303
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, method(object({
54676
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat;
54677
+ method(object({
54304
54678
  deviceId: number(),
54305
54679
  /** Bound on the wait. Sensible range 3000–10000ms. */
54306
54680
  timeoutMs: number().int().min(500).max(3e4).default(8e3)
@@ -55009,6 +55383,7 @@ var ConsumablesStatusSchema = object({
55009
55383
  })),
55010
55384
  lastChangedAt: number()
55011
55385
  });
55386
+ Object.values(DeviceType), [...ConsumableRemainingUnitSchema.options], [...ConsumableStatusSchema.options], [...ConsumableKindSchema.options], [...ConsumableFormSchema.options];
55012
55387
  Object.values(DeviceType), method(object({
55013
55388
  deviceId: number().int().nonnegative(),
55014
55389
  key: string().min(1)
@@ -55201,6 +55576,30 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
55201
55576
  auth: "admin"
55202
55577
  });
55203
55578
  /**
55579
+ * display-palette — the cluster's one colour table (D939).
55580
+ *
55581
+ * Hub singleton. `getPalette` reports `unknown` when the settings store
55582
+ * cannot be read; it does not pretend the bundled preset was stored.
55583
+ * `setPalette` refuses a palette that fails the ΔE / contrast rule and names
55584
+ * the pairs.
55585
+ */
55586
+ var presetSummarySchema = object({
55587
+ id: string(),
55588
+ name: string(),
55589
+ swatches: record(string(), paletteSwatchSchema),
55590
+ fallbacks: array(string())
55591
+ });
55592
+ method(_void(), paletteResultSchema, {
55593
+ auth: "protected",
55594
+ role: "viewer"
55595
+ }), method(_void(), array(presetSummarySchema).readonly(), {
55596
+ auth: "protected",
55597
+ role: "viewer"
55598
+ }), method(setPaletteInputSchema, paletteReadySchema, {
55599
+ kind: "mutation",
55600
+ auth: "admin"
55601
+ });
55602
+ /**
55204
55603
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
55205
55604
  * for every device, regardless of provider — the kernel needs a uniform
55206
55605
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -55480,6 +55879,7 @@ DeviceType.Dishwasher, method(object({
55480
55879
  kind: "mutation",
55481
55880
  auth: "protected"
55482
55881
  }), method(object({ deviceId: DeviceIdSchema }), DishwasherOptionsSchema, { auth: "protected" });
55882
+ DeviceType.Camera;
55483
55883
  object({
55484
55884
  /** Ms epoch of the last press. null = never observed since this provider started. */
55485
55885
  lastPressedAt: number().nullable(),
@@ -57272,6 +57672,7 @@ authKey: string().optional() }), object({
57272
57672
  /** Human-readable error when `ok: false`. */
57273
57673
  error: string().optional()
57274
57674
  }), { kind: "mutation" });
57675
+ DeviceType.Camera;
57275
57676
  object({
57276
57677
  detected: boolean(),
57277
57678
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -59343,7 +59744,8 @@ object({
59343
59744
  since: number().nullable(),
59344
59745
  source: RunningStateSourceSchema,
59345
59746
  phase: string().nullable(),
59346
- lastFetchedAt: number()
59747
+ /** null until a reading has been published (D393). */
59748
+ lastFetchedAt: number().nullable()
59347
59749
  });
59348
59750
  object({
59349
59751
  deviceId: number(),
@@ -59351,6 +59753,7 @@ object({
59351
59753
  phase: string().nullable()
59352
59754
  });
59353
59755
  Object.values(DeviceType);
59756
+ DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
59354
59757
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
59355
59758
  kind: "mutation",
59356
59759
  auth: "admin"
@@ -66193,6 +66596,27 @@ Object.freeze({
66193
66596
  access: "create",
66194
66597
  role: "viewer"
66195
66598
  },
66599
+ "displayPalette.getPalette": {
66600
+ capName: "display-palette",
66601
+ capScope: "system",
66602
+ addonId: null,
66603
+ access: "view",
66604
+ role: "viewer"
66605
+ },
66606
+ "displayPalette.listPresets": {
66607
+ capName: "display-palette",
66608
+ capScope: "system",
66609
+ addonId: null,
66610
+ access: "view",
66611
+ role: "viewer"
66612
+ },
66613
+ "displayPalette.setPalette": {
66614
+ capName: "display-palette",
66615
+ capScope: "system",
66616
+ addonId: null,
66617
+ access: "create",
66618
+ role: "admin"
66619
+ },
66196
66620
  "doorbell.getStatus": {
66197
66621
  capName: "doorbell",
66198
66622
  capScope: "device",
@@ -76649,6 +77073,7 @@ var SYSTEM_CAP_VOCABULARY = {
76649
77073
  "device-provider": system(INTERNAL),
76650
77074
  "device-removal-hook": system(INTERNAL),
76651
77075
  "device-state": system("the runtime-state mirror every trigger already reads through"),
77076
+ "display-palette": system("the cluster display palette — one colour table for every client, not a device action"),
76652
77077
  "embedding-encoder": system(ML),
76653
77078
  "face-gallery": system("the face gallery — curated on its own page"),
76654
77079
  "failure-contribution": system(INTERNAL),
@@ -79533,6 +79958,96 @@ Object.freeze({
79533
79958
  "smtp-provider": "email"
79534
79959
  });
79535
79960
  DeviceType.Camera;
79961
+ 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;
79962
+ /**
79963
+ * A saved Customize assignment (D936). The schema is the type: callers use
79964
+ * `z.infer`, they do not restate the shape.
79965
+ */
79966
+ var OverrideSourceSchema = object({
79967
+ addonId: string().min(1),
79968
+ stableId: string().min(1),
79969
+ cap: string().min(1),
79970
+ fieldPath: string().min(1)
79971
+ });
79972
+ var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
79973
+ object({ kind: literal("identity") }),
79974
+ object({ kind: literal("invert") }),
79975
+ object({
79976
+ kind: literal("threshold"),
79977
+ comparison: _enum(["gte", "lte"]),
79978
+ threshold: number(),
79979
+ startDwellMs: number().nonnegative(),
79980
+ stopDwellMs: number().nonnegative()
79981
+ }),
79982
+ object({
79983
+ kind: literal("linear"),
79984
+ scale: number(),
79985
+ offset: number(),
79986
+ clampMin: number().optional(),
79987
+ clampMax: number().optional()
79988
+ }),
79989
+ object({
79990
+ kind: literal("enum-map"),
79991
+ mapping: record(string(), string().nullable())
79992
+ }),
79993
+ object({ kind: literal("number") })
79994
+ ]);
79995
+ var ScalarOverrideDraftSchema = object({
79996
+ kind: literal("scalar"),
79997
+ cap: string().min(1),
79998
+ targetId: string().min(1),
79999
+ source: OverrideSourceSchema,
80000
+ transform: CustomizeTransformDraftSchema
80001
+ });
80002
+ var KeyedArrayOverrideDraftSchema = object({
80003
+ kind: literal("keyedArray"),
80004
+ cap: string().min(1),
80005
+ targetId: string().min(1),
80006
+ key: string().min(1),
80007
+ label: string().min(1),
80008
+ fieldPath: string().min(1),
80009
+ source: OverrideSourceSchema,
80010
+ transform: CustomizeTransformDraftSchema
80011
+ });
80012
+ var PulseOverrideDraftSchema = object({
80013
+ kind: literal("pulse"),
80014
+ cap: string().min(1),
80015
+ targetId: string().min(1),
80016
+ enabled: boolean(),
80017
+ debounceMs: number().nonnegative(),
80018
+ sources: array(OverrideSourceSchema).min(1)
80019
+ });
80020
+ var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
80021
+ "in-addition",
80022
+ "confirm",
80023
+ "replace"
80024
+ ]).optional() });
80025
+ discriminatedUnion("kind", [
80026
+ ScalarOverrideDraftSchema,
80027
+ KeyedArrayOverrideDraftSchema,
80028
+ PulseOverrideDraftSchema,
80029
+ object({
80030
+ kind: literal("span"),
80031
+ cap: string().min(1),
80032
+ targetId: string().min(1),
80033
+ timeoutMs: number().nonnegative(),
80034
+ cooldownMs: number().nonnegative().optional(),
80035
+ sources: array(SpanSourceDraftSchema)
80036
+ })
80037
+ ]);
80038
+ object({
80039
+ targetId: string().min(1),
80040
+ configured: boolean(),
80041
+ source: _enum(["native", "assigned"]),
80042
+ state: _enum([
80043
+ "active",
80044
+ "stale",
80045
+ "released",
80046
+ "unavailable"
80047
+ ]),
80048
+ reason: string().nullable()
80049
+ });
80050
+ String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
79536
80051
  var G711_SCALE_CORRECTION_DB = {
79537
80052
  PCMU: 20 * Math.log10(4),
79538
80053
  PCMA: 20 * Math.log10(8)