@camstack/addon-provider-tuya 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.js CHANGED
@@ -11591,7 +11591,14 @@ var cameraStreamsCapability = {
11591
11591
  low: string().optional()
11592
11592
  }),
11593
11593
  lastChangedAt: number()
11594
- })
11594
+ }),
11595
+ /**
11596
+ * 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.
11597
+ *
11598
+ * See `RuntimeStateDurability`. Enforced by
11599
+ * `scripts/check-runtime-state-durability.ts`.
11600
+ */
11601
+ durability: "session"
11595
11602
  };
11596
11603
  /** Where a block runs. The operator chooses — a block driving a device on an
11597
11604
  * agent is the reason placement is not fixed to the hub. */
@@ -12152,6 +12159,13 @@ var deviceDiscoveryCapability = {
12152
12159
  kind: "poll"
12153
12160
  },
12154
12161
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
12162
+ /**
12163
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
12164
+ *
12165
+ * See `RuntimeStateDurability`. Enforced by
12166
+ * `scripts/check-runtime-state-durability.ts`.
12167
+ */
12168
+ durability: "session",
12155
12169
  methods: {
12156
12170
  /**
12157
12171
  * Snapshot of the current `discovered` list. Returns the
@@ -14068,7 +14082,23 @@ var NotificationActionSchema = object({
14068
14082
  * else — see `notification-center/action-token.ts` for what that does and
14069
14083
  * does not buy.
14070
14084
  */
14071
- destructive: boolean().optional()
14085
+ destructive: boolean().optional(),
14086
+ /**
14087
+ * How the tap should REACH the url.
14088
+ *
14089
+ * `navigate` (absent, and every button authored before this field) opens it:
14090
+ * the phone leaves the notification and shows whatever the callback returns.
14091
+ * That is right for a button whose answer the operator wants to read.
14092
+ *
14093
+ * `background` fires it as a POST and stays put. It exists for the buttons
14094
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
14095
+ * an answer to the notification, and being thrown into a browser tab to
14096
+ * confirm it costs more attention than the notification did. A backend that
14097
+ * cannot do a background call renders it as an ordinary link (the adapters
14098
+ * fall back rather than dropping the button), so this is a preference, never
14099
+ * a requirement.
14100
+ */
14101
+ mode: _enum(["navigate", "background"]).optional()
14072
14102
  });
14073
14103
  /**
14074
14104
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14920,7 +14950,17 @@ var alarmPanelCapability = {
14920
14950
  * full slice; renders an arm button per `availableModes` entry and
14921
14951
  * a PIN field iff `requiresCode === true`.
14922
14952
  */
14923
- runtimeState: AlarmPanelStatusSchema
14953
+ runtimeState: AlarmPanelStatusSchema,
14954
+ /**
14955
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14956
+ *
14957
+ * See `RuntimeStateDurability`. Enforced by
14958
+ * `scripts/check-runtime-state-durability.ts`.
14959
+ */
14960
+ durability: "restored",
14961
+ /** Clock fields: written, but excluded from the compare that decides
14962
+ * whether persisting is worth a SQLite commit. */
14963
+ volatileStateFields: ["lastChangedAt"]
14924
14964
  };
