@camstack/addon-provider-velux 0.2.15 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +656 -69
  2. package/dist/addon.mjs +656 -69
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -10770,7 +10770,14 @@ var cameraStreamsCapability = {
10770
10770
  low: string().optional()
10771
10771
  }),
10772
10772
  lastChangedAt: number()
10773
- })
10773
+ }),
10774
+ /**
10775
+ * Runtime-state durability: **session** — a restored `slotStatuses: streaming` for a camera that has been dark for two hours is a lie the UI renders as truth.
10776
+ *
10777
+ * See `RuntimeStateDurability`. Enforced by
10778
+ * `scripts/check-runtime-state-durability.ts`.
10779
+ */
10780
+ durability: "session"
10774
10781
  };
10775
10782
  /** Where a block runs. The operator chooses — a block driving a device on an
10776
10783
  * agent is the reason placement is not fixed to the hub. */
@@ -11331,6 +11338,13 @@ var deviceDiscoveryCapability = {
11331
11338
  kind: "poll"
11332
11339
  },
11333
11340
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11341
+ /**
11342
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11343
+ *
11344
+ * See `RuntimeStateDurability`. Enforced by
11345
+ * `scripts/check-runtime-state-durability.ts`.
11346
+ */
11347
+ durability: "session",
11334
11348
  methods: {
11335
11349
  /**
11336
11350
  * Snapshot of the current `discovered` list. Returns the
@@ -13230,7 +13244,23 @@ var NotificationActionSchema = object({
13230
13244
  * else — see `notification-center/action-token.ts` for what that does and
13231
13245
  * does not buy.
13232
13246
  */
13233
- destructive: boolean().optional()
13247
+ destructive: boolean().optional(),
13248
+ /**
13249
+ * How the tap should REACH the url.
13250
+ *
13251
+ * `navigate` (absent, and every button authored before this field) opens it:
13252
+ * the phone leaves the notification and shows whatever the callback returns.
13253
+ * That is right for a button whose answer the operator wants to read.
13254
+ *
13255
+ * `background` fires it as a POST and stays put. It exists for the buttons
13256
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13257
+ * an answer to the notification, and being thrown into a browser tab to
13258
+ * confirm it costs more attention than the notification did. A backend that
13259
+ * cannot do a background call renders it as an ordinary link (the adapters
13260
+ * fall back rather than dropping the button), so this is a preference, never
13261
+ * a requirement.
13262
+ */
13263
+ mode: _enum(["navigate", "background"]).optional()
13234
13264
  });
13235
13265
  /**
13236
13266
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14082,7 +14112,17 @@ var alarmPanelCapability = {
14082
14112
  * full slice; renders an arm button per `availableModes` entry and
14083
14113
  * a PIN field iff `requiresCode === true`.
14084
14114
  */
14085
- runtimeState: AlarmPanelStatusSchema
14115
+ runtimeState: AlarmPanelStatusSchema,
14116
+ /**
14117
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14118
+ *
14119
+ * See `RuntimeStateDurability`. Enforced by
14120
+ * `scripts/check-runtime-state-durability.ts`.
14121
+ */
14122
+ durability: "restored",
14123
+ /** Clock fields: written, but excluded from the compare that decides
14124
+ * whether persisting is worth a SQLite commit. */
14125
+ volatileStateFields: ["lastChangedAt"]
14086
14126
  };
