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