14925
14965
  /**
14926
14966
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -15097,6 +15137,9 @@ var NcSystemEventConditionSchema = object({
15097
15137
  nodeIds: array(string().min(1)).min(1).optional(),
15098
15138
  packageNames: array(string().min(1)).min(1).optional()
15099
15139
  });
15140
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
15141
+ * outage the operator asked for once and forgot. */
15142
+ var NC_SNOOZE_MAX_MINUTES = 1440;
15100
15143
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
15101
15144
  var NcScheduleSchema = object({
15102
15145
  windows: array(object({
@@ -15473,15 +15516,15 @@ var NcConditionsSchema = object({
15473
15516
  * (an `immediate` rule naming an `audio-*` class, one notification per
15474
15517
  * classified sample) stays exactly as it was for rules that already use it.
15475
15518
  *
15476
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
15477
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
15478
- * (`camstack/src/data/notification-center.ts`, guarded by
15479
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
15519
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
15520
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
15521
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
15522
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
15480
15523
  * condition fields it does not know when a rule is saved from the phone.
15481
15524
  * Publishing an editor for a condition the app cannot round-trip is how an
15482
- * operator loses a rule's conditions by opening it — so the descriptor, the
15483
- * admin widget and the viewer mirror land together (P2 + P3), and only then
15484
- * does an audio rule become authorable.
15525
+ * operator loses a rule's conditions by opening it — so the viewer mirror
15526
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
15527
+ * follows here.
15485
15528
  */
15486
15529
  audio: NcAudioConditionSchema.optional()
15487
15530
  });
@@ -15717,6 +15760,30 @@ var NcRuleInputSchema = object({
15717
15760
  */
15718
15761
  snoozeAllowGlobal: boolean().optional(),
15719
15762
  /**
15763
+ * The snooze durations THIS rule's notification offers as buttons, in
15764
+ * minutes.
15765
+ *
15766
+ * Three states, and all three are distinct — which is exactly why this is
15767
+ * `.optional()` and never `.default()`. A Zod default does not run on the
15768
+ * addon cap path (three production failures in one day), so a schema default
15769
+ * would collapse the first two:
15770
+ *
15771
+ * | value | meaning |
15772
+ * | --- | --- |
15773
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
15774
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
15775
+ * | a list | these choices, de-duplicated and sorted, at most four |
15776
+ *
15777
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
15778
+ * three buttons in total) and a rule that spent it all on snooze choices
15779
+ * would push its own tap-through actions off the notification.
15780
+ *
15781
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
15782
+ * that arms the panel, is exempt automatically and cannot be silenced by a
15783
+ * window from anywhere (D133).
15784
+ */
15785
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
15786
+ /**
15720
15787
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
15721
15788
  *
15722
15789
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -15816,6 +15883,7 @@ var NcConditionDescriptorSchema = object({
15816
15883
  "device",
15817
15884
  "package",
15818
15885
  "occupancy",
15886
+ "audio",
15819
15887
  "system"
15820
15888
  ]),
15821
15889
  label: string(),
@@ -15834,6 +15902,7 @@ var NcConditionDescriptorSchema = object({
15834
15902
  "crossingSelect",
15835
15903
  "polygonDraw",
15836
15904
  "occupancy",
15905
+ "audio",
15837
15906
  "deviceState",
15838
15907
  "systemEvent"
15839
15908
  ]),
@@ -15985,7 +16054,20 @@ var NcSnoozeInputSchema = object({
15985
16054
  ruleId: string().optional(),
15986
16055
  /** Required when `scope: 'device'`. */
15987
16056
  deviceId: number().int().optional(),
15988
- durationMinutes: number().int().min(1).max(1440),
16057
+ /**
16058
+ * Narrow the window to these subject classes — "the cat, not the person".
16059
+ *
16060
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
16061
+ * what every window authored before this field meant, so no persisted row
16062
+ * changes meaning and no client has to learn anything to keep working.
16063
+ *
16064
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
16065
+ * cross rules (D133): the operator points at a camera and a kind of thing,
16066
+ * not at whichever of their four rules happened to produce the notification
16067
+ * they are dismissing.
16068
+ */
16069
+ classes: array(string().min(1)).min(1).optional(),
16070
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15989
16071
  /**
15990
16072
  * Silence this for EVERY recipient, not just the caller. Permission is
15991
16073
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -16010,6 +16092,10 @@ var NcSnoozeSchema = object({
16010
16092
  scope: NcSnoozeScopeSchema,
16011
16093
  ruleId: string().optional(),
16012
16094
  deviceId: number().int().optional(),
16095
+ /** Subject classes this window covers. ABSENT = every class — see
16096
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
16097
+ * no SQLite column: nothing queries a window by class. */
16098
+ classes: array(string().min(1)).min(1).optional(),
16013
16099
  startedAt: number(),
16014
16100
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
16015
16101
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -18110,7 +18196,14 @@ var zonesCapability = {
18110
18196
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
18111
18197
  * (e.g. zone groupings) can sit alongside the polygon list.
18112
18198
  */
18113
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
18199
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
18200
+ /**
18201
+ * 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.
18202
+ *
18203
+ * See `RuntimeStateDurability`. Enforced by
18204
+ * `scripts/check-runtime-state-durability.ts`.
18205
+ */
18206
+ durability: "restored"
18114
18207
  };
18115
18208
  /**
18116
18209
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -20909,7 +21002,17 @@ var airQualitySensorCapability = {
20909
21002
  schema: AirQualitySensorStatusSchema,
20910
21003
  kind: "push"
20911
21004
  },
20912
- runtimeState: AirQualitySensorStatusSchema
21005
+ runtimeState: AirQualitySensorStatusSchema,
21006
+ /**
21007
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
21008
+ *
21009
+ * See `RuntimeStateDurability`. Enforced by
21010
+ * `scripts/check-runtime-state-durability.ts`.
21011
+ */
21012
+ durability: "restored",
21013
+ /** Clock fields: written, but excluded from the compare that decides
21014
+ * whether persisting is worth a SQLite commit. */
21015
+ volatileStateFields: ["lastFetchedAt"]
20913
21016
  };
20914
21017
  /**
20915
21018
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20941,7 +21044,17 @@ var ambientLightSensorCapability = {
20941
21044
  schema: AmbientLightSensorStatusSchema,
20942
21045
  kind: "push"
20943
21046
  },
20944
- runtimeState: AmbientLightSensorStatusSchema
21047
+ runtimeState: AmbientLightSensorStatusSchema,
21048
+ /**
21049
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
21050
+ *
21051
+ * See `RuntimeStateDurability`. Enforced by
21052
+ * `scripts/check-runtime-state-durability.ts`.
21053
+ */
21054
+ durability: "restored",
21055
+ /** Clock fields: written, but excluded from the compare that decides
21056
+ * whether persisting is worth a SQLite commit. */
21057
+ volatileStateFields: ["lastFetchedAt"]
20945
21058
  };
20946
21059
  /**
20947
21060
  * Per-class audio metrics aggregated over a sliding window.
@@ -21059,7 +21172,14 @@ var audioMetricsCapability = {
21059
21172
  }), AudioMetricsHistorySchema)
21060
21173
  },
21061
21174
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
21062
- runtimeState: AudioMetricsSnapshotSchema
21175
+ runtimeState: AudioMetricsSnapshotSchema,
21176
+ /**
21177
+ * 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.
21178
+ *
21179
+ * See `RuntimeStateDurability`. Enforced by
21180
+ * `scripts/check-runtime-state-durability.ts`.
21181
+ */
21182
+ durability: "session"
21063
21183
  };
21064
21184
  /**
21065
21185
  * Automation-control cap. Models HA `automation.*` entities on
@@ -21121,7 +21241,14 @@ var automationControlCapability = {
21121
21241
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
21122
21242
  * (badge) directly.
21123
21243
  */
21124
- runtimeState: AutomationControlStatusSchema
21244
+ runtimeState: AutomationControlStatusSchema,
21245
+ /**
21246
+ * 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.
21247
+ *
21248
+ * See `RuntimeStateDurability`. Enforced by
21249
+ * `scripts/check-runtime-state-durability.ts`.
21250
+ */
21251
+ durability: "session"
21125
21252
  };
21126
21253
  /**
21127
21254
  * Battery status snapshot. Emitted by providers whose device is
@@ -21227,7 +21354,17 @@ onStatusChanged: { data: object({
21227
21354
  * via `device.runtimeState.getCapState('battery')` regardless of
21228
21355
  * the underlying driver.
21229
21356
  */
21230
- runtimeState: BatteryStatusSchema
21357
+ runtimeState: BatteryStatusSchema,
21358
+ /**
21359
+ * 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.
21360
+ *
21361
+ * See `RuntimeStateDurability`. Enforced by
21362
+ * `scripts/check-runtime-state-durability.ts`.
21363
+ */
21364
+ durability: "restored",
21365
+ /** Clock fields: written, but excluded from the compare that decides
21366
+ * whether persisting is worth a SQLite commit. */
21367
+ volatileStateFields: ["lastUpdated"]
21231
21368
  };
21232
21369
  /**
21233
21370
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -21256,7 +21393,17 @@ var binaryCapability = {
21256
21393
  schema: BinaryStatusSchema,
21257
21394
  kind: "push"
21258
21395
  },
21259
- runtimeState: BinaryStatusSchema
21396
+ runtimeState: BinaryStatusSchema,
21397
+ /**
21398
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
21399
+ *
21400
+ * See `RuntimeStateDurability`. Enforced by
21401
+ * `scripts/check-runtime-state-durability.ts`.
21402
+ */
21403
+ durability: "restored",
21404
+ /** Clock fields: written, but excluded from the compare that decides
21405
+ * whether persisting is worth a SQLite commit. */
21406
+ volatileStateFields: ["lastChangedAt"]
21260
21407
  };
21261
21408
  /**
21262
21409
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -21309,7 +21456,14 @@ onBrightnessChanged: { data: object({
21309
21456
  * by the kernel. Read via `device.state.brightness.value` so UI
21310
21457
  * sliders surface the current level without polling the provider.
21311
21458
  */
21312
- runtimeState: BrightnessStatusSchema
21459
+ runtimeState: BrightnessStatusSchema,
21460
+ /**
21461
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
21462
+ *
21463
+ * See `RuntimeStateDurability`. Enforced by
21464
+ * `scripts/check-runtime-state-durability.ts`.
21465
+ */
21466
+ durability: "session"
21313
21467
  };
21314
21468
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
21315
21469
  kind: "mutation",
@@ -21397,7 +21551,17 @@ var carbonMonoxideCapability = {
21397
21551
  schema: CarbonMonoxideStatusSchema,
21398
21552
  kind: "push"
21399
21553
  },
21400
- runtimeState: CarbonMonoxideStatusSchema
21554
+ runtimeState: CarbonMonoxideStatusSchema,
21555
+ /**
21556
+ * Runtime-state durability: **restored** — as `smoke`.
21557
+ *
21558
+ * See `RuntimeStateDurability`. Enforced by
21559
+ * `scripts/check-runtime-state-durability.ts`.
21560
+ */
21561
+ durability: "restored",
21562
+ /** Clock fields: written, but excluded from the compare that decides
21563
+ * whether persisting is worth a SQLite commit. */
21564
+ volatileStateFields: ["lastChangedAt"]
21401
21565
  };