14087
14127
  /**
14088
14128
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14259,6 +14299,9 @@ var NcSystemEventConditionSchema = object({
14259
14299
  nodeIds: array(string().min(1)).min(1).optional(),
14260
14300
  packageNames: array(string().min(1)).min(1).optional()
14261
14301
  });
14302
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14303
+ * outage the operator asked for once and forgot. */
14304
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14262
14305
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14263
14306
  var NcScheduleSchema = object({
14264
14307
  windows: array(object({
@@ -14635,15 +14678,15 @@ var NcConditionsSchema = object({
14635
14678
  * (an `immediate` rule naming an `audio-*` class, one notification per
14636
14679
  * classified sample) stays exactly as it was for rules that already use it.
14637
14680
  *
14638
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14639
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14640
- * (`camstack/src/data/notification-center.ts`, guarded by
14641
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14681
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14682
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14683
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14684
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14642
14685
  * condition fields it does not know when a rule is saved from the phone.
14643
14686
  * Publishing an editor for a condition the app cannot round-trip is how an
14644
- * operator loses a rule's conditions by opening it — so the descriptor, the
14645
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14646
- * does an audio rule become authorable.
14687
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14688
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14689
+ * follows here.
14647
14690
  */
14648
14691
  audio: NcAudioConditionSchema.optional()
14649
14692
  });
@@ -14879,6 +14922,30 @@ var NcRuleInputSchema = object({
14879
14922
  */
14880
14923
  snoozeAllowGlobal: boolean().optional(),
14881
14924
  /**
14925
+ * The snooze durations THIS rule's notification offers as buttons, in
14926
+ * minutes.
14927
+ *
14928
+ * Three states, and all three are distinct — which is exactly why this is
14929
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14930
+ * addon cap path (three production failures in one day), so a schema default
14931
+ * would collapse the first two:
14932
+ *
14933
+ * | value | meaning |
14934
+ * | --- | --- |
14935
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14936
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14937
+ * | a list | these choices, de-duplicated and sorted, at most four |
14938
+ *
14939
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14940
+ * three buttons in total) and a rule that spent it all on snooze choices
14941
+ * would push its own tap-through actions off the notification.
14942
+ *
14943
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14944
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14945
+ * window from anywhere (D133).
14946
+ */
14947
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14948
+ /**
14882
14949
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14883
14950
  *
14884
14951
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14978,6 +15045,7 @@ var NcConditionDescriptorSchema = object({
14978
15045
  "device",
14979
15046
  "package",
14980
15047
  "occupancy",
15048
+ "audio",
14981
15049
  "system"
14982
15050
  ]),
14983
15051
  label: string(),
@@ -14996,6 +15064,7 @@ var NcConditionDescriptorSchema = object({
14996
15064
  "crossingSelect",
14997
15065
  "polygonDraw",
14998
15066
  "occupancy",
15067
+ "audio",
14999
15068
  "deviceState",
15000
15069
  "systemEvent"
15001
15070
  ]),
@@ -15147,7 +15216,20 @@ var NcSnoozeInputSchema = object({
15147
15216
  ruleId: string().optional(),
15148
15217
  /** Required when `scope: 'device'`. */
15149
15218
  deviceId: number().int().optional(),
15150
- durationMinutes: number().int().min(1).max(1440),
15219
+ /**
15220
+ * Narrow the window to these subject classes — "the cat, not the person".
15221
+ *
15222
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15223
+ * what every window authored before this field meant, so no persisted row
15224
+ * changes meaning and no client has to learn anything to keep working.
15225
+ *
15226
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15227
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15228
+ * not at whichever of their four rules happened to produce the notification
15229
+ * they are dismissing.
15230
+ */
15231
+ classes: array(string().min(1)).min(1).optional(),
15232
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15151
15233
  /**
15152
15234
  * Silence this for EVERY recipient, not just the caller. Permission is
15153
15235
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15172,6 +15254,10 @@ var NcSnoozeSchema = object({
15172
15254
  scope: NcSnoozeScopeSchema,
15173
15255
  ruleId: string().optional(),
15174
15256
  deviceId: number().int().optional(),
15257
+ /** Subject classes this window covers. ABSENT = every class — see
15258
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15259
+ * no SQLite column: nothing queries a window by class. */
15260
+ classes: array(string().min(1)).min(1).optional(),
15175
15261
  startedAt: number(),
15176
15262
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15177
15263
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17272,7 +17358,14 @@ var zonesCapability = {
17272
17358
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
17273
17359
  * (e.g. zone groupings) can sit alongside the polygon list.
17274
17360
  */
17275
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
17361
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
17362
+ /**
17363
+ * Runtime-state durability: **restored** — written only on operator mutation, so a camera that never had one has nothing to re-derive from. This is the slice `zone-mirror-hydration.ts` exists to paper over.
17364
+ *
17365
+ * See `RuntimeStateDurability`. Enforced by
17366
+ * `scripts/check-runtime-state-durability.ts`.
17367
+ */
17368
+ durability: "restored"
17276
17369
  };
17277
17370
  /**
17278
17371
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -20071,7 +20164,17 @@ var airQualitySensorCapability = {
20071
20164
  schema: AirQualitySensorStatusSchema,
20072
20165
  kind: "push"
20073
20166
  },
20074
- runtimeState: AirQualitySensorStatusSchema
20167
+ runtimeState: AirQualitySensorStatusSchema,
20168
+ /**
20169
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20170
+ *
20171
+ * See `RuntimeStateDurability`. Enforced by
20172
+ * `scripts/check-runtime-state-durability.ts`.
20173
+ */
20174
+ durability: "restored",
20175
+ /** Clock fields: written, but excluded from the compare that decides
20176
+ * whether persisting is worth a SQLite commit. */
20177
+ volatileStateFields: ["lastFetchedAt"]
20075
20178
  };
20076
20179
  /**
20077
20180
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20103,7 +20206,17 @@ var ambientLightSensorCapability = {
20103
20206
  schema: AmbientLightSensorStatusSchema,
20104
20207
  kind: "push"
20105
20208
  },
20106
- runtimeState: AmbientLightSensorStatusSchema
20209
+ runtimeState: AmbientLightSensorStatusSchema,
20210
+ /**
20211
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20212
+ *
20213
+ * See `RuntimeStateDurability`. Enforced by
20214
+ * `scripts/check-runtime-state-durability.ts`.
20215
+ */
20216
+ durability: "restored",
20217
+ /** Clock fields: written, but excluded from the compare that decides
20218
+ * whether persisting is worth a SQLite commit. */
20219
+ volatileStateFields: ["lastFetchedAt"]
20107
20220
  };
20108
20221
  /**
20109
20222
  * Per-class audio metrics aggregated over a sliding window.
@@ -20221,7 +20334,14 @@ var audioMetricsCapability = {
20221
20334
  }), AudioMetricsHistorySchema)
20222
20335
  },
20223
20336
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
20224
- runtimeState: AudioMetricsSnapshotSchema
20337
+ runtimeState: AudioMetricsSnapshotSchema,
20338
+ /**
20339
+ * Runtime-state durability: **session** — 1 Hz per camera at the mirror and ~63 % of the fleet's whole runtime-state write rate. `avgDbfs` is a rolling 60 s mean that genuinely moves every second, so no equality fix reclaims it — and a two-hour-old dB reading rendered as current is worse than no reading.
20340
+ *
20341
+ * See `RuntimeStateDurability`. Enforced by
20342
+ * `scripts/check-runtime-state-durability.ts`.
20343
+ */
20344
+ durability: "session"
20225
20345
  };
20226
20346
  /**
20227
20347
  * Automation-control cap. Models HA `automation.*` entities on
@@ -20283,7 +20403,14 @@ var automationControlCapability = {
20283
20403
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
20284
20404
  * (badge) directly.
20285
20405
  */
20286
- runtimeState: AutomationControlStatusSchema
20406
+ runtimeState: AutomationControlStatusSchema,
20407
+ /**
20408
+ * Runtime-state durability: **session** — the authority for an automation being enabled is the automation store; a restored `isRunning` would be a lie. D62: one authority per switch.
20409
+ *
20410
+ * See `RuntimeStateDurability`. Enforced by
20411
+ * `scripts/check-runtime-state-durability.ts`.
20412
+ */
20413
+ durability: "session"
20287
20414
  };
20288
20415
  /**
20289
20416
  * Battery status snapshot. Emitted by providers whose device is
@@ -20389,7 +20516,17 @@ onStatusChanged: { data: object({
20389
20516
  * via `device.runtimeState.getCapState('battery')` regardless of
20390
20517
  * the underlying driver.
20391
20518
  */
20392
- runtimeState: BatteryStatusSchema
20519
+ runtimeState: BatteryStatusSchema,
20520
+ /**
20521
+ * Runtime-state durability: **restored** — a sleeping battery camera may not report for hours; the restored percentage is the only thing the UI and the sleep gate have. Zero churn once `lastUpdated` is excluded — 526 writes, 0 value changes, in 25 minutes.
20522
+ *
20523
+ * See `RuntimeStateDurability`. Enforced by
20524
+ * `scripts/check-runtime-state-durability.ts`.
20525
+ */
20526
+ durability: "restored",
20527
+ /** Clock fields: written, but excluded from the compare that decides
20528
+ * whether persisting is worth a SQLite commit. */
20529
+ volatileStateFields: ["lastUpdated"]
20393
20530
  };
20394
20531
  /**
20395
20532
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -20418,7 +20555,17 @@ var binaryCapability = {
20418
20555
  schema: BinaryStatusSchema,
20419
20556
  kind: "push"
20420
20557
  },
20421
- runtimeState: BinaryStatusSchema
20558
+ runtimeState: BinaryStatusSchema,
20559
+ /**
20560
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
20561
+ *
20562
+ * See `RuntimeStateDurability`. Enforced by
20563
+ * `scripts/check-runtime-state-durability.ts`.
20564
+ */
20565
+ durability: "restored",
20566
+ /** Clock fields: written, but excluded from the compare that decides
20567
+ * whether persisting is worth a SQLite commit. */
20568
+ volatileStateFields: ["lastChangedAt"]
20422
20569
  };
20423
20570
  /**
20424
20571
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -20471,7 +20618,14 @@ onBrightnessChanged: { data: object({
20471
20618
  * by the kernel. Read via `device.state.brightness.value` so UI
20472
20619
  * sliders surface the current level without polling the provider.
20473
20620
  */
20474
- runtimeState: BrightnessStatusSchema
20621
+ runtimeState: BrightnessStatusSchema,
20622
+ /**
20623
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
20624
+ *
20625
+ * See `RuntimeStateDurability`. Enforced by
20626
+ * `scripts/check-runtime-state-durability.ts`.
20627
+ */
20628
+ durability: "session"
20475
20629
  };
20476
20630
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
20477
20631
  kind: "mutation",
@@ -20559,7 +20713,17 @@ var carbonMonoxideCapability = {
20559
20713
  schema: CarbonMonoxideStatusSchema,
20560
20714
  kind: "push"
20561
20715
  },
20562
- runtimeState: CarbonMonoxideStatusSchema
20716
+ runtimeState: CarbonMonoxideStatusSchema,
20717
+ /**
20718
+ * Runtime-state durability: **restored** — as `smoke`.
20719
+ *
20720
+ * See `RuntimeStateDurability`. Enforced by
20721
+ * `scripts/check-runtime-state-durability.ts`.
20722
+ */
20723
+ durability: "restored",
20724
+ /** Clock fields: written, but excluded from the compare that decides
20725
+ * whether persisting is worth a SQLite commit. */
20726
+ volatileStateFields: ["lastChangedAt"]
20563
20727
  };
