@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.js CHANGED
@@ -100698,7 +100698,7 @@ function parseBaichuanWebhookObject(mess) {
100698
100698
  return parsed;
100699
100699
  }
100700
100700
  //#endregion
100701
- //#region ../types/dist/event-category-CY27-fF0.mjs
100701
+ //#region ../types/dist/event-category-7P4A3bYA.mjs
100702
100702
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
100703
100703
  EventCategory["SystemBoot"] = "system.boot";
100704
100704
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -100929,6 +100929,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
100929
100929
  * dropped) — consumers MUST also gate on the device record's `probed` flag.
100930
100930
  */
100931
100931
  EventCategory["DeviceReady"] = "device.ready";
100932
+ /**
100933
+ * An identity link (D1063) became `linked` — auto on strong evidence or
100934
+ * confirmed by the operator — or a confirmed link's evidence came back. Telemetry: the `identity-links` record is the
100935
+ * truth, and core-blocks reconciles its contributions from it as well.
100936
+ * Payload: `IdentityLinkEventPayload`.
100937
+ */
100938
+ EventCategory["IdentityLinkCreated"] = "identity-link.created";
100939
+ /**
100940
+ * A `linked` identity link stopped acting: its evidence is gone (an auto link
100941
+ * is deleted; an operator-confirmed one stays `linked`, flagged
100942
+ * `evidenceGone`, and no longer acts), a side was removed, or the operator
100943
+ * unlinked it. Payload: `IdentityLinkEventPayload` with `reason`.
100944
+ */
100945
+ EventCategory["IdentityLinkLost"] = "identity-link.lost";
100932
100946
  EventCategory["IntegrationEnabled"] = "integration.enabled";
100933
100947
  EventCategory["IntegrationDisabled"] = "integration.disabled";
100934
100948
  EventCategory["IntegrationDeleted"] = "integration.deleted";
@@ -101530,7 +101544,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
101530
101544
  return EventCategory;
101531
101545
  }({});
101532
101546
  //#endregion
101533
- //#region ../types/dist/composed-stable-id-BNTaDZEh.mjs
101547
+ //#region ../types/dist/composed-stable-id-DIeNz933.mjs
101534
101548
  /**
101535
101549
  import { errMsg } from '@camstack/types'
101536
101550
  * Extract a human-readable message from an unknown error value.
@@ -101978,6 +101992,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
101978
101992
  /** A machine that runs workloads or is an appliance with its own OS: a
101979
101993
  * server, a hypervisor, a gateway console, a CCU. */
101980
101994
  DeviceRole["Host"] = "host";
101995
+ /** An uninterruptible power supply: battery charge, mains status and load. A
101996
+ * `DeviceType.Sensor` device. */
101997
+ DeviceRole["Ups"] = "ups";
101981
101998
  return DeviceRole;
101982
101999
  }({});
101983
102000
  /**
@@ -106804,7 +106821,7 @@ var ZodIssueCode = {
106804
106821
  var ZodFirstPartyTypeKind;
106805
106822
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
106806
106823
  //#endregion
106807
- //#region ../types/dist/sleep-BT1bLgPq.mjs
106824
+ //#region ../types/dist/runtime-capabilities-B36VcCR6.mjs
106808
106825
  /**
106809
106826
  * The audio chunk plane's byte format, and the ONE expansion from a coded
106810
106827
  * window to float samples (D455).
@@ -108020,6 +108037,18 @@ function isInstanceEnabled(body) {
108020
108037
  }
108021
108038
  /** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
108022
108039
  var SWITCH_KEY = "enabled";
108040
+ /**
108041
+ * The "Add device" mode an instance gets when its provider states none, from how the provider's
108042
+ * devices are found: `lan` scans, `account` adopts the account's children, anything else is manual.
108043
+ * The one place this default lives.
108044
+ */
108045
+ function defaultAddDeviceMode(description) {
108046
+ switch (description.discovery?.mode) {
108047
+ case "lan": return "scan";
108048
+ case "account": return "children";
108049
+ default: return "none";
108050
+ }
108051
+ }
108023
108052
  /** The keys of the kind's secret fields that sit at the top level of the body. */