21402
21566
  /**
21403
21567
  * HVAC / climate control cap. Models the full surface of a HA
@@ -21557,7 +21721,14 @@ var climateControlCapability = {
21557
21721
  * the full slice via `device.state.climate-control.value` and refresh
21558
21722
  * on every push without re-querying the provider.
21559
21723
  */
21560
- runtimeState: ClimateControlStatusSchema
21724
+ runtimeState: ClimateControlStatusSchema,
21725
+ /**
21726
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
21727
+ *
21728
+ * See `RuntimeStateDurability`. Enforced by
21729
+ * `scripts/check-runtime-state-durability.ts`.
21730
+ */
21731
+ durability: "session"
21561
21732
  };
21562
21733
  /**
21563
21734
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -21667,7 +21838,14 @@ onColorChanged: { data: object({
21667
21838
  * kernel. Read via `device.state.color.value` so UI pickers surface
21668
21839
  * the current chromaticity without polling the provider.
21669
21840
  */
21670
- runtimeState: ColorStatusSchema
21841
+ runtimeState: ColorStatusSchema,
21842
+ /**
21843
+ * Runtime-state durability: **session** — as `brightness`.
21844
+ *
21845
+ * See `RuntimeStateDurability`. Enforced by
21846
+ * `scripts/check-runtime-state-durability.ts`.
21847
+ */
21848
+ durability: "session"
21671
21849
  };
21672
21850
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
21673
21851
  object({
@@ -21733,7 +21911,17 @@ var connectivityCapability = {
21733
21911
  schema: ConnectivityStatusSchema,
21734
21912
  kind: "push"
21735
21913
  },
21736
- runtimeState: ConnectivityStatusSchema
21914
+ runtimeState: ConnectivityStatusSchema,
21915
+ /**
21916
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21917
+ *
21918
+ * See `RuntimeStateDurability`. Enforced by
21919
+ * `scripts/check-runtime-state-durability.ts`.
21920
+ */
21921
+ durability: "restored",
21922
+ /** Clock fields: written, but excluded from the compare that decides
21923
+ * whether persisting is worth a SQLite commit. */
21924
+ volatileStateFields: ["lastChangedAt"]
21737
21925
  };
21738
21926
  /**
21739
21927
  * Generic device-consumables capability — surfaces a device's
@@ -21815,7 +22003,14 @@ reset: method(object({
21815
22003
  }
21816
22004
  }
21817
22005
  },
21818
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
22006
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
22007
+ /**
22008
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
22009
+ *
22010
+ * See `RuntimeStateDurability`. Enforced by
22011
+ * `scripts/check-runtime-state-durability.ts`.
22012
+ */
22013
+ durability: "session"
21819
22014
  };
21820
22015
  /**
21821
22016
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21846,7 +22041,17 @@ var contactCapability = {
21846
22041
  schema: ContactStatusSchema,
21847
22042
  kind: "push"
21848
22043
  },
21849
- runtimeState: ContactStatusSchema
22044
+ runtimeState: ContactStatusSchema,
22045
+ /**
22046
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
22047
+ *
22048
+ * See `RuntimeStateDurability`. Enforced by
22049
+ * `scripts/check-runtime-state-durability.ts`.
22050
+ */
22051
+ durability: "restored",
22052
+ /** Clock fields: written, but excluded from the compare that decides
22053
+ * whether persisting is worth a SQLite commit. */
22054
+ volatileStateFields: ["lastChangedAt"]
21850
22055
  };
21851
22056
  /**
21852
22057
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21952,7 +22157,14 @@ var controlCapability = {
21952
22157
  * dropdown / text field / date picker) read the slice's discriminant
21953
22158
  * and value directly without polling the provider.
21954
22159
  */
21955
- runtimeState: ControlStatusSchema
22160
+ runtimeState: ControlStatusSchema,
22161
+ /**
22162
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
22163
+ *
22164
+ * See `RuntimeStateDurability`. Enforced by
22165
+ * `scripts/check-runtime-state-durability.ts`.
22166
+ */
22167
+ durability: "session"
21956
22168
  };