20564
20728
  /**
20565
20729
  * HVAC / climate control cap. Models the full surface of a HA
@@ -20719,7 +20883,14 @@ var climateControlCapability = {
20719
20883
  * the full slice via `device.state.climate-control.value` and refresh
20720
20884
  * on every push without re-querying the provider.
20721
20885
  */
20722
- runtimeState: ClimateControlStatusSchema
20886
+ runtimeState: ClimateControlStatusSchema,
20887
+ /**
20888
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
20889
+ *
20890
+ * See `RuntimeStateDurability`. Enforced by
20891
+ * `scripts/check-runtime-state-durability.ts`.
20892
+ */
20893
+ durability: "session"
20723
20894
  };
20724
20895
  /**
20725
20896
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -20829,7 +21000,14 @@ onColorChanged: { data: object({
20829
21000
  * kernel. Read via `device.state.color.value` so UI pickers surface
20830
21001
  * the current chromaticity without polling the provider.
20831
21002
  */
20832
- runtimeState: ColorStatusSchema
21003
+ runtimeState: ColorStatusSchema,
21004
+ /**
21005
+ * Runtime-state durability: **session** — as `brightness`.
21006
+ *
21007
+ * See `RuntimeStateDurability`. Enforced by
21008
+ * `scripts/check-runtime-state-durability.ts`.
21009
+ */
21010
+ durability: "session"
20833
21011
  };
20834
21012
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
20835
21013
  object({
@@ -20887,7 +21065,17 @@ var connectivityCapability = {
20887
21065
  schema: ConnectivityStatusSchema,
20888
21066
  kind: "push"
20889
21067
  },
20890
- runtimeState: ConnectivityStatusSchema
21068
+ runtimeState: ConnectivityStatusSchema,
21069
+ /**
21070
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21071
+ *
21072
+ * See `RuntimeStateDurability`. Enforced by
21073
+ * `scripts/check-runtime-state-durability.ts`.
21074
+ */
21075
+ durability: "restored",
21076
+ /** Clock fields: written, but excluded from the compare that decides
21077
+ * whether persisting is worth a SQLite commit. */
21078
+ volatileStateFields: ["lastChangedAt"]
20891
21079
  };
20892
21080
  /**
20893
21081
  * Generic device-consumables capability — surfaces a device's
@@ -20969,7 +21157,14 @@ reset: method(object({
20969
21157
  }
20970
21158
  }
20971
21159
  },
20972
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
21160
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
21161
+ /**
21162
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
21163
+ *
21164
+ * See `RuntimeStateDurability`. Enforced by
21165
+ * `scripts/check-runtime-state-durability.ts`.
21166
+ */
21167
+ durability: "session"
20973
21168
  };
20974
21169
  /**
20975
21170
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21000,7 +21195,17 @@ var contactCapability = {
21000
21195
  schema: ContactStatusSchema,
21001
21196
  kind: "push"
21002
21197
  },
21003
- runtimeState: ContactStatusSchema
21198
+ runtimeState: ContactStatusSchema,
21199
+ /**
21200
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
21201
+ *
21202
+ * See `RuntimeStateDurability`. Enforced by
21203
+ * `scripts/check-runtime-state-durability.ts`.
21204
+ */
21205
+ durability: "restored",
21206
+ /** Clock fields: written, but excluded from the compare that decides
21207
+ * whether persisting is worth a SQLite commit. */
21208
+ volatileStateFields: ["lastChangedAt"]
21004
21209
  };
21005
21210
  /**
21006
21211
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21106,7 +21311,14 @@ var controlCapability = {
21106
21311
  * dropdown / text field / date picker) read the slice's discriminant
21107
21312
  * and value directly without polling the provider.
21108
21313
  */
21109
- runtimeState: ControlStatusSchema
21314
+ runtimeState: ControlStatusSchema,
21315
+ /**
21316
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
21317
+ *
21318
+ * See `RuntimeStateDurability`. Enforced by
21319
+ * `scripts/check-runtime-state-durability.ts`.
21320
+ */
21321
+ durability: "session"
21110
21322
  };