108024
108053
  function topLevelSecretKeys(paths) {
108025
108054
  return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
@@ -108122,6 +108151,7 @@ var RecordIntegrationInstances = class {
108122
108151
  enabled: isInstanceEnabled(record.data),
108123
108152
  formValues: shown,
108124
108153
  kind,
108154
+ addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
108125
108155
  ...health?.status !== void 0 ? { status: health.status } : {},
108126
108156
  ...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
108127
108157
  };
@@ -111405,14 +111435,104 @@ var SubscribeAudioChunksInputSchema = object({
111405
111435
  var SubscribeAudioChunksResultSchema = object({
111406
111436
  /** Opaque id passed to `pullAudioChunks` / `unsubscribeAudioChunks`. */
111407
111437
  subscriptionId: string() });
111408
- var BrokerStatsSchema = object({
111409
- status: _enum([
111410
- "idle",
111411
- "connecting",
111412
- "streaming",
111413
- "error",
111414
- "stopped"
111438
+ var BrokerStatusSchema = _enum([
111439
+ "idle",
111440
+ "connecting",
111441
+ "streaming",
111442
+ "error",
111443
+ "stopped"
111444
+ ]);
111445
+ /**
111446
+ * The encode a derived stream's feeder was last spawned with — the read-only
111447
+ * "effective encode". Read off the ffmpeg argv that runs, so it cannot drift
111448
+ * from what the operator's profile and the carrier's rules resolved to.
111449
+ */
111450
+ var DerivedEffectiveEncodeSchema = object({
111451
+ /** `-c:v` of the argv (`libx264`, a hardware encoder, `copy`); null when absent. */
111452
+ encoder: string().nullable(),
111453
+ /** Output frame rate; null when the source cadence passes through unmeasured. */
111454
+ fps: number$1().nullable(),
111455
+ gopFrames: number$1(),
111456
+ /** ABR target (`-b:v`), kbps. */
111457
+ targetKbps: number$1().nullable(),
111458
+ /** Ceiling (`-maxrate`), kbps. */
111459
+ capKbps: number$1().nullable(),
111460
+ bufsizeKbps: number$1().nullable(),
111461
+ /**
111462
+ * `copy` = source audio untouched, `aac` = re-encoded, `profile` = operator's
111463
+ * encode, `none` = the operator dropped the track.
111464
+ */
111465
+ audio: _enum([
111466
+ "copy",
111467
+ "aac",
111468
+ "profile",
111469
+ "none"
111470
+ ])
111471
+ });
111472
+ /**
111473
+ * A derived stream's source: a **profile** slot (follows whatever physical
111474
+ * stream that profile is assigned to) or a **camStream** (pinned to one
111475
+ * physical stream regardless of assignment).
111476
+ */
111477
+ var DerivedSourceRefSchema = union([object({
111478
+ kind: literal("profile"),
111479
+ profile: _enum([
111480
+ "high",
111481
+ "mid",
111482
+ "low"
111483
+ ])
111484
+ }), object({
111485
+ kind: literal("camStream"),
111486
+ camStreamId: string()
111487
+ })]);
111488
+ object({
111489
+ width: number$1().nullable(),
111490
+ height: number$1().nullable(),
111491
+ fps: number$1().nullable(),
111492
+ idrIntervalMs: number$1().nullable(),
111493
+ /** `h264` / `h265` when observed. */
111494
+ videoCodec: _enum(["h264", "h265"]).nullable(),
111495
+ /** Upper-cased SDP name (`AAC`, `PCMU`) when the source has an audio track. */
111496
+ audioCodec: string().nullable()
111497
+ });
111498
+ /**
111499
+ * The full effective encode of a derived-stream profile: the stats the broker
111500
+ * publishes in `getBrokerStats.derivedEncode` plus the resolved geometry, the
111501
+ * flags that say WHY a number differs from the request, and the ffmpeg output
111502
+ * argv. One function (`computeDerivedEncode`) produces it for both the
111503
+ * broker's start path and `previewDerivedEncode`.
111504
+ */
111505
+ var DerivedEncodePreviewSchema = DerivedEffectiveEncodeSchema.extend({
111506
+ /** Final picture size; `null` when neither the profile nor the source names it. */
111507
+ width: number$1().nullable(),
111508
+ height: number$1().nullable(),
111509
+ /** `h264` / `h265` re-encode, `copy` remux; `null` is never returned (the encoder always resolves). */
111510
+ videoCodec: _enum([
111511
+ "h264",
111512
+ "h265",
111513
+ "copy"
111415
111514
  ]),
111515
+ requestedFps: number$1().nullable(),
111516
+ /** The requested fps exceeded the source and the source cadence won. */
111517
+ fpsClampedToSource: boolean(),
111518
+ /** Lowest bitrate accepted for this geometry x fps; `null` when unknown. */
111519
+ floorKbps: number$1().nullable(),
111520
+ /** The explicit bitrate was below the floor and was raised to it. */
111521
+ raisedToFloor: boolean(),
111522
+ /** What the profile asked for when it was raised; `null` otherwise. */
111523
+ requestedKbps: number$1().nullable(),
111524
+ /** Seconds between keyframes; `null` when the output cadence is unknown. */
111525
+ keyframeIntervalSec: number$1().nullable(),
111526
+ /** The ffmpeg argv, with the source loopback URL in `-i`. */
111527
+ args: array(string())
111528
+ });
111529
+ /** Result of `previewDerivedEncode`: a plan, or the reason there is none. */
111530
+ var PreviewDerivedEncodeResultSchema = discriminatedUnion("kind", [object({
111531
+ kind: literal("preview"),
111532
+ preview: DerivedEncodePreviewSchema
111533
+ }), object({ kind: literal("no-source") })]);
111534
+ var BrokerStatsSchema = object({
111535
+ status: BrokerStatusSchema,
111416
111536
  inputFps: number$1(),
111417
111537
  encodedSubscribers: number$1(),
111418
111538
  uptimeMs: number$1(),
@@ -111452,7 +111572,9 @@ var BrokerStatsSchema = object({
111452
111572
  * alone that the mute is on the packet path and not merely persisted.
111453
111573
  */
111454
111574
  audioMuted: boolean().optional(),
111455
- audioMutedDropped: number$1().optional()
111575
+ audioMutedDropped: number$1().optional(),
111576
+ /** Present for a derived broker once its feeder has spawned at least once. */
111577
+ derivedEncode: DerivedEffectiveEncodeSchema.optional()
111456
111578
  });
111457
111579
  /**
111458
111580
  * Exporter-facing "profile restream" entry. Returned by
@@ -111642,6 +111764,10 @@ var CAP_VOCABULARY_BY_NAME = {
111642
111764
  it: "Commuta {device}"
111643
111765
  },
111644
111766
  icon: "toggle-right",
111767
+ sideEffects: [{
111768
+ field: "on",
111769
+ negate: true
111770
+ }],
111645
111771
  offeredWhen: {
111646
111772
  method: "getOptions",
111647
111773
  field: "supportsSetState"
@@ -112756,7 +112882,15 @@ var CAP_VOCABULARY_BY_NAME = {
112756
112882
  effect: {
112757
112883
  field: "state",
112758
112884
  value: "locked"
112759
- }
112885
+ },
112886
+ hold: { effects: [{
112887
+ field: "state",
112888
+ value: "locking",
112889
+ when: {
112890
+ field: "state",
112891
+ notIn: ["locked"]
112892
+ }
112893
+ }] }
112760
112894
  },
112761
112895
  {
112762
112896
  id: "lock.unlock",
@@ -112785,7 +112919,15 @@ var CAP_VOCABULARY_BY_NAME = {
112785
112919
  effect: {
112786
112920
  field: "state",
112787
112921
  value: "unlocked"
112788
- }
112922
+ },
112923
+ hold: { effects: [{
112924
+ field: "state",
112925
+ value: "unlocking",
112926
+ when: {
112927
+ field: "state",
112928
+ notIn: ["unlocked"]
112929
+ }
112930
+ }] }
112789
112931
  },
112790
112932
  {
112791
112933
  id: "lock.open",
@@ -113099,6 +113241,14 @@ var CAP_VOCABULARY_BY_NAME = {
113099
113241
  step: .5,
113100
113242
  unit: "°C"
113101
113243
  }
113244
+ }],
113245
+ effect: {
113246
+ field: "targetLow",
113247
+ fromArg: "targetLow"
113248
+ },
113249
+ sideEffects: [{
113250
+ field: "targetHigh",
113251
+ fromArg: "targetHigh"
113102
113252
  }]
113103
113253
  },
113104
113254
  {
@@ -113155,7 +113305,11 @@ var CAP_VOCABULARY_BY_NAME = {
113155
113305
  from: "status",
113156
113306
  field: "availableFanModes"
113157
113307
  }
113158
- }]
113308
+ }],
113309
+ effect: {
113310
+ field: "fanMode",
113311
+ fromArg: "fanMode"
113312
+ }
113159
113313
  },
113160
113314
  {
113161
113315
  id: "climate.preset",
@@ -113180,7 +113334,11 @@ var CAP_VOCABULARY_BY_NAME = {
113180
113334
  from: "status",
113181
113335
  field: "availablePresets"
113182
113336
  }
113183
- }]
113337
+ }],
113338
+ effect: {
113339
+ field: "preset",
113340
+ fromArg: "preset"
113341
+ }
113184
113342
  },
113185
113343
  {
113186
113344
  id: "climate.swingVerticalOn",
@@ -113413,7 +113571,15 @@ var CAP_VOCABULARY_BY_NAME = {
113413
113571
  effect: {
113414
113572
  field: "speed",
113415
113573
  value: 100
113416
- }
113574
+ },
113575
+ sideEffects: [{
113576
+ field: "preset",
113577
+ value: "",
113578
+ when: {
113579
+ field: "preset",
113580
+ notIn: [""]
113581
+ }
113582
+ }]
113417
113583
  },
113418
113584
  {
113419
113585
  id: "fan.speed",
@@ -113444,7 +113610,15 @@ var CAP_VOCABULARY_BY_NAME = {
113444
113610
  effect: {
113445
113611
  field: "speed",
113446
113612
  fromArg: "speed"
113447
- }
113613
+ },
113614
+ sideEffects: [{
113615
+ field: "preset",
113616
+ value: "",
113617
+ when: {
113618
+ field: "preset",
113619
+ notIn: [""]
113620
+ }
113621
+ }]
113448
113622
  },
113449
113623
  {
113450
113624
  id: "fan.preset",
@@ -113469,7 +113643,11 @@ var CAP_VOCABULARY_BY_NAME = {
113469
113643
  from: "status",
113470
113644
  field: "availablePresets"
113471
113645
  }
113472
- }]
113646
+ }],
113647
+ effect: {
113648
+ field: "preset",
113649
+ fromArg: "preset"
113650
+ }
113473
113651
  },
113474
113652
  {
113475
113653
  id: "fan.forward",
@@ -114014,7 +114192,15 @@ var CAP_VOCABULARY_BY_NAME = {
114014
114192
  effect: {
114015
114193
  field: "state",
114016
114194
  value: "disarmed"
114017
- }
114195
+ },
114196
+ hold: { effects: [{
114197
+ field: "state",
114198
+ value: "disarming",
114199
+ when: {
114200
+ field: "state",
114201
+ notIn: ["disarmed"]
114202
+ }
114203
+ }] }
114018
114204
  },
114019
114205
  {
114020
114206
  id: "alarm.arm.home",
@@ -114044,7 +114230,15 @@ var CAP_VOCABULARY_BY_NAME = {
114044
114230
  effect: {
114045
114231
  field: "state",
114046
114232
  value: "armed_home"
114047
- }
114233
+ },
114234
+ hold: { effects: [{
114235
+ field: "state",
114236
+ value: "arming",
114237
+ when: {
114238
+ field: "state",
114239
+ notIn: ["armed_home"]
114240
+ }
114241
+ }] }
114048
114242
  },
114049
114243
  {
114050
114244
  id: "alarm.arm.away",
@@ -114074,7 +114268,15 @@ var CAP_VOCABULARY_BY_NAME = {
114074
114268
  effect: {
114075
114269
  field: "state",
114076
114270
  value: "armed_away"
114077
- }
114271
+ },
114272
+ hold: { effects: [{
114273
+ field: "state",
114274
+ value: "arming",
114275
+ when: {
114276
+ field: "state",
114277
+ notIn: ["armed_away"]
114278
+ }
114279
+ }] }
114078
114280
  },
114079
114281
  {
114080
114282
  id: "alarm.arm.night",
@@ -114104,7 +114306,15 @@ var CAP_VOCABULARY_BY_NAME = {
114104
114306
  effect: {
114105
114307
  field: "state",
114106
114308
  value: "armed_night"
114107
- }
114309
+ },
114310
+ hold: { effects: [{
114311
+ field: "state",
114312
+ value: "arming",
114313
+ when: {
114314
+ field: "state",
114315
+ notIn: ["armed_night"]
114316
+ }
114317
+ }] }
114108
114318
  },
114109
114319
  {
114110
114320
  id: "alarm.arm.vacation",
@@ -114134,7 +114344,15 @@ var CAP_VOCABULARY_BY_NAME = {
114134
114344
  effect: {
114135
114345
  field: "state",
114136
114346
  value: "armed_vacation"
114137
- }
114347
+ },
114348
+ hold: { effects: [{
114349
+ field: "state",
114350
+ value: "arming",
114351
+ when: {
114352
+ field: "state",
114353
+ notIn: ["armed_vacation"]
114354
+ }
114355
+ }] }
114138
114356
  },
114139
114357
  {
114140
114358
  id: "alarm.arm.custom_bypass",
@@ -114164,7 +114382,15 @@ var CAP_VOCABULARY_BY_NAME = {
114164
114382
  effect: {
114165
114383
  field: "state",
114166
114384
  value: "armed_custom_bypass"
114167
- }
114385
+ },
114386
+ hold: { effects: [{
114387
+ field: "state",
114388
+ value: "arming",
114389
+ when: {
114390
+ field: "state",
114391
+ notIn: ["armed_custom_bypass"]
114392
+ }
114393
+ }] }
114168
114394
  }
114169
114395
  ],
114170
114396
  state: [{
@@ -115306,7 +115532,14 @@ var CAP_VOCABULARY_BY_NAME = {
115306
115532
  quantity: "mass"
115307
115533
  },
115308
115534
  optional: true
115309
- }]
115535
+ }],
115536
+ hold: {
115537
+ effects: [{
115538
+ field: "feeding",
115539
+ value: true
115540
+ }],
115541
+ holdMs: 1e4
115542
+ }
115310
115543
  },
115311
115544
  {
115312
115545
  id: "petFeeder.feedHoppers",
@@ -115350,7 +115583,14 @@ var CAP_VOCABULARY_BY_NAME = {
115350
115583
  quantity: "mass"
115351
115584
  },
115352
115585
  optional: true
115353
- }]
115586
+ }],
115587
+ hold: {
115588
+ effects: [{
115589
+ field: "feeding",
115590
+ value: true
115591
+ }],
115592
+ holdMs: 1e4
115593
+ }
115354
115594
  },
115355
115595
  {
115356
115596
  id: "petFeeder.cancelFeed",
@@ -115441,7 +115681,11 @@ var CAP_VOCABULARY_BY_NAME = {
115441
115681
  it: "Attiva il blocco bambini di {device}"
115442
115682
  },
115443
115683
  icon: "lock",
115444
- args: { on: true }
115684
+ args: { on: true },
115685
+ effect: {
115686
+ field: "childLock",
115687
+ value: true
115688
+ }
115445
115689
  },
115446
115690
  {
115447
115691
  id: "petFeeder.childLockOff",
@@ -115455,7 +115699,11 @@ var CAP_VOCABULARY_BY_NAME = {
115455
115699
  it: "Disattiva il blocco bambini di {device}"
115456
115700
  },
115457
115701
  icon: "lock-open",
115458
- args: { on: false }
115702
+ args: { on: false },
115703
+ effect: {
115704
+ field: "childLock",
115705
+ value: false
115706
+ }
115459
115707
  },
115460
115708
  {
115461
115709
  id: "petFeeder.lightOn",
@@ -115469,7 +115717,11 @@ var CAP_VOCABULARY_BY_NAME = {
115469
115717
  it: "Accendi la spia di {device}"
115470
115718
  },
115471
115719
  icon: "lightbulb",
115472
- args: { on: true }
115720
+ args: { on: true },
115721
+ effect: {
115722
+ field: "indicatorLight",
115723
+ value: true
115724
+ }
115473
115725
  },
115474
115726
  {
115475
115727
  id: "petFeeder.lightOff",
@@ -115483,7 +115735,11 @@ var CAP_VOCABULARY_BY_NAME = {
115483
115735
  it: "Spegni la spia di {device}"
115484
115736
  },
115485
115737
  icon: "lightbulb-off",
115486
- args: { on: false }
115738
+ args: { on: false },
115739
+ effect: {
115740
+ field: "indicatorLight",
115741
+ value: false
115742
+ }
115487
115743
  },
115488
115744
  {
115489
115745
  id: "petFeeder.feedSoundOn",
@@ -115497,7 +115753,11 @@ var CAP_VOCABULARY_BY_NAME = {
115497
115753
  it: "Attiva il suono di erogazione di {device}"
115498
115754
  },
115499
115755
  icon: "volume-2",
115500
- args: { on: true }
115756
+ args: { on: true },
115757
+ effect: {
115758
+ field: "feedSound",
115759
+ value: true
115760
+ }
115501
115761
  },
115502
115762
  {
115503
115763
  id: "petFeeder.feedSoundOff",
@@ -115511,7 +115771,11 @@ var CAP_VOCABULARY_BY_NAME = {
115511
115771
  it: "Disattiva il suono di erogazione di {device}"
115512
115772
  },
115513
115773
  icon: "volume-x",
115514
- args: { on: false }
115774
+ args: { on: false },
115775
+ effect: {
115776
+ field: "feedSound",
115777
+ value: false
115778
+ }
115515
115779
  },
115516
115780
  {
115517
115781
  id: "petFeeder.volume",
@@ -115536,7 +115800,11 @@ var CAP_VOCABULARY_BY_NAME = {
115536
115800
  min: 0,
115537
115801
  step: 1
115538
115802
  }
115539
- }]
115803
+ }],
115804
+ effect: {
115805
+ field: "volume",
115806
+ fromArg: "level"
115807
+ }
115540
115808
  }
115541
115809
  ],
115542
115810
  state: [
@@ -115608,7 +115876,11 @@ var CAP_VOCABULARY_BY_NAME = {
115608
115876
  it: "Avvia la pompa di {device}"
115609
115877
  },
115610
115878
  icon: "play",
115611
- args: { on: true }
115879
+ args: { on: true },
115880
+ effect: {
115881
+ field: "pumpRunning",
115882
+ value: true
115883
+ }
115612
115884
  }, {
115613
115885
  id: "petFountain.pumpOff",
115614
115886
  method: "setPump",
@@ -115621,7 +115893,11 @@ var CAP_VOCABULARY_BY_NAME = {
115621
115893
  it: "Ferma la pompa di {device}"
115622
115894
  },
115623
115895
  icon: "square",
115624
- args: { on: false }
115896
+ args: { on: false },
115897
+ effect: {
115898
+ field: "pumpRunning",
115899
+ value: false
115900
+ }
115625
115901
  }],
115626
115902
  state: [{
115627
115903
  kind: "boolean",
@@ -115673,7 +115949,11 @@ var CAP_VOCABULARY_BY_NAME = {
115673
115949
  it: "Fai lavorare la pompa di {device} a ciclo acceso/spento"
115674
115950
  },
115675
115951
  icon: "timer",
115676
- args: { on: true }
115952
+ args: { on: true },
115953
+ effect: {
115954
+ field: "enabled",
115955
+ value: true
115956
+ }
115677
115957
  },
115678
115958
  {
115679
115959
  id: "pumpCycle.off",
@@ -115687,7 +115967,11 @@ var CAP_VOCABULARY_BY_NAME = {
115687
115967
  it: "Fai lavorare la pompa di {device} in continuo"
115688
115968
  },
115689
115969
  icon: "timer-off",
115690
- args: { on: false }
115970
+ args: { on: false },
115971
+ effect: {
115972
+ field: "enabled",
115973
+ value: false
115974
+ }
115691
115975
  },
115692
115976
  {
115693
115977
  id: "pumpCycle.onMinutes",
@@ -115713,7 +115997,12 @@ var CAP_VOCABULARY_BY_NAME = {
115713
115997
  step: 1,
115714
115998
  unit: "min"
115715
115999
  }
115716
- }]
116000
+ }],
116001
+ effect: {
116002
+ field: "onTime",
116003
+ fromArg: "minutes",
116004
+ scale: 60
116005
+ }
115717
116006
  },
115718
116007
  {
115719
116008
  id: "pumpCycle.offMinutes",
@@ -115739,7 +116028,12 @@ var CAP_VOCABULARY_BY_NAME = {
115739
116028
  step: 1,
115740
116029
  unit: "min"
115741
116030
  }
115742
- }]
116031
+ }],
116032
+ effect: {
116033
+ field: "offTime",
116034
+ fromArg: "minutes",
116035
+ scale: 60
116036
+ }
115743
116037
  }
115744
116038
  ],
115745
116039
  state: [{
@@ -115856,7 +116150,11 @@ var CAP_VOCABULARY_BY_NAME = {
115856
116150
  en: "Play on {device}",
115857
116151
  it: "Avvia la riproduzione su {device}"
115858
116152
  },
115859
- icon: "play"
116153
+ icon: "play",
116154
+ effect: {
116155
+ field: "state",
116156
+ value: "playing"
116157
+ }
115860
116158
  },
115861
116159
  {
115862
116160
  id: "media.pause",
@@ -115869,7 +116167,11 @@ var CAP_VOCABULARY_BY_NAME = {
115869
116167
  en: "Pause {device}",
115870
116168
  it: "Metti in pausa {device}"
115871
116169
  },
115872
- icon: "pause"
116170
+ icon: "pause",
116171
+ effect: {
116172
+ field: "state",
116173
+ value: "paused"
116174
+ }
115873
116175
  },
115874
116176
  {
115875
116177
  id: "media.stop",
@@ -115935,7 +116237,11 @@ var CAP_VOCABULARY_BY_NAME = {
115935
116237
  step: 1,
115936
116238
  unit: "%"
115937
116239
  }
115938
- }]
116240
+ }],
116241
+ effect: {
116242
+ field: "volumeLevel",
116243
+ fromArg: "volumeLevel"
116244
+ }
115939
116245
  },
115940
116246
  {
115941
116247
  id: "media.mute",
@@ -115949,7 +116255,11 @@ var CAP_VOCABULARY_BY_NAME = {
115949
116255
  it: "Silenzia {device}"
115950
116256
  },
115951
116257
  icon: "volume-x",
115952
- args: { muted: true }
116258
+ args: { muted: true },
116259
+ effect: {
116260
+ field: "isMuted",
116261
+ value: true
116262
+ }
115953
116263
  },
115954
116264
  {
115955
116265
  id: "media.unmute",
@@ -115963,7 +116273,11 @@ var CAP_VOCABULARY_BY_NAME = {
115963
116273
  it: "Riattiva l’audio di {device}"
115964
116274
  },
115965
116275
  icon: "volume-2",
115966
- args: { muted: false }
116276
+ args: { muted: false },
116277
+ effect: {
116278
+ field: "isMuted",
116279
+ value: false
116280
+ }
115967
116281
  },
115968
116282
  {
115969
116283
  id: "media.shuffleOn",
@@ -115977,7 +116291,11 @@ var CAP_VOCABULARY_BY_NAME = {
115977
116291
  it: "Attiva la riproduzione casuale su {device}"
115978
116292
  },
115979
116293
  icon: "shuffle",
115980
- args: { shuffle: true }
116294
+ args: { shuffle: true },
116295
+ effect: {
116296
+ field: "shuffle",
116297
+ value: true
116298
+ }
115981
116299
  },
115982
116300
  {
115983
116301
  id: "media.shuffleOff",
@@ -115991,7 +116309,11 @@ var CAP_VOCABULARY_BY_NAME = {
115991
116309
  it: "Disattiva la riproduzione casuale su {device}"
115992
116310
  },
115993
116311
  icon: "shuffle",
115994
- args: { shuffle: false }
116312
+ args: { shuffle: false },
116313
+ effect: {
116314
+ field: "shuffle",
116315
+ value: false
116316
+ }
115995
116317
  },
115996
116318
  {
115997
116319
  id: "media.repeat",
@@ -116037,7 +116359,11 @@ var CAP_VOCABULARY_BY_NAME = {
116037
116359
  }
116038
116360
  ]
116039
116361
  }
116040
- }]
116362
+ }],
116363
+ effect: {
116364
+ field: "repeat",
116365
+ fromArg: "repeat"
116366
+ }
116041
116367
  },
116042
116368
  {
116043
116369
  id: "media.source",
@@ -116062,7 +116388,11 @@ var CAP_VOCABULARY_BY_NAME = {
116062
116388
  from: "status",
116063
116389
  field: "availableSources"
116064
116390
  }
116065
- }]
116391
+ }],
116392
+ effect: {
116393
+ field: "source",
116394
+ fromArg: "source"
116395
+ }
116066
116396
  },
116067
116397
  {
116068
116398
  id: "media.seek",
@@ -116602,7 +116932,14 @@ var CAP_VOCABULARY_BY_NAME = {
116602
116932
  en: "Run {device}",
116603
116933
  it: "Esegui {device}"
116604
116934
  },
116605
- icon: "scroll-text"
116935
+ icon: "scroll-text",
116936
+ hold: {
116937
+ effects: [{
116938
+ field: "isRunning",
116939
+ value: true
116940
+ }],
116941
+ holdMs: 1e4
116942
+ }
116606
116943
  }, {
116607
116944
  id: "script.stop",
116608
116945
  method: "stop",
@@ -116614,7 +116951,11 @@ var CAP_VOCABULARY_BY_NAME = {
116614
116951
  en: "Stop {device}",
116615
116952
  it: "Ferma {device}"
116616
116953
  },
116617
- icon: "square"
116954
+ icon: "square",
116955
+ effect: {
116956
+ field: "isRunning",
116957
+ value: false
116958
+ }
116618
116959
  }],
116619
116960
  state: [{
116620
116961
  kind: "boolean",
@@ -116652,7 +116993,11 @@ var CAP_VOCABULARY_BY_NAME = {
116652
116993
  en: "Enable {device}",
116653
116994
  it: "Abilita {device}"
116654
116995
  },
116655
- icon: "toggle-right"
116996
+ icon: "toggle-right",
116997
+ effect: {
116998
+ field: "enabled",
116999
+ value: true
117000
+ }
116656
117001
  },
116657
117002
  {
116658
117003
  id: "haAutomation.disable",
@@ -116665,7 +117010,11 @@ var CAP_VOCABULARY_BY_NAME = {
116665
117010
  en: "Disable {device}",
116666
117011
  it: "Disabilita {device}"
116667
117012
  },
116668
- icon: "toggle-left"
117013
+ icon: "toggle-left",
117014
+ effect: {
117015
+ field: "enabled",
117016
+ value: false
117017
+ }
116669
117018
  },
116670
117019
  {
116671
117020
  id: "haAutomation.trigger",
@@ -118267,6 +118616,17 @@ var CAP_VOCABULARY_BY_NAME = {
118267
118616
  },
118268
118617
  notOperatorFacing: { resync: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action" }
118269
118618
  },
118619
+ "device-state-refresh": {
118620
+ scope: "device",
118621
+ noun: {
118622
+ en: "State refresh",
118623
+ it: "Aggiornamento dello stato"
118624
+ },
118625
+ notOperatorFacing: {
118626
+ refresh: "the core schedules state refreshes itself; an operator never asks for one",
118627
+ resubscribe: "the core schedules state refreshes itself; an operator never asks for one"
118628
+ }
118629
+ },
118270
118630
  "recording": {
118271
118631
  scope: "device",
118272
118632
  noun: {
@@ -121255,6 +121615,7 @@ var CAP_NAMES = Object.freeze([
121255
121615
  "device-removal-hook",
121256
121616
  "device-runs",
121257
121617
  "device-state",
121618
+ "device-state-refresh",
121258
121619
  "device-status",
121259
121620
  "device-transitions",
121260
121621
  "dishwasher",
@@ -122895,6 +123256,10 @@ Object.freeze({
122895
123256
  "path": "power",
122896
123257
  "valueType": "number"
122897
123258
  },
123259
+ {
123260
+ "path": "deliveredPower",
123261
+ "valueType": "number"
123262
+ },
122898
123263
  {
122899
123264
  "path": "energy",
122900
123265
  "valueType": "number"
@@ -123737,7 +124102,7 @@ function sleep(ms) {
123737
124102
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
123738
124103
  }
123739
124104
  //#endregion
123740
- //#region ../types/dist/implemented-methods-k3KProJd.mjs
124105
+ //#region ../types/dist/implemented-methods-BUBqZ2a0.mjs
123741
124106
  /**
123742
124107
  * The ffmpeg build every CamStack node downloads, per platform and arch.
123743
124108
  *
@@ -124897,6 +125262,8 @@ var CompositionItemEntrySchema = object({
124897
125262
  */
124898
125263
  reset: CompositionForwardCommandSchema.optional()
124899
125264
  });
125265
+ /** Which identity link added a feature (D1063). */
125266
+ var CompositionContributedBySchema = object({ linkId: string().min(1) });
124900
125267
  var CompositionFeatureSchema = discriminatedUnion("kind", [object({
124901
125268
  kind: literal("fields"),
124902
125269
  cap: string().min(1),
@@ -124908,7 +125275,14 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
124908
125275
  */
124909
125276
  items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
124910
125277
  /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
124911
- commands: record(string().min(1), CompositionCommandTargetSchema).optional()
125278
+ commands: record(string().min(1), CompositionCommandTargetSchema).optional(),
125279
+ /**
125280
+ * Provenance only (D1063): the identity link that added this feature. The
125281
+ * source ref stays in `fields`; `enabled` stays the operator's switch. An
125282
+ * operator edit of the source drops the stamp and the feature becomes the
125283
+ * operator's; a lost link removes only stamped features.
125284
+ */
125285
+ contributedBy: CompositionContributedBySchema.optional()
124912
125286
  }), object({
124913
125287
  kind: literal("passthrough"),
124914
125288
  cap: string().min(1),
@@ -126353,10 +126727,16 @@ looseObject({
126353
126727
  TargetSchema.omit({ id: true });
126354
126728
  var EncodeProfileSchema = object({
126355
126729
  video: object({
126730
+ /**
126731
+ * `h264` / `h265` re-encode into that codec; `source` re-encodes in whatever
126732
+ * codec the source speaks (a resize that keeps the codec); `copy` remuxes
126733
+ * with no encode at all (so no resize either).
126734
+ */
126356
126735
  codec: _enum([
126357
126736
  "h264",
126358
126737
  "h265",
126359
- "copy"
126738
+ "copy",
126739
+ "source"
126360
126740
  ]),
126361
126741
  profile: _enum([
126362
126742
  "baseline",
@@ -126408,12 +126788,14 @@ var EncodeProfileSchema = object({
126408
126788
  singleSlicePerFrame: boolean().optional()
126409
126789
  }),
126410
126790
  audio: union([literal("passthrough"), object({
126791
+ /** `none` drops the audio track (`-an`); `copy` carries the source's. */
126411
126792
  codec: _enum([
126412
126793
  "opus",
126413
126794
  "aac",
126414
126795
  "pcmu",
126415
126796
  "pcma",
126416
- "copy"
126797
+ "copy",
126798
+ "none"
126417
126799
  ]),
126418
126800
  bitrateKbps: number$1().int().positive().optional(),
126419
126801
  sampleRateHz: number$1().int().positive().optional(),
@@ -127597,7 +127979,7 @@ function ordinalOf(id) {
127597
127979
  function defaultIntegrationOf(integrations, eligible) {
127598
127980
  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;
127599
127981
  }
127600
- function unstamped(device) {
127982
+ function unstamped$1(device) {
127601
127983
  return device.integrationId === void 0 || device.integrationId === null || device.integrationId === "";
127602
127984
  }
127603
127985
  /**
@@ -127614,8 +127996,8 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
127614
127996
  const all = await ports.listDevices(spec.addonId);
127615
127997
  const byId = new Map(all.map((d) => [d.id, d]));
127616
127998
  const reservations = /* @__PURE__ */ new Set();
127617
- for (const device of all) if (unstamped(device) && await isReservation(ports, device)) reservations.add(device.id);
127618
- const orphans = all.filter((d) => unstamped(d) && !reservations.has(d.id));
127999
+ for (const device of all) if (unstamped$1(device) && await isReservation(ports, device)) reservations.add(device.id);
128000
+ const orphans = all.filter((d) => unstamped$1(d) && !reservations.has(d.id));
127619
128001
  const summaryBase = { reservations: reservations.size };
127620
128002
  if (orphans.length === 0) return {
127621
128003
  outcome: "already-done",
@@ -127630,7 +128012,7 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
127630
128012
  const unresolved = /* @__PURE__ */ new Set();
127631
128013
  const failed = /* @__PURE__ */ new Set();
127632
128014
  const resolve = (device, seen) => {
127633
- if (!unstamped(device)) return device.integrationId ?? null;
128015
+ if (!unstamped$1(device)) return device.integrationId ?? null;
127634
128016
  const planned = plan.get(device.id);
127635
128017
  if (planned !== void 0) return planned;
127636
128018
  if (failed.has(device.id)) return null;
@@ -154822,6 +155204,14 @@ var alarmPanelCapability = {
154822
155204
  field: "state",
154823
155205
  value: "disarmed"
154824
155206
  },
155207
+ hold: { effects: [{
155208
+ field: "state",
155209
+ value: "disarming",
155210
+ when: {
155211
+ field: "state",
155212
+ notIn: ["disarmed"]
155213
+ }
155214
+ }] },
154825
155215
  openArgs: [{
154826
155216
  key: "code",
154827
155217
  label: t("PIN code", "Codice PIN"),
@@ -154852,6 +155242,14 @@ var alarmPanelCapability = {
154852
155242
  field: "state",
154853
155243
  value: "armed_home"
154854
155244
  },
155245
+ hold: { effects: [{
155246
+ field: "state",
155247
+ value: "arming",
155248
+ when: {
155249
+ field: "state",
155250
+ notIn: ["armed_home"]
155251
+ }
155252
+ }] },
154855
155253
  args: { mode: "home" },
154856
155254
  openArgs: [{
154857
155255
  key: "code",
@@ -154872,6 +155270,14 @@ var alarmPanelCapability = {
154872
155270
  field: "state",
154873
155271
  value: "armed_away"
154874
155272
  },
155273
+ hold: { effects: [{
155274
+ field: "state",
155275
+ value: "arming",
155276
+ when: {
155277
+ field: "state",
155278
+ notIn: ["armed_away"]
155279
+ }
155280
+ }] },
154875
155281
  args: { mode: "away" },
154876
155282
  openArgs: [{
154877
155283
  key: "code",
@@ -154892,6 +155298,14 @@ var alarmPanelCapability = {
154892
155298
  field: "state",
154893
155299
  value: "armed_night"
154894
155300
  },
155301
+ hold: { effects: [{
155302
+ field: "state",
155303
+ value: "arming",
155304
+ when: {
155305
+ field: "state",
155306
+ notIn: ["armed_night"]
155307
+ }
155308
+ }] },
154895
155309
  args: { mode: "night" },
154896
155310
  openArgs: [{
154897
155311
  key: "code",
@@ -154912,6 +155326,14 @@ var alarmPanelCapability = {
154912
155326
  field: "state",
154913
155327
  value: "armed_vacation"
154914
155328
  },
155329
+ hold: { effects: [{
155330
+ field: "state",
155331
+ value: "arming",
155332
+ when: {
155333
+ field: "state",
155334
+ notIn: ["armed_vacation"]
155335
+ }
155336
+ }] },
154915
155337
  args: { mode: "vacation" },
154916
155338
  openArgs: [{
154917
155339
  key: "code",
@@ -154932,6 +155354,14 @@ var alarmPanelCapability = {
154932
155354
  field: "state",
154933
155355
  value: "armed_custom_bypass"
154934
155356
  },
155357
+ hold: { effects: [{
155358
+ field: "state",
155359
+ value: "arming",
155360
+ when: {
155361
+ field: "state",
155362
+ notIn: ["armed_custom_bypass"]
155363
+ }
155364
+ }] },
154935
155365
  args: { mode: "custom_bypass" },
154936
155366
  openArgs: [{
154937
155367
  key: "code",
@@ -155615,6 +156045,10 @@ var automationControlCapability = {
155615
156045
  auth: "admin",
155616
156046
  actions: [{
155617
156047
  id: "haAutomation.enable",
156048
+ effect: {
156049
+ field: "enabled",
156050
+ value: true
156051
+ },
155618
156052
  label: t("Enable automation", "Abilita l’automazione"),
155619
156053
  phrase: t("Enable {device}", "Abilita {device}"),
155620
156054
  icon: "toggle-right"
@@ -155625,6 +156059,10 @@ var automationControlCapability = {
155625
156059
  auth: "admin",
155626
156060
  actions: [{
155627
156061
  id: "haAutomation.disable",
156062
+ effect: {
156063
+ field: "enabled",
156064
+ value: false
156065
+ },
155628
156066
  label: t("Disable automation", "Disabilita l’automazione"),
155629
156067
  phrase: t("Disable {device}", "Disabilita {device}"),
155630
156068
  icon: "toggle-left"
@@ -157703,7 +158141,11 @@ method(object({
157703
158141
  }).nullable(), {
157704
158142
  kind: "mutation",
157705
158143
  auth: "admin"
157706
- }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
158144
+ }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({
158145
+ deviceId: number$1().int().nonnegative(),
158146
+ profile: EncodeProfileSchema,
158147
+ source: DerivedSourceRefSchema.optional()
158148
+ }), PreviewDerivedEncodeResultSchema), method(object({ brokerId: string() }), object({
157707
158149
  probed: boolean(),
157708
158150
  summary: string()
157709
158151
  }), {
@@ -158435,6 +158877,14 @@ var climateControlCapability = {
158435
158877
  label: t("Set temperature range", "Imposta l’intervallo di temperatura"),
158436
158878
  phrase: t("Keep {device} between {targetLow} and {targetHigh}", "Mantieni {device} tra {targetLow} e {targetHigh}"),
158437
158879
  icon: "thermometer",
158880
+ effect: {
158881
+ field: "targetLow",
158882
+ fromArg: "targetLow"
158883
+ },
158884
+ sideEffects: [{
158885
+ field: "targetHigh",
158886
+ fromArg: "targetHigh"
158887
+ }],
158438
158888
  openArgs: [{
158439
158889
  key: "targetLow",
158440
158890
  label: t("Lowest", "Minima"),
@@ -158493,6 +158943,10 @@ var climateControlCapability = {
158493
158943
  label: t("Set fan mode", "Imposta la ventilazione"),
158494
158944
  phrase: t("Set the fan of {device} to {fanMode}", "Imposta la ventilazione di {device} su {fanMode}"),
158495
158945
  icon: "fan",
158946
+ effect: {
158947
+ field: "fanMode",
158948
+ fromArg: "fanMode"
158949
+ },
158496
158950
  openArgs: [{
158497
158951
  key: "fanMode",
158498
158952
  label: t("Fan mode", "Ventilazione"),
@@ -158515,6 +158969,10 @@ var climateControlCapability = {
158515
158969
  label: t("Set preset", "Imposta il preset"),
158516
158970
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
158517
158971
  icon: "list",
158972
+ effect: {
158973
+ field: "preset",
158974
+ fromArg: "preset"
158975
+ },
158518
158976
  openArgs: [{
158519
158977
  key: "preset",
158520
158978
  label: t("Preset", "Preset"),
@@ -159102,7 +159560,8 @@ var CompositionProblemSchema = object({
159102
159560
  "command-source-unknown",
159103
159561
  "command-input-unknown",
159104
159562
  "command-input-missing",
159105
- "power-source-is-actuator"
159563
+ "power-source-is-actuator",
159564
+ "link-contribution-removed"
159106
159565
  ]),
159107
159566
  path: string(),
159108
159567
  message: string()
@@ -160529,6 +160988,10 @@ var mediaPlayerCapability = {
160529
160988
  auth: "protected",
160530
160989
  actions: [{
160531
160990
  id: "media.play",
160991
+ effect: {
160992
+ field: "state",
160993
+ value: "playing"
160994
+ },
160532
160995
  label: t("Play", "Riproduci"),
160533
160996
  phrase: t("Play on {device}", "Avvia la riproduzione su {device}"),
160534
160997
  icon: "play"
@@ -160539,6 +161002,10 @@ var mediaPlayerCapability = {
160539
161002
  auth: "protected",
160540
161003
  actions: [{
160541
161004
  id: "media.pause",
161005
+ effect: {
161006
+ field: "state",
161007
+ value: "paused"
161008
+ },
160542
161009
  label: t("Pause media", "Metti in pausa"),
160543
161010
  phrase: t("Pause {device}", "Metti in pausa {device}"),
160544
161011
  icon: "pause"
@@ -160582,6 +161049,10 @@ var mediaPlayerCapability = {
160582
161049
  auth: "protected",
160583
161050
  actions: [{
160584
161051
  id: "media.volume",
161052
+ effect: {
161053
+ field: "volumeLevel",
161054
+ fromArg: "volumeLevel"
161055
+ },
160585
161056
  label: t("Set volume", "Imposta il volume"),
160586
161057
  phrase: t("Set the volume of {device} to {volumeLevel}", "Imposta il volume di {device} al {volumeLevel}"),
160587
161058
  icon: "volume-2",
@@ -160606,12 +161077,20 @@ var mediaPlayerCapability = {
160606
161077
  auth: "protected",
160607
161078
  actions: [{
160608
161079
  id: "media.mute",
161080
+ effect: {
161081
+ field: "isMuted",
161082
+ value: true
161083
+ },
160609
161084
  label: t("Mute", "Silenzia"),
160610
161085
  phrase: t("Mute {device}", "Silenzia {device}"),
160611
161086
  icon: "volume-x",
160612
161087
  args: { muted: true }
160613
161088
  }, {
160614
161089
  id: "media.unmute",
161090
+ effect: {
161091
+ field: "isMuted",
161092
+ value: false
161093
+ },
160615
161094
  label: t("Unmute", "Riattiva l’audio"),
160616
161095
  phrase: t("Unmute {device}", "Riattiva l’audio di {device}"),
160617
161096
  icon: "volume-2",
@@ -160626,12 +161105,20 @@ var mediaPlayerCapability = {
160626
161105
  auth: "protected",
160627
161106
  actions: [{
160628
161107
  id: "media.shuffleOn",
161108
+ effect: {
161109
+ field: "shuffle",
161110
+ value: true
161111
+ },
160629
161112
  label: t("Shuffle on", "Riproduzione casuale attiva"),
160630
161113
  phrase: t("Turn on shuffle on {device}", "Attiva la riproduzione casuale su {device}"),
160631
161114
  icon: "shuffle",
160632
161115
  args: { shuffle: true }
160633
161116
  }, {
160634
161117
  id: "media.shuffleOff",
161118
+ effect: {
161119
+ field: "shuffle",
161120
+ value: false
161121
+ },
160635
161122
  label: t("Shuffle off", "Riproduzione casuale spenta"),
160636
161123
  phrase: t("Turn off shuffle on {device}", "Disattiva la riproduzione casuale su {device}"),
160637
161124
  icon: "shuffle",
@@ -160646,6 +161133,10 @@ var mediaPlayerCapability = {
160646
161133
  auth: "protected",
160647
161134
  actions: [{
160648
161135
  id: "media.repeat",
161136
+ effect: {
161137
+ field: "repeat",
161138
+ fromArg: "repeat"
161139
+ },
160649
161140
  label: t("Set repeat", "Imposta la ripetizione"),
160650
161141
  phrase: t("Set repeat on {device} to {repeat}", "Imposta la ripetizione di {device} su {repeat}"),
160651
161142
  icon: "repeat",
@@ -160680,6 +161171,10 @@ var mediaPlayerCapability = {
160680
161171
  auth: "protected",
160681
161172
  actions: [{
160682
161173
  id: "media.source",
161174
+ effect: {
161175
+ field: "source",
161176
+ fromArg: "source"
161177
+ },
160683
161178
  label: t("Select source", "Scegli la sorgente"),
160684
161179
  phrase: t("Switch {device} to {source}", "Passa {device} alla sorgente {source}"),
160685
161180
  icon: "cast",
@@ -160848,7 +161343,7 @@ var mediaPlayerCapability = {
160848
161343
  ]
160849
161344
  }
160850
161345
  };
160851
- 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;
161346
+ 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;
160852
161347
  var NUMBER = {
160853
161348
  kind: "fixed",
160854
161349
  result: ["number"]
@@ -161340,7 +161835,9 @@ var PowerSourceRefusalReasonSchema = _enum([
161340
161835
  "switch-call-failed",
161341
161836
  "switch-options-unreadable",
161342
161837
  "not-settable",
161343
- "switch-is-actuator"
161838
+ "switch-is-actuator",
161839
+ "link-lost",
161840
+ "link-unknown"
161344
161841
  ]);
161345
161842
  var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
161346
161843
  accepted: literal(false),
@@ -163427,6 +163924,79 @@ var IdentityCandidatesSchema = discriminatedUnion("status", [object({
163427
163924
  pairs: array(IdentityCandidatePairSchema).readonly(),
163428
163925
  undeclaredDeviceIds: array(number$1().int()).readonly()
163429
163926
  })]);
163927
+ var IdentityLinkKindSchema = _enum(["same-device", "poe-power"]);
163928
+ /**
163929
+ * - `proposed` — one strong key matched: waits for the operator;
163930
+ * - `linked` — confirmed by the operator, or auto-linked on strong evidence;
163931
+ * - `dismissed` — the operator said no (or unlinked): sticky, never re-proposed.
163932
+ */
163933
+ var IdentityLinkStateSchema = _enum([
163934
+ "proposed",
163935
+ "linked",
163936
+ "dismissed"
163937
+ ]);
163938
+ /** Who decided the current state: the matcher (`auto`) or the operator. */
163939
+ var IdentityLinkOriginSchema = _enum(["auto", "operator"]);
163940
+ /** One side: the device ref that survives re-registration, plus its current numeric id. */
163941
+ var IdentityLinkSideSchema = object({
163942
+ addonId: string().min(1),
163943
+ stableId: string().min(1),
163944
+ deviceId: number$1().int()
163945
+ });
163946
+ var IdentityLinkSchema = object({
163947
+ kind: IdentityLinkKindSchema,
163948
+ a: IdentityLinkSideSchema,
163949
+ b: IdentityLinkSideSchema,
163950
+ state: IdentityLinkStateSchema,
163951
+ origin: IdentityLinkOriginSchema,
163952
+ /** The identifiers that matched when the link was last evaluated, ordered by key then value. */
163953
+ evidence: array(IdentityMatchedKeySchema).readonly(),
163954
+ /** An operator-confirmed link whose evidence no longer matches: kept, flagged. */
163955
+ evidenceGone: literal(true).optional(),
163956
+ createdAt: number$1().int().nonnegative(),
163957
+ decidedAt: number$1().int().nonnegative().optional()
163958
+ }).extend({ id: string().min(1) });
163959
+ DeviceRole.PoePort;
163960
+ /**
163961
+ * The answer of `device-manager.listIdentityLinks`. `not-loaded` until the
163962
+ * links have been read — never an empty list (D315).
163963
+ */
163964
+ var IdentityLinksReadSchema = discriminatedUnion("status", [object({
163965
+ status: literal("not-loaded"),
163966
+ reason: string()
163967
+ }), object({
163968
+ status: literal("answered"),
163969
+ links: array(IdentityLinkSchema).readonly()
163970
+ })]);
163971
+ /** Why an operator decision on a link was refused. */
163972
+ var IdentityLinkDecisionRefusalSchema = _enum([
163973
+ "not-loaded",
163974
+ "unknown-link",
163975
+ "wrong-state"
163976
+ ]);
163977
+ /** The answer of `confirmIdentityLink` / `dismissIdentityLink` / `unlinkIdentity`. */
163978
+ var IdentityLinkDecisionSchema = discriminatedUnion("ok", [object({
163979
+ ok: literal(true),
163980
+ link: IdentityLinkSchema
163981
+ }), object({
163982
+ ok: literal(false),
163983
+ reason: IdentityLinkDecisionRefusalSchema,
163984
+ message: string()
163985
+ })]);
163986
+ /** Why a link was lost. */
163987
+ var IdentityLinkLostReasonSchema = _enum([
163988
+ "evidence-gone",
163989
+ "device-removed",
163990
+ "operator-unlinked"
163991
+ ]);
163992
+ object({
163993
+ linkId: string(),
163994
+ kind: IdentityLinkKindSchema,
163995
+ aDeviceId: number$1().int(),
163996
+ bDeviceId: number$1().int(),
163997
+ origin: IdentityLinkOriginSchema,
163998
+ reason: IdentityLinkLostReasonSchema.optional()
163999
+ });
163430
164000
  var DeviceSearchRequiresSchema = object({
163431
164001
  /** Capability names the field wants a value of. Absent when the field wants actions only. */
163432
164002
  caps: array(string()).readonly().optional(),
@@ -163993,6 +164563,11 @@ var DeviceInfoSchema = object({
163993
164563
  * the owning provider via `setIdentifiers`; read-only for the operator.
163994
164564
  * Absent ⇒ the provider declared none. */
163995
164565
  identifiers: DeviceIdentifiersSchema.optional(),
164566
+ /** The identity of the device at the far end of this device's physical
164567
+ * link (D1059 amended by D1063) — a PoE port's wired client. Written only by
164568
+ * the owning provider via `setAttachedIdentifiers`; it never makes the two
164569
+ * devices the same device. Absent ⇒ none declared. */
164570
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
163996
164571
  /** Optional upstream-system identity + rendering envelope. See
163997
164572
  * `SourceInfo` in `packages/types/src/device/source-info.ts`. */
163998
164573
  sourceInfo: SourceInfoSchema.optional(),
@@ -164146,6 +164721,8 @@ var DeviceMetaSchema = object({
164146
164721
  metadata: record(string(), unknown()).nullable().optional(),
164147
164722
  /** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
164148
164723
  identifiers: DeviceIdentifiersSchema.optional(),
164724
+ /** The far end of the device's physical link (D1063). See `DeviceMeta.attachedIdentifiers`. */
164725
+ attachedIdentifiers: DeviceIdentifiersSchema.optional(),
164149
164726
  /** Optional upstream-system identity + rendering envelope. See
164150
164727
  * `SourceInfo`. Present when the device has been persisted with a
164151
164728
  * non-synthetic source identifier (HA entities, vendor MAC, …);
@@ -164470,6 +165047,26 @@ method(object({
164470
165047
  }), method(object({}), IdentityCandidatesSchema, {
164471
165048
  kind: "query",
164472
165049
  auth: "admin"
165050
+ }), method(object({
165051
+ deviceId: number$1(),
165052
+ identifiers: DeviceIdentifiersSchema.nullable(),
165053
+ /** Kinds the provider tried to read and could not: their stored value is kept. */
165054
+ unread: array(DeviceIdentifierKeySchema).optional()
165055
+ }), _void(), {
165056
+ kind: "mutation",
165057
+ auth: "admin"
165058
+ }), method(object({ deviceId: number$1().int().optional() }), IdentityLinksReadSchema, {
165059
+ kind: "query",
165060
+ auth: "admin"
165061
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
165062
+ kind: "mutation",
165063
+ auth: "admin"
165064
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
165065
+ kind: "mutation",
165066
+ auth: "admin"
165067
+ }), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
165068
+ kind: "mutation",
165069
+ auth: "admin"
164473
165070
  }), method(_void(), array(string())), method(object({ name: string() }), _void(), {
164474
165071
  kind: "mutation",
164475
165072
  auth: "admin"
@@ -165434,8 +166031,12 @@ var ClaimsListingSchema = discriminatedUnion("state", [object({
165434
166031
  })]);
165435
166032
  method(object({ deviceId: number$1() }), record(string(), record(string(), unknown()))), method(object({
165436
166033
  deviceId: number$1(),
165437
- capName: string()
165438
- }), record(string(), unknown()).nullable()), method(object({}), record(string(), record(string(), record(string(), unknown())))), method(object({
166034
+ capName: string(),
166035
+ /** The slice the device CONFIRMED, without a held command (D1061) — history and automations. */
166036
+ confirmed: boolean().optional()
166037
+ }), record(string(), unknown()).nullable()), method(object({
166038
+ /** The slices the devices CONFIRMED, without held commands (D1061). */
166039
+ confirmed: boolean().optional() }), record(string(), record(string(), record(string(), unknown())))), method(object({
165439
166040
  deviceId: number$1(),
165440
166041
  capName: string(),
165441
166042
  slice: record(string(), unknown())
@@ -165473,6 +166074,101 @@ method(object({ deviceId: number$1() }), record(string(), record(string(), unkno
165473
166074
  slice: record(string(), unknown())
165474
166075
  }));
165475
166076
  /**
166077
+ * Server-driven device state refresh (D1062): the core decides WHEN a device is
166078
+ * re-read, the integration only knows HOW.
166079
+ *
166080
+ * A provider states its policy where it registers the device's
166081
+ * `device-state-refresh` cap (`ctx.registerNativeCap(cap, provider, {
166082
+ * stateRefresh })`). It reaches the hub by the road the command-hold options
166083
+ * take (D1061): written directly in-process, carried on a forked child's cap
166084
+ * descriptors otherwise. Plain data, wire-safe.
166085
+ */
166086
+ /** Why the core asks for a refresh. */
166087
+ var StateRefreshReasonSchema = _enum([
166088
+ "schedule",
166089
+ "command",
166090
+ "burst"
166091
+ ]);
166092
+ /**
166093
+ * What arrives without asking: `none` (everything is read), `partial` (some
166094
+ * fields arrive by push, the rest is read on the schedule), `full` (everything
166095
+ * arrives by push — never read on a schedule).
166096
+ */
166097
+ var StateRefreshPushSchema = _enum([
166098
+ "none",
166099
+ "partial",
166100
+ "full"
166101
+ ]);
166102
+ object({
166103
+ /**
166104
+ * The integration instance the device belongs to. Devices of one instance
166105
+ * share one schedule group: a batching provider is asked once for all of
166106
+ * them, and the heartbeat is judged across them.
166107
+ */
166108
+ integrationId: string().min(1),
166109
+ /** The fastest interval the integration can afford for its devices. The core polls at it by default. */
166110
+ minIntervalMs: number$1().int().min(1e3),
166111
+ /**
166112
+ * The operator's per-integration setting, when there is one. It can only SLOW
166113
+ * the cadence: the core polls at `max(minIntervalMs, intervalMs)`.
166114
+ */
166115
+ intervalMs: number$1().int().positive().optional(),
166116
+ /** One `refresh` call can read every device of the integration at once. */
166117
+ batch: boolean(),
166118
+ push: StateRefreshPushSchema,
166119
+ /** Longest silence a push integration may keep before the core re-reads it and asks it to resubscribe. */
166120
+ heartbeatMs: number$1().int().positive().optional(),
166121
+ /**
166122
+ * Bumped by the provider each time its push subscription reconnected on its
166123
+ * own. A change makes the core re-read every device of the integration
166124
+ * (pushes lost while it was down; events may be dropped, D8).
166125
+ */
166126
+ connectionEpoch: number$1().int().nonnegative().optional()
166127
+ });
166128
+ /**
166129
+ * device-state-refresh — the HOW of a device's state refresh, called by the
166130
+ * core, which owns the WHEN (D1062).
166131
+ *
166132
+ * The provider registers it per device with its policy
166133
+ * (`registerNativeCap(cap, provider, { stateRefresh })`). The hub's scheduler
166134
+ * calls `refresh` on the schedule, after a command and in the burst that
166135
+ * follows it, and `resubscribe` when a push integration fell silent. The
166136
+ * provider re-reads and writes the slices it already writes; nothing is
166137
+ * returned but completion.
166138
+ */
166139
+ var DeviceStateRefreshInputSchema = object({
166140
+ /** The device the call is routed by (one of `deviceIds`). */
166141
+ deviceId: number$1().int().nonnegative(),
166142
+ /** Every device to re-read: one, or the integration's whole set when the provider batches. */
166143
+ deviceIds: array(number$1().int().nonnegative()).min(1),
166144
+ reason: StateRefreshReasonSchema
166145
+ });
166146
+ var DeviceStateResubscribeInputSchema = object({ deviceId: number$1().int().nonnegative() });
166147
+ var DeviceStateRefreshResultSchema = object({ ok: literal(true) });
166148
+ var NOT_OPERATOR_FACING = "the core schedules state refreshes itself; an operator never asks for one";
166149
+ var deviceStateRefreshCapability = {
166150
+ name: "device-state-refresh",
166151
+ scope: "device",
166152
+ deviceNative: true,
166153
+ mode: "singleton",
166154
+ methods: {
166155
+ refresh: method(DeviceStateRefreshInputSchema, DeviceStateRefreshResultSchema, {
166156
+ kind: "mutation",
166157
+ auth: "admin",
166158
+ notOperatorFacing: NOT_OPERATOR_FACING
166159
+ }),
166160
+ resubscribe: method(DeviceStateResubscribeInputSchema, DeviceStateRefreshResultSchema, {
166161
+ kind: "mutation",
166162
+ auth: "admin",
166163
+ notOperatorFacing: NOT_OPERATOR_FACING
166164
+ })
166165
+ },
166166
+ vocabulary: {
166167
+ noun: t("State refresh", "Aggiornamento dello stato"),
166168
+ order: 3247
166169
+ }
166170
+ };
166171
+ /**
165476
166172
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
165477
166173
  * for every device, regardless of provider — the kernel needs a uniform
165478
166174
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -167902,7 +168598,15 @@ var fanControlCapability = {
167902
168598
  field: "speed",
167903
168599
  value: 100
167904
168600
  },
167905
- args: { speed: 100 }
168601
+ args: { speed: 100 },
168602
+ sideEffects: [{
168603
+ field: "preset",
168604
+ value: "",
168605
+ when: {
168606
+ field: "preset",
168607
+ notIn: [""]
168608
+ }
168609
+ }]
167906
168610
  },
167907
168611
  {
167908
168612
  id: "fan.speed",
@@ -167913,6 +168617,14 @@ var fanControlCapability = {
167913
168617
  field: "speed",
167914
168618
  fromArg: "speed"
167915
168619
  },
168620
+ sideEffects: [{
168621
+ field: "preset",
168622
+ value: "",
168623
+ when: {
168624
+ field: "preset",
168625
+ notIn: [""]
168626
+ }
168627
+ }],
167916
168628
  openArgs: [{
167917
168629
  key: "speed",
167918
168630
  label: t("Speed", "Velocità"),
@@ -167938,6 +168650,10 @@ var fanControlCapability = {
167938
168650
  label: t("Set preset", "Imposta il preset"),
167939
168651
  phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
167940
168652
  icon: "list",
168653
+ effect: {
168654
+ field: "preset",
168655
+ fromArg: "preset"
168656
+ },
167941
168657
  openArgs: [{
167942
168658
  key: "preset",
167943
168659
  label: t("Preset", "Preset"),
@@ -169668,7 +170384,7 @@ var HeroSceneSchema = object({
169668
170384
  level: number$1().min(0).max(1).nullable()
169669
170385
  });
169670
170386
  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;
169671
- 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;
170387
+ 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;
169672
170388
  var HeroRowIdSchema = _enum([
169673
170389
  "progress",
169674
170390
  "run-for",
@@ -170940,6 +171656,16 @@ var IntegrationInstanceStatusSchema = object({
170940
171656
  /** A short human word for the state ("Signed in", "Token expired"); shown instead of `state`. */
170941
171657
  label: string().optional()
170942
171658
  });
171659
+ /**
171660
+ * What "Add device" inside ONE instance offers, decided per instance by its provider. `scan`: the
171661
+ * LAN scan finds devices this instance holds; `children`: only the instance's own children, via
171662
+ * adoption (a scan would offer other hosts, which are new integrations); `none`: manual add only.
171663
+ */
171664
+ var IntegrationInstanceAddDeviceSchema = _enum([
171665
+ "scan",
171666
+ "children",
171667
+ "none"
171668
+ ]);
170943
171669
  var IntegrationInstanceSchema = object({
170944
171670
  id: IntegrationInstanceIdSchema,
170945
171671
  name: string(),
@@ -170957,7 +171683,9 @@ var IntegrationInstanceSchema = object({
170957
171683
  formValues: record(string(), unknown()),
170958
171684
  status: IntegrationInstanceStatusSchema.optional(),
170959
171685
  /** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
170960
- lastCheckedAt: number$1().optional()
171686
+ lastCheckedAt: number$1().optional(),
171687
+ /** 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). */
171688
+ addDevice: IntegrationInstanceAddDeviceSchema.optional()
170961
171689
  });
170962
171690
  var IntegrationInstancePatchSchema = object({
170963
171691
  id: IntegrationInstanceIdSchema,
@@ -173108,6 +173836,14 @@ var lockControlCapability = {
173108
173836
  field: "state",
173109
173837
  value: "locked"
173110
173838
  },
173839
+ hold: { effects: [{
173840
+ field: "state",
173841
+ value: "locking",
173842
+ when: {
173843
+ field: "state",
173844
+ notIn: ["locked"]
173845
+ }
173846
+ }] },
173111
173847
  openArgs: [{
173112
173848
  key: "code",
173113
173849
  label: t("PIN code", "Codice PIN"),
@@ -173141,6 +173877,14 @@ var lockControlCapability = {
173141
173877
  field: "state",
173142
173878
  value: "unlocked"
173143
173879
  },
173880
+ hold: { effects: [{
173881
+ field: "state",
173882
+ value: "unlocking",
173883
+ when: {
173884
+ field: "state",
173885
+ notIn: ["unlocked"]
173886
+ }
173887
+ }] },
173144
173888
  openArgs: [{
173145
173889
  key: "code",
173146
173890
  label: t("PIN code", "Codice PIN"),
@@ -177552,6 +178296,16 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
177552
178296
  timestamp: number$1()
177553
178297
  }), EventCategory.PipelineAnalyticsDetectionEvent, EventCategory.PipelineAnalyticsPackageDelivered, EventCategory.PipelineAnalyticsPackagePickedUp;
177554
178298
  /**
178299
+ * A rectangle as a fraction of a frame, `[0, 1]` on both axes — the wire shape
178300
+ * of `NormalizedRect` (which is derived from it).
178301
+ */
178302
+ var NormalizedRectSchema = object({
178303
+ x: number$1(),
178304
+ y: number$1(),
178305
+ w: number$1(),
178306
+ h: number$1()
178307
+ });
178308
+ /**
177555
178309
  * A root model's boxes standing in for one crop-kind step's own inference
177556
178310
  * (D730) — see `runPipeline.suppliedRoot`.
177557
178311
  */
@@ -177852,7 +178606,13 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
177852
178606
  /** Pool deaths inside the current window. */
177853
178607
  deaths: number$1(),
177854
178608
  /** The last death's message. */
177855
- lastError: string()
178609
+ lastError: string(),
178610
+ /**
178611
+ * Present when the device is ABSENT rather than dead: the runtime
178612
+ * itself enumerates no such device (`no-gpu-device` — OpenVINO sees
178613
+ * no supported GPU; driver/runtime does not support this iGPU).
178614
+ */
178615
+ absentReason: _enum(["no-gpu-device"]).optional()
177856
178616
  })).readonly() })), method(object({
177857
178617
  nodeId: string(),
177858
178618
  deviceKey: string()
@@ -177944,7 +178704,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
177944
178704
  * reader) run on them through their own crop policy. Boxes are in the
177945
178705
  * PIXELS of the image this call carries. Absent ⇒ the root step runs.
177946
178706
  */
177947
- suppliedRoot: SuppliedRootOutputSchema.optional()
178707
+ suppliedRoot: SuppliedRootOutputSchema.optional(),
178708
+ /**
178709
+ * The motion analyzer's merged subjects (D394) for this camera, fresh,
178710
+ * normalised to the frame (0..1). Feeds the motion-guided root crop
178711
+ * (D1060): the executor picks per frame whether the object-detection
178712
+ * root runs on the full frame or on a crop around them. Honoured only
178713
+ * on the live `frame` plane with a `frameRef`. Absent or empty ⇒ no
178714
+ * motion known ⇒ full frame.
178715
+ */
178716
+ motionRegions: array(NormalizedRectSchema).optional()
177948
178717
  }), PipelineRunResultBridge, { kind: "mutation" }), method(object({
177949
178718
  steps: array(PipelineStepInputSchema).min(1),
177950
178719
  frames: array(FrameInputSchema).min(1).max(255),
@@ -178737,7 +179506,8 @@ var StatelessStepRefusalSchema = _enum([
178737
179506
  "unknown-step",
178738
179507
  "model-not-servable",
178739
179508
  "unreadable-frame",
178740
- "execution-failed"
179509
+ "execution-failed",
179510
+ "no-eligible-device"
178741
179511
  ]);
178742
179512
  /**
178743
179513
  * Answer to `runStatelessStep` — a discriminated union rather than a nullable
@@ -179036,7 +179806,15 @@ var RunnerInferenceDeviceSchema = object({
179036
179806
  * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
179037
179807
  * the elected device's provisioning, as before.
179038
179808
  */
179039
- steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
179809
+ steps: record(string(), RunnerJumpStepProvisioningSchema).optional(),
179810
+ /**
179811
+ * Steps switched OFF on this device (D1065, `inferenceDevices[key].steps[s]
179812
+ * .enabled === false`). The runner never runs a subtree containing one of
179813
+ * them here: it auto-jumps it to an allowed device, and when none can take
179814
+ * it the subtree is skipped (`disabled-on-device`), never run here anyway.
179815
+ * Absent ⇒ none (an orchestrator that predates D1065).
179816
+ */
179817
+ disabledSteps: array(string()).readonly().optional()
179040
179818
  });
179041
179819
  /**
179042
179820
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -184753,6 +185531,14 @@ method(object({ deviceId: number$1().int() }), object({
184753
185531
  auth: "admin"
184754
185532
  }), NOT_A_DEVICE.PIPELINE;
184755
185533
  /**
185534
+ * Hold limits a cap's vocabulary may declare on an action (D1061).
185535
+ *
185536
+ * A one-shot command (feed, run a script) has no lasting state to confirm; it
185537
+ * holds its in-progress flag just long enough that a second tap, before the
185538
+ * device reports, is seen as "already running" and refused.
185539
+ */
185540
+ var ONE_SHOT_HOLD_MS = 1e4;
185541
+ /**
184756
185542
  * Feeder connectivity / power status — mirrors the HA petkit device-status
184757
185543
  * enum: `normal` (online, mains), `offline` (not reaching PetKit cloud),
184758
185544
  * `on_batteries` (running on battery backup). `null` until first reported.
@@ -184870,6 +185656,13 @@ var petFeederCapability = {
184870
185656
  label: t("Feed", "Dai da mangiare"),
184871
185657
  phrase: t("Dispense {grams} from {device}", "Eroga {grams} da {device}"),
184872
185658
  icon: "paw-print",
185659
+ hold: {
185660
+ effects: [{
185661
+ field: "feeding",
185662
+ value: true
185663
+ }],
185664
+ holdMs: ONE_SHOT_HOLD_MS
185665
+ },
184873
185666
  openArgs: [{
184874
185667
  key: "grams",
184875
185668
  label: t("Grams", "Grammi"),
@@ -184888,6 +185681,13 @@ var petFeederCapability = {
184888
185681
  label: t("Feed from both hoppers", "Eroga da entrambi i serbatoi"),
184889
185682
  phrase: t("Dispense {hopper1} and {hopper2} from {device}", "Eroga {hopper1} e {hopper2} da {device}"),
184890
185683
  icon: "paw-print",
185684
+ hold: {
185685
+ effects: [{
185686
+ field: "feeding",
185687
+ value: true
185688
+ }],
185689
+ holdMs: ONE_SHOT_HOLD_MS
185690
+ },
184891
185691
  openArgs: [{
184892
185692
  key: "hopper1",
184893
185693
  label: t("Hopper 1", "Serbatoio 1"),
@@ -184993,12 +185793,20 @@ var petFeederCapability = {
184993
185793
  auth: "protected",
184994
185794
  actions: [{
184995
185795
  id: "petFeeder.childLockOn",
185796
+ effect: {
185797
+ field: "childLock",
185798
+ value: true
185799
+ },
184996
185800
  label: t("Child lock on", "Blocco bambini attivo"),
184997
185801
  phrase: t("Turn on the child lock of {device}", "Attiva il blocco bambini di {device}"),
184998
185802
  icon: "lock",
184999
185803
  args: { on: true }
185000
185804
  }, {
185001
185805
  id: "petFeeder.childLockOff",
185806
+ effect: {
185807
+ field: "childLock",
185808
+ value: false
185809
+ },
185002
185810
  label: t("Child lock off", "Blocco bambini spento"),
185003
185811
  phrase: t("Turn off the child lock of {device}", "Disattiva il blocco bambini di {device}"),
185004
185812
  icon: "lock-open",
@@ -185014,12 +185822,20 @@ var petFeederCapability = {
185014
185822
  auth: "protected",
185015
185823
  actions: [{
185016
185824
  id: "petFeeder.lightOn",
185825
+ effect: {
185826
+ field: "indicatorLight",
185827
+ value: true
185828
+ },
185017
185829
  label: t("Indicator light on", "Spia accesa"),
185018
185830
  phrase: t("Turn on the indicator light of {device}", "Accendi la spia di {device}"),
185019
185831
  icon: "lightbulb",
185020
185832
  args: { on: true }
185021
185833
  }, {
185022
185834
  id: "petFeeder.lightOff",
185835
+ effect: {
185836
+ field: "indicatorLight",
185837
+ value: false
185838
+ },
185023
185839
  label: t("Indicator light off", "Spia spenta"),
185024
185840
  phrase: t("Turn off the indicator light of {device}", "Spegni la spia di {device}"),
185025
185841
  icon: "lightbulb-off",
@@ -185035,12 +185851,20 @@ var petFeederCapability = {
185035
185851
  auth: "protected",
185036
185852
  actions: [{
185037
185853
  id: "petFeeder.feedSoundOn",
185854
+ effect: {
185855
+ field: "feedSound",
185856
+ value: true
185857
+ },
185038
185858
  label: t("Feeding sound on", "Suono di erogazione attivo"),
185039
185859
  phrase: t("Turn on the feeding sound of {device}", "Attiva il suono di erogazione di {device}"),
185040
185860
  icon: "volume-2",
185041
185861
  args: { on: true }
185042
185862
  }, {
185043
185863
  id: "petFeeder.feedSoundOff",
185864
+ effect: {
185865
+ field: "feedSound",
185866
+ value: false
185867
+ },
185044
185868
  label: t("Feeding sound off", "Suono di erogazione spento"),
185045
185869
  phrase: t("Turn off the feeding sound of {device}", "Disattiva il suono di erogazione di {device}"),
185046
185870
  icon: "volume-x",
@@ -185056,6 +185880,10 @@ var petFeederCapability = {
185056
185880
  auth: "protected",
185057
185881
  actions: [{
185058
185882
  id: "petFeeder.volume",
185883
+ effect: {
185884
+ field: "volume",
185885
+ fromArg: "level"
185886
+ },
185059
185887
  label: t("Set volume", "Imposta il volume"),
185060
185888
  phrase: t("Set the volume of {device} to {level}", "Imposta il volume di {device} a {level}"),
185061
185889
  icon: "volume-2",
@@ -185201,12 +186029,20 @@ setPump: method(object({
185201
186029
  auth: "protected",
185202
186030
  actions: [{
185203
186031
  id: "petFountain.pumpOn",
186032
+ effect: {
186033
+ field: "pumpRunning",
186034
+ value: true
186035
+ },
185204
186036
  label: t("Pump on", "Pompa accesa"),
185205
186037
  phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
185206
186038
  icon: "play",
185207
186039
  args: { on: true }
185208
186040
  }, {
185209
186041
  id: "petFountain.pumpOff",
186042
+ effect: {
186043
+ field: "pumpRunning",
186044
+ value: false
186045
+ },
185210
186046
  label: t("Pump off", "Pompa spenta"),
185211
186047
  phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
185212
186048
  icon: "square",
@@ -185753,7 +186589,15 @@ var DeviceStepConfigSchema = object({
185753
186589
  * at a disabled/absent device on that node at save time. Absent ⇒ the runner
185754
186590
  * auto-jumps only when the effective device's format cannot run the step.
185755
186591
  */
185756
- jumpDeviceKey: string().optional()
186592
+ jumpDeviceKey: string().optional(),
186593
+ /**
186594
+ * DEVICE switch for this step (D1065). `false` = the step is never
186595
+ * provisioned on this accelerator: a detail step jumps to another enabled
186596
+ * device of the node where it is allowed, else it is skipped with reason
186597
+ * `disabled-on-device`; a root is skipped. Absent = inherit (on). Written by
186598
+ * `setDeviceStepEnabled`.
186599
+ */
186600
+ enabled: boolean().optional()
185757
186601
  });
185758
186602
  var AgentPipelineSettingsSchema = object({
185759
186603
  maxCameras: number$1().int().nonnegative().nullable().default(null),
@@ -185797,6 +186641,12 @@ var AgentPipelineSettingsSchema = object({
185797
186641
  */
185798
186642
  stepSettings: record(string(), record(string(), unknown()).readonly()).optional(),
185799
186643
  /**
186644
+ * NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
186645
+ * runs on a camera whose pipeline runs on this node (skip reason
186646
+ * `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
186647
+ */
186648
+ stepEnabled: record(string(), boolean()).optional(),
186649
+ /**
185800
186650
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
185801
186651
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
185802
186652
  * accelerator (safe default); two+ enabled ⇒ the dispatcher balances
@@ -186118,7 +186968,9 @@ var InferenceDeviceExclusionReasonSchema = _enum([
186118
186968
  "disabled",
186119
186969
  "unavailable",
186120
186970
  "cannot-host-camera-root",
186121
- "accelerator-preferred"
186971
+ "accelerator-preferred",
186972
+ "root-switched-off",
186973
+ "no-gpu-device"
186122
186974
  ]);
186123
186975
  var NodeInferenceDeviceSchema = object({
186124
186976
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
@@ -186151,7 +187003,13 @@ var NodeInferenceDeviceSchema = object({
186151
187003
  enabled: boolean(),
186152
187004
  /** Relative balancer weight for the enabled device (default 1). */
186153
187005
  weight: number$1(),
186154
- /** Per-device concurrent-session cap; null = unlimited (multi-device C4). */
187006
+ /**
187007
+ * Per-device concurrent-session cap; null = unlimited (multi-device C4). A
187008
+ * limit: a camera no device can take within its cap stays on the node's
187009
+ * default pool — EXCEPT when that default pool is an excluded device
187010
+ * (`defaultPoolExcluded`), where it goes over the cap on the least-loaded
187011
+ * eligible device instead (#610).
187012
+ */
186155
187013
  maxSessions: number$1().nullable(),
186156
187014
  /** Object-detection model the executor defaults to for this deviceKey. */
186157
187015
  defaultModelId: string(),
@@ -186201,9 +187059,86 @@ var NodeInferenceDevicesSchema = object({
186201
187059
  nodeId: string(),
186202
187060
  /** False when the node's platform-probe was unreachable (no live device set). */
186203
187061
  reachable: boolean(),
186204
- devices: array(NodeInferenceDeviceSchema).readonly()
187062
+ devices: array(NodeInferenceDeviceSchema).readonly(),
187063
+ /**
187064
+ * The election left NO device and one was excluded because the operator
187065
+ * turned it off or it is not functional (#610): the runner's default pool is
187066
+ * that device, so work with no explicit device (a stateless step, a bench with
187067
+ * no `deviceKey`) is refused rather than run there. Absent = an orchestrator
187068
+ * older than the field, or an unreachable node: nothing is claimed (D315).
187069
+ */
187070
+ defaultPoolExcluded: boolean().optional()
186205
187071
  });
186206
187072
  /**
187073
+ * The CLUSTER switch of one pipeline step (D1065):
187074
+ * - `off` — hard off: no camera, node or device can turn it on;
187075
+ * - `on` — on by default; a camera may turn it off (`stepToggles`);
187076
+ * - `opt-in` — off by default; a camera turns it on (`stepToggles`).
187077
+ * Absent = the catalog's `enabledByDefault` (`true` → `on`, `false` → `opt-in`).
187078
+ */
187079
+ var StepClusterModeSchema = _enum([
187080
+ "off",
187081
+ "on",
187082
+ "opt-in"
187083
+ ]);
187084
+ /**
187085
+ * What one step does on one (node, device) — computed by the orchestrator with
187086
+ * the SAME placement function the attach path runs (`pipeline-resolver.ts`),
187087
+ * so a client never re-derives it. Precedence: cluster off > camera toggle
187088
+ * (else the cluster default) > node off > device off / jump.
187089
+ */
187090
+ var StepSwitchCellSchema = discriminatedUnion("kind", [
187091
+ object({ kind: literal("on") }),
187092
+ object({ kind: literal("off-cluster") }),
187093
+ object({ kind: literal("off-node") }),
187094
+ object({ kind: literal("off-device") }),
187095
+ object({
187096
+ kind: literal("jump"),
187097
+ toDeviceKey: string()
187098
+ }),
187099
+ object({
187100
+ kind: literal("skip"),
187101
+ reason: _enum(["no-compatible-model", "root-not-runnable-on-elected-device"])
187102
+ }),
187103
+ object({ kind: literal("zone-driven") }),
187104
+ object({
187105
+ kind: literal("supplied-by-root"),
187106
+ rootModelId: string()
187107
+ }),
187108
+ object({ kind: literal("opt-in-unused") })
187109
+ ]);
187110
+ var StepSwitchDeviceSchema = object({
187111
+ deviceKey: string(),
187112
+ format: _enum(MODEL_FORMATS),
187113
+ /** The device switch as stored (`inferenceDevices[key].steps[step].enabled`); `null` = inherit. */
187114
+ stepEnabled: boolean().nullable(),
187115
+ /** Whether the device is in the node's dispatch roster (enabled, available, not excluded). */
187116
+ eligible: boolean(),
187117
+ cell: StepSwitchCellSchema
187118
+ });
187119
+ var StepSwitchNodeSchema = object({
187120
+ nodeId: string(),
187121
+ /** False when the node's catalog or device probe did not answer — no cells are claimed. */
187122
+ reachable: boolean(),
187123
+ /** The node switch as stored (`stepEnabled[step]`); `null` = inherit. */
187124
+ stepEnabled: boolean().nullable(),
187125
+ devices: array(StepSwitchDeviceSchema).readonly()
187126
+ });
187127
+ var StepSwitchMatrixSchema = object({ steps: array(object({
187128
+ stepId: string(),
187129
+ name: string(),
187130
+ slot: string(),
187131
+ /** The stored cluster mode; `null` = the catalog default applies. */
187132
+ clusterMode: StepClusterModeSchema.nullable(),
187133
+ /** The mode in force (stored, else derived from `enabledByDefault`). */
187134
+ effectiveMode: StepClusterModeSchema,
187135
+ /** Cameras whose `stepToggles[step]` is `true`. */
187136
+ camerasEnabling: number$1().int().nonnegative(),
187137
+ /** Cameras whose `stepToggles[step]` is `false`. */
187138
+ camerasDisabling: number$1().int().nonnegative(),
187139
+ nodes: array(StepSwitchNodeSchema).readonly()
187140
+ })).readonly() });
187141
+ /**
186207
187142
  * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
186208
187143
  *
186209
187144
  * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
@@ -186374,7 +187309,28 @@ method(object({
186374
187309
  }), object({ success: literal(true) }), {
186375
187310
  kind: "mutation",
186376
187311
  auth: "admin"
186377
- }), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
187312
+ }), method(object({
187313
+ stepId: string(),
187314
+ mode: StepClusterModeSchema.nullable()
187315
+ }), object({ success: literal(true) }), {
187316
+ kind: "mutation",
187317
+ auth: "admin"
187318
+ }), method(object({
187319
+ agentNodeId: string(),
187320
+ stepId: string(),
187321
+ enabled: boolean().nullable()
187322
+ }), object({ success: literal(true) }), {
187323
+ kind: "mutation",
187324
+ auth: "admin"
187325
+ }), method(object({
187326
+ agentNodeId: string(),
187327
+ deviceKey: string(),
187328
+ stepId: string(),
187329
+ enabled: boolean().nullable()
187330
+ }), object({ success: literal(true) }), {
187331
+ kind: "mutation",
187332
+ auth: "admin"
187333
+ }), method(_void(), StepSwitchMatrixSchema), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
186378
187334
  agentNodeId: string(),
186379
187335
  deviceKey: string()
186380
187336
  }), object({ success: literal(true) }), {
@@ -186789,6 +187745,16 @@ var CoralInfoSchema = object({
186789
187745
  reason: _enum(["driver-missing", "device-not-accessible"])
186790
187746
  })).readonly().optional()
186791
187747
  });
187748
+ var NvidiaInfoBaseSchema = object({
187749
+ type: literal("nvidia"),
187750
+ name: string(),
187751
+ memoryMB: number$1().optional()
187752
+ });
187753
+ /** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
187754
+ var NvidiaInfoSchema = discriminatedUnion("usable", [NvidiaInfoBaseSchema.extend({ usable: literal(true) }), NvidiaInfoBaseSchema.extend({
187755
+ usable: literal(false),
187756
+ reason: _enum(["no-cuda-execution-provider"])
187757
+ })]);
186792
187758
  var HardwareInfoSchema = object({
186793
187759
  platform: HardwarePlatformSchema,
186794
187760
  arch: HardwareArchSchema,
@@ -186799,6 +187765,7 @@ var HardwareInfoSchema = object({
186799
187765
  gpu: GpuInfoSchema.nullable(),
186800
187766
  npu: NpuInfoSchema.nullable(),
186801
187767
  coral: CoralInfoSchema.nullable().optional(),
187768
+ nvidia: NvidiaInfoSchema.nullable().optional(),
186802
187769
  /**
186803
187770
  * Per-accelerator compute (D930). Omitted by a node that has not probed it.
186804
187771
  * `null` fields inside an entry are a failed query, never a zero.
@@ -186886,8 +187853,14 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
186886
187853
  * in real-world devices.
186887
187854
  */
186888
187855
  var PowerMeterStatusSchema = object({
186889
- /** Instantaneous power draw (watts). */
187856
+ /** Instantaneous TOTAL power draw of the device (watts), when known. */
186890
187857
  power: number$1().optional().meta(readingMeta("power", { label: "Power" })),
187858
+ /**
187859
+ * Power the device passes on to downstream loads (watts), e.g. the PoE a switch delivers to
187860
+ * its ports. When `power` is known it already includes this (the own draw is `netPowerOf`);
187861
+ * a device that reports no total (a UniFi switch) carries this field alone.
187862
+ */
187863
+ deliveredPower: number$1().optional().meta(readingMeta("power", { label: "Delivered" })),
186891
187864
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
186892
187865
  energy: number$1().optional().meta(readingMeta("energy", { label: "Energy" })),
186893
187866
  /** Voltage (volts). */
@@ -186922,7 +187895,8 @@ var POWER_METER_DEVICE_TYPES = [
186922
187895
  DeviceType.Dishwasher,
186923
187896
  DeviceType.Vacuum,
186924
187897
  DeviceType.LawnMower,
186925
- DeviceType.PetFeeder
187898
+ DeviceType.PetFeeder,
187899
+ DeviceType.Workload
186926
187900
  ];
186927
187901
  /** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
186928
187902
  var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
@@ -188093,12 +189067,20 @@ var pumpCycleCapability = {
188093
189067
  auth: "protected",
188094
189068
  actions: [{
188095
189069
  id: "pumpCycle.on",
189070
+ effect: {
189071
+ field: "enabled",
189072
+ value: true
189073
+ },
188096
189074
  label: t("Pump cycle on", "Ciclo pompa attivo"),
188097
189075
  phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
188098
189076
  icon: "timer",
188099
189077
  args: { on: true }
188100
189078
  }, {
188101
189079
  id: "pumpCycle.off",
189080
+ effect: {
189081
+ field: "enabled",
189082
+ value: false
189083
+ },
188102
189084
  label: t("Pump cycle off", "Ciclo pompa spento"),
188103
189085
  phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
188104
189086
  icon: "timer-off",
@@ -188117,6 +189099,11 @@ var pumpCycleCapability = {
188117
189099
  label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
188118
189100
  phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
188119
189101
  icon: "timer",
189102
+ effect: {
189103
+ field: "onTime",
189104
+ fromArg: "minutes",
189105
+ scale: 60
189106
+ },
188120
189107
  openArgs: [{
188121
189108
  key: "minutes",
188122
189109
  label: t("Minutes", "Minuti"),
@@ -188141,6 +189128,11 @@ var pumpCycleCapability = {
188141
189128
  label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
188142
189129
  phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
188143
189130
  icon: "timer-off",
189131
+ effect: {
189132
+ field: "offTime",
189133
+ fromArg: "minutes",
189134
+ scale: 60
189135
+ },
188144
189136
  openArgs: [{
188145
189137
  key: "minutes",
188146
189138
  label: t("Minutes", "Minuti"),
@@ -192111,7 +193103,14 @@ var scriptRunnerCapability = {
192111
193103
  id: "script.run",
192112
193104
  label: t("Run script", "Esegui lo script"),
192113
193105
  phrase: t("Run {device}", "Esegui {device}"),
192114
- icon: "scroll-text"
193106
+ icon: "scroll-text",
193107
+ hold: {
193108
+ effects: [{
193109
+ field: "isRunning",
193110
+ value: true
193111
+ }],
193112
+ holdMs: ONE_SHOT_HOLD_MS
193113
+ }
192115
193114
  }]
192116
193115
  }),
192117
193116
  /** Cancel a running script. Provider rejects when the script
@@ -192121,6 +193120,10 @@ var scriptRunnerCapability = {
192121
193120
  auth: "admin",
192122
193121
  actions: [{
192123
193122
  id: "script.stop",
193123
+ effect: {
193124
+ field: "isRunning",
193125
+ value: false
193126
+ },
192124
193127
  label: t("Stop script", "Ferma lo script"),
192125
193128
  phrase: t("Stop {device}", "Ferma {device}"),
192126
193129
  icon: "square"
@@ -194087,6 +195090,10 @@ var switchCapability = {
194087
195090
  auth: "protected",
194088
195091
  actions: [{
194089
195092
  id: "switch.toggle",
195093
+ sideEffects: [{
195094
+ field: "on",
195095
+ negate: true
195096
+ }],
194090
195097
  label: t("Toggle", "Commuta"),
194091
195098
  phrase: t("Toggle {device}", "Commuta {device}"),
194092
195099
  icon: "toggle-right",
@@ -200877,6 +201884,20 @@ var BaseDevice = class {
200877
201884
  }, raw, options);
200878
201885
  }
200879
201886
  /**
201887
+ * Declare the identity of the device at the FAR END of this device's physical
201888
+ * link (D1063): a PoE port's wired client. Same normalisation, `unread`
201889
+ * rule and owner check as {@link declareIdentifiers}, written through
201890
+ * `device-manager.setAttachedIdentifiers`. It never makes the two devices the
201891
+ * same device. Best-effort: never throws.
201892
+ */
201893
+ async declareAttachedIdentifiers(raw, options) {
201894
+ return declareDeviceIdentifiers({
201895
+ deviceId: this.id,
201896
+ logger: this.ctx.logger,
201897
+ writer: this.ctx.api.deviceManager?.setAttachedIdentifiers
201898
+ }, raw, options);
201899
+ }
201900
+ /**
200880
201901
  * Re-publish the device's current `features` array to the persisted
200881
201902
  * meta blob. Drivers call this after a probe finishes when the live
200882
201903
  * `features` getter has gained new flags (e.g. `hasIntercom` flips
@@ -202605,23 +203626,56 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
202605
203626
  };
202606
203627
  });
202607
203628
  var minutesOf = (seconds) => Math.max(0, Math.round(seconds / 60));
203629
+ var pumpCycleContribution = contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
203630
+ const enabled = slice?.enabled ?? null;
203631
+ 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;
203632
+ return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
203633
+ kind: "toggle",
203634
+ id: "pump-cycle.enabled",
203635
+ label: t("Pump cycle", "Ciclo pompa"),
203636
+ on: enabled,
203637
+ turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
203638
+ turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
203639
+ }])] };
203640
+ });
203641
+ var WORKLOAD_WORDS = {
203642
+ running: {
203643
+ state: "on",
203644
+ title: t("Running", "In esecuzione")
203645
+ },
203646
+ paused: {
203647
+ state: "standby",
203648
+ title: t("Paused", "In pausa")
203649
+ },
203650
+ stopped: {
203651
+ state: "off",
203652
+ title: t("Stopped", "Fermo")
203653
+ },
203654
+ starting: {
203655
+ state: "running",
203656
+ title: t("Starting", "In avvio")
203657
+ },
203658
+ stopping: {
203659
+ state: "running",
203660
+ title: t("Stopping", "In arresto")
203661
+ },
203662
+ crashed: {
203663
+ state: "alert",
203664
+ title: t("Crashed", "Andato in errore")
203665
+ }
203666
+ };
202608
203667
  var DEVICES_FAMILY_CONTRIBUTIONS = {
202609
203668
  "fan-control": fanContribution,
202610
203669
  "vacuum-control": vacuumContribution,
202611
203670
  "lawn-mower-control": mowerContribution,
202612
203671
  "pet-feeder": feederContribution,
202613
203672
  "pet-fountain": fountainContribution,
202614
- "pump-cycle": contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
202615
- const enabled = slice?.enabled ?? null;
202616
- 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;
202617
- return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
202618
- kind: "toggle",
202619
- id: "pump-cycle.enabled",
202620
- label: t("Pump cycle", "Ciclo pompa"),
202621
- on: enabled,
202622
- turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
202623
- turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
202624
- }])] };
203673
+ "pump-cycle": pumpCycleContribution,
203674
+ workload: contribution("workload", WorkloadStatusSchema, (slice) => {
203675
+ const state = slice?.state ?? null;
203676
+ if (state === null) return { reading: reading("workload", "unknown") };
203677
+ const words = WORKLOAD_WORDS[state];
203678
+ return { reading: reading("workload", words.state, false, words.title) };
202625
203679
  })
202626
203680
  };
202627
203681
  /**
@@ -204636,7 +205690,7 @@ lookOf({
204636
205690
  });
204637
205691
  DeviceType.Climate;
204638
205692
  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;
204639
- 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;
205693
+ 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;
204640
205694
  Object.freeze({
204641
205695
  "accessories.getStatus": {
204642
205696
  capName: "accessories",
@@ -206836,6 +207890,13 @@ Object.freeze({
206836
207890
  access: "create",
206837
207891
  role: "admin"
206838
207892
  },
207893
+ "deviceManager.confirmIdentityLink": {
207894
+ capName: "device-manager",
207895
+ capScope: "system",
207896
+ addonId: null,
207897
+ access: "create",
207898
+ role: "admin"
207899
+ },
206839
207900
  "deviceManager.createDevice": {
206840
207901
  capName: "device-manager",
206841
207902
  capScope: "system",
@@ -206885,6 +207946,13 @@ Object.freeze({
206885
207946
  access: "create",
206886
207947
  role: "admin"
206887
207948
  },
207949
+ "deviceManager.dismissIdentityLink": {
207950
+ capName: "device-manager",
207951
+ capScope: "system",
207952
+ addonId: null,
207953
+ access: "create",
207954
+ role: "admin"
207955
+ },
206888
207956
  "deviceManager.enable": {
206889
207957
  capName: "device-manager",
206890
207958
  capScope: "system",
@@ -207081,6 +208149,13 @@ Object.freeze({
207081
208149
  access: "view",
207082
208150
  role: "admin"
207083
208151
  },
208152
+ "deviceManager.listIdentityLinks": {
208153
+ capName: "device-manager",
208154
+ capScope: "system",
208155
+ addonId: null,
208156
+ access: "view",
208157
+ role: "admin"
208158
+ },
207084
208159
  "deviceManager.listLocationDescriptions": {
207085
208160
  capName: "device-manager",
207086
208161
  capScope: "system",
@@ -207277,6 +208352,13 @@ Object.freeze({
207277
208352
  access: "create",
207278
208353
  role: "admin"
207279
208354
  },
208355
+ "deviceManager.setAttachedIdentifiers": {
208356
+ capName: "device-manager",
208357
+ capScope: "system",
208358
+ addonId: null,
208359
+ access: "create",
208360
+ role: "admin"
208361
+ },
207280
208362
  "deviceManager.setChildLayout": {
207281
208363
  capName: "device-manager",
207282
208364
  capScope: "system",
@@ -207438,6 +208520,13 @@ Object.freeze({
207438
208520
  access: "create",
207439
208521
  role: "admin"
207440
208522
  },
208523
+ "deviceManager.unlinkIdentity": {
208524
+ capName: "device-manager",
208525
+ capScope: "system",
208526
+ addonId: null,
208527
+ access: "delete",
208528
+ role: "admin"
208529
+ },
207441
208530
  "deviceManager.updateConfig": {
207442
208531
  capName: "device-manager",
207443
208532
  capScope: "system",
@@ -207718,6 +208807,20 @@ Object.freeze({
207718
208807
  access: "create",
207719
208808
  role: "admin"
207720
208809
  },
208810
+ "deviceStateRefresh.refresh": {
208811
+ capName: "device-state-refresh",
208812
+ capScope: "device",
208813
+ addonId: null,
208814
+ access: "create",
208815
+ role: "admin"
208816
+ },
208817
+ "deviceStateRefresh.resubscribe": {
208818
+ capName: "device-state-refresh",
208819
+ capScope: "device",
208820
+ addonId: null,
208821
+ access: "create",
208822
+ role: "admin"
208823
+ },
207721
208824
  "deviceStatus.getStatus": {
207722
208825
  capName: "device-status",
207723
208826
  capScope: "device",
@@ -211589,6 +212692,13 @@ Object.freeze({
211589
212692
  access: "view",
211590
212693
  role: "admin"
211591
212694
  },
212695
+ "pipelineOrchestrator.getStepSwitches": {
212696
+ capName: "pipeline-orchestrator",
212697
+ capScope: "system",
212698
+ addonId: null,
212699
+ access: "view",
212700
+ role: "admin"
212701
+ },
211592
212702
  "pipelineOrchestrator.listAgentSettings": {
211593
212703
  capName: "pipeline-orchestrator",
211594
212704
  capScope: "system",
@@ -211743,6 +212853,20 @@ Object.freeze({
211743
212853
  access: "create",
211744
212854
  role: "admin"
211745
212855
  },
212856
+ "pipelineOrchestrator.setClusterStepMode": {
212857
+ capName: "pipeline-orchestrator",
212858
+ capScope: "system",
212859
+ addonId: null,
212860
+ access: "create",
212861
+ role: "admin"
212862
+ },
212863
+ "pipelineOrchestrator.setDeviceStepEnabled": {
212864
+ capName: "pipeline-orchestrator",
212865
+ capScope: "system",
212866
+ addonId: null,
212867
+ access: "create",
212868
+ role: "admin"
212869
+ },
211746
212870
  "pipelineOrchestrator.setLoadBalancingShares": {
211747
212871
  capName: "pipeline-orchestrator",
211748
212872
  capScope: "system",
@@ -211750,6 +212874,13 @@ Object.freeze({
211750
212874
  access: "create",
211751
212875
  role: "admin"
211752
212876
  },
212877
+ "pipelineOrchestrator.setNodeStepEnabled": {
212878
+ capName: "pipeline-orchestrator",
212879
+ capScope: "system",
212880
+ addonId: null,
212881
+ access: "create",
212882
+ role: "admin"
212883
+ },
211753
212884
  "pipelineOrchestrator.setNodeStepSettings": {
211754
212885
  capName: "pipeline-orchestrator",
211755
212886
  capScope: "system",
@@ -213906,6 +215037,13 @@ Object.freeze({
213906
215037
  access: "view",
213907
215038
  role: "admin"
213908
215039
  },
215040
+ "streamBroker.previewDerivedEncode": {
215041
+ capName: "stream-broker",
215042
+ capScope: "system",
215043
+ addonId: null,
215044
+ access: "view",
215045
+ role: "admin"
215046
+ },
213909
215047
  "streamBroker.probeStream": {
213910
215048
  capName: "stream-broker",
213911
215049
  capScope: "system",
@@ -215352,7 +216490,7 @@ function offered(received) {
215352
216490
  }
215353
216491
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
215354
216492
  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;
215355
- 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;
216493
+ 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;
215356
216494
  new Set(Object.values(DeviceType));
215357
216495
  new Set(Object.values(DeviceRole));
215358
216496
  var LAST_FETCHED_FIELD = "lastFetchedAt";
@@ -216136,6 +217274,11 @@ Object.freeze({
216136
217274
  form: "array",
216137
217275
  optional: true
216138
217276
  }],
217277
+ "deviceManager.listIdentityLinks": [{
217278
+ name: "deviceId",
217279
+ form: "single",
217280
+ optional: true
217281
+ }],
216139
217282
  "deviceManager.loadConfig": [{
216140
217283
  name: "deviceId",
216141
217284
  form: "single",
@@ -216186,6 +217329,11 @@ Object.freeze({
216186
217329
  form: "single",
216187
217330
  optional: false
216188
217331
  }],
217332
+ "deviceManager.setAttachedIdentifiers": [{
217333
+ name: "deviceId",
217334
+ form: "single",
217335
+ optional: false
217336
+ }],
216189
217337
  "deviceManager.setChildLayout": [{
216190
217338
  name: "deviceId",
216191
217339
  form: "single",
@@ -216380,6 +217528,20 @@ Object.freeze({
216380
217528
  form: "single",
216381
217529
  optional: false
216382
217530
  }],
217531
+ "deviceStateRefresh.refresh": [{
217532
+ name: "deviceId",
217533
+ form: "single",
217534
+ optional: false
217535
+ }, {
217536
+ name: "deviceIds",
217537
+ form: "array",
217538
+ optional: false
217539
+ }],
217540
+ "deviceStateRefresh.resubscribe": [{
217541
+ name: "deviceId",
217542
+ form: "single",
217543
+ optional: false
217544
+ }],
216383
217545
  "deviceStatus.getStatus": [{
216384
217546
  name: "deviceId",
216385
217547
  form: "single",
@@ -218337,6 +219499,11 @@ Object.freeze({
218337
219499
  form: "single",
218338
219500
  optional: false
218339
219501
  }],
219502
+ "streamBroker.previewDerivedEncode": [{
219503
+ name: "deviceId",
219504
+ form: "single",
219505
+ optional: false
219506
+ }],
218340
219507
  "streamBroker.produceEventMedia": [{
218341
219508
  name: "deviceId",
218342
219509
  form: "single",
@@ -228423,8 +229590,8 @@ function wantsEventTrace(debugGeneral, socketFlags) {
228423
229590
  //#region src/reolink-hub-session.ts
228424
229591
  var HUB_DISCOVERY_REFRESH_TIMEOUT_MS = 8e3;
228425
229592
  /**
228426
- * How often the session re-reads its own channels summary to reconcile the adopted children's
228427
- * sleep slices. 60 s: a naturally-waking camera (PIR, schedule) is caught within a minute, and
229593
+ * How often the core re-reads the session's own channels summary to reconcile the adopted
229594
+ * 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
228428
229595
  * the play path has its own faster confirm + post-dial watch, so this only ever carries
228429
229596
  * background drift. Never wakes a child — the summary is answered by the hub itself.
228430
229597
  */
@@ -228465,7 +229632,6 @@ var ReolinkHubSession = class {
228465
229632
  #connectInFlight = null;
228466
229633
  #reconnectAttempts = 0;
228467
229634
  #reconnectTimer = null;
228468
- #reconcileTimer = null;
228469
229635
  #shutdown = false;
228470
229636
  #online = false;
228471
229637
  #snapshot = {
@@ -228530,14 +229696,11 @@ var ReolinkHubSession = class {
228530
229696
  port: c.rtspPort
228531
229697
  };
228532
229698
  }
228533
- /** Arm the periodic reconcile and make the first dial. Idempotent. */
229699
+ /**
229700
+ * Make the first dial. The reconcile after it is the core's: `device-state-refresh` calls
229701
+ * {@link refresh} at {@link HUB_CHILD_SLEEP_RECONCILE_MS} (D1062), the session owns no clock.
229702
+ */
228534
229703
  start() {
228535
- if (this.#reconcileTimer === null) {
228536
- this.#reconcileTimer = setInterval(() => {
228537
- this.refresh().catch(() => {});
228538
- }, HUB_CHILD_SLEEP_RECONCILE_MS);
228539
- if (typeof this.#reconcileTimer.unref === "function") this.#reconcileTimer.unref();
228540
- }
228541
229704
  this.getApi().catch((err) => {
228542
229705
  this.#logger.warn("Reolink hub initial connect failed — will retry", {
228543
229706
  tags: { integrationId: this.integrationId },
@@ -228570,10 +229733,6 @@ var ReolinkHubSession = class {
228570
229733
  clearTimeout(this.#reconnectTimer);
228571
229734
  this.#reconnectTimer = null;
228572
229735
  }
228573
- if (this.#reconcileTimer !== null) {
228574
- clearInterval(this.#reconcileTimer);
228575
- this.#reconcileTimer = null;
228576
- }
228577
229736
  await this.dropApi("hub-shutdown");
228578
229737
  }
228579
229738
  /**
@@ -229095,6 +230254,39 @@ async function connectReolinkHub(connection) {
229095
230254
  return api;
229096
230255
  }
229097
230256
  //#endregion
230257
+ //#region src/reolink-state-refresh.ts
230258
+ /**
230259
+ * Reolink's side of the core state refresh (D1062) for the cameras behind an NVR / Home Hub.
230260
+ *
230261
+ * The NVR reads its own cameras by itself and pushes their events, so the only scheduled work is
230262
+ * the regular reconcile of the children's sleep state, and it is answered by the NVR session
230263
+ * (`HubSessionHandle.refresh()`): the hub's channel summary and battery table. A refresh NEVER
230264
+ * dials or wakes a child camera. Push level is `partial` (events and awake/sleeping notices
230265
+ * arrive by push; the reconcile catches drift), one schedule per integration (`batch`).
230266
+ */
230267
+ function hubChildRefreshPolicy(integrationId) {
230268
+ return {
230269
+ integrationId,
230270
+ minIntervalMs: HUB_CHILD_SLEEP_RECONCILE_MS,
230271
+ batch: true,
230272
+ push: "partial"
230273
+ };
230274
+ }
230275
+ /** A standalone camera keeps its own reads and registers nothing. */
230276
+ function registerHubChildStateRefresh(target) {
230277
+ const integrationId = target.integrationId;
230278
+ if (integrationId === null || !target.hubChild) return;
230279
+ target.ctx.registerNativeCap(deviceStateRefreshCapability, {
230280
+ refresh: async () => {
230281
+ const session = target.session();
230282
+ if (session === null) throw new Error(`reolink: no NVR session for integration ${integrationId}`);
230283
+ await session.refresh();
230284
+ return { ok: true };
230285
+ },
230286
+ resubscribe: async () => ({ ok: true })
230287
+ }, { stateRefresh: hubChildRefreshPolicy(integrationId) });
230288
+ }
230289
+ //#endregion
229098
230290
  //#region src/hub-child-settings.ts
229099
230291
  /**
229100
230292
  * A camera adopted under an NVR / Home Hub dials through the integration's session: the address
@@ -233066,6 +234258,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
233066
234258
  constructor(ctx) {
233067
234259
  super(ctx, reolinkCameraSchema, { type: DeviceType.Camera });
233068
234260
  this.registerNativeCapabilities();
234261
+ this.registerNvrStateRefresh();
233069
234262
  }
233070
234263
  /**
233071
234264
  * Resolved Baichuan channel for per-channel cmd_ids. Children
@@ -234112,6 +235305,20 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
234112
235305
  async getRawState() {
234113
235306
  return buildRawState(this.runtimeState);
234114
235307
  }
235308
+ /**
235309
+ * A hub child is kept fresh by its NVR session, never by a dial to the camera (D1062): the
235310
+ * core calls the session's `refresh()` — the hub's own channel summary — once per integration.
235311
+ * A standalone camera keeps its own reads and registers nothing.
235312
+ */
235313
+ registerNvrStateRefresh() {
235314
+ const integrationId = this.hubIntegrationId();
235315
+ registerHubChildStateRefresh({
235316
+ ctx: this.ctx,
235317
+ integrationId,
235318
+ hubChild: this.isHubChild(),
235319
+ session: () => integrationId === null ? null : reolinkHubSessions.get(integrationId)
235320
+ });
235321
+ }
234115
235322
  registerNativeCapabilities() {
234116
235323
  this.ctx.registerNativeCap(snapshotCapability, {
234117
235324
  getSnapshot: async ({ deviceId, force }) => {
@@ -241730,8 +242937,18 @@ function buildReolinkInstances(records, deps) {
241730
242937
  * NVR / Home Hub one does, and a create wizard (no id yet) sets up a hub.
241731
242938
  */
241732
242939
  function reolinkInstancesProvider(instances, deps) {
242940
+ const base = instances.toProvider();
242941
+ const withAddDevice = async (instance) => ({
242942
+ ...instance,
242943
+ addDevice: await integrationIsHub(instances, deps, instance.id) ? "children" : "scan"
242944
+ });
241733
242945
  return {
241734
- ...instances.toProvider(),
242946
+ ...base,
242947
+ listInstances: async (input) => Promise.all((await base.listInstances(input)).map(withAddDevice)),
242948
+ getInstance: async (input) => {
242949
+ const found = await base.getInstance(input);
242950
+ return found === null ? null : withAddDevice(found);
242951
+ },
241735
242952
  instanceFormSchema: async ({ id }) => {
241736
242953
  if (id === null) return buildHubInstanceSchema();
241737
242954
  const [evidence, body] = await Promise.all([deps.registryEvidenceOf(id), instances.getResolved(id)]);