@camstack/addon-provider-reolink 1.2.244 → 1.2.246

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.mjs CHANGED
@@ -100690,7 +100690,7 @@ function parseBaichuanWebhookObject(mess) {
100690
100690
  return parsed;
100691
100691
  }
100692
100692
  //#endregion
100693
- //#region ../types/dist/event-category-CY27-fF0.mjs
100693
+ //#region ../types/dist/event-category-7P4A3bYA.mjs
100694
100694
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
100695
100695
  EventCategory["SystemBoot"] = "system.boot";
100696
100696
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -100921,6 +100921,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
100921
100921
  * dropped) — consumers MUST also gate on the device record's `probed` flag.
100922
100922
  */
100923
100923
  EventCategory["DeviceReady"] = "device.ready";
100924
+ /**
100925
+ * An identity link (D1063) became `linked` — auto on strong evidence or
100926
+ * confirmed by the operator — or a confirmed link's evidence came back. Telemetry: the `identity-links` record is the
100927
+ * truth, and core-blocks reconciles its contributions from it as well.
100928
+ * Payload: `IdentityLinkEventPayload`.
100929
+ */
100930
+ EventCategory["IdentityLinkCreated"] = "identity-link.created";
100931
+ /**
100932
+ * A `linked` identity link stopped acting: its evidence is gone (an auto link
100933
+ * is deleted; an operator-confirmed one stays `linked`, flagged
100934
+ * `evidenceGone`, and no longer acts), a side was removed, or the operator
100935
+ * unlinked it. Payload: `IdentityLinkEventPayload` with `reason`.
100936
+ */
100937
+ EventCategory["IdentityLinkLost"] = "identity-link.lost";
100924
100938
  EventCategory["IntegrationEnabled"] = "integration.enabled";
100925
100939
  EventCategory["IntegrationDisabled"] = "integration.disabled";
100926
100940
  EventCategory["IntegrationDeleted"] = "integration.deleted";
@@ -101522,7 +101536,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
101522
101536
  return EventCategory;
101523
101537
  }({});
101524
101538
  //#endregion
101525
- //#region ../types/dist/composed-stable-id-BNTaDZEh.mjs
101539
+ //#region ../types/dist/composed-stable-id-DIeNz933.mjs
101526
101540
  /**
101527
101541
  import { errMsg } from '@camstack/types'
101528
101542
  * Extract a human-readable message from an unknown error value.
@@ -101970,6 +101984,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
101970
101984
  /** A machine that runs workloads or is an appliance with its own OS: a
101971
101985
  * server, a hypervisor, a gateway console, a CCU. */
101972
101986
  DeviceRole["Host"] = "host";
101987
+ /** An uninterruptible power supply: battery charge, mains status and load. A
101988
+ * `DeviceType.Sensor` device. */
101989
+ DeviceRole["Ups"] = "ups";
101973
101990
  return DeviceRole;
101974
101991
  }({});
101975
101992
  /**
@@ -106796,7 +106813,7 @@ var ZodIssueCode = {
106796
106813
  var ZodFirstPartyTypeKind;
106797
106814
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
106798
106815
  //#endregion
106799
- //#region ../types/dist/sleep-BT1bLgPq.mjs
106816
+ //#region ../types/dist/runtime-capabilities-B36VcCR6.mjs
106800
106817
  /**
106801
106818
  * The audio chunk plane's byte format, and the ONE expansion from a coded
106802
106819
  * window to float samples (D455).
@@ -108012,6 +108029,18 @@ function isInstanceEnabled(body) {
108012
108029
  }
108013
108030
  /** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
108014
108031
  var SWITCH_KEY = "enabled";
108032
+ /**
108033
+ * The "Add device" mode an instance gets when its provider states none, from how the provider's
108034
+ * devices are found: `lan` scans, `account` adopts the account's children, anything else is manual.
108035
+ * The one place this default lives.
108036
+ */
108037
+ function defaultAddDeviceMode(description) {
108038
+ switch (description.discovery?.mode) {
108039
+ case "lan": return "scan";
108040
+ case "account": return "children";
108041
+ default: return "none";
108042
+ }
108043
+ }
108015
108044
  /** The keys of the kind's secret fields that sit at the top level of the body. */