21111
21323
  var CoverStatusSchema = object({
21112
21324
  /** Lifecycle state of the cover. */
@@ -21167,7 +21379,17 @@ var coverCapability = {
21167
21379
  * Runtime-state slice — mirrored by the kernel. UI controls watch
21168
21380
  * the slice for live position changes during a move.
21169
21381
  */
21170
- runtimeState: CoverStatusSchema
21382
+ runtimeState: CoverStatusSchema,
21383
+ /**
21384
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
21385
+ *
21386
+ * See `RuntimeStateDurability`. Enforced by
21387
+ * `scripts/check-runtime-state-durability.ts`.
21388
+ */
21389
+ durability: "restored",
21390
+ /** Clock fields: written, but excluded from the compare that decides
21391
+ * whether persisting is worth a SQLite commit. */
21392
+ volatileStateFields: ["lastChangedAt"]
21171
21393
  };
21172
21394
  /**
21173
21395
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -21261,7 +21483,17 @@ var dayNightCapability = {
21261
21483
  schema: DayNightStatusSchema,
21262
21484
  kind: "poll"
21263
21485
  },
21264
- runtimeState: DayNightStatusSchema
21486
+ runtimeState: DayNightStatusSchema,
21487
+ /**
21488
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
21489
+ *
21490
+ * See `RuntimeStateDurability`. Enforced by
21491
+ * `scripts/check-runtime-state-durability.ts`.
21492
+ */
21493
+ durability: "restored",
21494
+ /** Clock fields: written, but excluded from the compare that decides
21495
+ * whether persisting is worth a SQLite commit. */
21496
+ volatileStateFields: ["lastFetchedAt"]
21265
21497
  };
21266
21498
  /**
21267
21499
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -21308,7 +21540,17 @@ onStatusChanged: { data: object({
21308
21540
  schema: DeviceStatusSchema,
21309
21541
  kind: "push"
21310
21542
  },
21311
- runtimeState: DeviceStatusSchema
21543
+ runtimeState: DeviceStatusSchema,
21544
+ /**
21545
+ * Runtime-state durability: **restored** — the previous observation is what makes the first reading after a restart a COMPARISON instead of a phantom transition (D130). 32 real flips across 16 devices in 25 min — the busiest slice in the cold half.
21546
+ *
21547
+ * See `RuntimeStateDurability`. Enforced by
21548
+ * `scripts/check-runtime-state-durability.ts`.
21549
+ */
21550
+ durability: "restored",
21551
+ /** Clock fields: written, but excluded from the compare that decides
21552
+ * whether persisting is worth a SQLite commit. */
21553
+ volatileStateFields: ["lastChangedAt"]
21312
21554
  };
21313
21555
  /**
21314
21556
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -21370,7 +21612,14 @@ onPressed: { data: DoorbellPressEventSchema } },
21370
21612
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
21371
21613
  * without subscribing.
21372
21614
  */
21373
- runtimeState: DoorbellStatusSchema
21615
+ runtimeState: DoorbellStatusSchema,
21616
+ /**
21617
+ * Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
21618
+ *
21619
+ * See `RuntimeStateDurability`. Enforced by
21620
+ * `scripts/check-runtime-state-durability.ts`.
21621
+ */
21622
+ durability: "restored"
21374
21623
  };
21375
21624
  /**
21376
21625
  * Enum-state sensor — a string value picked from a finite option set.
@@ -21410,7 +21659,17 @@ var enumSensorCapability = {
21410
21659
  schema: EnumSensorStatusSchema,
21411
21660
  kind: "push"
21412
21661
  },
21413
- runtimeState: EnumSensorStatusSchema
21662
+ runtimeState: EnumSensorStatusSchema,
21663
+ /**
21664
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
21665
+ *
21666
+ * See `RuntimeStateDurability`. Enforced by
21667
+ * `scripts/check-runtime-state-durability.ts`.
21668
+ */
21669
+ durability: "restored",
21670
+ /** Clock fields: written, but excluded from the compare that decides
21671
+ * whether persisting is worth a SQLite commit. */
21672
+ volatileStateFields: ["lastFetchedAt"]
21414
21673
  };
21415
21674
  /**
21416
21675
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -21446,7 +21705,14 @@ var eventEmitterCapability = {
21446
21705
  schema: EventEmitterStatusSchema,
21447
21706
  kind: "push"
21448
21707
  },
21449
- runtimeState: EventEmitterStatusSchema
21708
+ runtimeState: EventEmitterStatusSchema,
21709
+ /**
21710
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
21711
+ *
21712
+ * See `RuntimeStateDurability`. Enforced by
21713
+ * `scripts/check-runtime-state-durability.ts`.
21714
+ */
21715
+ durability: "session"
21450
21716
  };
21451
21717
  var EventItemSchema = object({
21452
21718
  id: string(),
@@ -21727,7 +21993,14 @@ var fanControlCapability = {
21727
21993
  * Runtime-state slice — mirrored by the kernel. UI fan speed
21728
21994
  * sliders read `percentage` for live updates.
21729
21995
  */
21730
- runtimeState: FanControlStatusSchema
21996
+ runtimeState: FanControlStatusSchema,
21997
+ /**
21998
+ * Runtime-state durability: **session** — as `brightness`.
21999
+ *
22000
+ * See `RuntimeStateDurability`. Enforced by
22001
+ * `scripts/check-runtime-state-durability.ts`.
22002
+ */
22003
+ durability: "session"
21731
22004
  };
21732
22005
  /**
21733
22006
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -21803,7 +22076,14 @@ onProbeChanged: { data: object({
21803
22076
  schema: FeatureProbeStatusSchema,
21804
22077
  kind: "push"
21805
22078
  },
21806
- runtimeState: FeatureProbeStatusSchema
22079
+ runtimeState: FeatureProbeStatusSchema,
22080
+ /**
22081
+ * Runtime-state durability: **session** — per-session by definition — `lastProbedAt` means "this worker completed a probe THIS session", which is why the mirror seed already blanks it. Persisting it only creates something to blank.
22082
+ *
22083
+ * See `RuntimeStateDurability`. Enforced by
22084
+ * `scripts/check-runtime-state-durability.ts`.
22085
+ */
22086
+ durability: "session"
21807
22087
  };
21808
22088
  /**
21809
22089
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -21830,7 +22110,17 @@ var floodCapability = {
21830
22110
  schema: FloodStatusSchema,
21831
22111
  kind: "push"
21832
22112
  },
21833
- runtimeState: FloodStatusSchema
22113
+ runtimeState: FloodStatusSchema,
22114
+ /**
22115
+ * Runtime-state durability: **restored** — as `smoke`.
22116
+ *
22117
+ * See `RuntimeStateDurability`. Enforced by
22118
+ * `scripts/check-runtime-state-durability.ts`.
22119
+ */
22120
+ durability: "restored",
22121
+ /** Clock fields: written, but excluded from the compare that decides
22122
+ * whether persisting is worth a SQLite commit. */
22123
+ volatileStateFields: ["lastChangedAt"]
21834
22124
  };