21957
22169
  var CoverStatusSchema = object({
21958
22170
  /** Lifecycle state of the cover. */
@@ -22013,7 +22225,17 @@ var coverCapability = {
22013
22225
  * Runtime-state slice — mirrored by the kernel. UI controls watch
22014
22226
  * the slice for live position changes during a move.
22015
22227
  */
22016
- runtimeState: CoverStatusSchema
22228
+ runtimeState: CoverStatusSchema,
22229
+ /**
22230
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
22231
+ *
22232
+ * See `RuntimeStateDurability`. Enforced by
22233
+ * `scripts/check-runtime-state-durability.ts`.
22234
+ */
22235
+ durability: "restored",
22236
+ /** Clock fields: written, but excluded from the compare that decides
22237
+ * whether persisting is worth a SQLite commit. */
22238
+ volatileStateFields: ["lastChangedAt"]
22017
22239
  };
22018
22240
  /**
22019
22241
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -22107,7 +22329,17 @@ var dayNightCapability = {
22107
22329
  schema: DayNightStatusSchema,
22108
22330
  kind: "poll"
22109
22331
  },
22110
- runtimeState: DayNightStatusSchema
22332
+ runtimeState: DayNightStatusSchema,
22333
+ /**
22334
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
22335
+ *
22336
+ * See `RuntimeStateDurability`. Enforced by
22337
+ * `scripts/check-runtime-state-durability.ts`.
22338
+ */
22339
+ durability: "restored",
22340
+ /** Clock fields: written, but excluded from the compare that decides
22341
+ * whether persisting is worth a SQLite commit. */
22342
+ volatileStateFields: ["lastFetchedAt"]
22111
22343
  };
22112
22344
  /**
22113
22345
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -22154,7 +22386,17 @@ onStatusChanged: { data: object({
22154
22386
  schema: DeviceStatusSchema,
22155
22387
  kind: "push"
22156
22388
  },
22157
- runtimeState: DeviceStatusSchema
22389
+ runtimeState: DeviceStatusSchema,
22390
+ /**
22391
+ * 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.
22392
+ *
22393
+ * See `RuntimeStateDurability`. Enforced by
22394
+ * `scripts/check-runtime-state-durability.ts`.
22395
+ */
22396
+ durability: "restored",
22397
+ /** Clock fields: written, but excluded from the compare that decides
22398
+ * whether persisting is worth a SQLite commit. */
22399
+ volatileStateFields: ["lastChangedAt"]
22158
22400
  };
22159
22401
  /**
22160
22402
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -22216,7 +22458,14 @@ onPressed: { data: DoorbellPressEventSchema } },
22216
22458
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
22217
22459
  * without subscribing.
22218
22460
  */
22219
- runtimeState: DoorbellStatusSchema
22461
+ runtimeState: DoorbellStatusSchema,
22462
+ /**
22463
+ * 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.
22464
+ *
22465
+ * See `RuntimeStateDurability`. Enforced by
22466
+ * `scripts/check-runtime-state-durability.ts`.
22467
+ */
22468
+ durability: "restored"
22220
22469
  };
22221
22470
  /**
22222
22471
  * Enum-state sensor — a string value picked from a finite option set.
@@ -22256,7 +22505,17 @@ var enumSensorCapability = {
22256
22505
  schema: EnumSensorStatusSchema,
22257
22506
  kind: "push"
22258
22507
  },
22259
- runtimeState: EnumSensorStatusSchema
22508
+ runtimeState: EnumSensorStatusSchema,
22509
+ /**
22510
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
22511
+ *
22512
+ * See `RuntimeStateDurability`. Enforced by
22513
+ * `scripts/check-runtime-state-durability.ts`.
22514
+ */
22515
+ durability: "restored",
22516
+ /** Clock fields: written, but excluded from the compare that decides
22517
+ * whether persisting is worth a SQLite commit. */
22518
+ volatileStateFields: ["lastFetchedAt"]
22260
22519
  };
22261
22520
  /**
22262
22521
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -22292,7 +22551,14 @@ var eventEmitterCapability = {
22292
22551
  schema: EventEmitterStatusSchema,
22293
22552
  kind: "push"
22294
22553
  },
22295
- runtimeState: EventEmitterStatusSchema
22554
+ runtimeState: EventEmitterStatusSchema,
22555
+ /**
22556
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
22557
+ *
22558
+ * See `RuntimeStateDurability`. Enforced by
22559
+ * `scripts/check-runtime-state-durability.ts`.
22560
+ */
22561
+ durability: "session"
22296
22562
  };
22297
22563
  var EventItemSchema = object({
22298
22564
  id: string(),
@@ -22573,7 +22839,14 @@ var fanControlCapability = {
22573
22839
  * Runtime-state slice — mirrored by the kernel. UI fan speed
22574
22840
  * sliders read `percentage` for live updates.
22575
22841
  */
22576
- runtimeState: FanControlStatusSchema
22842
+ runtimeState: FanControlStatusSchema,
22843
+ /**
22844
+ * Runtime-state durability: **session** — as `brightness`.
22845
+ *
22846
+ * See `RuntimeStateDurability`. Enforced by
22847
+ * `scripts/check-runtime-state-durability.ts`.
22848
+ */
22849
+ durability: "session"
22577
22850
  };
22578
22851
  /**
22579
22852
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -22649,7 +22922,14 @@ onProbeChanged: { data: object({
22649
22922
  schema: FeatureProbeStatusSchema,
22650
22923
  kind: "push"
22651
22924
  },
22652
- runtimeState: FeatureProbeStatusSchema
22925
+ runtimeState: FeatureProbeStatusSchema,
22926
+ /**
22927
+ * 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.
22928
+ *
22929
+ * See `RuntimeStateDurability`. Enforced by
22930
+ * `scripts/check-runtime-state-durability.ts`.
22931
+ */
22932
+ durability: "session"
22653
22933
  };
22654
22934
  /**
22655
22935
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -22676,7 +22956,17 @@ var floodCapability = {
22676
22956
  schema: FloodStatusSchema,
22677
22957
  kind: "push"
22678
22958
  },
22679
- runtimeState: FloodStatusSchema
22959
+ runtimeState: FloodStatusSchema,
22960
+ /**
22961
+ * Runtime-state durability: **restored** — as `smoke`.
22962
+ *
22963
+ * See `RuntimeStateDurability`. Enforced by
22964
+ * `scripts/check-runtime-state-durability.ts`.
22965
+ */
22966
+ durability: "restored",
22967
+ /** Clock fields: written, but excluded from the compare that decides
22968
+ * whether persisting is worth a SQLite commit. */
22969
+ volatileStateFields: ["lastChangedAt"]
22680
22970
  };
