@camstack/addon-provider-homematic 1.2.176 → 1.2.178

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/CHANGELOG.md +12 -0
  2. package/dist/.bundle-modules.json +595 -592
  3. package/dist/{MotionZonesSettings-CovCElVu.mjs → MotionZonesSettings-BVVZUT5W.mjs} +2 -2
  4. package/dist/{PrivacyMaskSettings-rppcqOKk.mjs → PrivacyMaskSettings-CwXKH_b2.mjs} +4 -4
  5. package/dist/{SceneMonitorEditor-pLU11CrP.mjs → SceneMonitorEditor-BVKxQm-p.mjs} +3 -3
  6. package/dist/_stub.js +1835 -1614
  7. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-Br6CLztL.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-CcupHdRt.mjs} +3 -3
  8. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DhsWtqcv.mjs +26 -0
  9. package/dist/addon-provider-homematic.css +1 -1
  10. package/dist/addon.js +412 -154
  11. package/dist/addon.mjs +412 -154
  12. package/dist/{hostInit-XHpsKoE0.mjs → hostInit-5g7LqEHZ.mjs} +2 -2
  13. package/dist/{player-overlays-Dq97wYPZ.mjs → player-overlays-Bje29rJB.mjs} +1 -1
  14. package/dist/remoteEntry.js +1 -1
  15. package/dist/{responsive-OpRUtaZs.mjs → responsive-CbUxzOF7.mjs} +1 -1
  16. package/dist/{scene-monitor-copy-BBuVH6QD.mjs → scene-monitor-copy-Dsn4V--Q.mjs} +1 -1
  17. package/dist/{square-CxQ2Du6f.mjs → square-Ck3xIWXT.mjs} +1 -1
  18. package/dist/{trash-2-BPDQvo53.mjs → trash-2-DJ35AyWZ.mjs} +1 -1
  19. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DwBrRwfx.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BnW0Ooq9.mjs} +1 -1
  20. package/package.json +2 -2
  21. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DHKRjZRN.mjs +0 -26
package/dist/addon.js CHANGED
@@ -8,7 +8,7 @@ let crypto$1 = require("crypto");
8
8
  let fs_promises = require("fs/promises");
9
9
  let path = require("path");
10
10
  let node_os = require("node:os");
11
- //#region ../types/dist/event-category-CaURIwQA.mjs
11
+ //#region ../types/dist/event-category-BmPm98n0.mjs
12
12
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
13
13
  EventCategory["SystemBoot"] = "system.boot";
14
14
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -492,6 +492,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
492
492
  EventCategory["RunningStarted"] = "running.started";
493
493
  /** Mirrors `runningStateCapability.events.onFinished`. */
494
494
  EventCategory["RunningFinished"] = "running.finished";
495
+ /** Mirrors `deviceRunsCapability.events.onRunOpened` - a durable run record opened. */
496
+ EventCategory["DeviceRunOpened"] = "device-run.opened";
497
+ /** Mirrors `deviceRunsCapability.events.onRunClosed` - a durable run record closed. */
498
+ EventCategory["DeviceRunClosed"] = "device-run.closed";
495
499
  /**
496
500
  * Cap event fired by every device that registers the `event-emitter`
497
501
  * capability. Mirrors `eventEmitterCapability.events.onEvent`. Carries
@@ -5840,7 +5844,7 @@ var ZodIssueCode = {
5840
5844
  var ZodFirstPartyTypeKind;
5841
5845
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5842
5846
  //#endregion
5843
- //#region ../types/dist/sleep-CSYuxssh.mjs
5847
+ //#region ../types/dist/sleep-BKzhQTSm.mjs
5844
5848
  /**
5845
5849
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5846
5850
  * window to float samples (D455).
@@ -9370,6 +9374,7 @@ var CAP_NAMES = Object.freeze([
9370
9374
  "device-ops",
9371
9375
  "device-provider",
9372
9376
  "device-removal-hook",
9377
+ "device-runs",
9373
9378
  "device-state",
9374
9379
  "device-status",
9375
9380
  "dishwasher",
@@ -11314,7 +11319,7 @@ object({
11314
11319
  params: record(string(), union([string(), number()])).optional()
11315
11320
  });
11316
11321
  //#endregion
11317
- //#region ../types/dist/composition-BBzVf2xd.mjs
11322
+ //#region ../types/dist/composition-BiKWlUCc.mjs
11318
11323
  /**
11319
11324
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11320
11325
  *
@@ -12247,7 +12252,15 @@ var HelperSpecSchema = discriminatedUnion("kind", [
12247
12252
  thresholdWatts: number().positive(),
12248
12253
  startDwellMs: number().int().nonnegative(),
12249
12254
  stopDwellMs: number().int().nonnegative(),
12250
- member: HelperMemberSchema
12255
+ member: HelperMemberSchema,
12256
+ /**
12257
+ * The plug that powers the appliance (`switch.on`). Optional: when set, the
12258
+ * composition carries a `power-source` feature, so the hub can cut and restore
12259
+ * that plug (power-source link of a NEW-target composition).
12260
+ */
12261
+ powerSwitch: HelperMemberSchema.optional(),
12262
+ /** How long a forced restart keeps the plug off; the cap's default when unset. */
12263
+ offSeconds: number().optional()
12251
12264
  }),