21835
22125
  /**
21836
22126
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -21853,7 +22143,17 @@ var gasCapability = {
21853
22143
  schema: GasStatusSchema,
21854
22144
  kind: "push"
21855
22145
  },
21856
- runtimeState: GasStatusSchema
22146
+ runtimeState: GasStatusSchema,
22147
+ /**
22148
+ * Runtime-state durability: **restored** — as `smoke`.
22149
+ *
22150
+ * See `RuntimeStateDurability`. Enforced by
22151
+ * `scripts/check-runtime-state-durability.ts`.
22152
+ */
22153
+ durability: "restored",
22154
+ /** Clock fields: written, but excluded from the compare that decides
22155
+ * whether persisting is worth a SQLite commit. */
22156
+ volatileStateFields: ["lastChangedAt"]
21857
22157
  };
21858
22158
  /**
21859
22159
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -21929,7 +22229,14 @@ var humidifierCapability = {
21929
22229
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
21930
22230
  * slice for live humidity / mode changes.
21931
22231
  */
21932
- runtimeState: HumidifierStatusSchema
22232
+ runtimeState: HumidifierStatusSchema,
22233
+ /**
22234
+ * Runtime-state durability: **session** — as `climate-control`.
22235
+ *
22236
+ * See `RuntimeStateDurability`. Enforced by
22237
+ * `scripts/check-runtime-state-durability.ts`.
22238
+ */
22239
+ durability: "session"
21933
22240
  };
21934
22241
  /**
21935
22242
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -21965,7 +22272,17 @@ var humiditySensorCapability = {
21965
22272
  schema: HumiditySensorStatusSchema,
21966
22273
  kind: "push"
21967
22274
  },
21968
- runtimeState: HumiditySensorStatusSchema
22275
+ runtimeState: HumiditySensorStatusSchema,
22276
+ /**
22277
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
22278
+ *
22279
+ * See `RuntimeStateDurability`. Enforced by
22280
+ * `scripts/check-runtime-state-durability.ts`.
22281
+ */
22282
+ durability: "restored",
22283
+ /** Clock fields: written, but excluded from the compare that decides
22284
+ * whether persisting is worth a SQLite commit. */
22285
+ volatileStateFields: ["lastFetchedAt"]
21969
22286
  };
21970
22287
  /**
21971
22288
  * Image display cap. Models a single still image exposed by an integration —
@@ -22003,7 +22320,14 @@ var imageCapability = {
22003
22320
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22004
22321
  * directly and renders the still image.
22005
22322
  */
22006
- runtimeState: ImageStatusSchema
22323
+ runtimeState: ImageStatusSchema,
22324
+ /**
22325
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
22326
+ *
22327
+ * See `RuntimeStateDurability`. Enforced by
22328
+ * `scripts/check-runtime-state-durability.ts`.
22329
+ */
22330
+ durability: "session"
22007
22331
  };
22008
22332
  /**
22009
22333
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22152,7 +22476,17 @@ var imageSettingsCapability = {
22152
22476
  schema: ImageSettingsStatusSchema,
22153
22477
  kind: "poll"
22154
22478
  },
22155
- runtimeState: ImageSettingsStatusSchema
22479
+ runtimeState: ImageSettingsStatusSchema,
22480
+ /**
22481
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
22482
+ *
22483
+ * See `RuntimeStateDurability`. Enforced by
22484
+ * `scripts/check-runtime-state-durability.ts`.
22485
+ */
22486
+ durability: "restored",
22487
+ /** Clock fields: written, but excluded from the compare that decides
22488
+ * whether persisting is worth a SQLite commit. */
22489
+ volatileStateFields: ["lastFetchedAt"]
22156
22490
  };
22157
22491
  /**
22158
22492
  * integrations — system-scoped singleton capability for integration
@@ -22492,7 +22826,14 @@ var lawnMowerControlCapability = {
22492
22826
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22493
22827
  * slice for live activity + battery changes.
22494
22828
  */
22495
- runtimeState: LawnMowerControlStatusSchema
22829
+ runtimeState: LawnMowerControlStatusSchema,
22830
+ /**
22831
+ * Runtime-state durability: **session** — as `vacuum-control`.
22832
+ *
22833
+ * See `RuntimeStateDurability`. Enforced by
22834
+ * `scripts/check-runtime-state-durability.ts`.
22835
+ */
22836
+ durability: "session"
22496
22837
  };
22497
22838
  /**
22498
22839
  * local-network — hub-only singleton.
@@ -22698,7 +23039,17 @@ var lockControlCapability = {
22698
23039
  * read `state` and disable themselves during `locking`/`unlocking`
22699
23040
  * transitions.
22700
23041
  */
22701
- runtimeState: LockControlStatusSchema
23042
+ runtimeState: LockControlStatusSchema,
23043
+ /**
23044
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23045
+ *
23046
+ * See `RuntimeStateDurability`. Enforced by
23047
+ * `scripts/check-runtime-state-durability.ts`.
23048
+ */
23049
+ durability: "restored",
23050
+ /** Clock fields: written, but excluded from the compare that decides
23051
+ * whether persisting is worth a SQLite commit. */
23052
+ volatileStateFields: ["lastChangedAt"]
22702
23053
  };
22703
23054
  /**
22704
23055
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -22860,7 +23211,14 @@ var mediaPlayerCapability = {
22860
23211
  * full slice for live now-playing, volume, and progress updates
22861
23212
  * without polling.
22862
23213
  */
22863
- runtimeState: MediaPlayerStatusSchema
23214
+ runtimeState: MediaPlayerStatusSchema,
23215
+ /**
23216
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
23217
+ *
23218
+ * See `RuntimeStateDurability`. Enforced by
23219
+ * `scripts/check-runtime-state-durability.ts`.
23220
+ */
23221
+ durability: "session"
22864
23222
  };
22865
23223
  /**
22866
23224
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23124,7 +23482,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23124
23482
  * `device.state.motion.value`. Reads never invoke the provider, so
23125
23483
  * UIs and other addons can poll the cached state safely.
23126
23484
  */
23127
- runtimeState: MotionStatusSchema
23485
+ runtimeState: MotionStatusSchema,
23486
+ /**
23487
+ * Runtime-state durability: **session** — self-clearing by construction (`autoClearAfterMs`); a restored `detected: true` is a frozen event, and the next frame re-publishes the real one.
23488
+ *
23489
+ * See `RuntimeStateDurability`. Enforced by
23490
+ * `scripts/check-runtime-state-durability.ts`.
23491
+ */
23492
+ durability: "session"
23128
23493
  };