22681
22971
  /**
22682
22972
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -22699,7 +22989,17 @@ var gasCapability = {
22699
22989
  schema: GasStatusSchema,
22700
22990
  kind: "push"
22701
22991
  },
22702
- runtimeState: GasStatusSchema
22992
+ runtimeState: GasStatusSchema,
22993
+ /**
22994
+ * Runtime-state durability: **restored** — as `smoke`.
22995
+ *
22996
+ * See `RuntimeStateDurability`. Enforced by
22997
+ * `scripts/check-runtime-state-durability.ts`.
22998
+ */
22999
+ durability: "restored",
23000
+ /** Clock fields: written, but excluded from the compare that decides
23001
+ * whether persisting is worth a SQLite commit. */
23002
+ volatileStateFields: ["lastChangedAt"]
22703
23003
  };
22704
23004
  /**
22705
23005
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22775,7 +23075,14 @@ var humidifierCapability = {
22775
23075
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22776
23076
  * slice for live humidity / mode changes.
22777
23077
  */
22778
- runtimeState: HumidifierStatusSchema
23078
+ runtimeState: HumidifierStatusSchema,
23079
+ /**
23080
+ * Runtime-state durability: **session** — as `climate-control`.
23081
+ *
23082
+ * See `RuntimeStateDurability`. Enforced by
23083
+ * `scripts/check-runtime-state-durability.ts`.
23084
+ */
23085
+ durability: "session"
22779
23086
  };
22780
23087
  /**
22781
23088
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22811,7 +23118,17 @@ var humiditySensorCapability = {
22811
23118
  schema: HumiditySensorStatusSchema,
22812
23119
  kind: "push"
22813
23120
  },
22814
- runtimeState: HumiditySensorStatusSchema
23121
+ runtimeState: HumiditySensorStatusSchema,
23122
+ /**
23123
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
23124
+ *
23125
+ * See `RuntimeStateDurability`. Enforced by
23126
+ * `scripts/check-runtime-state-durability.ts`.
23127
+ */
23128
+ durability: "restored",
23129
+ /** Clock fields: written, but excluded from the compare that decides
23130
+ * whether persisting is worth a SQLite commit. */
23131
+ volatileStateFields: ["lastFetchedAt"]
22815
23132
  };
22816
23133
  /**
22817
23134
  * Image display cap. Models a single still image exposed by an integration —
@@ -22849,7 +23166,14 @@ var imageCapability = {
22849
23166
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22850
23167
  * directly and renders the still image.
22851
23168
  */
22852
- runtimeState: ImageStatusSchema
23169
+ runtimeState: ImageStatusSchema,
23170
+ /**
23171
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
23172
+ *
23173
+ * See `RuntimeStateDurability`. Enforced by
23174
+ * `scripts/check-runtime-state-durability.ts`.
23175
+ */
23176
+ durability: "session"
22853
23177
  };
22854
23178
  /**
22855
23179
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22998,7 +23322,17 @@ var imageSettingsCapability = {
22998
23322
  schema: ImageSettingsStatusSchema,
22999
23323
  kind: "poll"
23000
23324
  },
23001
- runtimeState: ImageSettingsStatusSchema
23325
+ runtimeState: ImageSettingsStatusSchema,
23326
+ /**
23327
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
23328
+ *
23329
+ * See `RuntimeStateDurability`. Enforced by
23330
+ * `scripts/check-runtime-state-durability.ts`.
23331
+ */
23332
+ durability: "restored",
23333
+ /** Clock fields: written, but excluded from the compare that decides
23334
+ * whether persisting is worth a SQLite commit. */
23335
+ volatileStateFields: ["lastFetchedAt"]
23002
23336
  };
23003
23337
  /**
23004
23338
  * integrations — system-scoped singleton capability for integration
@@ -23338,7 +23672,14 @@ var lawnMowerControlCapability = {
23338
23672
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
23339
23673
  * slice for live activity + battery changes.
23340
23674
  */
23341
- runtimeState: LawnMowerControlStatusSchema
23675
+ runtimeState: LawnMowerControlStatusSchema,
23676
+ /**
23677
+ * Runtime-state durability: **session** — as `vacuum-control`.
23678
+ *
23679
+ * See `RuntimeStateDurability`. Enforced by
23680
+ * `scripts/check-runtime-state-durability.ts`.
23681
+ */
23682
+ durability: "session"
23342
23683
  };
23343
23684
  /**
23344
23685
  * local-network — hub-only singleton.
@@ -23544,7 +23885,17 @@ var lockControlCapability = {
23544
23885
  * read `state` and disable themselves during `locking`/`unlocking`
23545
23886
  * transitions.
23546
23887
  */
23547
- runtimeState: LockControlStatusSchema
23888
+ runtimeState: LockControlStatusSchema,
23889
+ /**
23890
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23891
+ *
23892
+ * See `RuntimeStateDurability`. Enforced by
23893
+ * `scripts/check-runtime-state-durability.ts`.
23894
+ */
23895
+ durability: "restored",
23896
+ /** Clock fields: written, but excluded from the compare that decides
23897
+ * whether persisting is worth a SQLite commit. */
23898
+ volatileStateFields: ["lastChangedAt"]
23548
23899
  };
23549
23900
  /**
23550
23901
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -23706,7 +24057,14 @@ var mediaPlayerCapability = {
23706
24057
  * full slice for live now-playing, volume, and progress updates
23707
24058
  * without polling.
23708
24059
  */
23709
- runtimeState: MediaPlayerStatusSchema
24060
+ runtimeState: MediaPlayerStatusSchema,
24061
+ /**
24062
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
24063
+ *
24064
+ * See `RuntimeStateDurability`. Enforced by
24065
+ * `scripts/check-runtime-state-durability.ts`.
24066
+ */
24067
+ durability: "session"
23710
24068
  };
23711
24069
  /**
23712
24070
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23970,7 +24328,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23970
24328
  * `device.state.motion.value`. Reads never invoke the provider, so
23971
24329
  * UIs and other addons can poll the cached state safely.
23972
24330
  */
23973
- runtimeState: MotionStatusSchema
24331
+ runtimeState: MotionStatusSchema,
24332
+ /**
24333
+ * 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.
24334
+ *
24335
+ * See `RuntimeStateDurability`. Enforced by
24336
+ * `scripts/check-runtime-state-durability.ts`.
24337
+ */
24338
+ durability: "session"
23974
24339
  };