108016
108045
  function topLevelSecretKeys(paths) {
108017
108046
  return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
@@ -108114,6 +108143,7 @@ var RecordIntegrationInstances = class {
108114
108143
  enabled: isInstanceEnabled(record.data),
108115
108144
  formValues: shown,
108116
108145
  kind,
108146
+ addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
108117
108147
  ...health?.status !== void 0 ? { status: health.status } : {},
108118
108148
  ...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
108119
108149
  };
@@ -111397,14 +111427,104 @@ var SubscribeAudioChunksInputSchema = object({
111397
111427
  var SubscribeAudioChunksResultSchema = object({
111398
111428
  /** Opaque id passed to `pullAudioChunks` / `unsubscribeAudioChunks`. */
111399
111429
  subscriptionId: string() });
111400
- var BrokerStatsSchema = object({
111401
- status: _enum([
111402
- "idle",
111403
- "connecting",
111404
- "streaming",
111405
- "error",
111406
- "stopped"
111430
+ var BrokerStatusSchema = _enum([
111431
+ "idle",
111432
+ "connecting",
111433
+ "streaming",
111434
+ "error",
111435
+ "stopped"
111436
+ ]);
111437
+ /**
111438
+ * The encode a derived stream's feeder was last spawned with — the read-only
111439
+ * "effective encode". Read off the ffmpeg argv that runs, so it cannot drift
111440
+ * from what the operator's profile and the carrier's rules resolved to.
111441
+ */
111442
+ var DerivedEffectiveEncodeSchema = object({
111443
+ /** `-c:v` of the argv (`libx264`, a hardware encoder, `copy`); null when absent. */
111444
+ encoder: string().nullable(),
111445
+ /** Output frame rate; null when the source cadence passes through unmeasured. */
111446
+ fps: number$1().nullable(),
111447
+ gopFrames: number$1(),
111448
+ /** ABR target (`-b:v`), kbps. */
111449
+ targetKbps: number$1().nullable(),
111450
+ /** Ceiling (`-maxrate`), kbps. */
111451
+ capKbps: number$1().nullable(),
111452
+ bufsizeKbps: number$1().nullable(),
111453
+ /**
111454
+ * `copy` = source audio untouched, `aac` = re-encoded, `profile` = operator's
111455
+ * encode, `none` = the operator dropped the track.
111456
+ */
111457
+ audio: _enum([
111458
+ "copy",
111459
+ "aac",
111460
+ "profile",
111461
+ "none"
111462
+ ])
111463
+ });
111464
+ /**
111465
+ * A derived stream's source: a **profile** slot (follows whatever physical
111466
+ * stream that profile is assigned to) or a **camStream** (pinned to one
111467
+ * physical stream regardless of assignment).
111468
+ */
111469
+ var DerivedSourceRefSchema = union([object({
111470
+ kind: literal("profile"),
111471
+ profile: _enum([
111472
+ "high",
111473
+ "mid",
111474
+ "low"
111475
+ ])
111476
+ }), object({
111477
+ kind: literal("camStream"),
111478
+ camStreamId: string()
111479
+ })]);
111480
+ object({
111481
+ width: number$1().nullable(),
111482
+ height: number$1().nullable(),
111483
+ fps: number$1().nullable(),
111484
+ idrIntervalMs: number$1().nullable(),
111485
+ /** `h264` / `h265` when observed. */
111486
+ videoCodec: _enum(["h264", "h265"]).nullable(),
111487
+ /** Upper-cased SDP name (`AAC`, `PCMU`) when the source has an audio track. */
111488
+ audioCodec: string().nullable()
111489
+ });
111490
+ /**
111491
+ * The full effective encode of a derived-stream profile: the stats the broker
111492
+ * publishes in `getBrokerStats.derivedEncode` plus the resolved geometry, the
111493
+ * flags that say WHY a number differs from the request, and the ffmpeg output
111494
+ * argv. One function (`computeDerivedEncode`) produces it for both the
111495
+ * broker's start path and `previewDerivedEncode`.
111496
+ */
111497
+ var DerivedEncodePreviewSchema = DerivedEffectiveEncodeSchema.extend({
111498
+ /** Final picture size; `null` when neither the profile nor the source names it. */
111499
+ width: number$1().nullable(),
111500
+ height: number$1().nullable(),
111501
+ /** `h264` / `h265` re-encode, `copy` remux; `null` is never returned (the encoder always resolves). */
111502
+ videoCodec: _enum([
111503
+ "h264",
111504
+ "h265",
111505
+ "copy"
111407
111506
  ]),
111507
+ requestedFps: number$1().nullable(),
111508
+ /** The requested fps exceeded the source and the source cadence won. */
111509
+ fpsClampedToSource: boolean(),
111510
+ /** Lowest bitrate accepted for this geometry x fps; `null` when unknown. */
111511
+ floorKbps: number$1().nullable(),
111512
+ /** The explicit bitrate was below the floor and was raised to it. */
111513
+ raisedToFloor: boolean(),
111514
+ /** What the profile asked for when it was raised; `null` otherwise. */
111515
+ requestedKbps: number$1().nullable(),
111516
+ /** Seconds between keyframes; `null` when the output cadence is unknown. */
111517
+ keyframeIntervalSec: number$1().nullable(),
111518
+ /** The ffmpeg argv, with the source loopback URL in `-i`. */
111519
+ args: array(string())
111520
+ });
111521
+ /** Result of `previewDerivedEncode`: a plan, or the reason there is none. */
111522
+ var PreviewDerivedEncodeResultSchema = discriminatedUnion("kind", [object({
111523
+ kind: literal("preview"),
111524
+ preview: DerivedEncodePreviewSchema
111525
+ }), object({ kind: literal("no-source") })]);
111526
+ var BrokerStatsSchema = object({
111527
+ status: BrokerStatusSchema,
111408
111528
  inputFps: number$1(),
111409
111529
  encodedSubscribers: number$1(),
111410
111530
  uptimeMs: number$1(),
@@ -111444,7 +111564,9 @@ var BrokerStatsSchema = object({
111444
111564
  * alone that the mute is on the packet path and not merely persisted.
111445
111565
  */
111446
111566
  audioMuted: boolean().optional(),
111447
- audioMutedDropped: number$1().optional()
111567
+ audioMutedDropped: number$1().optional(),
111568
+ /** Present for a derived broker once its feeder has spawned at least once. */
111569
+ derivedEncode: DerivedEffectiveEncodeSchema.optional()
111448
111570
  });
111449
111571
  /**
111450
111572
  * Exporter-facing "profile restream" entry. Returned by
@@ -111634,6 +111756,10 @@ var CAP_VOCABULARY_BY_NAME = {
111634
111756
  it: "Commuta {device}"
111635
111757
  },
111636
111758
  icon: "toggle-right",
111759
+ sideEffects: [{
111760
+ field: "on",
111761
+ negate: true
111762
+ }],
111637
111763
  offeredWhen: {
111638
111764
  method: "getOptions",
111639
111765
  field: "supportsSetState"
@@ -112748,7 +112874,15 @@ var CAP_VOCABULARY_BY_NAME = {
112748
112874
  effect: {
112749
112875
  field: "state",
112750
112876
  value: "locked"
112751
- }
112877
+ },
112878
+ hold: { effects: [{
112879
+ field: "state",
112880
+ value: "locking",
112881
+ when: {
112882
+ field: "state",
112883
+ notIn: ["locked"]
112884
+ }
112885
+ }] }
112752
112886
  },
112753
112887
  {
112754
112888
  id: "lock.unlock",
@@ -112777,7 +112911,15 @@ var CAP_VOCABULARY_BY_NAME = {
112777
112911
  effect: {
112778
112912
  field: "state",
112779
112913
  value: "unlocked"
112780
- }
112914
+ },
112915
+ hold: { effects: [{
112916
+ field: "state",
112917
+ value: "unlocking",
112918
+ when: {
112919
+ field: "state",
112920
+ notIn: ["unlocked"]
112921
+ }
112922
+ }] }
112781
112923
  },
112782
112924
  {
112783
112925
  id: "lock.open",
@@ -113091,6 +113233,14 @@ var CAP_VOCABULARY_BY_NAME = {
113091
113233
  step: .5,
113092
113234
  unit: "°C"
113093
113235
  }
113236
+ }],
113237
+ effect: {
113238
+ field: "targetLow",
113239
+ fromArg: "targetLow"
113240
+ },
113241
+ sideEffects: [{
113242
+ field: "targetHigh",
113243
+ fromArg: "targetHigh"
113094
113244
  }]
113095
113245
  },
113096
113246
  {
@@ -113147,7 +113297,11 @@ var CAP_VOCABULARY_BY_NAME = {
113147
113297
  from: "status",
113148
113298
  field: "availableFanModes"
113149
113299
  }
113150
- }]
113300
+ }],
113301
+ effect: {
113302
+ field: "fanMode",
113303
+ fromArg: "fanMode"
113304
+ }
113151
113305
  },
113152
113306
  {
113153
113307
  id: "climate.preset",
@@ -113172,7 +113326,11 @@ var CAP_VOCABULARY_BY_NAME = {
113172
113326
  from: "status",
113173
113327
  field: "availablePresets"
113174
113328
  }
113175
- }]
113329
+ }],
113330
+ effect: {
113331
+ field: "preset",
113332
+ fromArg: "preset"
113333
+ }
113176
113334
  },
113177
113335
  {
113178
113336
  id: "climate.swingVerticalOn",
@@ -113405,7 +113563,15 @@ var CAP_VOCABULARY_BY_NAME = {
113405
113563
  effect: {
113406
113564
  field: "speed",
113407
113565
  value: 100
113408
- }
113566
+ },
113567
+ sideEffects: [{
113568
+ field: "preset",
113569
+ value: "",
113570
+ when: {
113571
+ field: "preset",
113572
+ notIn: [""]
113573
+ }
113574
+ }]
113409
113575
  },
113410
113576
  {
113411
113577
  id: "fan.speed",
@@ -113436,7 +113602,15 @@ var CAP_VOCABULARY_BY_NAME = {
113436
113602
  effect: {
113437
113603
  field: "speed",
113438
113604
  fromArg: "speed"
113439
- }
113605
+ },
113606
+ sideEffects: [{
113607
+ field: "preset",
113608
+ value: "",
113609
+ when: {
113610
+ field: "preset",
113611
+ notIn: [""]
113612
+ }
113613
+ }]
113440
113614
  },
113441
113615
  {
113442
113616
  id: "fan.preset",
@@ -113461,7 +113635,11 @@ var CAP_VOCABULARY_BY_NAME = {
113461
113635
  from: "status",
113462
113636
  field: "availablePresets"
113463
113637
  }
113464
- }]
113638
+ }],
113639
+ effect: {
113640
+ field: "preset",
113641
+ fromArg: "preset"
113642
+ }
113465
113643
  },
113466
113644
  {
113467
113645
  id: "fan.forward",
@@ -114006,7 +114184,15 @@ var CAP_VOCABULARY_BY_NAME = {
114006
114184
  effect: {
114007
114185
  field: "state",
114008
114186
  value: "disarmed"
114009
- }
114187
+ },
114188
+ hold: { effects: [{
114189
+ field: "state",
114190
+ value: "disarming",
114191
+ when: {
114192
+ field: "state",
114193
+ notIn: ["disarmed"]
114194
+ }
114195
+ }] }
114010
114196
  },
114011
114197
  {
114012
114198
  id: "alarm.arm.home",
@@ -114036,7 +114222,15 @@ var CAP_VOCABULARY_BY_NAME = {
114036
114222
  effect: {
114037
114223
  field: "state",
114038
114224
  value: "armed_home"
114039
- }
114225
+ },
114226
+ hold: { effects: [{
114227
+ field: "state",
114228
+ value: "arming",
114229
+ when: {
114230
+ field: "state",
114231
+ notIn: ["armed_home"]
114232
+ }
114233
+ }] }
114040
114234
  },
114041
114235
  {
114042
114236
  id: "alarm.arm.away",
@@ -114066,7 +114260,15 @@ var CAP_VOCABULARY_BY_NAME = {
114066
114260
  effect: {
114067
114261
  field: "state",
114068
114262
  value: "armed_away"
114069
- }
114263
+ },
114264
+ hold: { effects: [{
114265
+ field: "state",
114266
+ value: "arming",
114267
+ when: {
114268
+ field: "state",
114269
+ notIn: ["armed_away"]
114270
+ }
114271
+ }] }
114070
114272
  },
114071
114273
  {
114072
114274
  id: "alarm.arm.night",
@@ -114096,7 +114298,15 @@ var CAP_VOCABULARY_BY_NAME = {
114096
114298
  effect: {
114097
114299
  field: "state",
114098
114300
  value: "armed_night"
114099
- }
114301
+ },
114302
+ hold: { effects: [{
114303
+ field: "state",
114304
+ value: "arming",
114305
+ when: {
114306
+ field: "state",
114307
+ notIn: ["armed_night"]
114308
+ }
114309
+ }] }
114100
114310
  },
114101
114311
  {
114102
114312
  id: "alarm.arm.vacation",
@@ -114126,7 +114336,15 @@ var CAP_VOCABULARY_BY_NAME = {
114126
114336
  effect: {
114127
114337
  field: "state",
114128
114338
  value: "armed_vacation"
114129
- }
114339
+ },
114340
+ hold: { effects: [{
114341
+ field: "state",
114342
+ value: "arming",
114343
+ when: {
114344
+ field: "state",
114345
+ notIn: ["armed_vacation"]
114346
+ }
114347
+ }] }
114130
114348
  },
114131
114349
  {
114132
114350
  id: "alarm.arm.custom_bypass",
@@ -114156,7 +114374,15 @@ var CAP_VOCABULARY_BY_NAME = {
114156
114374
  effect: {
114157
114375
  field: "state",
114158
114376
  value: "armed_custom_bypass"
114159
- }
114377
+ },
114378
+ hold: { effects: [{
114379
+ field: "state",
114380
+ value: "arming",
114381
+ when: {
114382
+ field: "state",
114383
+ notIn: ["armed_custom_bypass"]
114384
+ }
114385
+ }] }
114160
114386
  }
114161
114387
  ],
114162
114388
  state: [{
@@ -115298,7 +115524,14 @@ var CAP_VOCABULARY_BY_NAME = {
115298
115524
  quantity: "mass"
115299
115525
  },
115300
115526
  optional: true
115301
- }]
115527
+ }],
115528
+ hold: {
115529
+ effects: [{
115530
+ field: "feeding",
115531
+ value: true
115532
+ }],
115533
+ holdMs: 1e4
115534
+ }
115302
115535
  },
115303
115536
  {
115304
115537
  id: "petFeeder.feedHoppers",
@@ -115342,7 +115575,14 @@ var CAP_VOCABULARY_BY_NAME = {
115342
115575
  quantity: "mass"
115343
115576
  },
115344
115577
  optional: true
115345
- }]
115578
+ }],
115579
+ hold: {
115580
+ effects: [{
115581
+ field: "feeding",
115582
+ value: true
115583
+ }],
115584
+ holdMs: 1e4
115585
+ }
115346
115586
  },
115347
115587
  {
115348
115588
  id: "petFeeder.cancelFeed",
@@ -115433,7 +115673,11 @@ var CAP_VOCABULARY_BY_NAME = {
115433
115673
  it: "Attiva il blocco bambini di {device}"
115434
115674
  },
115435
115675
  icon: "lock",
115436
- args: { on: true }
115676
+ args: { on: true },
115677
+ effect: {
115678
+ field: "childLock",
115679
+ value: true
115680
+ }
115437
115681
  },
115438
115682
  {
115439
115683
  id: "petFeeder.childLockOff",
@@ -115447,7 +115691,11 @@ var CAP_VOCABULARY_BY_NAME = {
115447
115691
  it: "Disattiva il blocco bambini di {device}"
115448
115692
  },
115449
115693
  icon: "lock-open",
115450
- args: { on: false }
115694
+ args: { on: false },
115695
+ effect: {
115696
+ field: "childLock",
115697
+ value: false
115698
+ }
115451
115699
  },
115452
115700
  {
115453
115701
  id: "petFeeder.lightOn",
@@ -115461,7 +115709,11 @@ var CAP_VOCABULARY_BY_NAME = {
115461
115709
  it: "Accendi la spia di {device}"
115462
115710
  },
115463
115711
  icon: "lightbulb",
115464
- args: { on: true }
115712
+ args: { on: true },
115713
+ effect: {
115714
+ field: "indicatorLight",
115715
+ value: true
115716
+ }
115465
115717
  },
115466
115718
  {
115467
115719
  id: "petFeeder.lightOff",
@@ -115475,7 +115727,11 @@ var CAP_VOCABULARY_BY_NAME = {
115475
115727
  it: "Spegni la spia di {device}"
115476
115728
  },
115477
115729
  icon: "lightbulb-off",
115478
- args: { on: false }
115730
+ args: { on: false },
115731
+ effect: {
115732
+ field: "indicatorLight",
115733
+ value: false
115734
+ }
115479
115735
  },
115480
115736
  {
115481
115737
  id: "petFeeder.feedSoundOn",
@@ -115489,7 +115745,11 @@ var CAP_VOCABULARY_BY_NAME = {
115489
115745
  it: "Attiva il suono di erogazione di {device}"
115490
115746
  },
115491
115747
  icon: "volume-2",
115492
- args: { on: true }
115748
+ args: { on: true },
115749
+ effect: {
115750
+ field: "feedSound",
115751
+ value: true
115752
+ }
115493
115753
  },
115494
115754
  {
115495
115755
  id: "petFeeder.feedSoundOff",
@@ -115503,7 +115763,11 @@ var CAP_VOCABULARY_BY_NAME = {
115503
115763
  it: "Disattiva il suono di erogazione di {device}"
115504
115764
  },
115505
115765
  icon: "volume-x",
115506
- args: { on: false }
115766
+ args: { on: false },
115767
+ effect: {
115768
+ field: "feedSound",
115769
+ value: false
115770
+ }
115507
115771
  },
115508
115772
  {
115509
115773
  id: "petFeeder.volume",
@@ -115528,7 +115792,11 @@ var CAP_VOCABULARY_BY_NAME = {
115528
115792
  min: 0,
115529
115793
  step: 1
115530
115794
  }
115531
- }]
115795
+ }],
115796
+ effect: {
115797
+ field: "volume",
115798
+ fromArg: "level"
115799
+ }
115532
115800
  }
115533
115801
  ],
115534
115802
  state: [
@@ -115600,7 +115868,11 @@ var CAP_VOCABULARY_BY_NAME = {
115600
115868
  it: "Avvia la pompa di {device}"
115601
115869
  },
115602
115870
  icon: "play",
115603
- args: { on: true }
115871
+ args: { on: true },
115872
+ effect: {
115873
+ field: "pumpRunning",
115874
+ value: true
115875
+ }
115604
115876
  }, {
115605
115877
  id: "petFountain.pumpOff",
115606
115878
  method: "setPump",
@@ -115613,7 +115885,11 @@ var CAP_VOCABULARY_BY_NAME = {
115613
115885
  it: "Ferma la pompa di {device}"
115614
115886
  },
115615
115887
  icon: "square",
115616
- args: { on: false }
115888
+ args: { on: false },
115889
+ effect: {
115890
+ field: "pumpRunning",
115891
+ value: false
115892
+ }
115617
115893
  }],
115618
115894
  state: [{
115619
115895
  kind: "boolean",
@@ -115665,7 +115941,11 @@ var CAP_VOCABULARY_BY_NAME = {
115665
115941
  it: "Fai lavorare la pompa di {device} a ciclo acceso/spento"
115666
115942
  },
115667
115943
  icon: "timer",
115668
- args: { on: true }
115944
+ args: { on: true },
115945
+ effect: {
115946
+ field: "enabled",
115947
+ value: true
115948
+ }
115669
115949
  },
115670
115950
  {
115671
115951
  id: "pumpCycle.off",
@@ -115679,7 +115959,11 @@ var CAP_VOCABULARY_BY_NAME = {
115679
115959
  it: "Fai lavorare la pompa di {device} in continuo"
115680
115960
  },
115681
115961
  icon: "timer-off",
115682
- args: { on: false }
115962
+ args: { on: false },
115963
+ effect: {
115964
+ field: "enabled",
115965
+ value: false
115966
+ }
115683
115967
  },
115684
115968
  {
115685
115969
  id: "pumpCycle.onMinutes",
@@ -115705,7 +115989,12 @@ var CAP_VOCABULARY_BY_NAME = {
115705
115989
  step: 1,
115706
115990
  unit: "min"
115707
115991
  }
115708
- }]
115992
+ }],
115993
+ effect: {
115994
+ field: "onTime",
115995
+ fromArg: "minutes",
115996
+ scale: 60
115997
+ }
115709
115998
  },
115710
115999
  {
115711
116000
  id: "pumpCycle.offMinutes",
@@ -115731,7 +116020,12 @@ var CAP_VOCABULARY_BY_NAME = {
115731
116020
  step: 1,
115732
116021
  unit: "min"
115733
116022
  }
115734
- }]
116023
+ }],
116024
+ effect: {
116025
+ field: "offTime",
116026
+ fromArg: "minutes",
116027
+ scale: 60
116028
+ }
115735
116029
  }
115736
116030
  ],
115737
116031
  state: [{
@@ -115848,7 +116142,11 @@ var CAP_VOCABULARY_BY_NAME = {
115848
116142
  en: "Play on {device}",
115849
116143
  it: "Avvia la riproduzione su {device}"
115850
116144
  },
115851
- icon: "play"
116145
+ icon: "play",
116146
+ effect: {
116147
+ field: "state",
116148
+ value: "playing"
116149
+ }
115852
116150
  },
115853
116151
  {
115854
116152
  id: "media.pause",
@@ -115861,7 +116159,11 @@ var CAP_VOCABULARY_BY_NAME = {
115861
116159
  en: "Pause {device}",
115862
116160
  it: "Metti in pausa {device}"
115863
116161
  },
115864
- icon: "pause"
116162
+ icon: "pause",
116163
+ effect: {
116164
+ field: "state",
116165
+ value: "paused"
116166
+ }
115865
116167
  },
115866
116168
  {
115867
116169
  id: "media.stop",
@@ -115927,7 +116229,11 @@ var CAP_VOCABULARY_BY_NAME = {
115927
116229
  step: 1,
115928
116230
  unit: "%"
115929
116231
  }
115930
- }]
116232
+ }],
116233
+ effect: {
116234
+ field: "volumeLevel",
116235
+ fromArg: "volumeLevel"
116236
+ }
115931
116237
  },
115932
116238
  {
115933
116239
  id: "media.mute",
@@ -115941,7 +116247,11 @@ var CAP_VOCABULARY_BY_NAME = {
115941
116247
  it: "Silenzia {device}"
115942
116248
  },
115943
116249
  icon: "volume-x",
115944
- args: { muted: true }
116250
+ args: { muted: true },
116251
+ effect: {
116252
+ field: "isMuted",
116253
+ value: true
116254
+ }
115945
116255
  },
115946
116256
  {
115947
116257
  id: "media.unmute",
@@ -115955,7 +116265,11 @@ var CAP_VOCABULARY_BY_NAME = {
115955
116265
  it: "Riattiva l’audio di {device}"
115956
116266
  },
115957
116267
  icon: "volume-2",
115958
- args: { muted: false }
116268
+ args: { muted: false },
116269
+ effect: {
116270
+ field: "isMuted",
116271
+ value: false
116272
+ }
115959
116273
  },
115960
116274
  {
115961
116275
  id: "media.shuffleOn",
@@ -115969,7 +116283,11 @@ var CAP_VOCABULARY_BY_NAME = {
115969
116283
  it: "Attiva la riproduzione casuale su {device}"
115970
116284
  },
115971
116285
  icon: "shuffle",
115972
- args: { shuffle: true }
116286
+ args: { shuffle: true },
116287
+ effect: {
116288
+ field: "shuffle",
116289
+ value: true
116290
+ }
115973
116291
  },
115974
116292
  {
115975
116293
  id: "media.shuffleOff",
@@ -115983,7 +116301,11 @@ var CAP_VOCABULARY_BY_NAME = {
115983
116301
  it: "Disattiva la riproduzione casuale su {device}"
115984
116302
  },
115985
116303
  icon: "shuffle",
115986
- args: { shuffle: false }
116304
+ args: { shuffle: false },
116305
+ effect: {
116306
+ field: "shuffle",
116307
+ value: false
116308
+ }
115987
116309
  },
115988
116310
  {
115989
116311
  id: "media.repeat",
@@ -116029,7 +116351,11 @@ var CAP_VOCABULARY_BY_NAME = {
116029
116351
  }
116030
116352
  ]
116031
116353
  }
116032
- }]
116354
+ }],
116355
+ effect: {
116356
+ field: "repeat",
116357
+ fromArg: "repeat"
116358
+ }
116033
116359
  },
116034
116360
  {
116035
116361
  id: "media.source",
@@ -116054,7 +116380,11 @@ var CAP_VOCABULARY_BY_NAME = {
116054
116380
  from: "status",
116055
116381
  field: "availableSources"
116056
116382
  }
116057
- }]
116383
+ }],
116384
+ effect: {
116385
+ field: "source",
116386
+ fromArg: "source"
116387
+ }
116058
116388
  },
116059
116389
  {
116060
116390
  id: "media.seek",
@@ -116594,7 +116924,14 @@ var CAP_VOCABULARY_BY_NAME = {
116594
116924
  en: "Run {device}",
116595
116925
  it: "Esegui {device}"
116596
116926
  },
116597
- icon: "scroll-text"
116927
+ icon: "scroll-text",
116928
+ hold: {
116929
+ effects: [{
116930
+ field: "isRunning",
116931
+ value: true
116932
+ }],
116933
+ holdMs: 1e4
116934
+ }
116598
116935
  }, {
116599
116936
  id: "script.stop",
116600
116937
  method: "stop",
@@ -116606,7 +116943,11 @@ var CAP_VOCABULARY_BY_NAME = {
116606
116943
  en: "Stop {device}",
116607
116944
  it: "Ferma {device}"
116608
116945
  },
116609
- icon: "square"
116946
+ icon: "square",
116947
+ effect: {
116948
+ field: "isRunning",
116949
+ value: false
116950
+ }
116610
116951
  }],
116611
116952
  state: [{
116612
116953
  kind: "boolean",
@@ -116644,7 +116985,11 @@ var CAP_VOCABULARY_BY_NAME = {
116644
116985
  en: "Enable {device}",
116645
116986
  it: "Abilita {device}"
116646
116987
  },
116647
- icon: "toggle-right"
116988
+ icon: "toggle-right",
116989
+ effect: {
116990
+ field: "enabled",
116991
+ value: true
116992
+ }
116648
116993
  },
116649
116994
  {
116650
116995
  id: "haAutomation.disable",
@@ -116657,7 +117002,11 @@ var CAP_VOCABULARY_BY_NAME = {
116657
117002
  en: "Disable {device}",
116658
117003
  it: "Disabilita {device}"
116659
117004
  },
116660
- icon: "toggle-left"
117005
+ icon: "toggle-left",
117006
+ effect: {
117007
+ field: "enabled",
117008
+ value: false
117009
+ }
116661
117010
  },
116662
117011
  {
116663
117012
  id: "haAutomation.trigger",
@@ -118259,6 +118608,17 @@ var CAP_VOCABULARY_BY_NAME = {
118259
118608
  },
118260
118609
  notOperatorFacing: { resync: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action" }
118261
118610
  },
118611
+ "device-state-refresh": {
118612
+ scope: "device",
118613
+ noun: {
118614
+ en: "State refresh",
118615
+ it: "Aggiornamento dello stato"
118616
+ },
118617
+ notOperatorFacing: {
118618
+ refresh: "the core schedules state refreshes itself; an operator never asks for one",
118619
+ resubscribe: "the core schedules state refreshes itself; an operator never asks for one"
118620
+ }
118621
+ },
118262
118622
  "recording": {
118263
118623
  scope: "device",
118264
118624
  noun: {
@@ -121247,6 +121607,7 @@ var CAP_NAMES = Object.freeze([
121247
121607
  "device-removal-hook",
121248
121608
  "device-runs",
121249
121609
  "device-state",
121610
+ "device-state-refresh",
121250
121611
  "device-status",
121251
121612
  "device-transitions",
121252
121613
  "dishwasher",
@@ -122887,6 +123248,10 @@ Object.freeze({
122887
123248
  "path": "power",
122888
123249
  "valueType": "number"
122889
123250
  },
123251
+ {
123252
+ "path": "deliveredPower",
123253
+ "valueType": "number"
123254
+ },
122890
123255
  {
122891
123256
  "path": "energy",
122892
123257
  "valueType": "number"
@@ -123729,7 +124094,7 @@ function sleep(ms) {
123729
124094
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
123730
124095
  }
123731
124096
  //#endregion
123732
- //#region ../types/dist/implemented-methods-k3KProJd.mjs
124097
+ //#region ../types/dist/implemented-methods-BUBqZ2a0.mjs
123733
124098
  /**
123734
124099
  * The ffmpeg build every CamStack node downloads, per platform and arch.
123735
124100
  *
@@ -124889,6 +125254,8 @@ var CompositionItemEntrySchema = object({
124889
125254
  */
124890
125255
  reset: CompositionForwardCommandSchema.optional()
124891
125256
  });
125257
+ /** Which identity link added a feature (D1063). */
125258
+ var CompositionContributedBySchema = object({ linkId: string().min(1) });
124892
125259
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
124893
125260
  kind: literal("fields"),
124894
125261
  cap: string().min(1),
@@ -124900,7 +125267,14 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
124900
125267
  */
124901
125268
  items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
124902
125269
  /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
124903
- commands: record(string().min(1), CompositionCommandTargetSchema).optional()
125270
+ commands: record(string().min(1), CompositionCommandTargetSchema).optional(),
125271
+ /**
125272
+ * Provenance only (D1063): the identity link that added this feature. The
125273
+ * source ref stays in `fields`; `enabled` stays the operator's switch. An
125274
+ * operator edit of the source drops the stamp and the feature becomes the
125275
+ * operator's; a lost link removes only stamped features.
125276
+ */
125277
+ contributedBy: CompositionContributedBySchema.optional()
124904
125278
  }), object({
124905
125279
  kind: literal("passthrough"),
124906
125280
  cap: string().min(1),
@@ -126345,10 +126719,16 @@ looseObject({
126345
126719
  TargetSchema.omit({ id: true });
126346
126720
  var EncodeProfileSchema = object({
126347
126721
  video: object({
126722
+ /**
126723
+ * `h264` / `h265` re-encode into that codec; `source` re-encodes in whatever
126724
+ * codec the source speaks (a resize that keeps the codec); `copy` remuxes
126725
+ * with no encode at all (so no resize either).
126726
+ */
126348
126727
  codec: _enum([
126349
126728
  "h264",
126350
126729
  "h265",
126351
- "copy"
126730
+ "copy",
126731
+ "source"
126352
126732
  ]),
126353
126733
  profile: _enum([
126354
126734
  "baseline",
@@ -126400,12 +126780,14 @@ var EncodeProfileSchema = object({
126400
126780
  singleSlicePerFrame: boolean().optional()
126401
126781
  }),
126402
126782
  audio: union([literal("passthrough"), object({
126783
+ /** `none` drops the audio track (`-an`); `copy` carries the source's. */
126403
126784
  codec: _enum([
126404
126785
  "opus",
126405
126786
  "aac",
126406
126787
  "pcmu",
126407
126788
  "pcma",
126408
- "copy"
126789
+ "copy",
126790
+ "none"
126409
126791
  ]),
126410
126792
  bitrateKbps: number$1().int().positive().optional(),
126411
126793
  sampleRateHz: number$1().int().positive().optional(),
@@ -127589,7 +127971,7 @@ function ordinalOf(id) {
127589
127971
  function defaultIntegrationOf(integrations, eligible) {
127590
127972
  return [...eligible === void 0 ? integrations : integrations.filter(eligible)].sort((a, b) => ordinalOf(a.id) - ordinalOf(b.id) || (a.id < b.id ? -1 : 1))[0] ?? null;
127591
127973
  }
127592
- function unstamped(device) {
127974
+ function unstamped$1(device) {
127593
127975
  return device.integrationId === void 0 || device.integrationId === null || device.integrationId === "";
127594
127976
  }
127595
127977
  /**
@@ -127606,8 +127988,8 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
127606
127988
  const all = await ports.listDevices(spec.addonId);
127607
127989
  const byId = new Map(all.map((d) => [d.id, d]));
127608
127990
  const reservations = /* @__PURE__ */ new Set();
127609
- for (const device of all) if (unstamped(device) && await isReservation(ports, device)) reservations.add(device.id);
127610
- const orphans = all.filter((d) => unstamped(d) && !reservations.has(d.id));
127991
+ for (const device of all) if (unstamped$1(device) && await isReservation(ports, device)) reservations.add(device.id);
127992
+ const orphans = all.filter((d) => unstamped$1(d) && !reservations.has(d.id));
127611
127993
  const summaryBase = { reservations: reservations.size };
127612
127994
  if (orphans.length === 0) return {
127613
127995
  outcome: "already-done",
@@ -127622,7 +128004,7 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
127622
128004
  const unresolved = /* @__PURE__ */ new Set();
127623
128005
  const failed = /* @__PURE__ */ new Set();
127624
128006
  const resolve = (device, seen) => {
127625
- if (!unstamped(device)) return device.integrationId ?? null;
128007
+ if (!unstamped$1(device)) return device.integrationId ?? null;
127626
128008
  const planned = plan.get(device.id);
127627
128009
  if (planned !== void 0) return planned;
127628
128010
  if (failed.has(device.id)) return null;
@@ -154814,6 +155196,14 @@ var alarmPanelCapability = {
154814
155196
  field: "state",
154815
155197
  value: "disarmed"
154816
155198
  },
155199
+ hold: { effects: [{
155200
+ field: "state",
155201
+ value: "disarming",
155202
+ when: {
155203
+ field: "state",
155204
+ notIn: ["disarmed"]
155205
+ }
155206
+ }] },
154817
155207
  openArgs: [{
154818
155208
  key: "code",
154819
155209
  label: t("PIN code", "Codice PIN"),
@@ -154844,6 +155234,14 @@ var alarmPanelCapability = {
154844
155234
  field: "state",
154845
155235
  value: "armed_home"
154846
155236
  },
155237
+ hold: { effects: [{
155238
+ field: "state",
155239
+ value: "arming",
155240
+ when: {
155241
+ field: "state",
155242
+ notIn: ["armed_home"]
155243
+ }
155244
+ }] },
154847
155245
  args: { mode: "home" },
154848
155246
  openArgs: [{
154849
155247
  key: "code",
@@ -154864,6 +155262,14 @@ var alarmPanelCapability = {
154864
155262
  field: "state",
154865
155263
  value: "armed_away"
154866
155264
  },
155265
+ hold: { effects: [{
155266
+ field: "state",
155267
+ value: "arming",
155268
+ when: {
155269
+ field: "state",
155270
+ notIn: ["armed_away"]
155271
+ }
155272
+ }] },
154867
155273
  args: { mode: "away" },
154868
155274
  openArgs: [{
154869
155275
  key: "code",
@@ -154884,6 +155290,14 @@ var alarmPanelCapability = {
154884
155290
  field: "state",
154885
155291
  value: "armed_night"
154886
155292
  },
155293
+ hold: { effects: [{
155294
+ field: "state",
155295
+ value: "arming",
155296
+ when: {
155297
+ field: "state",
155298
+ notIn: ["armed_night"]
155299
+ }
155300
+ }] },
154887
155301
  args: { mode: "night" },
154888
155302
  openArgs: [{
154889
155303
  key: "code",
@@ -154904,6 +155318,14 @@ var alarmPanelCapability = {
154904
155318
  field: "state",
154905
155319
  value: "armed_vacation"
154906
155320
  },
155321
+ hold: { effects: [{
155322
+ field: "state",
155323
+ value: "arming",
155324
+ when: {
155325
+ field: "state",
155326
+ notIn: ["armed_vacation"]
155327
+ }
155328
+ }] },
154907
155329
  args: { mode: "vacation" },
154908
155330
  openArgs: [{
154909
155331
  key: "code",
@@ -154924,6 +155346,14 @@ var alarmPanelCapability = {
154924
155346
  field: "state",
154925
155347
  value: "armed_custom_bypass"
154926
155348
  },
155349
+ hold: { effects: [{
155350
+ field: "state",
155351
+ value: "arming",
155352
+ when: {
155353
+ field: "state",
155354
+ notIn: ["armed_custom_bypass"]
155355
+ }
155356
+ }] },
154927
155357
  args: { mode: "custom_bypass" },
154928
155358
  openArgs: [{
154929
155359
  key: "code",
@@ -155607,6 +156037,10 @@ var automationControlCapability = {
155607
156037
  auth: "admin",
155608
156038
  actions: [{
155609
156039
  id: "haAutomation.enable",
156040
+ effect: {
156041
+ field: "enabled",
156042
+ value: true
156043
+ },
155610
156044
  label: t("Enable automation", "Abilita l’automazione"),
155611
156045
  phrase: t("Enable {device}", "Abilita {device}"),
155612
156046
  icon: "toggle-right"
@@ -155617,6 +156051,10 @@ var automationControlCapability = {
155617
156051
  auth: "admin",
155618
156052
  actions: [{
155619
156053
  id: "haAutomation.disable",
156054
+ effect: {
156055
+ field: "enabled",
156056
+ value: false
156057
+ },
155620
156058
  label: t("Disable automation", "Disabilita l’automazione"),
155621
156059
  phrase: t("Disable {device}", "Disabilita {device}"),
155622
156060
  icon: "toggle-left"
@@ -157695,7 +158133,11 @@ method(object({
157695
158133
  }).nullable(), {
157696
158134
  kind: "mutation",
157697
158135
  auth: "admin"
157698
- }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
158136
+ }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({
158137
+ deviceId: number$1().int().nonnegative(),
158138
+ profile: EncodeProfileSchema,
158139
+ source: DerivedSourceRefSchema.optional()
158140
+ }), PreviewDerivedEncodeResultSchema), method(object({ brokerId: string() }), object({
157699
158141
  probed: boolean(),
157700
158142
  summary: string()
157701
158143
  }), {
@@ -158427,6 +158869,14 @@ var climateControlCapability = {
158427
158869
  label: t("Set temperature range", "Imposta l’intervallo di temperatura"),
158428
158870
  phrase: t("Keep {device} between {targetLow} and {targetHigh}", "Mantieni {device} tra {targetLow} e {targetHigh}"),
158429
158871
  icon: "thermometer",
158872
+ effect: {
158873
+ field: "targetLow",
158874
+ fromArg: "targetLow"
158875
+ },
158876
+ sideEffects: [{
158877
+ field: "targetHigh",
158878
+ fromArg: "targetHigh"
158879
+ }],
158430
158880
  openArgs: [{
158431
158881
  key: "targetLow",
158432
158882
  label: t("Lowest", "Minima"),
@@ -158485,6 +158935,10 @@ var climateControlCapability = {
158485
158935
  label: t("Set fan mode", "Imposta la ventilazione"),
158486
158936
  phrase: t("Set the fan of {device} to {fanMode}", "Imposta la ventilazione di {device} su {fanMode}"),
158487
158937
  icon: "fan",
158938
+ effect: {
158939
+ field: "fanMode",
158940
+ fromArg: "fanMode"
158941
+ },
158488
158942
  openArgs: [{
158489
158943
  key: "fanMode",
158490
158944
  label: t("Fan mode", "Ventilazione"),
@@ -158507,6 +158961,10 @@ var climateControlCapability = {
158507
158961
  label: t("Set preset", "Imposta il preset"),
158508
158962
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
158509
158963
  icon: "list",
158964
+ effect: {
158965
+ field: "preset",
158966
+ fromArg: "preset"
158967
+ },
158510
158968
  openArgs: [{
158511
158969
  key: "preset",
158512
158970
  label: t("Preset", "Preset"),
@@ -159094,7 +159552,8 @@ var CompositionProblemSchema = object({
159094
159552
  "command-source-unknown",
159095
159553
  "command-input-unknown",
159096
159554
  "command-input-missing",
159097
- "power-source-is-actuator"
159555
+ "power-source-is-actuator",
159556
+ "link-contribution-removed"
159098
159557
  ]),
159099
159558
  path: string(),
159100
159559
  message: string()
@@ -160521,6 +160980,10 @@ var mediaPlayerCapability = {
160521
160980
  auth: "protected",
160522
160981
  actions: [{
160523
160982
  id: "media.play",
160983
+ effect: {
160984
+ field: "state",
160985
+ value: "playing"
160986
+ },
160524
160987
  label: t("Play", "Riproduci"),
160525
160988
  phrase: t("Play on {device}", "Avvia la riproduzione su {device}"),
160526
160989
  icon: "play"
@@ -160531,6 +160994,10 @@ var mediaPlayerCapability = {
160531
160994
  auth: "protected",
160532
160995
  actions: [{
160533
160996
  id: "media.pause",
160997
+ effect: {
160998
+ field: "state",
160999
+ value: "paused"
161000
+ },
160534
161001
  label: t("Pause media", "Metti in pausa"),
160535
161002
  phrase: t("Pause {device}", "Metti in pausa {device}"),
160536
161003
  icon: "pause"
@@ -160574,6 +161041,10 @@ var mediaPlayerCapability = {
160574
161041
  auth: "protected",
160575
161042
  actions: [{
160576
161043
  id: "media.volume",
161044
+ effect: {
161045
+ field: "volumeLevel",
161046
+ fromArg: "volumeLevel"
161047
+ },
160577
161048
  label: t("Set volume", "Imposta il volume"),
160578
161049
  phrase: t("Set the volume of {device} to {volumeLevel}", "Imposta il volume di {device} al {volumeLevel}"),
160579
161050
  icon: "volume-2",
@@ -160598,12 +161069,20 @@ var mediaPlayerCapability = {
160598
161069
  auth: "protected",
160599
161070
  actions: [{
160600
161071
  id: "media.mute",
161072
+ effect: {
161073
+ field: "isMuted",
161074
+ value: true
161075
+ },
160601
161076
  label: t("Mute", "Silenzia"),
160602
161077
  phrase: t("Mute {device}", "Silenzia {device}"),
160603
161078
  icon: "volume-x",
160604
161079
  args: { muted: true }
160605
161080
  }, {
160606
161081
  id: "media.unmute",
161082
+ effect: {
161083
+ field: "isMuted",
161084
+ value: false
161085
+ },
160607
161086
  label: t("Unmute", "Riattiva l’audio"),
160608
161087
  phrase: t("Unmute {device}", "Riattiva l’audio di {device}"),
160609
161088
  icon: "volume-2",
@@ -160618,12 +161097,20 @@ var mediaPlayerCapability = {
160618
161097
  auth: "protected",
160619
161098
  actions: [{
160620
161099
  id: "media.shuffleOn",
161100
+ effect: {
161101
+ field: "shuffle",
161102
+ value: true
161103
+ },
160621
161104
  label: t("Shuffle on", "Riproduzione casuale attiva"),
160622
161105
  phrase: t("Turn on shuffle on {device}", "Attiva la riproduzione casuale su {device}"),
160623
161106
  icon: "shuffle",
160624
161107
  args: { shuffle: true }
160625
161108
  }, {
160626
161109
  id: "media.shuffleOff",
161110
+ effect: {
161111
+ field: "shuffle",
161112
+ value: false
161113
+ },
160627
161114
  label: t("Shuffle off", "Riproduzione casuale spenta"),
160628
161115
  phrase: t("Turn off shuffle on {device}", "Disattiva la riproduzione casuale su {device}"),
160629
161116
  icon: "shuffle",
@@ -160638,6 +161125,10 @@ var mediaPlayerCapability = {
160638
161125
  auth: "protected",
160639
161126
  actions: [{
160640
161127
  id: "media.repeat",
161128
+ effect: {
161129
+ field: "repeat",
161130
+ fromArg: "repeat"
161131
+ },
160641
161132
  label: t("Set repeat", "Imposta la ripetizione"),
160642
161133
  phrase: t("Set repeat on {device} to {repeat}", "Imposta la ripetizione di {device} su {repeat}"),
160643
161134
  icon: "repeat",
@@ -160672,6 +161163,10 @@ var mediaPlayerCapability = {
160672
161163
  auth: "protected",
160673
161164
  actions: [{
160674
161165
  id: "media.source",
161166
+ effect: {
161167
+ field: "source",
161168
+ fromArg: "source"
161169
+ },
160675
161170
  label: t("Select source", "Scegli la sorgente"),
160676
161171
  phrase: t("Switch {device} to {source}", "Passa {device} alla sorgente {source}"),
160677
161172
  icon: "cast",
@@ -160840,7 +161335,7 @@ var mediaPlayerCapability = {
160840
161335
  ]
160841
161336
  }
160842
161337
  };
160843
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation;
161338
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Workload, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation;
160844
161339
  var NUMBER = {
160845
161340
  kind: "fixed",
160846
161341
  result: ["number"]
@@ -161332,7 +161827,9 @@ var PowerSourceRefusalReasonSchema = _enum([
161332
161827
  "switch-call-failed",
161333
161828
  "switch-options-unreadable",
161334
161829
  "not-settable",
161335
- "switch-is-actuator"
161830
+ "switch-is-actuator",
161831
+ "link-lost",
161832
+ "link-unknown"
161336
161833
  ]);
161337
161834
  var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
161338
161835
  accepted: literal(false),
@@ -163419,6 +163916,79 @@ var IdentityCandidatesSchema = discriminatedUnion("status", [object({
163419
163916
  pairs: array(IdentityCandidatePairSchema).readonly(),
163420
163917
  undeclaredDeviceIds: array(number$1().int()).readonly()
163421
163918
  })]);
163919
+ var IdentityLinkKindSchema = _enum(["same-device", "poe-power"]);
163920
+ /**
163921
+ * - `proposed` — one strong key matched: waits for the operator;
163922
+ * - `linked` — confirmed by the operator, or auto-linked on strong evidence;
163923
+ * - `dismissed` — the operator said no (or unlinked): sticky, never re-proposed.
163924
+ */
163925
+ var IdentityLinkStateSchema = _enum([
163926
+ "proposed",
163927
+ "linked",
163928
+ "dismissed"
163929
+ ]);
163930
+ /** Who decided the current state: the matcher (`auto`) or the operator. */
163931
+ var IdentityLinkOriginSchema = _enum(["auto", "operator"]);
163932
+ /** One side: the device ref that survives re-registration, plus its current numeric id. */
163933
+ var IdentityLinkSideSchema = object({
163934
+ addonId: string().min(1),
163935
+ stableId: string().min(1),
163936
+ deviceId: number$1().int()
163937
+ });
163938
+ var IdentityLinkSchema = object({
163939
+ kind: IdentityLinkKindSchema,
163940
+ a: IdentityLinkSideSchema,
163941
+ b: IdentityLinkSideSchema,
163942
+ state: IdentityLinkStateSchema,
163943
+ origin: IdentityLinkOriginSchema,
163944
+ /** The identifiers that matched when the link was last evaluated, ordered by key then value. */
163945
+ evidence: array(IdentityMatchedKeySchema).readonly(),
163946
+ /** An operator-confirmed link whose evidence no longer matches: kept, flagged. */
163947
+ evidenceGone: literal(true).optional(),
163948
+ createdAt: number$1().int().nonnegative(),
163949
+ decidedAt: number$1().int().nonnegative().optional()
163950
+ }).extend({ id: string().min(1) });
163951
+ DeviceRole.PoePort;
163952
+ /**
163953
+ * The answer of `device-manager.listIdentityLinks`. `not-loaded` until the
163954
+ * links have been read — never an empty list (D315).
163955
+ */
163956
+ var IdentityLinksReadSchema = discriminatedUnion("status", [object({
163957
+ status: literal("not-loaded"),
163958
+ reason: string()
163959
+ }), object({
163960
+ status: literal("answered"),
163961
+ links: array(IdentityLinkSchema).readonly()
163962
+ })]);
163963
+ /** Why an operator decision on a link was refused. */
163964
+ var IdentityLinkDecisionRefusalSchema = _enum([
163965
+ "not-loaded",
163966
+ "unknown-link",
163967
+ "wrong-state"
163968
+ ]);
163969
+ /** The answer of `confirmIdentityLink` / `dismissIdentityLink` / `unlinkIdentity`. */
163970
+ var IdentityLinkDecisionSchema = discriminatedUnion("ok", [object({
163971
+ ok: literal(true),
163972
+ link: IdentityLinkSchema
163973
+ }), object({
163974
+ ok: literal(false),
163975
+ reason: IdentityLinkDecisionRefusalSchema,
163976
+ message: string()
163977
+ })]);
163978
+ /** Why a link was lost. */
163979
+ var IdentityLinkLostReasonSchema = _enum([
163980
+ "evidence-gone",
163981
+ "device-removed",
163982
+ "operator-unlinked"
163983
+ ]);
163984
+ object({
163985
+ linkId: string(),
163986
+ kind: IdentityLinkKindSchema,
163987
+ aDeviceId: number$1().int(),
163988
+ bDeviceId: number$1().int(),
163989
+ origin: IdentityLinkOriginSchema,
163990
+ reason: IdentityLinkLostReasonSchema.optional()
163991
+ });
163422
163992
  var DeviceSearchRequiresSchema = object({
163423
163993
  /** Capability names the field wants a value of. Absent when the field wants actions only. */
163424
163994
  caps: array(string()).readonly().optional(),
@@ -163985,6 +164555,11 @@ var DeviceInfoSchema = object({
163985
164555
  * the owning provider via `setIdentifiers`; read-only for the operator.
163986
164556
  * Absent ⇒ the provider declared none. */
163987
164557
  identifiers: DeviceIdentifiersSchema.optional(),
164558
+ /** The identity of the device at the far end of this device's physical
164559
+ * link (D1059 amended by D1063) — a PoE port's wired client. Written only by
164560
+ * the owning provider via `setAttachedIdentifiers`; it never makes the two
164561
+ * devices the same device. Absent ⇒ none declared. */
164562
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
163988
164563
  /** Optional upstream-system identity + rendering envelope. See
163989
164564
  * `SourceInfo` in `packages/types/src/device/source-info.ts`. */
163990
164565
  sourceInfo: SourceInfoSchema.optional(),
@@ -164138,6 +164713,8 @@ var DeviceMetaSchema = object({
164138
164713
  metadata: record(string(), unknown()).nullable().optional(),
164139
164714
  /** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
164140
164715
  identifiers: DeviceIdentifiersSchema.optional(),
164716
+ /** The far end of the device's physical link (D1063). See `DeviceMeta.attachedIdentifiers`. */
164717
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
164141
164718
  /** Optional upstream-system identity + rendering envelope. See
164142
164719
  * `SourceInfo`. Present when the device has been persisted with a
164143
164720
  * non-synthetic source identifier (HA entities, vendor MAC, …);
@@ -164462,6 +165039,26 @@ method(object({
164462
165039
  }), method(object({}), IdentityCandidatesSchema, {
164463
165040
  kind: "query",
164464
165041
  auth: "admin"
165042
+ }), method(object({
165043
+ deviceId: number$1(),
165044
+ identifiers: DeviceIdentifiersSchema.nullable(),
165045
+ /** Kinds the provider tried to read and could not: their stored value is kept. */
165046
+ unread: array(DeviceIdentifierKeySchema).optional()
165047
+ }), _void(), {
165048
+ kind: "mutation",
165049
+ auth: "admin"
165050
+ }), method(object({ deviceId: number$1().int().optional() }), IdentityLinksReadSchema, {
165051
+ kind: "query",
165052
+ auth: "admin"
165053
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
165054
+ kind: "mutation",
165055
+ auth: "admin"
165056
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
165057
+ kind: "mutation",
165058
+ auth: "admin"
165059
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
165060
+ kind: "mutation",
165061
+ auth: "admin"
164465
165062
  }), method(_void(), array(string())), method(object({ name: string() }), _void(), {
164466
165063
  kind: "mutation",
164467
165064
  auth: "admin"
@@ -165426,8 +166023,12 @@ var ClaimsListingSchema = discriminatedUnion("state", [object({
165426
166023
  })]);
165427
166024
  method(object({ deviceId: number$1() }), record(string(), record(string(), unknown()))), method(object({
165428
166025
  deviceId: number$1(),
165429
- capName: string()
165430
- }), record(string(), unknown()).nullable()), method(object({}), record(string(), record(string(), record(string(), unknown())))), method(object({
166026
+ capName: string(),
166027
+ /** The slice the device CONFIRMED, without a held command (D1061) — history and automations. */
166028
+ confirmed: boolean().optional()
166029
+ }), record(string(), unknown()).nullable()), method(object({
166030
+ /** The slices the devices CONFIRMED, without held commands (D1061). */
166031
+ confirmed: boolean().optional() }), record(string(), record(string(), record(string(), unknown())))), method(object({
165431
166032
  deviceId: number$1(),
165432
166033
  capName: string(),
165433
166034
  slice: record(string(), unknown())
@@ -165465,6 +166066,101 @@ method(object({ deviceId: number$1() }), record(string(), record(string(), unkno
165465
166066
  slice: record(string(), unknown())
165466
166067
  }));
165467
166068
  /**
166069
+ * Server-driven device state refresh (D1062): the core decides WHEN a device is
166070
+ * re-read, the integration only knows HOW.
166071
+ *
166072
+ * A provider states its policy where it registers the device's
166073
+ * `device-state-refresh` cap (`ctx.registerNativeCap(cap, provider, {
166074
+ * stateRefresh })`). It reaches the hub by the road the command-hold options
166075
+ * take (D1061): written directly in-process, carried on a forked child's cap
166076
+ * descriptors otherwise. Plain data, wire-safe.
166077
+ */
166078
+ /** Why the core asks for a refresh. */
166079
+ var StateRefreshReasonSchema = _enum([
166080
+ "schedule",
166081
+ "command",
166082
+ "burst"
166083
+ ]);
166084
+ /**
166085
+ * What arrives without asking: `none` (everything is read), `partial` (some
166086
+ * fields arrive by push, the rest is read on the schedule), `full` (everything
166087
+ * arrives by push — never read on a schedule).
166088
+ */
166089
+ var StateRefreshPushSchema = _enum([
166090
+ "none",
166091
+ "partial",
166092
+ "full"
166093
+ ]);
166094
+ object({
166095
+ /**
166096
+ * The integration instance the device belongs to. Devices of one instance
166097
+ * share one schedule group: a batching provider is asked once for all of
166098
+ * them, and the heartbeat is judged across them.
166099
+ */
166100
+ integrationId: string().min(1),
166101
+ /** The fastest interval the integration can afford for its devices. The core polls at it by default. */
166102
+ minIntervalMs: number$1().int().min(1e3),
166103
+ /**
166104
+ * The operator's per-integration setting, when there is one. It can only SLOW
166105
+ * the cadence: the core polls at `max(minIntervalMs, intervalMs)`.
166106
+ */
166107
+ intervalMs: number$1().int().positive().optional(),
166108
+ /** One `refresh` call can read every device of the integration at once. */
166109
+ batch: boolean(),
166110
+ push: StateRefreshPushSchema,
166111
+ /** Longest silence a push integration may keep before the core re-reads it and asks it to resubscribe. */
166112
+ heartbeatMs: number$1().int().positive().optional(),
166113
+ /**
166114
+ * Bumped by the provider each time its push subscription reconnected on its
166115
+ * own. A change makes the core re-read every device of the integration
166116
+ * (pushes lost while it was down; events may be dropped, D8).
166117
+ */
166118
+ connectionEpoch: number$1().int().nonnegative().optional()
166119
+ });
166120
+ /**
166121
+ * device-state-refresh — the HOW of a device's state refresh, called by the
166122
+ * core, which owns the WHEN (D1062).
166123
+ *
166124
+ * The provider registers it per device with its policy
166125
+ * (`registerNativeCap(cap, provider, { stateRefresh })`). The hub's scheduler
166126
+ * calls `refresh` on the schedule, after a command and in the burst that
166127
+ * follows it, and `resubscribe` when a push integration fell silent. The
166128
+ * provider re-reads and writes the slices it already writes; nothing is
166129
+ * returned but completion.
166130
+ */
166131
+ var DeviceStateRefreshInputSchema = object({
166132
+ /** The device the call is routed by (one of `deviceIds`). */
166133
+ deviceId: number$1().int().nonnegative(),
166134
+ /** Every device to re-read: one, or the integration's whole set when the provider batches. */
166135
+ deviceIds: array(number$1().int().nonnegative()).min(1),
166136
+ reason: StateRefreshReasonSchema
166137
+ });
166138
+ var DeviceStateResubscribeInputSchema = object({ deviceId: number$1().int().nonnegative() });
166139
+ var DeviceStateRefreshResultSchema = object({ ok: literal(true) });
166140
+ var NOT_OPERATOR_FACING = "the core schedules state refreshes itself; an operator never asks for one";
166141
+ var deviceStateRefreshCapability = {
166142
+ name: "device-state-refresh",
166143
+ scope: "device",
166144
+ deviceNative: true,
166145
+ mode: "singleton",
166146
+ methods: {
166147
+ refresh: method(DeviceStateRefreshInputSchema, DeviceStateRefreshResultSchema, {
166148
+ kind: "mutation",
166149
+ auth: "admin",
166150
+ notOperatorFacing: NOT_OPERATOR_FACING
166151
+ }),
166152
+ resubscribe: method(DeviceStateResubscribeInputSchema, DeviceStateRefreshResultSchema, {
166153
+ kind: "mutation",
166154
+ auth: "admin",
166155
+ notOperatorFacing: NOT_OPERATOR_FACING
166156
+ })
166157
+ },
166158
+ vocabulary: {
166159
+ noun: t("State refresh", "Aggiornamento dello stato"),
166160
+ order: 3247
166161
+ }
166162
+ };
166163
+ /**
165468
166164
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
165469
166165
  * for every device, regardless of provider — the kernel needs a uniform
165470
166166
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -167894,7 +168590,15 @@ var fanControlCapability = {
167894
168590
  field: "speed",
167895
168591
  value: 100
167896
168592
  },
167897
- args: { speed: 100 }
168593
+ args: { speed: 100 },
168594
+ sideEffects: [{
168595
+ field: "preset",
168596
+ value: "",
168597
+ when: {
168598
+ field: "preset",
168599
+ notIn: [""]
168600
+ }
168601
+ }]
167898
168602
  },
167899
168603
  {
167900
168604
  id: "fan.speed",
@@ -167905,6 +168609,14 @@ var fanControlCapability = {
167905
168609
  field: "speed",
167906
168610
  fromArg: "speed"
167907
168611
  },
168612
+ sideEffects: [{
168613
+ field: "preset",
168614
+ value: "",
168615
+ when: {
168616
+ field: "preset",
168617
+ notIn: [""]
168618
+ }
168619
+ }],
167908
168620
  openArgs: [{
167909
168621
  key: "speed",
167910
168622
  label: t("Speed", "Velocità"),
@@ -167930,6 +168642,10 @@ var fanControlCapability = {
167930
168642
  label: t("Set preset", "Imposta il preset"),
167931
168643
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
167932
168644
  icon: "list",
168645
+ effect: {
168646
+ field: "preset",
168647
+ fromArg: "preset"
168648
+ },
167933
168649
  openArgs: [{
167934
168650
  key: "preset",
167935
168651
  label: t("Preset", "Preset"),
@@ -169660,7 +170376,7 @@ var HeroSceneSchema = object({
169660
170376
  level: number$1().min(0).max(1).nullable()
169661
170377
  });
169662
170378
  DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
169663
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
170379
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host, DeviceRole.Ups;
169664
170380
  var HeroRowIdSchema = _enum([
169665
170381
  "progress",
169666
170382
  "run-for",
@@ -170932,6 +171648,16 @@ var IntegrationInstanceStatusSchema = object({
170932
171648
  /** A short human word for the state ("Signed in", "Token expired"); shown instead of `state`. */
170933
171649
  label: string().optional()
170934
171650
  });
171651
+ /**
171652
+ * What "Add device" inside ONE instance offers, decided per instance by its provider. `scan`: the
171653
+ * LAN scan finds devices this instance holds; `children`: only the instance's own children, via
171654
+ * adoption (a scan would offer other hosts, which are new integrations); `none`: manual add only.
171655
+ */
171656
+ var IntegrationInstanceAddDeviceSchema = _enum([
171657
+ "scan",
171658
+ "children",
171659
+ "none"
171660
+ ]);
170935
171661
  var IntegrationInstanceSchema = object({
170936
171662
  id: IntegrationInstanceIdSchema,
170937
171663
  name: string(),
@@ -170949,7 +171675,9 @@ var IntegrationInstanceSchema = object({
170949
171675
  formValues: record(string(), unknown()),
170950
171676
  status: IntegrationInstanceStatusSchema.optional(),
170951
171677
  /** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
170952
- lastCheckedAt: number$1().optional()
171678
+ lastCheckedAt: number$1().optional(),
171679
+ /** What "Add device" inside this instance offers; see {@link IntegrationInstanceAddDeviceSchema}. Absent means the caller derives it from `describe().discovery` with `defaultAddDeviceMode` (lan → scan, account → children, else none). */
171680
+ addDevice: IntegrationInstanceAddDeviceSchema.optional()
170953
171681
  });
170954
171682
  var IntegrationInstancePatchSchema = object({
170955
171683
  id: IntegrationInstanceIdSchema,
@@ -173100,6 +173828,14 @@ var lockControlCapability = {
173100
173828
  field: "state",
173101
173829
  value: "locked"
173102
173830
  },
173831
+ hold: { effects: [{
173832
+ field: "state",
173833
+ value: "locking",
173834
+ when: {
173835
+ field: "state",
173836
+ notIn: ["locked"]
173837
+ }
173838
+ }] },
173103
173839
  openArgs: [{
173104
173840
  key: "code",
173105
173841
  label: t("PIN code", "Codice PIN"),
@@ -173133,6 +173869,14 @@ var lockControlCapability = {
173133
173869
  field: "state",
173134
173870
  value: "unlocked"
173135
173871
  },
173872
+ hold: { effects: [{
173873
+ field: "state",
173874
+ value: "unlocking",
173875
+ when: {
173876
+ field: "state",
173877
+ notIn: ["unlocked"]
173878
+ }
173879
+ }] },
173136
173880
  openArgs: [{
173137
173881
  key: "code",
173138
173882
  label: t("PIN code", "Codice PIN"),
@@ -177544,6 +178288,16 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
177544
178288
  timestamp: number$1()
177545
178289
  }), EventCategory.PipelineAnalyticsDetectionEvent, EventCategory.PipelineAnalyticsPackageDelivered, EventCategory.PipelineAnalyticsPackagePickedUp;
177546
178290
  /**
178291
+ * A rectangle as a fraction of a frame, `[0, 1]` on both axes — the wire shape
178292
+ * of `NormalizedRect` (which is derived from it).
178293
+ */
178294
+ var NormalizedRectSchema = object({
178295
+ x: number$1(),
178296
+ y: number$1(),
178297
+ w: number$1(),
178298
+ h: number$1()
178299
+ });
178300
+ /**
177547
178301
  * A root model's boxes standing in for one crop-kind step's own inference
177548
178302
  * (D730) — see `runPipeline.suppliedRoot`.
177549
178303
  */
@@ -177844,7 +178598,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
177844
178598
  /** Pool deaths inside the current window. */
177845
178599
  deaths: number$1(),
177846
178600
  /** The last death's message. */
177847
- lastError: string()
178601
+ lastError: string(),
178602
+ /**
178603
+ * Present when the device is ABSENT rather than dead: the runtime
178604
+ * itself enumerates no such device (`no-gpu-device` — OpenVINO sees
178605
+ * no supported GPU; driver/runtime does not support this iGPU).
178606
+ */
178607
+ absentReason: _enum(["no-gpu-device"]).optional()
177848
178608
  })).readonly() })), method(object({
177849
178609
  nodeId: string(),
177850
178610
  deviceKey: string()
@@ -177936,7 +178696,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
177936
178696
  * reader) run on them through their own crop policy. Boxes are in the
177937
178697
  * PIXELS of the image this call carries. Absent ⇒ the root step runs.
177938
178698
  */
177939
- suppliedRoot: SuppliedRootOutputSchema.optional()
178699
+ suppliedRoot: SuppliedRootOutputSchema.optional(),
178700
+ /**
178701
+ * The motion analyzer's merged subjects (D394) for this camera, fresh,
178702
+ * normalised to the frame (0..1). Feeds the motion-guided root crop
178703
+ * (D1060): the executor picks per frame whether the object-detection
178704
+ * root runs on the full frame or on a crop around them. Honoured only
178705
+ * on the live `frame` plane with a `frameRef`. Absent or empty ⇒ no
178706
+ * motion known ⇒ full frame.
178707
+ */
178708
+ motionRegions: array(NormalizedRectSchema).optional()
177940
178709
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
177941
178710
  steps: array(PipelineStepInputSchema).min(1),
177942
178711
  frames: array(FrameInputSchema).min(1).max(255),
@@ -178729,7 +179498,8 @@ var StatelessStepRefusalSchema = _enum([
178729
179498
  "unknown-step",
178730
179499
  "model-not-servable",
178731
179500
  "unreadable-frame",
178732
- "execution-failed"
179501
+ "execution-failed",
179502
+ "no-eligible-device"
178733
179503
  ]);
178734
179504
  /**
178735
179505
  * Answer to `runStatelessStep` — a discriminated union rather than a nullable
@@ -179028,7 +179798,15 @@ var RunnerInferenceDeviceSchema = object({
179028
179798
  * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
179029
179799
  * the elected device's provisioning, as before.
179030
179800
  */
179031
- steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
179801
+ steps: record(string(), RunnerJumpStepProvisioningSchema).optional(),
179802
+ /**
179803
+ * Steps switched OFF on this device (D1065, `inferenceDevices[key].steps[s]
179804
+ * .enabled === false`). The runner never runs a subtree containing one of
179805
+ * them here: it auto-jumps it to an allowed device, and when none can take
179806
+ * it the subtree is skipped (`disabled-on-device`), never run here anyway.
179807
+ * Absent ⇒ none (an orchestrator that predates D1065).
179808
+ */
179809
+ disabledSteps: array(string()).readonly().optional()
179032
179810
  });
179033
179811
  /**
179034
179812
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -184745,6 +185523,14 @@ method(object({ deviceId: number$1().int() }), object({
184745
185523
  auth: "admin"
184746
185524
  }), NOT_A_DEVICE.PIPELINE;
184747
185525
  /**
185526
+ * Hold limits a cap's vocabulary may declare on an action (D1061).
185527
+ *
185528
+ * A one-shot command (feed, run a script) has no lasting state to confirm; it
185529
+ * holds its in-progress flag just long enough that a second tap, before the
185530
+ * device reports, is seen as "already running" and refused.
185531
+ */
185532
+ var ONE_SHOT_HOLD_MS = 1e4;
185533
+ /**
184748
185534
  * Feeder connectivity / power status — mirrors the HA petkit device-status
184749
185535
  * enum: `normal` (online, mains), `offline` (not reaching PetKit cloud),
184750
185536
  * `on_batteries` (running on battery backup). `null` until first reported.
@@ -184862,6 +185648,13 @@ var petFeederCapability = {
184862
185648
  label: t("Feed", "Dai da mangiare"),
184863
185649
  phrase: t("Dispense {grams} from {device}", "Eroga {grams} da {device}"),
184864
185650
  icon: "paw-print",
185651
+ hold: {
185652
+ effects: [{
185653
+ field: "feeding",
185654
+ value: true
185655
+ }],
185656
+ holdMs: ONE_SHOT_HOLD_MS
185657
+ },
184865
185658
  openArgs: [{
184866
185659
  key: "grams",
184867
185660
  label: t("Grams", "Grammi"),
@@ -184880,6 +185673,13 @@ var petFeederCapability = {
184880
185673
  label: t("Feed from both hoppers", "Eroga da entrambi i serbatoi"),
184881
185674
  phrase: t("Dispense {hopper1} and {hopper2} from {device}", "Eroga {hopper1} e {hopper2} da {device}"),
184882
185675
  icon: "paw-print",
185676
+ hold: {
185677
+ effects: [{
185678
+ field: "feeding",
185679
+ value: true
185680
+ }],
185681
+ holdMs: ONE_SHOT_HOLD_MS
185682
+ },
184883
185683
  openArgs: [{
184884
185684
  key: "hopper1",
184885
185685
  label: t("Hopper 1", "Serbatoio 1"),
@@ -184985,12 +185785,20 @@ var petFeederCapability = {
184985
185785
  auth: "protected",
184986
185786
  actions: [{
184987
185787
  id: "petFeeder.childLockOn",
185788
+ effect: {
185789
+ field: "childLock",
185790
+ value: true
185791
+ },
184988
185792
  label: t("Child lock on", "Blocco bambini attivo"),
184989
185793
  phrase: t("Turn on the child lock of {device}", "Attiva il blocco bambini di {device}"),
184990
185794
  icon: "lock",
184991
185795
  args: { on: true }
184992
185796
  }, {
184993
185797
  id: "petFeeder.childLockOff",
185798
+ effect: {
185799
+ field: "childLock",
185800
+ value: false
185801
+ },
184994
185802
  label: t("Child lock off", "Blocco bambini spento"),
184995
185803
  phrase: t("Turn off the child lock of {device}", "Disattiva il blocco bambini di {device}"),
184996
185804
  icon: "lock-open",
@@ -185006,12 +185814,20 @@ var petFeederCapability = {
185006
185814
  auth: "protected",
185007
185815
  actions: [{
185008
185816
  id: "petFeeder.lightOn",
185817
+ effect: {
185818
+ field: "indicatorLight",
185819
+ value: true
185820
+ },
185009
185821
  label: t("Indicator light on", "Spia accesa"),
185010
185822
  phrase: t("Turn on the indicator light of {device}", "Accendi la spia di {device}"),
185011
185823
  icon: "lightbulb",
185012
185824
  args: { on: true }
185013
185825
  }, {
185014
185826
  id: "petFeeder.lightOff",
185827
+ effect: {
185828
+ field: "indicatorLight",
185829
+ value: false
185830
+ },
185015
185831
  label: t("Indicator light off", "Spia spenta"),
185016
185832
  phrase: t("Turn off the indicator light of {device}", "Spegni la spia di {device}"),
185017
185833
  icon: "lightbulb-off",
@@ -185027,12 +185843,20 @@ var petFeederCapability = {
185027
185843
  auth: "protected",
185028
185844
  actions: [{
185029
185845
  id: "petFeeder.feedSoundOn",
185846
+ effect: {
185847
+ field: "feedSound",
185848
+ value: true
185849
+ },
185030
185850
  label: t("Feeding sound on", "Suono di erogazione attivo"),
185031
185851
  phrase: t("Turn on the feeding sound of {device}", "Attiva il suono di erogazione di {device}"),
185032
185852
  icon: "volume-2",
185033
185853
  args: { on: true }
185034
185854
  }, {
185035
185855
  id: "petFeeder.feedSoundOff",
185856
+ effect: {
185857
+ field: "feedSound",
185858
+ value: false
185859
+ },
185036
185860
  label: t("Feeding sound off", "Suono di erogazione spento"),
185037
185861
  phrase: t("Turn off the feeding sound of {device}", "Disattiva il suono di erogazione di {device}"),
185038
185862
  icon: "volume-x",
@@ -185048,6 +185872,10 @@ var petFeederCapability = {
185048
185872
  auth: "protected",
185049
185873
  actions: [{
185050
185874
  id: "petFeeder.volume",
185875
+ effect: {
185876
+ field: "volume",
185877
+ fromArg: "level"
185878
+ },
185051
185879
  label: t("Set volume", "Imposta il volume"),
185052
185880
  phrase: t("Set the volume of {device} to {level}", "Imposta il volume di {device} a {level}"),
185053
185881
  icon: "volume-2",
@@ -185193,12 +186021,20 @@ setPump: method(object({
185193
186021
  auth: "protected",
185194
186022
  actions: [{
185195
186023
  id: "petFountain.pumpOn",
186024
+ effect: {
186025
+ field: "pumpRunning",
186026
+ value: true
186027
+ },
185196
186028
  label: t("Pump on", "Pompa accesa"),
185197
186029
  phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
185198
186030
  icon: "play",
185199
186031
  args: { on: true }
185200
186032
  }, {
185201
186033
  id: "petFountain.pumpOff",
186034
+ effect: {
186035
+ field: "pumpRunning",
186036
+ value: false
186037
+ },
185202
186038
  label: t("Pump off", "Pompa spenta"),
185203
186039
  phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
185204
186040
  icon: "square",
@@ -185745,7 +186581,15 @@ var DeviceStepConfigSchema = object({
185745
186581
  * at a disabled/absent device on that node at save time. Absent ⇒ the runner
185746
186582
  * auto-jumps only when the effective device's format cannot run the step.
185747
186583
  */
185748
- jumpDeviceKey: string().optional()
186584
+ jumpDeviceKey: string().optional(),
186585
+ /**
186586
+ * DEVICE switch for this step (D1065). `false` = the step is never
186587
+ * provisioned on this accelerator: a detail step jumps to another enabled
186588
+ * device of the node where it is allowed, else it is skipped with reason
186589
+ * `disabled-on-device`; a root is skipped. Absent = inherit (on). Written by
186590
+ * `setDeviceStepEnabled`.
186591
+ */
186592
+ enabled: boolean().optional()
185749
186593
  });
185750
186594
  var AgentPipelineSettingsSchema = object({
185751
186595
  maxCameras: number$1().int().nonnegative().nullable().default(null),
@@ -185789,6 +186633,12 @@ var AgentPipelineSettingsSchema = object({
185789
186633
  */
185790
186634
  stepSettings: record(string(), record(string(), unknown()).readonly()).optional(),
185791
186635
  /**
186636
+ * NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
186637
+ * runs on a camera whose pipeline runs on this node (skip reason
186638
+ * `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
186639
+ */
186640
+ stepEnabled: record(string(), boolean()).optional(),
186641
+ /**
185792
186642
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
185793
186643
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
185794
186644
  * accelerator (safe default); two+ enabled ⇒ the dispatcher balances
@@ -186110,7 +186960,9 @@ var InferenceDeviceExclusionReasonSchema = _enum([
186110
186960
  "disabled",
186111
186961
  "unavailable",
186112
186962
  "cannot-host-camera-root",
186113
- "accelerator-preferred"
186963
+ "accelerator-preferred",
186964
+ "root-switched-off",
186965
+ "no-gpu-device"
186114
186966
  ]);
186115
186967
  var NodeInferenceDeviceSchema = object({
186116
186968
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
@@ -186143,7 +186995,13 @@ var NodeInferenceDeviceSchema = object({
186143
186995
  enabled: boolean(),
186144
186996
  /** Relative balancer weight for the enabled device (default 1). */
186145
186997
  weight: number$1(),
186146
- /** Per-device concurrent-session cap; null = unlimited (multi-device C4). */
186998
+ /**
186999
+ * Per-device concurrent-session cap; null = unlimited (multi-device C4). A
187000
+ * limit: a camera no device can take within its cap stays on the node's
187001
+ * default pool — EXCEPT when that default pool is an excluded device
187002
+ * (`defaultPoolExcluded`), where it goes over the cap on the least-loaded
187003
+ * eligible device instead (#610).
187004
+ */
186147
187005
  maxSessions: number$1().nullable(),
186148
187006
  /** Object-detection model the executor defaults to for this deviceKey. */
186149
187007
  defaultModelId: string(),
@@ -186193,9 +187051,86 @@ var NodeInferenceDevicesSchema = object({
186193
187051
  nodeId: string(),
186194
187052
  /** False when the node's platform-probe was unreachable (no live device set). */
186195
187053
  reachable: boolean(),
186196
- devices: array(NodeInferenceDeviceSchema).readonly()
187054
+ devices: array(NodeInferenceDeviceSchema).readonly(),
187055
+ /**
187056
+ * The election left NO device and one was excluded because the operator
187057
+ * turned it off or it is not functional (#610): the runner's default pool is
187058
+ * that device, so work with no explicit device (a stateless step, a bench with
187059
+ * no `deviceKey`) is refused rather than run there. Absent = an orchestrator
187060
+ * older than the field, or an unreachable node: nothing is claimed (D315).
187061
+ */
187062
+ defaultPoolExcluded: boolean().optional()
186197
187063
  });
186198
187064
  /**
187065
+ * The CLUSTER switch of one pipeline step (D1065):
187066
+ * - `off` — hard off: no camera, node or device can turn it on;
187067
+ * - `on` — on by default; a camera may turn it off (`stepToggles`);
187068
+ * - `opt-in` — off by default; a camera turns it on (`stepToggles`).
187069
+ * Absent = the catalog's `enabledByDefault` (`true` → `on`, `false` → `opt-in`).
187070
+ */
187071
+ var StepClusterModeSchema = _enum([
187072
+ "off",
187073
+ "on",
187074
+ "opt-in"
187075
+ ]);
187076
+ /**
187077
+ * What one step does on one (node, device) — computed by the orchestrator with
187078
+ * the SAME placement function the attach path runs (`pipeline-resolver.ts`),
187079
+ * so a client never re-derives it. Precedence: cluster off > camera toggle
187080
+ * (else the cluster default) > node off > device off / jump.
187081
+ */
187082
+ var StepSwitchCellSchema = discriminatedUnion("kind", [
187083
+ object({ kind: literal("on") }),
187084
+ object({ kind: literal("off-cluster") }),
187085
+ object({ kind: literal("off-node") }),
187086
+ object({ kind: literal("off-device") }),
187087
+ object({
187088
+ kind: literal("jump"),
187089
+ toDeviceKey: string()
187090
+ }),
187091
+ object({
187092
+ kind: literal("skip"),
187093
+ reason: _enum(["no-compatible-model", "root-not-runnable-on-elected-device"])
187094
+ }),
187095
+ object({ kind: literal("zone-driven") }),
187096
+ object({
187097
+ kind: literal("supplied-by-root"),
187098
+ rootModelId: string()
187099
+ }),
187100
+ object({ kind: literal("opt-in-unused") })
187101
+ ]);
187102
+ var StepSwitchDeviceSchema = object({
187103
+ deviceKey: string(),
187104
+ format: _enum(MODEL_FORMATS),
187105
+ /** The device switch as stored (`inferenceDevices[key].steps[step].enabled`); `null` = inherit. */
187106
+ stepEnabled: boolean().nullable(),
187107
+ /** Whether the device is in the node's dispatch roster (enabled, available, not excluded). */
187108
+ eligible: boolean(),
187109
+ cell: StepSwitchCellSchema
187110
+ });
187111
+ var StepSwitchNodeSchema = object({
187112
+ nodeId: string(),
187113
+ /** False when the node's catalog or device probe did not answer — no cells are claimed. */
187114
+ reachable: boolean(),
187115
+ /** The node switch as stored (`stepEnabled[step]`); `null` = inherit. */
187116
+ stepEnabled: boolean().nullable(),
187117
+ devices: array(StepSwitchDeviceSchema).readonly()
187118
+ });
187119
+ var StepSwitchMatrixSchema = object({ steps: array(object({
187120
+ stepId: string(),
187121
+ name: string(),
187122
+ slot: string(),
187123
+ /** The stored cluster mode; `null` = the catalog default applies. */
187124
+ clusterMode: StepClusterModeSchema.nullable(),
187125
+ /** The mode in force (stored, else derived from `enabledByDefault`). */
187126
+ effectiveMode: StepClusterModeSchema,
187127
+ /** Cameras whose `stepToggles[step]` is `true`. */
187128
+ camerasEnabling: number$1().int().nonnegative(),
187129
+ /** Cameras whose `stepToggles[step]` is `false`. */
187130
+ camerasDisabling: number$1().int().nonnegative(),
187131
+ nodes: array(StepSwitchNodeSchema).readonly()
187132
+ })).readonly() });
187133
+ /**
186199
187134
  * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
186200
187135
  *
186201
187136
  * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
@@ -186366,7 +187301,28 @@ method(object({
186366
187301
  }), object({ success: literal(true) }), {
186367
187302
  kind: "mutation",
186368
187303
  auth: "admin"
186369
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
187304
+ }), method(object({
187305
+ stepId: string(),
187306
+ mode: StepClusterModeSchema.nullable()
187307
+ }), object({ success: literal(true) }), {
187308
+ kind: "mutation",
187309
+ auth: "admin"
187310
+ }), method(object({
187311
+ agentNodeId: string(),
187312
+ stepId: string(),
187313
+ enabled: boolean().nullable()
187314
+ }), object({ success: literal(true) }), {
187315
+ kind: "mutation",
187316
+ auth: "admin"
187317
+ }), method(object({
187318
+ agentNodeId: string(),
187319
+ deviceKey: string(),
187320
+ stepId: string(),
187321
+ enabled: boolean().nullable()
187322
+ }), object({ success: literal(true) }), {
187323
+ kind: "mutation",
187324
+ auth: "admin"
187325
+ }), method(_void(), StepSwitchMatrixSchema), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
186370
187326
  agentNodeId: string(),
186371
187327
  deviceKey: string()
186372
187328
  }), object({ success: literal(true) }), {
@@ -186781,6 +187737,16 @@ var CoralInfoSchema = object({
186781
187737
  reason: _enum(["driver-missing", "device-not-accessible"])
186782
187738
  })).readonly().optional()
186783
187739
  });
187740
+ var NvidiaInfoBaseSchema = object({
187741
+ type: literal("nvidia"),
187742
+ name: string(),
187743
+ memoryMB: number$1().optional()
187744
+ });
187745
+ /** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
187746
+ var NvidiaInfoSchema = discriminatedUnion("usable", [NvidiaInfoBaseSchema.extend({ usable: literal(true) }), NvidiaInfoBaseSchema.extend({
187747
+ usable: literal(false),
187748
+ reason: _enum(["no-cuda-execution-provider"])
187749
+ })]);
186784
187750
  var HardwareInfoSchema = object({
186785
187751
  platform: HardwarePlatformSchema,
186786
187752
  arch: HardwareArchSchema,
@@ -186791,6 +187757,7 @@ var HardwareInfoSchema = object({
186791
187757
  gpu: GpuInfoSchema.nullable(),
186792
187758
  npu: NpuInfoSchema.nullable(),
186793
187759
  coral: CoralInfoSchema.nullable().optional(),
187760
+ nvidia: NvidiaInfoSchema.nullable().optional(),
186794
187761
  /**
186795
187762
  * Per-accelerator compute (D930). Omitted by a node that has not probed it.
186796
187763
  * `null` fields inside an entry are a failed query, never a zero.
@@ -186878,8 +187845,14 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
186878
187845
  * in real-world devices.
186879
187846
  */
186880
187847
  var PowerMeterStatusSchema = object({
186881
- /** Instantaneous power draw (watts). */
187848
+ /** Instantaneous TOTAL power draw of the device (watts), when known. */
186882
187849
  power: number$1().optional().meta(readingMeta("power", { label: "Power" })),
187850
+ /**
187851
+ * Power the device passes on to downstream loads (watts), e.g. the PoE a switch delivers to
187852
+ * its ports. When `power` is known it already includes this (the own draw is `netPowerOf`);
187853
+ * a device that reports no total (a UniFi switch) carries this field alone.
187854
+ */
187855
+ deliveredPower: number$1().optional().meta(readingMeta("power", { label: "Delivered" })),
186883
187856
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
186884
187857
  energy: number$1().optional().meta(readingMeta("energy", { label: "Energy" })),
186885
187858
  /** Voltage (volts). */
@@ -186914,7 +187887,8 @@ var POWER_METER_DEVICE_TYPES = [
186914
187887
  DeviceType.Dishwasher,
186915
187888
  DeviceType.Vacuum,
186916
187889
  DeviceType.LawnMower,
186917
- DeviceType.PetFeeder
187890
+ DeviceType.PetFeeder,
187891
+ DeviceType.Workload
186918
187892
  ];
186919
187893
  /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
186920
187894
  var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
@@ -188085,12 +189059,20 @@ var pumpCycleCapability = {
188085
189059
  auth: "protected",
188086
189060
  actions: [{
188087
189061
  id: "pumpCycle.on",
189062
+ effect: {
189063
+ field: "enabled",
189064
+ value: true
189065
+ },
188088
189066
  label: t("Pump cycle on", "Ciclo pompa attivo"),
188089
189067
  phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
188090
189068
  icon: "timer",
188091
189069
  args: { on: true }
188092
189070
  }, {
188093
189071
  id: "pumpCycle.off",
189072
+ effect: {
189073
+ field: "enabled",
189074
+ value: false
189075
+ },
188094
189076
  label: t("Pump cycle off", "Ciclo pompa spento"),
188095
189077
  phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
188096
189078
  icon: "timer-off",
@@ -188109,6 +189091,11 @@ var pumpCycleCapability = {
188109
189091
  label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
188110
189092
  phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
188111
189093
  icon: "timer",
189094
+ effect: {
189095
+ field: "onTime",
189096
+ fromArg: "minutes",
189097
+ scale: 60
189098
+ },
188112
189099
  openArgs: [{
188113
189100
  key: "minutes",
188114
189101
  label: t("Minutes", "Minuti"),
@@ -188133,6 +189120,11 @@ var pumpCycleCapability = {
188133
189120
  label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
188134
189121
  phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
188135
189122
  icon: "timer-off",
189123
+ effect: {
189124
+ field: "offTime",
189125
+ fromArg: "minutes",
189126
+ scale: 60
189127
+ },
188136
189128
  openArgs: [{
188137
189129
  key: "minutes",
188138
189130
  label: t("Minutes", "Minuti"),
@@ -192103,7 +193095,14 @@ var scriptRunnerCapability = {
192103
193095
  id: "script.run",
192104
193096
  label: t("Run script", "Esegui lo script"),
192105
193097
  phrase: t("Run {device}", "Esegui {device}"),
192106
- icon: "scroll-text"
193098
+ icon: "scroll-text",
193099
+ hold: {
193100
+ effects: [{
193101
+ field: "isRunning",
193102
+ value: true
193103
+ }],
193104
+ holdMs: ONE_SHOT_HOLD_MS
193105
+ }
192107
193106
  }]
192108
193107
  }),
192109
193108
  /** Cancel a running script. Provider rejects when the script
@@ -192113,6 +193112,10 @@ var scriptRunnerCapability = {
192113
193112
  auth: "admin",
192114
193113
  actions: [{
192115
193114
  id: "script.stop",
193115
+ effect: {
193116
+ field: "isRunning",
193117
+ value: false
193118
+ },
192116
193119
  label: t("Stop script", "Ferma lo script"),
192117
193120
  phrase: t("Stop {device}", "Ferma {device}"),
192118
193121
  icon: "square"
@@ -194079,6 +195082,10 @@ var switchCapability = {
194079
195082
  auth: "protected",
194080
195083
  actions: [{
194081
195084
  id: "switch.toggle",
195085
+ sideEffects: [{
195086
+ field: "on",
195087
+ negate: true
195088
+ }],
194082
195089
  label: t("Toggle", "Commuta"),
194083
195090
  phrase: t("Toggle {device}", "Commuta {device}"),
194084
195091
  icon: "toggle-right",
@@ -200869,6 +201876,20 @@ var BaseDevice = class {
200869
201876
  }, raw, options);
200870
201877
  }
200871
201878
  /**
201879
+ * Declare the identity of the device at the FAR END of this device's physical
201880
+ * link (D1063): a PoE port's wired client. Same normalisation, `unread`
201881
+ * rule and owner check as {@link declareIdentifiers}, written through
201882
+ * `device-manager.setAttachedIdentifiers`. It never makes the two devices the
201883
+ * same device. Best-effort: never throws.
201884
+ */
201885
+ async declareAttachedIdentifiers(raw, options) {
201886
+ return declareDeviceIdentifiers({
201887
+ deviceId: this.id,
201888
+ logger: this.ctx.logger,
201889
+ writer: this.ctx.api.deviceManager?.setAttachedIdentifiers
201890
+ }, raw, options);
201891
+ }
201892
+ /**
200872
201893
  * Re-publish the device's current `features` array to the persisted
200873
201894
  * meta blob. Drivers call this after a probe finishes when the live
200874
201895
  * `features` getter has gained new flags (e.g. `hasIntercom` flips
@@ -202597,23 +203618,56 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
202597
203618
  };
202598
203619
  });
202599
203620
  var minutesOf = (seconds) => Math.max(0, Math.round(seconds / 60));
203621
+ var pumpCycleContribution = contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
203622
+ const enabled = slice?.enabled ?? null;
203623
+ const cycle = slice?.onTime != null && slice.offTime != null ? t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
203624
+ return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
203625
+ kind: "toggle",
203626
+ id: "pump-cycle.enabled",
203627
+ label: t("Pump cycle", "Ciclo pompa"),
203628
+ on: enabled,
203629
+ turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
203630
+ turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
203631
+ }])] };
203632
+ });
203633
+ var WORKLOAD_WORDS = {
203634
+ running: {
203635
+ state: "on",
203636
+ title: t("Running", "In esecuzione")
203637
+ },
203638
+ paused: {
203639
+ state: "standby",
203640
+ title: t("Paused", "In pausa")
203641
+ },
203642
+ stopped: {
203643
+ state: "off",
203644
+ title: t("Stopped", "Fermo")
203645
+ },
203646
+ starting: {
203647
+ state: "running",
203648
+ title: t("Starting", "In avvio")
203649
+ },
203650
+ stopping: {
203651
+ state: "running",
203652
+ title: t("Stopping", "In arresto")
203653
+ },
203654
+ crashed: {
203655
+ state: "alert",
203656
+ title: t("Crashed", "Andato in errore")
203657
+ }
203658
+ };
202600
203659
  var DEVICES_FAMILY_CONTRIBUTIONS = {
202601
203660
  "fan-control": fanContribution,
202602
203661
  "vacuum-control": vacuumContribution,
202603
203662
  "lawn-mower-control": mowerContribution,
202604
203663
  "pet-feeder": feederContribution,
202605
203664
  "pet-fountain": fountainContribution,
202606
- "pump-cycle": contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
202607
- const enabled = slice?.enabled ?? null;
202608
- const cycle = slice?.onTime != null && slice.offTime != null ? t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
202609
- return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
202610
- kind: "toggle",
202611
- id: "pump-cycle.enabled",
202612
- label: t("Pump cycle", "Ciclo pompa"),
202613
- on: enabled,
202614
- turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
202615
- turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
202616
- }])] };
203665
+ "pump-cycle": pumpCycleContribution,
203666
+ workload: contribution("workload", WorkloadStatusSchema, (slice) => {
203667
+ const state = slice?.state ?? null;
203668
+ if (state === null) return { reading: reading("workload", "unknown") };
203669
+ const words = WORKLOAD_WORDS[state];
203670
+ return { reading: reading("workload", words.state, false, words.title) };
202617
203671
  })
202618
203672
  };
202619
203673
  /**
@@ -204628,7 +205682,7 @@ lookOf({
204628
205682
  });
204629
205683
  DeviceType.Climate;
204630
205684
  DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, 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.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
204631
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
205685
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host, DeviceRole.Ups;
204632
205686
  Object.freeze({
204633
205687
  "accessories.getStatus": {
204634
205688
  capName: "accessories",
@@ -206828,6 +207882,13 @@ Object.freeze({
206828
207882
  access: "create",
206829
207883
  role: "admin"
206830
207884
  },
207885
+ "deviceManager.confirmIdentityLink": {
207886
+ capName: "device-manager",
207887
+ capScope: "system",
207888
+ addonId: null,
207889
+ access: "create",
207890
+ role: "admin"
207891
+ },
206831
207892
  "deviceManager.createDevice": {
206832
207893
  capName: "device-manager",
206833
207894
  capScope: "system",
@@ -206877,6 +207938,13 @@ Object.freeze({
206877
207938
  access: "create",
206878
207939
  role: "admin"
206879
207940
  },
207941
+ "deviceManager.dismissIdentityLink": {
207942
+ capName: "device-manager",
207943
+ capScope: "system",
207944
+ addonId: null,
207945
+ access: "create",
207946
+ role: "admin"
207947
+ },
206880
207948
  "deviceManager.enable": {
206881
207949
  capName: "device-manager",
206882
207950
  capScope: "system",
@@ -207073,6 +208141,13 @@ Object.freeze({
207073
208141
  access: "view",
207074
208142
  role: "admin"
207075
208143
  },
208144
+ "deviceManager.listIdentityLinks": {
208145
+ capName: "device-manager",
208146
+ capScope: "system",
208147
+ addonId: null,
208148
+ access: "view",
208149
+ role: "admin"
208150
+ },
207076
208151
  "deviceManager.listLocationDescriptions": {
207077
208152
  capName: "device-manager",
207078
208153
  capScope: "system",
@@ -207269,6 +208344,13 @@ Object.freeze({
207269
208344
  access: "create",
207270
208345
  role: "admin"
207271
208346
  },
208347
+ "deviceManager.setAttachedIdentifiers": {
208348
+ capName: "device-manager",
208349
+ capScope: "system",
208350
+ addonId: null,
208351
+ access: "create",
208352
+ role: "admin"
208353
+ },
207272
208354
  "deviceManager.setChildLayout": {
207273
208355
  capName: "device-manager",
207274
208356
  capScope: "system",
@@ -207430,6 +208512,13 @@ Object.freeze({
207430
208512
  access: "create",
207431
208513
  role: "admin"
207432
208514
  },
208515
+ "deviceManager.unlinkIdentity": {
208516
+ capName: "device-manager",
208517
+ capScope: "system",
208518
+ addonId: null,
208519
+ access: "delete",
208520
+ role: "admin"
208521
+ },
207433
208522
  "deviceManager.updateConfig": {
207434
208523
  capName: "device-manager",
207435
208524
  capScope: "system",
@@ -207710,6 +208799,20 @@ Object.freeze({
207710
208799
  access: "create",
207711
208800
  role: "admin"
207712
208801
  },
208802
+ "deviceStateRefresh.refresh": {
208803
+ capName: "device-state-refresh",
208804
+ capScope: "device",
208805
+ addonId: null,
208806
+ access: "create",
208807
+ role: "admin"
208808
+ },
208809
+ "deviceStateRefresh.resubscribe": {
208810
+ capName: "device-state-refresh",
208811
+ capScope: "device",
208812
+ addonId: null,
208813
+ access: "create",
208814
+ role: "admin"
208815
+ },
207713
208816
  "deviceStatus.getStatus": {
207714
208817
  capName: "device-status",
207715
208818
  capScope: "device",
@@ -211581,6 +212684,13 @@ Object.freeze({
211581
212684
  access: "view",
211582
212685
  role: "admin"
211583
212686
  },
212687
+ "pipelineOrchestrator.getStepSwitches": {
212688
+ capName: "pipeline-orchestrator",
212689
+ capScope: "system",
212690
+ addonId: null,
212691
+ access: "view",
212692
+ role: "admin"
212693
+ },
211584
212694
  "pipelineOrchestrator.listAgentSettings": {
211585
212695
  capName: "pipeline-orchestrator",
211586
212696
  capScope: "system",
@@ -211735,6 +212845,20 @@ Object.freeze({
211735
212845
  access: "create",
211736
212846
  role: "admin"
211737
212847
  },
212848
+ "pipelineOrchestrator.setClusterStepMode": {
212849
+ capName: "pipeline-orchestrator",
212850
+ capScope: "system",
212851
+ addonId: null,
212852
+ access: "create",
212853
+ role: "admin"
212854
+ },
212855
+ "pipelineOrchestrator.setDeviceStepEnabled": {
212856
+ capName: "pipeline-orchestrator",
212857
+ capScope: "system",
212858
+ addonId: null,
212859
+ access: "create",
212860
+ role: "admin"
212861
+ },
211738
212862
  "pipelineOrchestrator.setLoadBalancingShares": {
211739
212863
  capName: "pipeline-orchestrator",
211740
212864
  capScope: "system",
@@ -211742,6 +212866,13 @@ Object.freeze({
211742
212866
  access: "create",
211743
212867
  role: "admin"
211744
212868
  },
212869
+ "pipelineOrchestrator.setNodeStepEnabled": {
212870
+ capName: "pipeline-orchestrator",
212871
+ capScope: "system",
212872
+ addonId: null,
212873
+ access: "create",
212874
+ role: "admin"
212875
+ },
211745
212876
  "pipelineOrchestrator.setNodeStepSettings": {
211746
212877
  capName: "pipeline-orchestrator",
211747
212878
  capScope: "system",
@@ -213898,6 +215029,13 @@ Object.freeze({
213898
215029
  access: "view",
213899
215030
  role: "admin"
213900
215031
  },
215032
+ "streamBroker.previewDerivedEncode": {
215033
+ capName: "stream-broker",
215034
+ capScope: "system",
215035
+ addonId: null,
215036
+ access: "view",
215037
+ role: "admin"
215038
+ },
213901
215039
  "streamBroker.probeStream": {
213902
215040
  capName: "stream-broker",
213903
215041
  capScope: "system",
@@ -215344,7 +216482,7 @@ function offered(received) {
215344
216482
  }
215345
216483
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
215346
216484
  DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, 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.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
215347
- DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
216485
+ DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host, DeviceRole.Ups;
215348
216486
  new Set(Object.values(DeviceType));
215349
216487
  new Set(Object.values(DeviceRole));
215350
216488
  var LAST_FETCHED_FIELD = "lastFetchedAt";
@@ -216128,6 +217266,11 @@ Object.freeze({
216128
217266
  form: "array",
216129
217267
  optional: true
216130
217268
  }],
217269
+ "deviceManager.listIdentityLinks": [{
217270
+ name: "deviceId",
217271
+ form: "single",
217272
+ optional: true
217273
+ }],
216131
217274
  "deviceManager.loadConfig": [{
216132
217275
  name: "deviceId",
216133
217276
  form: "single",
@@ -216178,6 +217321,11 @@ Object.freeze({
216178
217321
  form: "single",
216179
217322
  optional: false
216180
217323
  }],
217324
+ "deviceManager.setAttachedIdentifiers": [{
217325
+ name: "deviceId",
217326
+ form: "single",
217327
+ optional: false
217328
+ }],
216181
217329
  "deviceManager.setChildLayout": [{
216182
217330
  name: "deviceId",
216183
217331
  form: "single",
@@ -216372,6 +217520,20 @@ Object.freeze({
216372
217520
  form: "single",
216373
217521
  optional: false
216374
217522
  }],
217523
+ "deviceStateRefresh.refresh": [{
217524
+ name: "deviceId",
217525
+ form: "single",
217526
+ optional: false
217527
+ }, {
217528
+ name: "deviceIds",
217529
+ form: "array",
217530
+ optional: false
217531
+ }],
217532
+ "deviceStateRefresh.resubscribe": [{
217533
+ name: "deviceId",
217534
+ form: "single",
217535
+ optional: false
217536
+ }],
216375
217537
  "deviceStatus.getStatus": [{
216376
217538
  name: "deviceId",
216377
217539
  form: "single",
@@ -218329,6 +219491,11 @@ Object.freeze({
218329
219491
  form: "single",
218330
219492
  optional: false
218331
219493
  }],
219494
+ "streamBroker.previewDerivedEncode": [{
219495
+ name: "deviceId",
219496
+ form: "single",
219497
+ optional: false
219498
+ }],
218332
219499
  "streamBroker.produceEventMedia": [{
218333
219500
  name: "deviceId",
218334
219501
  form: "single",
@@ -228415,8 +229582,8 @@ function wantsEventTrace(debugGeneral, socketFlags) {
228415
229582
  //#region src/reolink-hub-session.ts
228416
229583
  var HUB_DISCOVERY_REFRESH_TIMEOUT_MS = 8e3;
228417
229584
  /**
228418
- * How often the session re-reads its own channels summary to reconcile the adopted children's
228419
- * sleep slices. 60 s: a naturally-waking camera (PIR, schedule) is caught within a minute, and
229585
+ * How often the core re-reads the session's own channels summary to reconcile the adopted
229586
+ * children's sleep slices (the floor of the `device-state-refresh` policy). 60 s: a naturally-waking camera (PIR, schedule) is caught within a minute, and
228420
229587
  * the play path has its own faster confirm + post-dial watch, so this only ever carries
228421
229588
  * background drift. Never wakes a child — the summary is answered by the hub itself.
228422
229589
  */
@@ -228457,7 +229624,6 @@ var ReolinkHubSession = class {
228457
229624
  #connectInFlight = null;
228458
229625
  #reconnectAttempts = 0;
228459
229626
  #reconnectTimer = null;
228460
- #reconcileTimer = null;
228461
229627
  #shutdown = false;
228462
229628
  #online = false;
228463
229629
  #snapshot = {
@@ -228522,14 +229688,11 @@ var ReolinkHubSession = class {
228522
229688
  port: c.rtspPort
228523
229689
  };
228524
229690
  }
228525
- /** Arm the periodic reconcile and make the first dial. Idempotent. */
229691
+ /**
229692
+ * Make the first dial. The reconcile after it is the core's: `device-state-refresh` calls
229693
+ * {@link refresh} at {@link HUB_CHILD_SLEEP_RECONCILE_MS} (D1062), the session owns no clock.
229694
+ */
228526
229695
  start() {
228527
- if (this.#reconcileTimer === null) {
228528
- this.#reconcileTimer = setInterval(() => {
228529
- this.refresh().catch(() => {});
228530
- }, HUB_CHILD_SLEEP_RECONCILE_MS);
228531
- if (typeof this.#reconcileTimer.unref === "function") this.#reconcileTimer.unref();
228532
- }
228533
229696
  this.getApi().catch((err) => {
228534
229697
  this.#logger.warn("Reolink hub initial connect failed — will retry", {
228535
229698
  tags: { integrationId: this.integrationId },
@@ -228562,10 +229725,6 @@ var ReolinkHubSession = class {
228562
229725
  clearTimeout(this.#reconnectTimer);
228563
229726
  this.#reconnectTimer = null;
228564
229727
  }
228565
- if (this.#reconcileTimer !== null) {
228566
- clearInterval(this.#reconcileTimer);
228567
- this.#reconcileTimer = null;
228568
- }
228569
229728
  await this.dropApi("hub-shutdown");
228570
229729
  }
228571
229730
  /**
@@ -229087,6 +230246,39 @@ async function connectReolinkHub(connection) {
229087
230246
  return api;
229088
230247
  }
229089
230248
  //#endregion
230249
+ //#region src/reolink-state-refresh.ts
230250
+ /**
230251
+ * Reolink's side of the core state refresh (D1062) for the cameras behind an NVR / Home Hub.
230252
+ *
230253
+ * The NVR reads its own cameras by itself and pushes their events, so the only scheduled work is
230254
+ * the regular reconcile of the children's sleep state, and it is answered by the NVR session
230255
+ * (`HubSessionHandle.refresh()`): the hub's channel summary and battery table. A refresh NEVER
230256
+ * dials or wakes a child camera. Push level is `partial` (events and awake/sleeping notices
230257
+ * arrive by push; the reconcile catches drift), one schedule per integration (`batch`).
230258
+ */
230259
+ function hubChildRefreshPolicy(integrationId) {
230260
+ return {
230261
+ integrationId,
230262
+ minIntervalMs: HUB_CHILD_SLEEP_RECONCILE_MS,
230263
+ batch: true,
230264
+ push: "partial"
230265
+ };
230266
+ }
230267
+ /** A standalone camera keeps its own reads and registers nothing. */
230268
+ function registerHubChildStateRefresh(target) {
230269
+ const integrationId = target.integrationId;
230270
+ if (integrationId === null || !target.hubChild) return;
230271
+ target.ctx.registerNativeCap(deviceStateRefreshCapability, {
230272
+ refresh: async () => {
230273
+ const session = target.session();
230274
+ if (session === null) throw new Error(`reolink: no NVR session for integration ${integrationId}`);
230275
+ await session.refresh();
230276
+ return { ok: true };
230277
+ },
230278
+ resubscribe: async () => ({ ok: true })
230279
+ }, { stateRefresh: hubChildRefreshPolicy(integrationId) });
230280
+ }
230281
+ //#endregion
229090
230282
  //#region src/hub-child-settings.ts
229091
230283
  /**
229092
230284
  * A camera adopted under an NVR / Home Hub dials through the integration's session: the address
@@ -233058,6 +234250,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
233058
234250
  constructor(ctx) {
233059
234251
  super(ctx, reolinkCameraSchema, { type: DeviceType.Camera });
233060
234252
  this.registerNativeCapabilities();
234253
+ this.registerNvrStateRefresh();
233061
234254
  }
233062
234255
  /**
233063
234256
  * Resolved Baichuan channel for per-channel cmd_ids. Children
@@ -234104,6 +235297,20 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
234104
235297
  async getRawState() {
234105
235298
  return buildRawState(this.runtimeState);
234106
235299
  }
235300
+ /**
235301
+ * A hub child is kept fresh by its NVR session, never by a dial to the camera (D1062): the
235302
+ * core calls the session's `refresh()` — the hub's own channel summary — once per integration.
235303
+ * A standalone camera keeps its own reads and registers nothing.
235304
+ */
235305
+ registerNvrStateRefresh() {
235306
+ const integrationId = this.hubIntegrationId();
235307
+ registerHubChildStateRefresh({
235308
+ ctx: this.ctx,
235309
+ integrationId,
235310
+ hubChild: this.isHubChild(),
235311
+ session: () => integrationId === null ? null : reolinkHubSessions.get(integrationId)
235312
+ });
235313
+ }
234107
235314
  registerNativeCapabilities() {
234108
235315
  this.ctx.registerNativeCap(snapshotCapability, {
234109
235316
  getSnapshot: async ({ deviceId, force }) => {
@@ -241722,8 +242929,18 @@ function buildReolinkInstances(records, deps) {
241722
242929
  * NVR / Home Hub one does, and a create wizard (no id yet) sets up a hub.
241723
242930
  */
241724
242931
  function reolinkInstancesProvider(instances, deps) {
242932
+ const base = instances.toProvider();
242933
+ const withAddDevice = async (instance) => ({
242934
+ ...instance,
242935
+ addDevice: await integrationIsHub(instances, deps, instance.id) ? "children" : "scan"
242936
+ });
241725
242937
  return {
241726
- ...instances.toProvider(),
242938
+ ...base,
242939
+ listInstances: async (input) => Promise.all((await base.listInstances(input)).map(withAddDevice)),
242940
+ getInstance: async (input) => {
242941
+ const found = await base.getInstance(input);
242942
+ return found === null ? null : withAddDevice(found);
242943
+ },
241727
242944
  instanceFormSchema: async ({ id }) => {
241728
242945
  if (id === null) return buildHubInstanceSchema();
241729
242946
  const [evidence, body] = await Promise.all([deps.registryEvidenceOf(id), instances.getResolved(id)]);