23129
23494
  /**
23130
23495
  * Motion-trigger toggle for accessory devices.
@@ -23189,7 +23554,14 @@ var motionTriggerCapability = {
23189
23554
  schema: MotionTriggerStatusSchema,
23190
23555
  kind: "command-driven"
23191
23556
  },
23192
- runtimeState: MotionTriggerRuntimeStateSchema
23557
+ runtimeState: MotionTriggerRuntimeStateSchema,
23558
+ /**
23559
+ * Runtime-state durability: **session** — the authority for motion-trigger enablement is the provider's own config; the slice is a mirror of it, re-published on connect.
23560
+ *
23561
+ * See `RuntimeStateDurability`. Enforced by
23562
+ * `scripts/check-runtime-state-durability.ts`.
23563
+ */
23564
+ durability: "session"
23193
23565
  };
23194
23566
  /**
23195
23567
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -23256,7 +23628,17 @@ var motionZonesCapability = {
23256
23628
  schema: MotionZoneStatusSchema,
23257
23629
  kind: "poll"
23258
23630
  },
23259
- runtimeState: MotionZoneStatusSchema
23631
+ runtimeState: MotionZoneStatusSchema,
23632
+ /**
23633
+ * Runtime-state durability: **restored** — the 14 KB polygon list is the single largest slice on the fleet and has not changed since the operator drew it. Highest value per byte in the table.
23634
+ *
23635
+ * See `RuntimeStateDurability`. Enforced by
23636
+ * `scripts/check-runtime-state-durability.ts`.
23637
+ */
23638
+ durability: "restored",
23639
+ /** Clock fields: written, but excluded from the compare that decides
23640
+ * whether persisting is worth a SQLite commit. */
23641
+ volatileStateFields: ["lastFetchedAt"]
23260
23642
  };
23261
23643
  /**
23262
23644
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -23330,7 +23712,17 @@ var nativeObjectDetectionCapability = {
23330
23712
  schema: NativeObjectDetectionStatusSchema,
23331
23713
  kind: "push"
23332
23714
  },
23333
- runtimeState: NativeObjectDetectionRuntimeStateSchema
23715
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
23716
+ /**
23717
+ * Runtime-state durability: **restored** — `enabled` is an operator toggle on a camera whose refresh is a no-op and whose staleMs is Infinity. There is no hardware value to re-read — losing it loses the setting.
23718
+ *
23719
+ * See `RuntimeStateDurability`. Enforced by
23720
+ * `scripts/check-runtime-state-durability.ts`.
23721
+ */
23722
+ durability: "restored",
23723
+ /** Clock fields: written, but excluded from the compare that decides
23724
+ * whether persisting is worth a SQLite commit. */
23725
+ volatileStateFields: ["lastFetchedAt"]
23334
23726
  };
23335
23727
  /**
23336
23728
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -23664,7 +24056,14 @@ onSent: { data: object({
23664
24056
  * form reads `supports` to gate optional fields; history pane reads
23665
24057
  * `lastSentAt` / `lastError` / `queueDepth`.
23666
24058
  */
23667
- runtimeState: NotifierStatusSchema
24059
+ runtimeState: NotifierStatusSchema,
24060
+ /**
24061
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24062
+ *
24063
+ * See `RuntimeStateDurability`. Enforced by
24064
+ * `scripts/check-runtime-state-durability.ts`.
24065
+ */
24066
+ durability: "session"
23668
24067
  };
23669
24068
  /**
23670
24069
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -23707,7 +24106,17 @@ var numericSensorCapability = {
23707
24106
  schema: NumericSensorStatusSchema,
23708
24107
  kind: "push"
23709
24108
  },
23710
- runtimeState: NumericSensorStatusSchema
24109
+ runtimeState: NumericSensorStatusSchema,
24110
+ /**
24111
+ * Runtime-state durability: **restored** — polled value, low churn once the clock is excluded (251 of 669 writes were the clock alone); restoring it removes the cold window before the first poll.
24112
+ *
24113
+ * See `RuntimeStateDurability`. Enforced by
24114
+ * `scripts/check-runtime-state-durability.ts`.
24115
+ */
24116
+ durability: "restored",
24117
+ /** Clock fields: written, but excluded from the compare that decides
24118
+ * whether persisting is worth a SQLite commit. */
24119
+ volatileStateFields: ["lastFetchedAt"]
23711
24120
  };
23712
24121
  /**
23713
24122
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24092,7 +24501,14 @@ var petFeederCapability = {
24092
24501
  * the full slice via `device.state.petFeeder.value` and refresh on
24093
24502
  * every poll without re-querying the provider.
24094
24503
  */
24095
- runtimeState: PetFeederStatusSchema
24504
+ runtimeState: PetFeederStatusSchema,
24505
+ /**
24506
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
24507
+ *
24508
+ * See `RuntimeStateDurability`. Enforced by
24509
+ * `scripts/check-runtime-state-durability.ts`.
24510
+ */
24511
+ durability: "session"
24096
24512
  };
24097
24513
  var VehicleSchema = object({
24098
24514
  id: string(),
@@ -24404,7 +24820,17 @@ var powerMeterCapability = {
24404
24820
  schema: PowerMeterStatusSchema,
24405
24821
  kind: "push"
24406
24822
  },
24407
- runtimeState: PowerMeterStatusSchema
24823
+ runtimeState: PowerMeterStatusSchema,
24824
+ /**
24825
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
24826
+ *
24827
+ * See `RuntimeStateDurability`. Enforced by
24828
+ * `scripts/check-runtime-state-durability.ts`.
24829
+ */
24830
+ durability: "restored",
24831
+ /** Clock fields: written, but excluded from the compare that decides
24832
+ * whether persisting is worth a SQLite commit. */
24833
+ volatileStateFields: ["lastFetchedAt"]
24408
24834
  };
24409
24835
  /**
24410
24836
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -24461,7 +24887,17 @@ var presenceCapability = {
24461
24887
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
24462
24888
  * pre-fetch fast-path check).
24463
24889
  */
24464
- runtimeState: PresenceStatusSchema
24890
+ runtimeState: PresenceStatusSchema,
24891
+ /**
24892
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
24893
+ *
24894
+ * See `RuntimeStateDurability`. Enforced by
24895
+ * `scripts/check-runtime-state-durability.ts`.
24896
+ */
24897
+ durability: "restored",
24898
+ /** Clock fields: written, but excluded from the compare that decides
24899
+ * whether persisting is worth a SQLite commit. */
24900
+ volatileStateFields: ["lastChangedAt"]
24465
24901
  };