12252
12265
  object({
12253
12266
  kind: literal("statistic"),
@@ -13645,7 +13658,13 @@ var MigrationLedgerEntrySchema = object({
13645
13658
  /** Why it is `blocked` or `held` (`dependency-failed`, `snapshot-refused`, …). */
13646
13659
  reason: string().nullable(),
13647
13660
  nodeId: string().nullable(),
13648
- bootId: string().nullable()
13661
+ bootId: string().nullable(),
13662
+ /**
13663
+ * The catalogued meta of this id (description, body kind, store, `dependsOn`…),
13664
+ * joined by the engine from the catalogues it knows this boot. Absent when no
13665
+ * catalogue lists the id (a newer database).
13666
+ */
13667
+ meta: MigrationMetaSchema.optional()
13649
13668
  });
13650
13669
  /** A catalogued migration that is not applied, with where it stands. */
13651
13670
  var MigrationPendingEntrySchema = object({
@@ -19452,6 +19471,14 @@ var APPLIANCE_CAP_VOCABULARY = {
19452
19471
  }
19453
19472
  } }
19454
19473
  },
19474
+ "device-runs": {
19475
+ scope: "device",
19476
+ noun: t("Runs", "Esecuzioni"),
19477
+ events: {
19478
+ onRunOpened: { notOperatorFacing: "the durable record of a run that the running-state start flip already announces" },
19479
+ onRunClosed: { notOperatorFacing: "the durable record of a run that the running-state finish flip already announces" }
19480
+ }
19481
+ },
19455
19482
  update: {
19456
19483
  scope: "device",
19457
19484
  noun: t("Firmware update", "Aggiornamento firmware"),
@@ -46113,6 +46140,117 @@ function actuator(input) {
46113
46140
  };
46114
46141
  }
46115
46142
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
46143
+ var PowerSourceRefusalReasonSchema = _enum([
46144
+ "no-power-source",
46145
+ "switch-missing",
46146
+ "switch-offline",
46147
+ "switch-unknown",
46148
+ "restart-in-progress",
46149
+ "switch-call-failed"
46150
+ ]);
46151
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
46152
+ accepted: literal(false),
46153
+ reason: PowerSourceRefusalReasonSchema,
46154
+ /** One line for the operator, naming the switch. */
46155
+ message: string()
46156
+ })]);
46157
+ var PowerSourceInfoSchema = object({
46158
+ /** False when the device has no power source linked; the rest is then empty. */
46159
+ linked: boolean(),
46160
+ switchDeviceId: number().nullable(),
46161
+ switchName: string().nullable(),
46162
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
46163
+ switchOn: boolean().nullable(),
46164
+ switchOnline: boolean().nullable(),
46165
+ restartInProgress: boolean(),
46166
+ offSeconds: number().int()
46167
+ });
46168
+ /** The composed slice: the switch state the link mirrors, plus the stored off time. */
46169
+ var PowerSourceStateSchema = object({
46170
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
46171
+ switchOn: boolean().nullable(),
46172
+ offSeconds: number().int(),
46173
+ lastFetchedAt: number()
46174
+ });
46175
+ var POWER_SOURCE_DEVICE_TYPES = [
46176
+ DeviceType.Gateway,
46177
+ DeviceType.Hub,
46178
+ DeviceType.Camera,
46179
+ DeviceType.Sensor,
46180
+ DeviceType.MediaPlayer,
46181
+ DeviceType.Vacuum,
46182
+ DeviceType.Generic,
46183
+ DeviceType.Washer,
46184
+ DeviceType.Dryer,
46185
+ DeviceType.Dishwasher,
46186
+ DeviceType.PetFountain,
46187
+ DeviceType.Fan,
46188
+ DeviceType.Humidifier,
46189
+ DeviceType.Climate,
46190
+ DeviceType.WaterHeater
46191
+ ];
46192
+ var powerSourceCustomize = {
46193
+ version: 1,
46194
+ targets: [{
46195
+ id: "switch",
46196
+ cardinality: "scalar",
46197
+ vocabulary: {
46198
+ cap: "power-source",
46199
+ stateField: "switchOn"
46200
+ },
46201
+ deviceTypes: POWER_SOURCE_DEVICE_TYPES,
46202
+ apply: "add",
46203
+ path: "switchOn",
46204
+ sources: [{
46205
+ kind: "switch",
46206
+ transforms: [{ kind: "identity" }]
46207
+ }],
46208
+ companions: [{
46209
+ kind: "constant",
46210
+ path: "offSeconds",
46211
+ value: 10,
46212
+ when: "add"
46213
+ }, {
46214
+ kind: "clock",
46215
+ path: "lastFetchedAt",
46216
+ when: "always"
46217
+ }],
46218
+ sourceReport: { status: "assignment-status" }
46219
+ }]
46220
+ };
46221
+ var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
46222
+ var powerSourceCapability = {
46223
+ name: "power-source",
46224
+ scope: "device",
46225
+ mode: "singleton",
46226
+ deviceTypes: POWER_SOURCE_DEVICE_TYPES,
46227
+ methods: {
46228
+ getStatus: systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "admin" }),
46229
+ powerOn: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
46230
+ kind: "mutation",
46231
+ auth: "admin"
46232
+ }),
46233
+ powerOff: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
46234
+ kind: "mutation",
46235
+ auth: "admin"
46236
+ }),
46237
+ forceRestart: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
46238
+ kind: "mutation",
46239
+ auth: "admin"
46240
+ })
46241
+ },
46242
+ runtimeState: PowerSourceStateSchema,
46243
+ customize: powerSourceCustomize,
46244
+ /**
46245
+ * Runtime-state durability: **session** — mirrored from the linked switch on
46246
+ * its next report; a restored value would outlive the reading it names.
46247
+ *
46248
+ * See `RuntimeStateDurability`. Enforced by
46249
+ * `scripts/check-runtime-state-durability.ts`.
46250
+ */
46251
+ durability: "session",
46252
+ history: "none"
46253
+ };
46116
46254
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
46117
46255
  DeviceType.Camera;