23975
24340
  /**
23976
24341
  * Motion-trigger toggle for accessory devices.
@@ -24035,7 +24400,14 @@ var motionTriggerCapability = {
24035
24400
  schema: MotionTriggerStatusSchema,
24036
24401
  kind: "command-driven"
24037
24402
  },
24038
- runtimeState: MotionTriggerRuntimeStateSchema
24403
+ runtimeState: MotionTriggerRuntimeStateSchema,
24404
+ /**
24405
+ * 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.
24406
+ *
24407
+ * See `RuntimeStateDurability`. Enforced by
24408
+ * `scripts/check-runtime-state-durability.ts`.
24409
+ */
24410
+ durability: "session"
24039
24411
  };
24040
24412
  /**
24041
24413
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -24102,7 +24474,17 @@ var motionZonesCapability = {
24102
24474
  schema: MotionZoneStatusSchema,
24103
24475
  kind: "poll"
24104
24476
  },
24105
- runtimeState: MotionZoneStatusSchema
24477
+ runtimeState: MotionZoneStatusSchema,
24478
+ /**
24479
+ * 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.
24480
+ *
24481
+ * See `RuntimeStateDurability`. Enforced by
24482
+ * `scripts/check-runtime-state-durability.ts`.
24483
+ */
24484
+ durability: "restored",
24485
+ /** Clock fields: written, but excluded from the compare that decides
24486
+ * whether persisting is worth a SQLite commit. */
24487
+ volatileStateFields: ["lastFetchedAt"]
24106
24488
  };
24107
24489
  /**
24108
24490
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -24176,7 +24558,17 @@ var nativeObjectDetectionCapability = {
24176
24558
  schema: NativeObjectDetectionStatusSchema,
24177
24559
  kind: "push"
24178
24560
  },
24179
- runtimeState: NativeObjectDetectionRuntimeStateSchema
24561
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
24562
+ /**
24563
+ * 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.
24564
+ *
24565
+ * See `RuntimeStateDurability`. Enforced by
24566
+ * `scripts/check-runtime-state-durability.ts`.
24567
+ */
24568
+ durability: "restored",
24569
+ /** Clock fields: written, but excluded from the compare that decides
24570
+ * whether persisting is worth a SQLite commit. */
24571
+ volatileStateFields: ["lastFetchedAt"]
24180
24572
  };
24181
24573
  /**
24182
24574
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -24510,7 +24902,14 @@ onSent: { data: object({
24510
24902
  * form reads `supports` to gate optional fields; history pane reads
24511
24903
  * `lastSentAt` / `lastError` / `queueDepth`.
24512
24904
  */
24513
- runtimeState: NotifierStatusSchema
24905
+ runtimeState: NotifierStatusSchema,
24906
+ /**
24907
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24908
+ *
24909
+ * See `RuntimeStateDurability`. Enforced by
24910
+ * `scripts/check-runtime-state-durability.ts`.
24911
+ */
24912
+ durability: "session"
24514
24913
  };
24515
24914
  /**
24516
24915
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -24553,7 +24952,17 @@ var numericSensorCapability = {
24553
24952
  schema: NumericSensorStatusSchema,
24554
24953
  kind: "push"
24555
24954
  },
24556
- runtimeState: NumericSensorStatusSchema
24955
+ runtimeState: NumericSensorStatusSchema,
24956
+ /**
24957
+ * 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.
24958
+ *
24959
+ * See `RuntimeStateDurability`. Enforced by
24960
+ * `scripts/check-runtime-state-durability.ts`.
24961
+ */
24962
+ durability: "restored",
24963
+ /** Clock fields: written, but excluded from the compare that decides
24964
+ * whether persisting is worth a SQLite commit. */
24965
+ volatileStateFields: ["lastFetchedAt"]
24557
24966
  };
24558
24967
  /**
24559
24968
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24938,7 +25347,14 @@ var petFeederCapability = {
24938
25347
  * the full slice via `device.state.petFeeder.value` and refresh on
24939
25348
  * every poll without re-querying the provider.
24940
25349
  */
24941
- runtimeState: PetFeederStatusSchema
25350
+ runtimeState: PetFeederStatusSchema,
25351
+ /**
25352
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
25353
+ *
25354
+ * See `RuntimeStateDurability`. Enforced by
25355
+ * `scripts/check-runtime-state-durability.ts`.
25356
+ */
25357
+ durability: "session"
24942
25358
  };
24943
25359
  var VehicleSchema = object({
24944
25360
  id: string(),
@@ -25250,7 +25666,17 @@ var powerMeterCapability = {
25250
25666
  schema: PowerMeterStatusSchema,
25251
25667
  kind: "push"
25252
25668
  },
25253
- runtimeState: PowerMeterStatusSchema
25669
+ runtimeState: PowerMeterStatusSchema,
25670
+ /**
25671
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
25672
+ *
25673
+ * See `RuntimeStateDurability`. Enforced by
25674
+ * `scripts/check-runtime-state-durability.ts`.
25675
+ */
25676
+ durability: "restored",
25677
+ /** Clock fields: written, but excluded from the compare that decides
25678
+ * whether persisting is worth a SQLite commit. */
25679
+ volatileStateFields: ["lastFetchedAt"]
25254
25680
  };
25255
25681
  /**
25256
25682
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -25307,7 +25733,17 @@ var presenceCapability = {
25307
25733
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
25308
25734
  * pre-fetch fast-path check).
25309
25735
  */
25310
- runtimeState: PresenceStatusSchema
25736
+ runtimeState: PresenceStatusSchema,
25737
+ /**
25738
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25739
+ *
25740
+ * See `RuntimeStateDurability`. Enforced by
25741
+ * `scripts/check-runtime-state-durability.ts`.
25742
+ */
25743
+ durability: "restored",
25744
+ /** Clock fields: written, but excluded from the compare that decides
25745
+ * whether persisting is worth a SQLite commit. */
25746
+ volatileStateFields: ["lastChangedAt"]
25311
25747
  };
25312
25748
  /**
25313
25749
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -25343,7 +25779,17 @@ var pressureSensorCapability = {
25343
25779
  schema: PressureSensorStatusSchema,
25344
25780
  kind: "push"
25345
25781
  },
25346
- runtimeState: PressureSensorStatusSchema
25782
+ runtimeState: PressureSensorStatusSchema,
25783
+ /**
25784
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25785
+ *
25786
+ * See `RuntimeStateDurability`. Enforced by
25787
+ * `scripts/check-runtime-state-durability.ts`.
25788
+ */
25789
+ durability: "restored",
25790
+ /** Clock fields: written, but excluded from the compare that decides
25791
+ * whether persisting is worth a SQLite commit. */
25792
+ volatileStateFields: ["lastFetchedAt"]
25347
25793
  };