24466
24902
  /**
24467
24903
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -24497,7 +24933,17 @@ var pressureSensorCapability = {
24497
24933
  schema: PressureSensorStatusSchema,
24498
24934
  kind: "push"
24499
24935
  },
24500
- runtimeState: PressureSensorStatusSchema
24936
+ runtimeState: PressureSensorStatusSchema,
24937
+ /**
24938
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
24939
+ *
24940
+ * See `RuntimeStateDurability`. Enforced by
24941
+ * `scripts/check-runtime-state-durability.ts`.
24942
+ */
24943
+ durability: "restored",
24944
+ /** Clock fields: written, but excluded from the compare that decides
24945
+ * whether persisting is worth a SQLite commit. */
24946
+ volatileStateFields: ["lastFetchedAt"]
24501
24947
  };
24502
24948
  /**
24503
24949
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -24627,7 +25073,17 @@ var privacyMaskCapability = {
24627
25073
  schema: PrivacyMaskStatusSchema,
24628
25074
  kind: "poll"
24629
25075
  },
24630
- runtimeState: PrivacyMaskStatusSchema
25076
+ runtimeState: PrivacyMaskStatusSchema,
25077
+ /**
25078
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25079
+ *
25080
+ * See `RuntimeStateDurability`. Enforced by
25081
+ * `scripts/check-runtime-state-durability.ts`.
25082
+ */
25083
+ durability: "restored",
25084
+ /** Clock fields: written, but excluded from the compare that decides
25085
+ * whether persisting is worth a SQLite commit. */
25086
+ volatileStateFields: ["lastFetchedAt"]
24631
25087
  };
24632
25088
  var PtzPresetSchema = object({
24633
25089
  id: string(),
@@ -24793,7 +25249,14 @@ var ptzAutotrackCapability = {
24793
25249
  * fetch / cache / fallback logic out of the four cap methods —
24794
25250
  * they become trampolines over `runtimeState`.
24795
25251
  */
24796
- runtimeState: PtzAutotrackRuntimeStateSchema
25252
+ runtimeState: PtzAutotrackRuntimeStateSchema,
25253
+ /**
25254
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
25255
+ *
25256
+ * See `RuntimeStateDurability`. Enforced by
25257
+ * `scripts/check-runtime-state-durability.ts`.
25258
+ */
25259
+ durability: "session"
24797
25260
  };
24798
25261
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
24799
25262
  kind: "mutation",
@@ -25443,7 +25906,14 @@ var sceneMonitorCapability = {
25443
25906
  schema: SceneMonitorStatusSchema,
25444
25907
  kind: "push"
25445
25908
  },
25446
- runtimeState: SceneMonitorStatusSchema
25909
+ runtimeState: SceneMonitorStatusSchema,
25910
+ /**
25911
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
25912
+ *
25913
+ * See `RuntimeStateDurability`. Enforced by
25914
+ * `scripts/check-runtime-state-durability.ts`.
25915
+ */
25916
+ durability: "session"
25447
25917
  };
25448
25918
  /**
25449
25919
  * Per-stage gating mode applied to the zones a rule references.
@@ -25587,7 +26057,14 @@ var scriptRunnerCapability = {
25587
26057
  * `isRunning` to render a spinner during execution and surfaces
25588
26058
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
25589
26059
  */
25590
- runtimeState: ScriptRunnerStatusSchema
26060
+ runtimeState: ScriptRunnerStatusSchema,
26061
+ /**
26062
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26063
+ *
26064
+ * See `RuntimeStateDurability`. Enforced by
26065
+ * `scripts/check-runtime-state-durability.ts`.
26066
+ */
26067
+ durability: "session"
25591
26068
  };
25592
26069
  /**
25593
26070
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -25614,7 +26091,17 @@ var smokeCapability = {
25614
26091
  schema: SmokeStatusSchema,
25615
26092
  kind: "push"
25616
26093
  },
25617
- runtimeState: SmokeStatusSchema
26094
+ runtimeState: SmokeStatusSchema,
26095
+ /**
26096
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26097
+ *
26098
+ * See `RuntimeStateDurability`. Enforced by
26099
+ * `scripts/check-runtime-state-durability.ts`.
26100
+ */
26101
+ durability: "restored",
26102
+ /** Clock fields: written, but excluded from the compare that decides
26103
+ * whether persisting is worth a SQLite commit. */
26104
+ volatileStateFields: ["lastChangedAt"]
25618
26105
  };
25619
26106
  /**
25620
26107
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -25787,7 +26274,17 @@ var streamParamsCapability = {
25787
26274
  schema: StreamParamsStatusSchema,
25788
26275
  kind: "poll"
25789
26276
  },
25790
- runtimeState: StreamParamsStatusSchema
26277
+ runtimeState: StreamParamsStatusSchema,
26278
+ /**
26279
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
26280
+ *
26281
+ * See `RuntimeStateDurability`. Enforced by
26282
+ * `scripts/check-runtime-state-durability.ts`.
26283
+ */
26284
+ durability: "restored",
26285
+ /** Clock fields: written, but excluded from the compare that decides
26286
+ * whether persisting is worth a SQLite commit. */
26287
+ volatileStateFields: ["lastFetchedAt"]
25791
26288
  };
25792
26289
  /**
25793
26290
  * Generic on/off switch cap for accessory children (siren, floodlight,
@@ -25833,6 +26330,16 @@ var switchCapability = {
25833
26330
  * not need to re-query the provider after a setState mutation.
25834
26331
  */
25835
26332
  runtimeState: SwitchStatusSchema,