46118
46256
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
@@ -47538,6 +47676,101 @@ method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly())
47538
47676
  kind: "mutation",
47539
47677
  auth: "admin"
47540
47678
  });
47679
+ /**
47680
+ * device-runs - the durable record of ONE run of a device: a washing cycle, a
47681
+ * dishwasher cycle, later a mow or a clean (D992).
47682
+ *
47683
+ * A run is a DOCUMENT (opened at one instant, closed at another, carrying what
47684
+ * was measured over it), never a sample - device-history keeps the numbers over
47685
+ * time and its `device-runs` provider keeps these documents beside them, because
47686
+ * the energy of a run is a question about device-history's own series. The
47687
+ * record is written from the `running-state` flip on `DeviceStateChanged`; it
47688
+ * survives a restart (the open row is on disk) and a missed flip (boot compares
47689
+ * the open rows against the live snapshots).
47690
+ *
47691
+ * Every measurement is `number | null` and `null` means "could not be
47692
+ * measured", never `0` (D393). A run closed by the boot reconcile because the
47693
+ * device stopped while nobody was watching has `outcome: 'unknown'`.
47694
+ */
47695
+ var DeviceRunKindSchema = _enum([
47696
+ "appliance",
47697
+ "mower",
47698
+ "vacuum"
47699
+ ]);
47700
+ var DeviceRunStateSchema = _enum(["open", "closed"]);
47701
+ var DeviceRunOutcomeSchema = _enum([
47702
+ "completed",
47703
+ "aborted",
47704
+ "error",
47705
+ "unknown"
47706
+ ]);
47707
+ /** What opened or closed the run. `reconcile` is the boot comparison against live state. */
47708
+ var DeviceRunSourceSchema = _enum([
47709
+ "running-state",
47710
+ "activity",
47711
+ "reconcile"
47712
+ ]);
47713
+ /** How the energy of a run was obtained; `null` when it could not be. */
47714
+ var DeviceRunEnergyMethodSchema = _enum(["counter-delta", "history-integral"]);
47715
+ var DeviceRunPhaseSchema = object({
47716
+ phase: string(),
47717
+ at: number()
47718
+ });
47719
+ /** The kind-specific block; a later phase adds a branch, nothing else changes. */
47720
+ var DeviceRunDetailSchema = discriminatedUnion("kind", [object({
47721
+ kind: literal("appliance"),
47722
+ /** kWh used over the run. */
47723
+ energyKwh: number().nullable().meta(readingMeta("energy")),
47724
+ energyMethod: DeviceRunEnergyMethodSchema.nullable(),
47725
+ /** Highest power seen while the run was open. */
47726
+ peakW: number().nullable().meta(readingMeta("power")),
47727
+ /** Time-weighted mean power while the run was open. */
47728
+ avgW: number().nullable().meta(readingMeta("power")),
47729
+ /** The program the appliance said it ran when the run opened. */
47730
+ program: string().nullable(),
47731
+ remainingAtStartSec: number().nullable().meta(readingMeta("duration")),
47732
+ /** The last phase the device reported before the run closed. */
47733
+ finalPhase: string().nullable(),
47734
+ /**
47735
+ * The meter's energy counter when the run opened; `null` when the meter had
47736
+ * not said (or the run was opened late, by the boot reconcile). It lives in
47737
+ * the row so a run that outlives a restart still ends with `end - start`.
47738
+ */
47739
+ energyStartKwh: number().nullable().meta(readingMeta("energy")),
47740
+ /** Milliseconds of power readings behind `avgW` - the weight a restart resumes the mean with. */
47741
+ powerObservedMs: number()
47742
+ })]);
47743
+ var DeviceRunSchema = object({
47744
+ /** `${deviceId}:${startedAt}`. */
47745
+ runId: string(),
47746
+ deviceId: number().int(),
47747
+ kind: DeviceRunKindSchema,
47748
+ state: DeviceRunStateSchema,
47749
+ startedAt: number(),
47750
+ endedAt: number().nullable(),
47751
+ durationMs: number().nullable(),
47752
+ outcome: DeviceRunOutcomeSchema.nullable(),
47753
+ startSource: DeviceRunSourceSchema,
47754
+ endSource: DeviceRunSourceSchema.nullable(),
47755
+ /** Where the device's running bit came from (`running-state.source`); `null` when it did not say. */
47756
+ runningSource: _enum(["native", "assigned"]).nullable(),
47757
+ phases: array(DeviceRunPhaseSchema),
47758
+ detail: DeviceRunDetailSchema
47759
+ });
47760
+ DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, method(object({
47761
+ deviceId: number().int(),
47762
+ outcome: DeviceRunOutcomeSchema.optional(),
47763
+ atFrom: number().optional(),
47764
+ atTo: number().optional(),
47765
+ limit: number().int().positive().max(200).default(50),
47766
+ cursor: string().optional()
47767
+ }), object({
47768
+ runs: array(DeviceRunSchema).readonly(),
47769
+ nextCursor: string().nullable()
47770
+ })), method(object({
47771
+ deviceId: number().int(),
47772
+ runId: string()
47773
+ }), DeviceRunSchema.nullable()), method(object({ deviceId: number().int() }), DeviceRunSchema.nullable());
47541
47774
  var DeviceCaStatusSchema = discriminatedUnion("state", [
47542
47775
  object({ state: literal("absent") }),
47543
47776
  object({
@@ -47673,8 +47906,8 @@ method(object({}), object({
47673
47906
  });
47674
47907
  var KeychainKeySourceSchema = object({
47675
47908
  kind: _enum([
47676
- "config-file",
47677
- "previous-config-file",
47909
+ "mounted-file",
47910
+ "previous-mounted-file",
47678
47911
  "platform",
47679
47912
  "default-file"
47680
47913
  ]),
@@ -52170,7 +52403,8 @@ var PALETTE_ENTRY_IDS = [
52170
52403
  "switch",
52171
52404
  "siren",
52172
52405
  "button",
52173
- "doorbell"
52406
+ "doorbell",
52407
+ "appliance-cycle"
52174
52408
  ];
52175
52409
  var AUDIO_ENTRY_ID = "audio";
52176
52410
  /** Six rungs, quiet → loud. The opaque end is the entry's hex. */
@@ -52241,7 +52475,8 @@ var CAMSTACK_HEX = {
52241
52475
  switch: "#7a812a",
52242
52476
  siren: "#ac5d7f",
52243
52477
  button: "#b276cd",
52244
- doorbell: "#0087ab"
52478
+ doorbell: "#0087ab",
52479
+ "appliance-cycle": "#2a8c8c"
52245
52480
  };
52246
52481
  var CAMSTACK_FALLBACK = [
52247
52482
  "#b34dc7",
@@ -52306,7 +52541,8 @@ var HIGH_CONTRAST_HEX = {
52306
52541
  switch: "#d05259",
52307
52542
  siren: "#cd67b3",
52308
52543
  button: "#c9746a",
52309
- doorbell: "#338eeb"
52544
+ doorbell: "#338eeb",
52545
+ "appliance-cycle": "#00848a"
52310
52546
  };
52311
52547
  var HIGH_CONTRAST_FALLBACK = [
52312
52548
  "#817f3b",
@@ -52371,7 +52607,8 @@ var OKABE_ITO_HEX = {
52371
52607
  switch: "#ad2c4e",
52372
52608
  siren: "#348e08",
52373
52609
  button: "#d27303",
52374
- doorbell: "#55770f"
52610
+ doorbell: "#55770f",
52611
+ "appliance-cycle": "#00737d"
52375
52612
  };
52376
52613
  var OKABE_ITO_FALLBACK = [
52377
52614
  "#9a3784",
@@ -52580,6 +52817,7 @@ sub("switch", "control", "control", "switch", "Switch");
52580
52817
  sub("siren", "control", "control", "siren", "Siren");
52581
52818
  sub("button", "control", "control", "button", "Button");
52582
52819
  sub("doorbell", "control", "control", "doorbell", "Doorbell");
52820
+ sub("appliance-cycle", "control", "control", "switch", "Appliance cycle");
52583
52821
  for (const l of AUDIO_MACRO_LABELS) {
52584
52822
  const kind = `audio-${l.id}`;
52585
52823
  if (entries.has(kind)) continue;
@@ -61211,7 +61449,8 @@ var CAP_TO_KIND = {
61211
61449
  cover: "cover",
61212
61450
  switch: "switch",
61213
61451
  button: "button",
61214
- doorbell: "doorbell"
61452
+ doorbell: "doorbell",
61453
+ "running-state": "appliance-cycle"
61215
61454
  };
61216
61455
  function buildDescriptor(capName, kind) {
61217
61456
  const t = EVENT_TAXONOMY[kind];
@@ -64341,10 +64580,7 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
64341
64580
  }), InstallPackageResultSchema, {
64342
64581
  kind: "mutation",
64343
64582
  auth: "admin"
64344
- }), method(object({ packageName: string() }), InstallPackageResultSchema, {
64345
- kind: "mutation",
64346
- auth: "admin"
64347
- }), method(_void(), boolean()), method(_void(), array(unknown()).readonly()), method(object({
64583
+ }), method(object({
64348
64584
  packageName: string().min(1),
64349
64585
  nodeId: string().optional(),
64350
64586
  everywhere: boolean().optional()
@@ -65605,19 +65841,19 @@ var RemoteSetConfigResultSchema = discriminatedUnion("status", [object({ status:
65605
65841
  reason: _enum(["unknown-template", "not-a-media-player"]),
65606
65842
  detail: string()
65607
65843
  })]);
65608
- var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
65844
+ var deviceInput = object({ deviceId: number().int().nonnegative() });
65609
65845
  DeviceType.MediaPlayer;
65610
- method(deviceInput$1, RemoteConfigSchema, { auth: "admin" }), method(deviceInput$1.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
65846
+ method(deviceInput, RemoteConfigSchema, { auth: "admin" }), method(deviceInput.extend({ config: RemoteConfigSchema }), RemoteSetConfigResultSchema, {
65611
65847
  kind: "mutation",
65612
65848
  auth: "admin"
65613
- }), method(deviceInput$1, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput$1.extend({
65849
+ }), method(deviceInput, RemoteCommandListSchema, { auth: "protected" }), method(deviceInput.extend({
65614
65850
  role: RemoteRoleSchema,
65615
65851
  /** Sends in a row (volume steps). */
65616
65852
  repeat: number().int().min(1).max(50).default(1)
65617
65853
  }), RemoteSendResultSchema, {
65618
65854
  kind: "mutation",
65619
65855
  auth: "protected"
65620
- }), method(deviceInput$1.extend({
65856
+ }), method(deviceInput.extend({
65621
65857
  command: RemoteMediaCommandSchema,
65622
65858
  muted: boolean().optional(),
65623
65859
  source: string().optional(),
@@ -69937,117 +70173,6 @@ var lockControlCapability = {
69937
70173
  * whether persisting is worth a SQLite commit. */
69938
70174
  volatileStateFields: ["lastChangedAt"]
69939
70175
  };
69940
- var PowerSourceRefusalReasonSchema = _enum([
69941
- "no-power-source",
69942
- "switch-missing",
69943
- "switch-offline",
69944
- "switch-unknown",
69945
- "restart-in-progress",
69946
- "switch-call-failed"
69947
- ]);
69948
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
69949
- accepted: literal(false),
69950
- reason: PowerSourceRefusalReasonSchema,
69951
- /** One line for the operator, naming the switch. */
69952
- message: string()
69953
- })]);
69954
- var PowerSourceInfoSchema = object({
69955
- /** False when the device has no power source linked; the rest is then empty. */
69956
- linked: boolean(),
69957
- switchDeviceId: number().nullable(),
69958
- switchName: string().nullable(),
69959
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
69960
- switchOn: boolean().nullable(),
69961
- switchOnline: boolean().nullable(),
69962
- restartInProgress: boolean(),
69963
- offSeconds: number().int()
69964
- });
69965
- /** The composed slice: the switch state the link mirrors, plus the stored off time. */
69966
- var PowerSourceStateSchema = object({
69967
- /** Null while the switch has not reported: unknown is never `false` (D393). */
69968
- switchOn: boolean().nullable(),
69969
- offSeconds: number().int(),
69970
- lastFetchedAt: number()
69971
- });
69972
- var POWER_SOURCE_DEVICE_TYPES = [
69973
- DeviceType.Gateway,
69974
- DeviceType.Hub,
69975
- DeviceType.Camera,
69976
- DeviceType.Sensor,
69977
- DeviceType.MediaPlayer,
69978
- DeviceType.Vacuum,
69979
- DeviceType.Generic,
69980
- DeviceType.Washer,
69981
- DeviceType.Dryer,
69982
- DeviceType.Dishwasher,
69983
- DeviceType.PetFountain,
69984
- DeviceType.Fan,
69985
- DeviceType.Humidifier,
69986
- DeviceType.Climate,
69987
- DeviceType.WaterHeater
69988
- ];
69989
- var powerSourceCustomize = {
69990
- version: 1,
69991
- targets: [{
69992
- id: "switch",
69993
- cardinality: "scalar",
69994
- vocabulary: {
69995
- cap: "power-source",
69996
- stateField: "switchOn"
69997
- },
69998
- deviceTypes: POWER_SOURCE_DEVICE_TYPES,
69999
- apply: "add",
70000
- path: "switchOn",
70001
- sources: [{
70002
- kind: "switch",
70003
- transforms: [{ kind: "identity" }]
70004
- }],
70005
- companions: [{
70006
- kind: "constant",
70007
- path: "offSeconds",
70008
- value: 10,
70009
- when: "add"
70010
- }, {
70011
- kind: "clock",
70012
- path: "lastFetchedAt",
70013
- when: "always"
70014
- }],
70015
- sourceReport: { status: "assignment-status" }
70016
- }]
70017
- };
70018
- var deviceInput = object({ deviceId: number().int().nonnegative() });
70019
- var powerSourceCapability = {
70020
- name: "power-source",
70021
- scope: "device",
70022
- mode: "singleton",
70023
- deviceTypes: POWER_SOURCE_DEVICE_TYPES,
70024
- methods: {
70025
- getStatus: systemMethod(deviceInput, PowerSourceInfoSchema, { auth: "admin" }),
70026
- powerOn: systemMethod(deviceInput, PowerSourceActionResultSchema, {
70027
- kind: "mutation",
70028
- auth: "admin"
70029
- }),
70030
- powerOff: systemMethod(deviceInput, PowerSourceActionResultSchema, {
70031
- kind: "mutation",
70032
- auth: "admin"
70033
- }),
70034
- forceRestart: systemMethod(deviceInput, PowerSourceActionResultSchema, {
70035
- kind: "mutation",
70036
- auth: "admin"
70037
- })
70038
- },
70039
- runtimeState: PowerSourceStateSchema,
70040
- customize: powerSourceCustomize,
70041
- /**
70042
- * Runtime-state durability: **session** — mirrored from the linked switch on
70043
- * its next report; a restored value would outlive the reading it names.
70044
- *
70045
- * See `RuntimeStateDurability`. Enforced by
70046
- * `scripts/check-runtime-state-durability.ts`.
70047
- */
70048
- durability: "session",
70049
- history: "none"
70050
- };
70051
70176
  /**
70052
70177
  * A monotonic total between resets (D944). Energy uses `power-meter.energy`
70053
70178
  * so dashboards keep one series; every other instantaneous reading lands here.
@@ -73589,6 +73714,10 @@ var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
73589
73714
  /** Generic Customize target for the running boolean (D936). */
73590
73715
  var runningCustomize = {
73591
73716
  version: 1,
73717
+ overridable: [{
73718
+ path: "running",
73719
+ by: "running"
73720
+ }],
73592
73721
  targets: [{
73593
73722
  id: "running",
73594
73723
  cardinality: "scalar",
@@ -73646,7 +73775,7 @@ var runningCustomize = {
73646
73775
  kind: "constant",
73647
73776
  path: "phase",
73648
73777
  value: null,
73649
- when: "always"
73778
+ when: "add"
73650
73779
  },
73651
73780
  {
73652
73781
  kind: "clock",
@@ -76930,7 +77059,7 @@ var ExternalIdentityKeySchema = object({
76930
77059
  provider: string().min(1),
76931
77060
  subject: string().min(1)
76932
77061
  });
76933
- method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
77062
+ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(_void(), object({ defaultPasswordInUse: boolean() }), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
76934
77063
  kind: "mutation",
76935
77064
  auth: "admin",
76936
77065
  access: "create"
@@ -80269,13 +80398,6 @@ Object.freeze({
80269
80398
  access: "view",
80270
80399
  role: "admin"
80271
80400
  },
80272
- "addons.installFromWorkspace": {
80273
- capName: "addons",
80274
- capScope: "system",
80275
- addonId: null,
80276
- access: "create",
80277
- role: "admin"
80278
- },
80279
80401
  "addons.installPackage": {
80280
80402
  capName: "addons",
80281
80403
  capScope: "system",
@@ -80283,13 +80405,6 @@ Object.freeze({
80283
80405
  access: "create",
80284
80406
  role: "admin"
80285
80407
  },
80286
- "addons.isWorkspaceAvailable": {
80287
- capName: "addons",
80288
- capScope: "system",
80289
- addonId: null,
80290
- access: "view",
80291
- role: "admin"
80292
- },
80293
80408
  "addons.list": {
80294
80409
  capName: "addons",
80295
80410
  capScope: "system",
@@ -80339,13 +80454,6 @@ Object.freeze({
80339
80454
  access: "view",
80340
80455
  role: "admin"
80341
80456
  },
80342
- "addons.listWorkspacePackages": {
80343
- capName: "addons",
80344
- capScope: "system",
80345
- addonId: null,
80346
- access: "view",
80347
- role: "admin"
80348
- },
80349
80457
  "addons.onAddonLogs": {
80350
80458
  capName: "addons",
80351
80459
  capScope: "system",
@@ -83013,6 +83121,27 @@ Object.freeze({
83013
83121
  access: "create",
83014
83122
  role: "admin"
83015
83123
  },
83124
+ "deviceRuns.getCurrentRun": {
83125
+ capName: "device-runs",
83126
+ capScope: "device",
83127
+ addonId: null,
83128
+ access: "view",
83129
+ role: "viewer"
83130
+ },
83131
+ "deviceRuns.getRun": {
83132
+ capName: "device-runs",
83133
+ capScope: "device",
83134
+ addonId: null,
83135
+ access: "view",
83136
+ role: "viewer"
83137
+ },
83138
+ "deviceRuns.listRuns": {
83139
+ capName: "device-runs",
83140
+ capScope: "device",
83141
+ addonId: null,
83142
+ access: "view",
83143
+ role: "viewer"
83144
+ },
83016
83145
  "deviceState.claimFields": {
83017
83146
  capName: "device-state",
83018
83147
  capScope: "system",
@@ -89726,6 +89855,13 @@ Object.freeze({
89726
89855
  access: "view",
89727
89856
  role: "admin"
89728
89857
  },
89858
+ "userManagement.getAdminBootstrapStatus": {
89859
+ capName: "user-management",
89860
+ capScope: "system",
89861
+ addonId: null,
89862
+ access: "view",
89863
+ role: "admin"
89864
+ },
89729
89865
  "userManagement.getTotpStatus": {
89730
89866
  capName: "user-management",
89731
89867
  capScope: "system",
@@ -91211,6 +91347,21 @@ Object.freeze({
91211
91347
  form: "single",
91212
91348
  optional: false
91213
91349
  }],
91350
+ "deviceRuns.getCurrentRun": [{
91351
+ name: "deviceId",
91352
+ form: "single",
91353
+ optional: false
91354
+ }],
91355
+ "deviceRuns.getRun": [{
91356
+ name: "deviceId",
91357
+ form: "single",
91358
+ optional: false
91359
+ }],
91360
+ "deviceRuns.listRuns": [{
91361
+ name: "deviceId",
91362
+ form: "single",
91363
+ optional: false
91364
+ }],
91214
91365
  "deviceState.claimFields": [{
91215
91366
  name: "deviceId",
91216
91367
  form: "single",
@@ -93693,13 +93844,114 @@ NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
93693
93844
  *
93694
93845
  * Pure, RN-safe: the viewer imports the support rule from here.
93695
93846
  */
93847
+ /**
93848
+ * Control caps that still have a raise and a clear an operator names: an
93849
+ * appliance cycle raises when it STARTS and clears when it FINISHES. Kept out
93850
+ * of `SOURCE_CAP_ACTIVE_FIELD` on purpose — that table also makes a device a
93851
+ * camera-sensor / recorder-trigger source, and a dishwasher is neither.
93852
+ */
93853
+ var CYCLE_RAISED_FIELD_BY_CAP = { "running-state": "running" };
93696
93854
  /** Event kind → the boolean field of its cap slice that means "raised". */
93697
93855
  var NC_SENSOR_RAISED_FIELD_BY_KIND = Object.freeze(Object.fromEntries(Object.entries(EVENT_KIND_BY_CAP).flatMap(([capName, descriptor]) => {
93856
+ const cycleField = CYCLE_RAISED_FIELD_BY_CAP[capName];
93857
+ if (cycleField !== void 0) return [[descriptor.kind, cycleField]];
93698
93858
  const field = SOURCE_CAP_ACTIVE_FIELD[capName];
93699
93859
  if (field === void 0 || descriptor.category !== "sensor") return [];
93700
93860
  return [[descriptor.kind, field]];
93701
93861
  })));
93702
93862
  Object.freeze(Object.keys(NC_SENSOR_RAISED_FIELD_BY_KIND));
93863
+ Object.freeze({
93864
+ contact: {
93865
+ starts: {
93866
+ en: "opened",
93867
+ it: "si apre"
93868
+ },
93869
+ finishes: {
93870
+ en: "closed",
93871
+ it: "si chiude"
93872
+ }
93873
+ },
93874
+ "motion-sensor": {
93875
+ starts: {
93876
+ en: "motion detected",
93877
+ it: "movimento rilevato"
93878
+ },
93879
+ finishes: {
93880
+ en: "motion stopped",
93881
+ it: "movimento terminato"
93882
+ }
93883
+ },
93884
+ smoke: {
93885
+ starts: {
93886
+ en: "smoke detected",
93887
+ it: "fumo rilevato"
93888
+ },
93889
+ finishes: {
93890
+ en: "smoke gone",
93891
+ it: "fumo scomparso"
93892
+ }
93893
+ },
93894
+ flood: {
93895
+ starts: {
93896
+ en: "water detected",
93897
+ it: "acqua rilevata"
93898
+ },
93899
+ finishes: {
93900
+ en: "dry again",
93901
+ it: "di nuovo asciutto"
93902
+ }
93903
+ },
93904
+ gas: {
93905
+ starts: {
93906
+ en: "gas detected",
93907
+ it: "gas rilevato"
93908
+ },
93909
+ finishes: {
93910
+ en: "gas gone",
93911
+ it: "gas scomparso"
93912
+ }
93913
+ },
93914
+ "carbon-monoxide": {
93915
+ starts: {
93916
+ en: "carbon monoxide detected",
93917
+ it: "monossido rilevato"
93918
+ },
93919
+ finishes: {
93920
+ en: "carbon monoxide gone",
93921
+ it: "monossido scomparso"
93922
+ }
93923
+ },
93924
+ vibration: {
93925
+ starts: {
93926
+ en: "vibration detected",
93927
+ it: "vibrazione rilevata"
93928
+ },
93929
+ finishes: {
93930
+ en: "vibration stopped",
93931
+ it: "vibrazione terminata"
93932
+ }
93933
+ },
93934
+ tamper: {
93935
+ starts: {
93936
+ en: "tampered with",
93937
+ it: "manomesso"
93938
+ },
93939
+ finishes: {
93940
+ en: "tamper cleared",
93941
+ it: "manomissione rientrata"
93942
+ }
93943
+ },
93944
+ "appliance-cycle": {
93945
+ starts: {
93946
+ en: "the cycle started",
93947
+ it: "il ciclo parte"
93948
+ },
93949
+ finishes: {
93950
+ en: "the cycle finished",
93951
+ it: "il ciclo è terminato"
93952
+ }
93953
+ }
93954
+ });
93703
93955
  object({
93704
93956
  phase: _enum(["raised", "resolved"]),
93705
93957
  episodeId: string().min(1),
@@ -93906,6 +94158,10 @@ var STATE_SUMMARY_VARS = [
93906
94158
  [...RULE_TEXT],
93907
94159
  [...RULE_TEXT],
93908
94160
  [...RULE_TEXT],
94161
+ [...RULE_TEXT],
94162
+ [...RULE_TEXT],
94163
+ [...RULE_TEXT],
94164
+ [...RULE_TEXT],
93909
94165
  [...RULE_BODY_ONLY],
93910
94166
  [...RULE_TEXT],
93911
94167
  ([...RULE_TEXT], [...DEVICE_EVENTS]),
@@ -93923,6 +94179,7 @@ var STATE_SUMMARY_VARS = [
93923
94179
  [...RULE_TEXT],
93924
94180
  [...RULE_TEXT],
93925
94181
  [...RULE_TEXT],
94182
+ [...RULE_TEXT],
93926
94183
  ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
93927
94184
  [...RULE_TEXT],
93928
94185
  [...RULE_TEXT],
@@ -94167,6 +94424,7 @@ new Set([
94167
94424
  "siren",
94168
94425
  "button",
94169
94426
  "doorbell",
94427
+ "appliance-cycle",
94170
94428
  "audio-speech",
94171
94429
  "audio-scream",
94172
94430
  "audio-crying",