25348
25794
  /**
25349
25795
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -25473,7 +25919,17 @@ var privacyMaskCapability = {
25473
25919
  schema: PrivacyMaskStatusSchema,
25474
25920
  kind: "poll"
25475
25921
  },
25476
- runtimeState: PrivacyMaskStatusSchema
25922
+ runtimeState: PrivacyMaskStatusSchema,
25923
+ /**
25924
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25925
+ *
25926
+ * See `RuntimeStateDurability`. Enforced by
25927
+ * `scripts/check-runtime-state-durability.ts`.
25928
+ */
25929
+ durability: "restored",
25930
+ /** Clock fields: written, but excluded from the compare that decides
25931
+ * whether persisting is worth a SQLite commit. */
25932
+ volatileStateFields: ["lastFetchedAt"]
25477
25933
  };
25478
25934
  var PtzPresetSchema = object({
25479
25935
  id: string(),
@@ -25639,7 +26095,14 @@ var ptzAutotrackCapability = {
25639
26095
  * fetch / cache / fallback logic out of the four cap methods —
25640
26096
  * they become trampolines over `runtimeState`.
25641
26097
  */
25642
- runtimeState: PtzAutotrackRuntimeStateSchema
26098
+ runtimeState: PtzAutotrackRuntimeStateSchema,
26099
+ /**
26100
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
26101
+ *
26102
+ * See `RuntimeStateDurability`. Enforced by
26103
+ * `scripts/check-runtime-state-durability.ts`.
26104
+ */
26105
+ durability: "session"
25643
26106
  };
25644
26107
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
25645
26108
  kind: "mutation",
@@ -26289,7 +26752,14 @@ var sceneMonitorCapability = {
26289
26752
  schema: SceneMonitorStatusSchema,
26290
26753
  kind: "push"
26291
26754
  },
26292
- runtimeState: SceneMonitorStatusSchema
26755
+ runtimeState: SceneMonitorStatusSchema,
26756
+ /**
26757
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26758
+ *
26759
+ * See `RuntimeStateDurability`. Enforced by
26760
+ * `scripts/check-runtime-state-durability.ts`.
26761
+ */
26762
+ durability: "session"
26293
26763
  };
26294
26764
  /**
26295
26765
  * Per-stage gating mode applied to the zones a rule references.
@@ -26433,7 +26903,14 @@ var scriptRunnerCapability = {
26433
26903
  * `isRunning` to render a spinner during execution and surfaces
26434
26904
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
26435
26905
  */
26436
- runtimeState: ScriptRunnerStatusSchema
26906
+ runtimeState: ScriptRunnerStatusSchema,
26907
+ /**
26908
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26909
+ *
26910
+ * See `RuntimeStateDurability`. Enforced by
26911
+ * `scripts/check-runtime-state-durability.ts`.
26912
+ */
26913
+ durability: "session"
26437
26914
  };
26438
26915
  /**
26439
26916
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -26460,7 +26937,17 @@ var smokeCapability = {
26460
26937
  schema: SmokeStatusSchema,
26461
26938
  kind: "push"
26462
26939
  },
26463
- runtimeState: SmokeStatusSchema
26940
+ runtimeState: SmokeStatusSchema,
26941
+ /**
26942
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26943
+ *
26944
+ * See `RuntimeStateDurability`. Enforced by
26945
+ * `scripts/check-runtime-state-durability.ts`.
26946
+ */
26947
+ durability: "restored",
26948
+ /** Clock fields: written, but excluded from the compare that decides
26949
+ * whether persisting is worth a SQLite commit. */
26950
+ volatileStateFields: ["lastChangedAt"]
26464
26951
  };
26465
26952
  /**
26466
26953
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -26633,7 +27120,17 @@ var streamParamsCapability = {
26633
27120
  schema: StreamParamsStatusSchema,
26634
27121
  kind: "poll"
26635
27122
  },
26636
- runtimeState: StreamParamsStatusSchema
27123
+ runtimeState: StreamParamsStatusSchema,
27124
+ /**
27125
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
27126
+ *
27127
+ * See `RuntimeStateDurability`. Enforced by
27128
+ * `scripts/check-runtime-state-durability.ts`.
27129
+ */
27130
+ durability: "restored",
27131
+ /** Clock fields: written, but excluded from the compare that decides
27132
+ * whether persisting is worth a SQLite commit. */
27133
+ volatileStateFields: ["lastFetchedAt"]
26637
27134
  };
26638
27135
  /**
26639
27136
  * Generic on/off switch cap for accessory children (siren, floodlight,
@@ -26679,6 +27176,16 @@ var switchCapability = {
26679
27176
  * not need to re-query the provider after a setState mutation.
26680
27177
  */
26681
27178
  runtimeState: SwitchStatusSchema,
27179
+ /**
27180
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
27181
+ *
27182
+ * See `RuntimeStateDurability`. Enforced by
27183
+ * `scripts/check-runtime-state-durability.ts`.
27184
+ */
27185
+ durability: "restored",
27186
+ /** Clock fields: written, but excluded from the compare that decides
27187
+ * whether persisting is worth a SQLite commit. */
27188
+ volatileStateFields: ["lastChangedAt"],
26682
27189
  settings: { bindings: [{
26683
27190
  kind: "scalar",
26684
27191
  statusPath: "on",
@@ -26758,7 +27265,17 @@ var tamperCapability = {
26758
27265
  schema: TamperStatusSchema,
26759
27266
  kind: "push"
26760
27267
  },
26761
- runtimeState: TamperStatusSchema
27268
+ runtimeState: TamperStatusSchema,
27269
+ /**
27270
+ * Runtime-state durability: **restored** — as `smoke`.
27271
+ *
27272
+ * See `RuntimeStateDurability`. Enforced by
27273
+ * `scripts/check-runtime-state-durability.ts`.
27274
+ */
27275
+ durability: "restored",
27276
+ /** Clock fields: written, but excluded from the compare that decides
27277
+ * whether persisting is worth a SQLite commit. */
27278
+ volatileStateFields: ["lastChangedAt"]
26762
27279
  };
26763
27280
  /**
26764
27281
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26803,7 +27320,17 @@ var temperatureSensorCapability = {
26803
27320
  schema: TemperatureSensorStatusSchema,
26804
27321
  kind: "push"
26805
27322
  },
26806
- runtimeState: TemperatureSensorStatusSchema
27323
+ runtimeState: TemperatureSensorStatusSchema,
27324
+ /**
27325
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
27326
+ *
27327
+ * See `RuntimeStateDurability`. Enforced by
27328
+ * `scripts/check-runtime-state-durability.ts`.
27329
+ */
27330
+ durability: "restored",
27331
+ /** Clock fields: written, but excluded from the compare that decides
27332
+ * whether persisting is worth a SQLite commit. */
27333
+ volatileStateFields: ["lastFetchedAt"]
26807
27334
  };
26808
27335
  /**
26809
27336
  * toast — system-scoped singleton capability that streams toast
@@ -26872,7 +27399,14 @@ var updateCapability = {
26872
27399
  schema: UpdateStatusSchema,
26873
27400
  kind: "poll"
26874
27401
  },
26875
- runtimeState: UpdateStatusSchema
27402
+ runtimeState: UpdateStatusSchema,
27403
+ /**
27404
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
27405
+ *
27406
+ * See `RuntimeStateDurability`. Enforced by
27407
+ * `scripts/check-runtime-state-durability.ts`.
27408
+ */
27409
+ durability: "session"
26876
27410
  };