26333
+ /**
26334
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
26335
+ *
26336
+ * See `RuntimeStateDurability`. Enforced by
26337
+ * `scripts/check-runtime-state-durability.ts`.
26338
+ */
26339
+ durability: "restored",
26340
+ /** Clock fields: written, but excluded from the compare that decides
26341
+ * whether persisting is worth a SQLite commit. */
26342
+ volatileStateFields: ["lastChangedAt"],
25836
26343
  settings: { bindings: [{
25837
26344
  kind: "scalar",
25838
26345
  statusPath: "on",
@@ -25912,7 +26419,17 @@ var tamperCapability = {
25912
26419
  schema: TamperStatusSchema,
25913
26420
  kind: "push"
25914
26421
  },
25915
- runtimeState: TamperStatusSchema
26422
+ runtimeState: TamperStatusSchema,
26423
+ /**
26424
+ * Runtime-state durability: **restored** — as `smoke`.
26425
+ *
26426
+ * See `RuntimeStateDurability`. Enforced by
26427
+ * `scripts/check-runtime-state-durability.ts`.
26428
+ */
26429
+ durability: "restored",
26430
+ /** Clock fields: written, but excluded from the compare that decides
26431
+ * whether persisting is worth a SQLite commit. */
26432
+ volatileStateFields: ["lastChangedAt"]
25916
26433
  };
25917
26434
  /**
25918
26435
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -25957,7 +26474,17 @@ var temperatureSensorCapability = {
25957
26474
  schema: TemperatureSensorStatusSchema,
25958
26475
  kind: "push"
25959
26476
  },
25960
- runtimeState: TemperatureSensorStatusSchema
26477
+ runtimeState: TemperatureSensorStatusSchema,
26478
+ /**
26479
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
26480
+ *
26481
+ * See `RuntimeStateDurability`. Enforced by
26482
+ * `scripts/check-runtime-state-durability.ts`.
26483
+ */
26484
+ durability: "restored",
26485
+ /** Clock fields: written, but excluded from the compare that decides
26486
+ * whether persisting is worth a SQLite commit. */
26487
+ volatileStateFields: ["lastFetchedAt"]
25961
26488
  };
25962
26489
  /**
25963
26490
  * toast — system-scoped singleton capability that streams toast
@@ -26026,7 +26553,14 @@ var updateCapability = {
26026
26553
  schema: UpdateStatusSchema,
26027
26554
  kind: "poll"
26028
26555
  },
26029
- runtimeState: UpdateStatusSchema
26556
+ runtimeState: UpdateStatusSchema,
26557
+ /**
26558
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
26559
+ *
26560
+ * See `RuntimeStateDurability`. Enforced by
26561
+ * `scripts/check-runtime-state-durability.ts`.
26562
+ */
26563
+ durability: "session"
26030
26564
  };
26031
26565
  var UserSummarySchema = object({
26032
26566
  id: string(),
@@ -26360,7 +26894,14 @@ var vacuumControlCapability = {
26360
26894
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26361
26895
  * slice for live state + battery + fan-speed changes.
26362
26896
  */
26363
- runtimeState: VacuumControlStatusSchema
26897
+ runtimeState: VacuumControlStatusSchema,
26898
+ /**
26899
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
26900
+ *
26901
+ * See `RuntimeStateDurability`. Enforced by
26902
+ * `scripts/check-runtime-state-durability.ts`.
26903
+ */
26904
+ durability: "session"
26364
26905
  };
26365
26906
  var ValveStatusSchema = object({
26366
26907
  /** Lifecycle state of the valve. */
@@ -26412,7 +26953,14 @@ var valveCapability = {
26412
26953
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26413
26954
  * slice for live position changes during a move.
26414
26955
  */
26415
- runtimeState: ValveStatusSchema
26956
+ runtimeState: ValveStatusSchema,
26957
+ /**
26958
+ * Runtime-state durability: **session** — as `brightness`.
26959
+ *
26960
+ * See `RuntimeStateDurability`. Enforced by
26961
+ * `scripts/check-runtime-state-durability.ts`.
26962
+ */
26963
+ durability: "session"
26416
26964
  };
26417
26965
  /**
26418
26966
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -26434,7 +26982,17 @@ var vibrationCapability = {
26434
26982
  schema: VibrationStatusSchema,
26435
26983
  kind: "push"
26436
26984
  },
26437
- runtimeState: VibrationStatusSchema
26985
+ runtimeState: VibrationStatusSchema,
26986
+ /**
26987
+ * Runtime-state durability: **restored** — as `smoke`.
26988
+ *
26989
+ * See `RuntimeStateDurability`. Enforced by
26990
+ * `scripts/check-runtime-state-durability.ts`.
26991
+ */
26992
+ durability: "restored",
26993
+ /** Clock fields: written, but excluded from the compare that decides
26994
+ * whether persisting is worth a SQLite commit. */
26995
+ volatileStateFields: ["lastChangedAt"]
26438
26996
  };
26439
26997
  /**
26440
26998
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -26508,7 +27066,14 @@ var waterHeaterCapability = {
26508
27066
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26509
27067
  * slice for live temperature / mode / away changes.
26510
27068
  */
26511
- runtimeState: WaterHeaterStatusSchema
27069
+ runtimeState: WaterHeaterStatusSchema,
27070
+ /**
27071
+ * Runtime-state durability: **session** — as `climate-control`.
27072
+ *
27073
+ * See `RuntimeStateDurability`. Enforced by
27074
+ * `scripts/check-runtime-state-durability.ts`.
27075
+ */
27076
+ durability: "session"
26512
27077
  };
26513
27078
  /**
26514
27079
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -26567,7 +27132,14 @@ var weatherCapability = {
26567
27132
  * Runtime-state slice — mirrored by the kernel. The UI reads the
26568
27133
  * current conditions directly from the slice on each weather push.
26569
27134
  */
26570
- runtimeState: WeatherStatusSchema
27135
+ runtimeState: WeatherStatusSchema,
27136
+ /**
27137
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27138
+ *
27139
+ * See `RuntimeStateDurability`. Enforced by
27140
+ * `scripts/check-runtime-state-durability.ts`.
27141
+ */
27142
+ durability: "session"
26571
27143
  };
26572
27144
  /**
26573
27145
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -26729,7 +27301,14 @@ var zoneAnalyticsCapability = {
26729
27301
  * automatically; the explicit `getCurrentSnapshot` cap method is
26730
27302
  * still useful for one-off polls without a subscription.
26731
27303
  */
26732
- runtimeState: CameraOccupancySnapshotSchema
27304
+ runtimeState: CameraOccupancySnapshotSchema,
27305
+ /**
27306
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
27307
+ *
27308
+ * See `RuntimeStateDurability`. Enforced by
27309
+ * `scripts/check-runtime-state-durability.ts`.
27310
+ */
27311
+ durability: "session"
26733
27312
  };
26734
27313
  /**
26735
27314
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -26807,7 +27386,14 @@ var zoneRulesCapability = {
26807
27386
  motion: array(ZoneRuleSchema).readonly(),
26808
27387
  detection: array(ZoneRuleSchema).readonly(),
26809
27388
  package: array(ZoneRuleSchema).readonly()
26810
- })
27389
+ }),
27390
+ /**
27391
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
27392
+ *
27393
+ * See `RuntimeStateDurability`. Enforced by
27394
+ * `scripts/check-runtime-state-durability.ts`.
27395
+ */
27396
+ durability: "restored"
26811
27397
  };
26812
27398
  /**
26813
27399
  * Accessory device helpers — shared across drivers.
@@ -33494,6 +34080,7 @@ Object.freeze({
33494
34080
  "network-access": "ingress",
33495
34081
  "smtp-provider": "email"
33496
34082
  });
34083
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
33497
34084
  new Set(["devices", "classes"]);
33498
34085
  /**
33499
34086
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.