26877
27411
  var UserSummarySchema = object({
26878
27412
  id: string(),
@@ -27206,7 +27740,14 @@ var vacuumControlCapability = {
27206
27740
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27207
27741
  * slice for live state + battery + fan-speed changes.
27208
27742
  */
27209
- runtimeState: VacuumControlStatusSchema
27743
+ runtimeState: VacuumControlStatusSchema,
27744
+ /**
27745
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27746
+ *
27747
+ * See `RuntimeStateDurability`. Enforced by
27748
+ * `scripts/check-runtime-state-durability.ts`.
27749
+ */
27750
+ durability: "session"
27210
27751
  };
27211
27752
  var ValveStatusSchema = object({
27212
27753
  /** Lifecycle state of the valve. */
@@ -27258,7 +27799,14 @@ var valveCapability = {
27258
27799
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27259
27800
  * slice for live position changes during a move.
27260
27801
  */
27261
- runtimeState: ValveStatusSchema
27802
+ runtimeState: ValveStatusSchema,
27803
+ /**
27804
+ * Runtime-state durability: **session** — as `brightness`.
27805
+ *
27806
+ * See `RuntimeStateDurability`. Enforced by
27807
+ * `scripts/check-runtime-state-durability.ts`.
27808
+ */
27809
+ durability: "session"
27262
27810
  };
27263
27811
  /**
27264
27812
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -27280,7 +27828,17 @@ var vibrationCapability = {
27280
27828
  schema: VibrationStatusSchema,
27281
27829
  kind: "push"
27282
27830
  },
27283
- runtimeState: VibrationStatusSchema
27831
+ runtimeState: VibrationStatusSchema,
27832
+ /**
27833
+ * Runtime-state durability: **restored** — as `smoke`.
27834
+ *
27835
+ * See `RuntimeStateDurability`. Enforced by
27836
+ * `scripts/check-runtime-state-durability.ts`.
27837
+ */
27838
+ durability: "restored",
27839
+ /** Clock fields: written, but excluded from the compare that decides
27840
+ * whether persisting is worth a SQLite commit. */
27841
+ volatileStateFields: ["lastChangedAt"]
27284
27842
  };
27285
27843
  /**
27286
27844
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -27354,7 +27912,14 @@ var waterHeaterCapability = {
27354
27912
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27355
27913
  * slice for live temperature / mode / away changes.
27356
27914
  */
27357
- runtimeState: WaterHeaterStatusSchema
27915
+ runtimeState: WaterHeaterStatusSchema,
27916
+ /**
27917
+ * Runtime-state durability: **session** — as `climate-control`.
27918
+ *
27919
+ * See `RuntimeStateDurability`. Enforced by
27920
+ * `scripts/check-runtime-state-durability.ts`.
27921
+ */
27922
+ durability: "session"
27358
27923
  };
27359
27924
  /**
27360
27925
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -27413,7 +27978,14 @@ var weatherCapability = {
27413
27978
  * Runtime-state slice — mirrored by the kernel. The UI reads the
27414
27979
  * current conditions directly from the slice on each weather push.
27415
27980
  */
27416
- runtimeState: WeatherStatusSchema
27981
+ runtimeState: WeatherStatusSchema,
27982
+ /**
27983
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27984
+ *
27985
+ * See `RuntimeStateDurability`. Enforced by
27986
+ * `scripts/check-runtime-state-durability.ts`.
27987
+ */
27988
+ durability: "session"
27417
27989
  };
27418
27990
  /**
27419
27991
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -27575,7 +28147,14 @@ var zoneAnalyticsCapability = {
27575
28147
  * automatically; the explicit `getCurrentSnapshot` cap method is
27576
28148
  * still useful for one-off polls without a subscription.
27577
28149
  */
27578
- runtimeState: CameraOccupancySnapshotSchema
28150
+ runtimeState: CameraOccupancySnapshotSchema,
28151
+ /**
28152
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
28153
+ *
28154
+ * See `RuntimeStateDurability`. Enforced by
28155
+ * `scripts/check-runtime-state-durability.ts`.
28156
+ */
28157
+ durability: "session"
27579
28158
  };
27580
28159
  /**
27581
28160
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -27653,7 +28232,14 @@ var zoneRulesCapability = {
27653
28232
  motion: array(ZoneRuleSchema).readonly(),
27654
28233
  detection: array(ZoneRuleSchema).readonly(),
27655
28234
  package: array(ZoneRuleSchema).readonly()
27656
- })
28235
+ }),
28236
+ /**
28237
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
28238
+ *
28239
+ * See `RuntimeStateDurability`. Enforced by
28240
+ * `scripts/check-runtime-state-durability.ts`.
28241
+ */
28242
+ durability: "restored"
27657
28243
  };
27658
28244
  /**
27659
28245
  * Accessory device helpers — shared across drivers.
@@ -34340,6 +34926,7 @@ Object.freeze({
34340
34926
  "network-access": "ingress",
34341
34927
  "smtp-provider": "email"
34342
34928
  });
34929
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
34343
34930
  new Set(["devices", "classes"]);
34344
34931
  /**
34345
34932
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.