@camstack/addon-provider-wyze 0.2.14 → 0.2.15

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
@@ -10767,7 +10767,14 @@ var cameraStreamsCapability = {
10767
10767
  low: string().optional()
10768
10768
  }),
10769
10769
  lastChangedAt: number()
10770
- })
10770
+ }),
10771
+ /**
10772
+ * 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.
10773
+ *
10774
+ * See `RuntimeStateDurability`. Enforced by
10775
+ * `scripts/check-runtime-state-durability.ts`.
10776
+ */
10777
+ durability: "session"
10771
10778
  };
10772
10779
  /** Where a block runs. The operator chooses — a block driving a device on an
10773
10780
  * agent is the reason placement is not fixed to the hub. */
@@ -11328,6 +11335,13 @@ var deviceDiscoveryCapability = {
11328
11335
  kind: "poll"
11329
11336
  },
11330
11337
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11338
+ /**
11339
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11340
+ *
11341
+ * See `RuntimeStateDurability`. Enforced by
11342
+ * `scripts/check-runtime-state-durability.ts`.
11343
+ */
11344
+ durability: "session",
11331
11345
  methods: {
11332
11346
  /**
11333
11347
  * Snapshot of the current `discovered` list. Returns the
@@ -13244,7 +13258,23 @@ var NotificationActionSchema = object({
13244
13258
  * else — see `notification-center/action-token.ts` for what that does and
13245
13259
  * does not buy.
13246
13260
  */
13247
- destructive: boolean().optional()
13261
+ destructive: boolean().optional(),
13262
+ /**
13263
+ * How the tap should REACH the url.
13264
+ *
13265
+ * `navigate` (absent, and every button authored before this field) opens it:
13266
+ * the phone leaves the notification and shows whatever the callback returns.
13267
+ * That is right for a button whose answer the operator wants to read.
13268
+ *
13269
+ * `background` fires it as a POST and stays put. It exists for the buttons
13270
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13271
+ * an answer to the notification, and being thrown into a browser tab to
13272
+ * confirm it costs more attention than the notification did. A backend that
13273
+ * cannot do a background call renders it as an ordinary link (the adapters
13274
+ * fall back rather than dropping the button), so this is a preference, never
13275
+ * a requirement.
13276
+ */
13277
+ mode: _enum(["navigate", "background"]).optional()
13248
13278
  });
13249
13279
  /**
13250
13280
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14096,7 +14126,17 @@ var alarmPanelCapability = {
14096
14126
  * full slice; renders an arm button per `availableModes` entry and
14097
14127
  * a PIN field iff `requiresCode === true`.
14098
14128
  */
14099
- runtimeState: AlarmPanelStatusSchema
14129
+ runtimeState: AlarmPanelStatusSchema,
14130
+ /**
14131
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14132
+ *
14133
+ * See `RuntimeStateDurability`. Enforced by
14134
+ * `scripts/check-runtime-state-durability.ts`.
14135
+ */
14136
+ durability: "restored",
14137
+ /** Clock fields: written, but excluded from the compare that decides
14138
+ * whether persisting is worth a SQLite commit. */
14139
+ volatileStateFields: ["lastChangedAt"]
14100
14140
  };
14101
14141
  /**
14102
14142
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14273,6 +14313,9 @@ var NcSystemEventConditionSchema = object({
14273
14313
  nodeIds: array(string().min(1)).min(1).optional(),
14274
14314
  packageNames: array(string().min(1)).min(1).optional()
14275
14315
  });
14316
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14317
+ * outage the operator asked for once and forgot. */
14318
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14276
14319
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14277
14320
  var NcScheduleSchema = object({
14278
14321
  windows: array(object({
@@ -14649,15 +14692,15 @@ var NcConditionsSchema = object({
14649
14692
  * (an `immediate` rule naming an `audio-*` class, one notification per
14650
14693
  * classified sample) stays exactly as it was for rules that already use it.
14651
14694
  *
14652
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14653
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14654
- * (`camstack/src/data/notification-center.ts`, guarded by
14655
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14695
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14696
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14697
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14698
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14656
14699
  * condition fields it does not know when a rule is saved from the phone.
14657
14700
  * Publishing an editor for a condition the app cannot round-trip is how an
14658
- * operator loses a rule's conditions by opening it — so the descriptor, the
14659
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14660
- * does an audio rule become authorable.
14701
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14702
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14703
+ * follows here.
14661
14704
  */
14662
14705
  audio: NcAudioConditionSchema.optional()
14663
14706
  });
@@ -14893,6 +14936,30 @@ var NcRuleInputSchema = object({
14893
14936
  */
14894
14937
  snoozeAllowGlobal: boolean().optional(),
14895
14938
  /**
14939
+ * The snooze durations THIS rule's notification offers as buttons, in
14940
+ * minutes.
14941
+ *
14942
+ * Three states, and all three are distinct — which is exactly why this is
14943
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14944
+ * addon cap path (three production failures in one day), so a schema default
14945
+ * would collapse the first two:
14946
+ *
14947
+ * | value | meaning |
14948
+ * | --- | --- |
14949
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14950
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14951
+ * | a list | these choices, de-duplicated and sorted, at most four |
14952
+ *
14953
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14954
+ * three buttons in total) and a rule that spent it all on snooze choices
14955
+ * would push its own tap-through actions off the notification.
14956
+ *
14957
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14958
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14959
+ * window from anywhere (D133).
14960
+ */
14961
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14962
+ /**
14896
14963
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14897
14964
  *
14898
14965
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14992,6 +15059,7 @@ var NcConditionDescriptorSchema = object({
14992
15059
  "device",
14993
15060
  "package",
14994
15061
  "occupancy",
15062
+ "audio",
14995
15063
  "system"
14996
15064
  ]),
14997
15065
  label: string(),
@@ -15010,6 +15078,7 @@ var NcConditionDescriptorSchema = object({
15010
15078
  "crossingSelect",
15011
15079
  "polygonDraw",
15012
15080
  "occupancy",
15081
+ "audio",
15013
15082
  "deviceState",
15014
15083
  "systemEvent"
15015
15084
  ]),
@@ -15161,7 +15230,20 @@ var NcSnoozeInputSchema = object({
15161
15230
  ruleId: string().optional(),
15162
15231
  /** Required when `scope: 'device'`. */
15163
15232
  deviceId: number().int().optional(),
15164
- durationMinutes: number().int().min(1).max(1440),
15233
+ /**
15234
+ * Narrow the window to these subject classes — "the cat, not the person".
15235
+ *
15236
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15237
+ * what every window authored before this field meant, so no persisted row
15238
+ * changes meaning and no client has to learn anything to keep working.
15239
+ *
15240
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15241
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15242
+ * not at whichever of their four rules happened to produce the notification
15243
+ * they are dismissing.
15244
+ */
15245
+ classes: array(string().min(1)).min(1).optional(),
15246
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15165
15247
  /**
15166
15248
  * Silence this for EVERY recipient, not just the caller. Permission is
15167
15249
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15186,6 +15268,10 @@ var NcSnoozeSchema = object({
15186
15268
  scope: NcSnoozeScopeSchema,
15187
15269
  ruleId: string().optional(),
15188
15270
  deviceId: number().int().optional(),
15271
+ /** Subject classes this window covers. ABSENT = every class — see
15272
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15273
+ * no SQLite column: nothing queries a window by class. */
15274
+ classes: array(string().min(1)).min(1).optional(),
15189
15275
  startedAt: number(),
15190
15276
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15191
15277
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17286,7 +17372,14 @@ var zonesCapability = {
17286
17372
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
17287
17373
  * (e.g. zone groupings) can sit alongside the polygon list.
17288
17374
  */
17289
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
17375
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
17376
+ /**
17377
+ * 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.
17378
+ *
17379
+ * See `RuntimeStateDurability`. Enforced by
17380
+ * `scripts/check-runtime-state-durability.ts`.
17381
+ */
17382
+ durability: "restored"
17290
17383
  };
17291
17384
  /**
17292
17385
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -20180,7 +20273,17 @@ var airQualitySensorCapability = {
20180
20273
  schema: AirQualitySensorStatusSchema,
20181
20274
  kind: "push"
20182
20275
  },
20183
- runtimeState: AirQualitySensorStatusSchema
20276
+ runtimeState: AirQualitySensorStatusSchema,
20277
+ /**
20278
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20279
+ *
20280
+ * See `RuntimeStateDurability`. Enforced by
20281
+ * `scripts/check-runtime-state-durability.ts`.
20282
+ */
20283
+ durability: "restored",
20284
+ /** Clock fields: written, but excluded from the compare that decides
20285
+ * whether persisting is worth a SQLite commit. */
20286
+ volatileStateFields: ["lastFetchedAt"]
20184
20287
  };
20185
20288
  /**
20186
20289
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20212,7 +20315,17 @@ var ambientLightSensorCapability = {
20212
20315
  schema: AmbientLightSensorStatusSchema,
20213
20316
  kind: "push"
20214
20317
  },
20215
- runtimeState: AmbientLightSensorStatusSchema
20318
+ runtimeState: AmbientLightSensorStatusSchema,
20319
+ /**
20320
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20321
+ *
20322
+ * See `RuntimeStateDurability`. Enforced by
20323
+ * `scripts/check-runtime-state-durability.ts`.
20324
+ */
20325
+ durability: "restored",
20326
+ /** Clock fields: written, but excluded from the compare that decides
20327
+ * whether persisting is worth a SQLite commit. */
20328
+ volatileStateFields: ["lastFetchedAt"]
20216
20329
  };
20217
20330
  /**
20218
20331
  * Per-class audio metrics aggregated over a sliding window.
@@ -20330,7 +20443,14 @@ var audioMetricsCapability = {
20330
20443
  }), AudioMetricsHistorySchema)
20331
20444
  },
20332
20445
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
20333
- runtimeState: AudioMetricsSnapshotSchema
20446
+ runtimeState: AudioMetricsSnapshotSchema,
20447
+ /**
20448
+ * 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.
20449
+ *
20450
+ * See `RuntimeStateDurability`. Enforced by
20451
+ * `scripts/check-runtime-state-durability.ts`.
20452
+ */
20453
+ durability: "session"
20334
20454
  };
20335
20455
  /**
20336
20456
  * Automation-control cap. Models HA `automation.*` entities on
@@ -20392,7 +20512,14 @@ var automationControlCapability = {
20392
20512
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
20393
20513
  * (badge) directly.
20394
20514
  */
20395
- runtimeState: AutomationControlStatusSchema
20515
+ runtimeState: AutomationControlStatusSchema,
20516
+ /**
20517
+ * 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.
20518
+ *
20519
+ * See `RuntimeStateDurability`. Enforced by
20520
+ * `scripts/check-runtime-state-durability.ts`.
20521
+ */
20522
+ durability: "session"
20396
20523
  };
20397
20524
  /**
20398
20525
  * Battery status snapshot. Emitted by providers whose device is
@@ -20498,7 +20625,17 @@ onStatusChanged: { data: object({
20498
20625
  * via `device.runtimeState.getCapState('battery')` regardless of
20499
20626
  * the underlying driver.
20500
20627
  */
20501
- runtimeState: BatteryStatusSchema
20628
+ runtimeState: BatteryStatusSchema,
20629
+ /**
20630
+ * 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.
20631
+ *
20632
+ * See `RuntimeStateDurability`. Enforced by
20633
+ * `scripts/check-runtime-state-durability.ts`.
20634
+ */
20635
+ durability: "restored",
20636
+ /** Clock fields: written, but excluded from the compare that decides
20637
+ * whether persisting is worth a SQLite commit. */
20638
+ volatileStateFields: ["lastUpdated"]
20502
20639
  };
20503
20640
  /**
20504
20641
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -20527,7 +20664,17 @@ var binaryCapability = {
20527
20664
  schema: BinaryStatusSchema,
20528
20665
  kind: "push"
20529
20666
  },
20530
- runtimeState: BinaryStatusSchema
20667
+ runtimeState: BinaryStatusSchema,
20668
+ /**
20669
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
20670
+ *
20671
+ * See `RuntimeStateDurability`. Enforced by
20672
+ * `scripts/check-runtime-state-durability.ts`.
20673
+ */
20674
+ durability: "restored",
20675
+ /** Clock fields: written, but excluded from the compare that decides
20676
+ * whether persisting is worth a SQLite commit. */
20677
+ volatileStateFields: ["lastChangedAt"]
20531
20678
  };
20532
20679
  /**
20533
20680
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -20580,7 +20727,14 @@ onBrightnessChanged: { data: object({
20580
20727
  * by the kernel. Read via `device.state.brightness.value` so UI
20581
20728
  * sliders surface the current level without polling the provider.
20582
20729
  */
20583
- runtimeState: BrightnessStatusSchema
20730
+ runtimeState: BrightnessStatusSchema,
20731
+ /**
20732
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
20733
+ *
20734
+ * See `RuntimeStateDurability`. Enforced by
20735
+ * `scripts/check-runtime-state-durability.ts`.
20736
+ */
20737
+ durability: "session"
20584
20738
  };
20585
20739
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
20586
20740
  kind: "mutation",
@@ -20668,7 +20822,17 @@ var carbonMonoxideCapability = {
20668
20822
  schema: CarbonMonoxideStatusSchema,
20669
20823
  kind: "push"
20670
20824
  },
20671
- runtimeState: CarbonMonoxideStatusSchema
20825
+ runtimeState: CarbonMonoxideStatusSchema,
20826
+ /**
20827
+ * Runtime-state durability: **restored** — as `smoke`.
20828
+ *
20829
+ * See `RuntimeStateDurability`. Enforced by
20830
+ * `scripts/check-runtime-state-durability.ts`.
20831
+ */
20832
+ durability: "restored",
20833
+ /** Clock fields: written, but excluded from the compare that decides
20834
+ * whether persisting is worth a SQLite commit. */
20835
+ volatileStateFields: ["lastChangedAt"]
20672
20836
  };
20673
20837
  /**
20674
20838
  * HVAC / climate control cap. Models the full surface of a HA
@@ -20828,7 +20992,14 @@ var climateControlCapability = {
20828
20992
  * the full slice via `device.state.climate-control.value` and refresh
20829
20993
  * on every push without re-querying the provider.
20830
20994
  */
20831
- runtimeState: ClimateControlStatusSchema
20995
+ runtimeState: ClimateControlStatusSchema,
20996
+ /**
20997
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
20998
+ *
20999
+ * See `RuntimeStateDurability`. Enforced by
21000
+ * `scripts/check-runtime-state-durability.ts`.
21001
+ */
21002
+ durability: "session"
20832
21003
  };
20833
21004
  /**
20834
21005
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -20938,7 +21109,14 @@ onColorChanged: { data: object({
20938
21109
  * kernel. Read via `device.state.color.value` so UI pickers surface
20939
21110
  * the current chromaticity without polling the provider.
20940
21111
  */
20941
- runtimeState: ColorStatusSchema
21112
+ runtimeState: ColorStatusSchema,
21113
+ /**
21114
+ * Runtime-state durability: **session** — as `brightness`.
21115
+ *
21116
+ * See `RuntimeStateDurability`. Enforced by
21117
+ * `scripts/check-runtime-state-durability.ts`.
21118
+ */
21119
+ durability: "session"
20942
21120
  };
20943
21121
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
20944
21122
  object({
@@ -20996,7 +21174,17 @@ var connectivityCapability = {
20996
21174
  schema: ConnectivityStatusSchema,
20997
21175
  kind: "push"
20998
21176
  },
20999
- runtimeState: ConnectivityStatusSchema
21177
+ runtimeState: ConnectivityStatusSchema,
21178
+ /**
21179
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21180
+ *
21181
+ * See `RuntimeStateDurability`. Enforced by
21182
+ * `scripts/check-runtime-state-durability.ts`.
21183
+ */
21184
+ durability: "restored",
21185
+ /** Clock fields: written, but excluded from the compare that decides
21186
+ * whether persisting is worth a SQLite commit. */
21187
+ volatileStateFields: ["lastChangedAt"]
21000
21188
  };
21001
21189
  /**
21002
21190
  * Generic device-consumables capability — surfaces a device's
@@ -21078,7 +21266,14 @@ reset: method(object({
21078
21266
  }
21079
21267
  }
21080
21268
  },
21081
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
21269
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
21270
+ /**
21271
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
21272
+ *
21273
+ * See `RuntimeStateDurability`. Enforced by
21274
+ * `scripts/check-runtime-state-durability.ts`.
21275
+ */
21276
+ durability: "session"
21082
21277
  };
21083
21278
  /**
21084
21279
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21109,7 +21304,17 @@ var contactCapability = {
21109
21304
  schema: ContactStatusSchema,
21110
21305
  kind: "push"
21111
21306
  },
21112
- runtimeState: ContactStatusSchema
21307
+ runtimeState: ContactStatusSchema,
21308
+ /**
21309
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
21310
+ *
21311
+ * See `RuntimeStateDurability`. Enforced by
21312
+ * `scripts/check-runtime-state-durability.ts`.
21313
+ */
21314
+ durability: "restored",
21315
+ /** Clock fields: written, but excluded from the compare that decides
21316
+ * whether persisting is worth a SQLite commit. */
21317
+ volatileStateFields: ["lastChangedAt"]
21113
21318
  };
21114
21319
  /**
21115
21320
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21215,7 +21420,14 @@ var controlCapability = {
21215
21420
  * dropdown / text field / date picker) read the slice's discriminant
21216
21421
  * and value directly without polling the provider.
21217
21422
  */
21218
- runtimeState: ControlStatusSchema
21423
+ runtimeState: ControlStatusSchema,
21424
+ /**
21425
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
21426
+ *
21427
+ * See `RuntimeStateDurability`. Enforced by
21428
+ * `scripts/check-runtime-state-durability.ts`.
21429
+ */
21430
+ durability: "session"
21219
21431
  };
21220
21432
  var CoverStatusSchema = object({
21221
21433
  /** Lifecycle state of the cover. */
@@ -21276,7 +21488,17 @@ var coverCapability = {
21276
21488
  * Runtime-state slice — mirrored by the kernel. UI controls watch
21277
21489
  * the slice for live position changes during a move.
21278
21490
  */
21279
- runtimeState: CoverStatusSchema
21491
+ runtimeState: CoverStatusSchema,
21492
+ /**
21493
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
21494
+ *
21495
+ * See `RuntimeStateDurability`. Enforced by
21496
+ * `scripts/check-runtime-state-durability.ts`.
21497
+ */
21498
+ durability: "restored",
21499
+ /** Clock fields: written, but excluded from the compare that decides
21500
+ * whether persisting is worth a SQLite commit. */
21501
+ volatileStateFields: ["lastChangedAt"]
21280
21502
  };
21281
21503
  /**
21282
21504
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -21370,7 +21592,17 @@ var dayNightCapability = {
21370
21592
  schema: DayNightStatusSchema,
21371
21593
  kind: "poll"
21372
21594
  },
21373
- runtimeState: DayNightStatusSchema
21595
+ runtimeState: DayNightStatusSchema,
21596
+ /**
21597
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
21598
+ *
21599
+ * See `RuntimeStateDurability`. Enforced by
21600
+ * `scripts/check-runtime-state-durability.ts`.
21601
+ */
21602
+ durability: "restored",
21603
+ /** Clock fields: written, but excluded from the compare that decides
21604
+ * whether persisting is worth a SQLite commit. */
21605
+ volatileStateFields: ["lastFetchedAt"]
21374
21606
  };
21375
21607
  /**
21376
21608
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -21417,7 +21649,17 @@ onStatusChanged: { data: object({
21417
21649
  schema: DeviceStatusSchema,
21418
21650
  kind: "push"
21419
21651
  },
21420
- runtimeState: DeviceStatusSchema
21652
+ runtimeState: DeviceStatusSchema,
21653
+ /**
21654
+ * 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.
21655
+ *
21656
+ * See `RuntimeStateDurability`. Enforced by
21657
+ * `scripts/check-runtime-state-durability.ts`.
21658
+ */
21659
+ durability: "restored",
21660
+ /** Clock fields: written, but excluded from the compare that decides
21661
+ * whether persisting is worth a SQLite commit. */
21662
+ volatileStateFields: ["lastChangedAt"]
21421
21663
  };
21422
21664
  /**
21423
21665
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -21479,7 +21721,14 @@ onPressed: { data: DoorbellPressEventSchema } },
21479
21721
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
21480
21722
  * without subscribing.
21481
21723
  */
21482
- runtimeState: DoorbellStatusSchema
21724
+ runtimeState: DoorbellStatusSchema,
21725
+ /**
21726
+ * 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.
21727
+ *
21728
+ * See `RuntimeStateDurability`. Enforced by
21729
+ * `scripts/check-runtime-state-durability.ts`.
21730
+ */
21731
+ durability: "restored"
21483
21732
  };
21484
21733
  /**
21485
21734
  * Enum-state sensor — a string value picked from a finite option set.
@@ -21519,7 +21768,17 @@ var enumSensorCapability = {
21519
21768
  schema: EnumSensorStatusSchema,
21520
21769
  kind: "push"
21521
21770
  },
21522
- runtimeState: EnumSensorStatusSchema
21771
+ runtimeState: EnumSensorStatusSchema,
21772
+ /**
21773
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
21774
+ *
21775
+ * See `RuntimeStateDurability`. Enforced by
21776
+ * `scripts/check-runtime-state-durability.ts`.
21777
+ */
21778
+ durability: "restored",
21779
+ /** Clock fields: written, but excluded from the compare that decides
21780
+ * whether persisting is worth a SQLite commit. */
21781
+ volatileStateFields: ["lastFetchedAt"]
21523
21782
  };
21524
21783
  /**
21525
21784
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -21555,7 +21814,14 @@ var eventEmitterCapability = {
21555
21814
  schema: EventEmitterStatusSchema,
21556
21815
  kind: "push"
21557
21816
  },
21558
- runtimeState: EventEmitterStatusSchema
21817
+ runtimeState: EventEmitterStatusSchema,
21818
+ /**
21819
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
21820
+ *
21821
+ * See `RuntimeStateDurability`. Enforced by
21822
+ * `scripts/check-runtime-state-durability.ts`.
21823
+ */
21824
+ durability: "session"
21559
21825
  };
21560
21826
  var EventItemSchema = object({
21561
21827
  id: string(),
@@ -21836,7 +22102,14 @@ var fanControlCapability = {
21836
22102
  * Runtime-state slice — mirrored by the kernel. UI fan speed
21837
22103
  * sliders read `percentage` for live updates.
21838
22104
  */
21839
- runtimeState: FanControlStatusSchema
22105
+ runtimeState: FanControlStatusSchema,
22106
+ /**
22107
+ * Runtime-state durability: **session** — as `brightness`.
22108
+ *
22109
+ * See `RuntimeStateDurability`. Enforced by
22110
+ * `scripts/check-runtime-state-durability.ts`.
22111
+ */
22112
+ durability: "session"
21840
22113
  };
21841
22114
  /**
21842
22115
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -21912,7 +22185,14 @@ onProbeChanged: { data: object({
21912
22185
  schema: FeatureProbeStatusSchema,
21913
22186
  kind: "push"
21914
22187
  },
21915
- runtimeState: FeatureProbeStatusSchema
22188
+ runtimeState: FeatureProbeStatusSchema,
22189
+ /**
22190
+ * 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.
22191
+ *
22192
+ * See `RuntimeStateDurability`. Enforced by
22193
+ * `scripts/check-runtime-state-durability.ts`.
22194
+ */
22195
+ durability: "session"
21916
22196
  };
21917
22197
  /**
21918
22198
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -21939,7 +22219,17 @@ var floodCapability = {
21939
22219
  schema: FloodStatusSchema,
21940
22220
  kind: "push"
21941
22221
  },
21942
- runtimeState: FloodStatusSchema
22222
+ runtimeState: FloodStatusSchema,
22223
+ /**
22224
+ * Runtime-state durability: **restored** — as `smoke`.
22225
+ *
22226
+ * See `RuntimeStateDurability`. Enforced by
22227
+ * `scripts/check-runtime-state-durability.ts`.
22228
+ */
22229
+ durability: "restored",
22230
+ /** Clock fields: written, but excluded from the compare that decides
22231
+ * whether persisting is worth a SQLite commit. */
22232
+ volatileStateFields: ["lastChangedAt"]
21943
22233
  };
21944
22234
  /**
21945
22235
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -21962,7 +22252,17 @@ var gasCapability = {
21962
22252
  schema: GasStatusSchema,
21963
22253
  kind: "push"
21964
22254
  },
21965
- runtimeState: GasStatusSchema
22255
+ runtimeState: GasStatusSchema,
22256
+ /**
22257
+ * Runtime-state durability: **restored** — as `smoke`.
22258
+ *
22259
+ * See `RuntimeStateDurability`. Enforced by
22260
+ * `scripts/check-runtime-state-durability.ts`.
22261
+ */
22262
+ durability: "restored",
22263
+ /** Clock fields: written, but excluded from the compare that decides
22264
+ * whether persisting is worth a SQLite commit. */
22265
+ volatileStateFields: ["lastChangedAt"]
21966
22266
  };
21967
22267
  /**
21968
22268
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22038,7 +22338,14 @@ var humidifierCapability = {
22038
22338
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22039
22339
  * slice for live humidity / mode changes.
22040
22340
  */
22041
- runtimeState: HumidifierStatusSchema
22341
+ runtimeState: HumidifierStatusSchema,
22342
+ /**
22343
+ * Runtime-state durability: **session** — as `climate-control`.
22344
+ *
22345
+ * See `RuntimeStateDurability`. Enforced by
22346
+ * `scripts/check-runtime-state-durability.ts`.
22347
+ */
22348
+ durability: "session"
22042
22349
  };
22043
22350
  /**
22044
22351
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22074,7 +22381,17 @@ var humiditySensorCapability = {
22074
22381
  schema: HumiditySensorStatusSchema,
22075
22382
  kind: "push"
22076
22383
  },
22077
- runtimeState: HumiditySensorStatusSchema
22384
+ runtimeState: HumiditySensorStatusSchema,
22385
+ /**
22386
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
22387
+ *
22388
+ * See `RuntimeStateDurability`. Enforced by
22389
+ * `scripts/check-runtime-state-durability.ts`.
22390
+ */
22391
+ durability: "restored",
22392
+ /** Clock fields: written, but excluded from the compare that decides
22393
+ * whether persisting is worth a SQLite commit. */
22394
+ volatileStateFields: ["lastFetchedAt"]
22078
22395
  };
22079
22396
  /**
22080
22397
  * Image display cap. Models a single still image exposed by an integration —
@@ -22112,7 +22429,14 @@ var imageCapability = {
22112
22429
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22113
22430
  * directly and renders the still image.
22114
22431
  */
22115
- runtimeState: ImageStatusSchema
22432
+ runtimeState: ImageStatusSchema,
22433
+ /**
22434
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
22435
+ *
22436
+ * See `RuntimeStateDurability`. Enforced by
22437
+ * `scripts/check-runtime-state-durability.ts`.
22438
+ */
22439
+ durability: "session"
22116
22440
  };
22117
22441
  /**
22118
22442
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22261,7 +22585,17 @@ var imageSettingsCapability = {
22261
22585
  schema: ImageSettingsStatusSchema,
22262
22586
  kind: "poll"
22263
22587
  },
22264
- runtimeState: ImageSettingsStatusSchema
22588
+ runtimeState: ImageSettingsStatusSchema,
22589
+ /**
22590
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
22591
+ *
22592
+ * See `RuntimeStateDurability`. Enforced by
22593
+ * `scripts/check-runtime-state-durability.ts`.
22594
+ */
22595
+ durability: "restored",
22596
+ /** Clock fields: written, but excluded from the compare that decides
22597
+ * whether persisting is worth a SQLite commit. */
22598
+ volatileStateFields: ["lastFetchedAt"]
22265
22599
  };
22266
22600
  /**
22267
22601
  * integrations — system-scoped singleton capability for integration
@@ -22652,7 +22986,14 @@ var lawnMowerControlCapability = {
22652
22986
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22653
22987
  * slice for live activity + battery changes.
22654
22988
  */
22655
- runtimeState: LawnMowerControlStatusSchema
22989
+ runtimeState: LawnMowerControlStatusSchema,
22990
+ /**
22991
+ * Runtime-state durability: **session** — as `vacuum-control`.
22992
+ *
22993
+ * See `RuntimeStateDurability`. Enforced by
22994
+ * `scripts/check-runtime-state-durability.ts`.
22995
+ */
22996
+ durability: "session"
22656
22997
  };
22657
22998
  /**
22658
22999
  * local-network — hub-only singleton.
@@ -22858,7 +23199,17 @@ var lockControlCapability = {
22858
23199
  * read `state` and disable themselves during `locking`/`unlocking`
22859
23200
  * transitions.
22860
23201
  */
22861
- runtimeState: LockControlStatusSchema
23202
+ runtimeState: LockControlStatusSchema,
23203
+ /**
23204
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23205
+ *
23206
+ * See `RuntimeStateDurability`. Enforced by
23207
+ * `scripts/check-runtime-state-durability.ts`.
23208
+ */
23209
+ durability: "restored",
23210
+ /** Clock fields: written, but excluded from the compare that decides
23211
+ * whether persisting is worth a SQLite commit. */
23212
+ volatileStateFields: ["lastChangedAt"]
22862
23213
  };
22863
23214
  /**
22864
23215
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -23020,7 +23371,14 @@ var mediaPlayerCapability = {
23020
23371
  * full slice for live now-playing, volume, and progress updates
23021
23372
  * without polling.
23022
23373
  */
23023
- runtimeState: MediaPlayerStatusSchema
23374
+ runtimeState: MediaPlayerStatusSchema,
23375
+ /**
23376
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
23377
+ *
23378
+ * See `RuntimeStateDurability`. Enforced by
23379
+ * `scripts/check-runtime-state-durability.ts`.
23380
+ */
23381
+ durability: "session"
23024
23382
  };
23025
23383
  /**
23026
23384
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23284,7 +23642,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23284
23642
  * `device.state.motion.value`. Reads never invoke the provider, so
23285
23643
  * UIs and other addons can poll the cached state safely.
23286
23644
  */
23287
- runtimeState: MotionStatusSchema
23645
+ runtimeState: MotionStatusSchema,
23646
+ /**
23647
+ * 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.
23648
+ *
23649
+ * See `RuntimeStateDurability`. Enforced by
23650
+ * `scripts/check-runtime-state-durability.ts`.
23651
+ */
23652
+ durability: "session"
23288
23653
  };
23289
23654
  /**
23290
23655
  * Motion-trigger toggle for accessory devices.
@@ -23349,7 +23714,14 @@ var motionTriggerCapability = {
23349
23714
  schema: MotionTriggerStatusSchema,
23350
23715
  kind: "command-driven"
23351
23716
  },
23352
- runtimeState: MotionTriggerRuntimeStateSchema
23717
+ runtimeState: MotionTriggerRuntimeStateSchema,
23718
+ /**
23719
+ * 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.
23720
+ *
23721
+ * See `RuntimeStateDurability`. Enforced by
23722
+ * `scripts/check-runtime-state-durability.ts`.
23723
+ */
23724
+ durability: "session"
23353
23725
  };
23354
23726
  /**
23355
23727
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -23416,7 +23788,17 @@ var motionZonesCapability = {
23416
23788
  schema: MotionZoneStatusSchema,
23417
23789
  kind: "poll"
23418
23790
  },
23419
- runtimeState: MotionZoneStatusSchema
23791
+ runtimeState: MotionZoneStatusSchema,
23792
+ /**
23793
+ * 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.
23794
+ *
23795
+ * See `RuntimeStateDurability`. Enforced by
23796
+ * `scripts/check-runtime-state-durability.ts`.
23797
+ */
23798
+ durability: "restored",
23799
+ /** Clock fields: written, but excluded from the compare that decides
23800
+ * whether persisting is worth a SQLite commit. */
23801
+ volatileStateFields: ["lastFetchedAt"]
23420
23802
  };
23421
23803
  /**
23422
23804
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -23490,7 +23872,17 @@ var nativeObjectDetectionCapability = {
23490
23872
  schema: NativeObjectDetectionStatusSchema,
23491
23873
  kind: "push"
23492
23874
  },
23493
- runtimeState: NativeObjectDetectionRuntimeStateSchema
23875
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
23876
+ /**
23877
+ * 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.
23878
+ *
23879
+ * See `RuntimeStateDurability`. Enforced by
23880
+ * `scripts/check-runtime-state-durability.ts`.
23881
+ */
23882
+ durability: "restored",
23883
+ /** Clock fields: written, but excluded from the compare that decides
23884
+ * whether persisting is worth a SQLite commit. */
23885
+ volatileStateFields: ["lastFetchedAt"]
23494
23886
  };
23495
23887
  /**
23496
23888
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -23824,7 +24216,14 @@ onSent: { data: object({
23824
24216
  * form reads `supports` to gate optional fields; history pane reads
23825
24217
  * `lastSentAt` / `lastError` / `queueDepth`.
23826
24218
  */
23827
- runtimeState: NotifierStatusSchema
24219
+ runtimeState: NotifierStatusSchema,
24220
+ /**
24221
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24222
+ *
24223
+ * See `RuntimeStateDurability`. Enforced by
24224
+ * `scripts/check-runtime-state-durability.ts`.
24225
+ */
24226
+ durability: "session"
23828
24227
  };
23829
24228
  /**
23830
24229
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -23867,7 +24266,17 @@ var numericSensorCapability = {
23867
24266
  schema: NumericSensorStatusSchema,
23868
24267
  kind: "push"
23869
24268
  },
23870
- runtimeState: NumericSensorStatusSchema
24269
+ runtimeState: NumericSensorStatusSchema,
24270
+ /**
24271
+ * 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.
24272
+ *
24273
+ * See `RuntimeStateDurability`. Enforced by
24274
+ * `scripts/check-runtime-state-durability.ts`.
24275
+ */
24276
+ durability: "restored",
24277
+ /** Clock fields: written, but excluded from the compare that decides
24278
+ * whether persisting is worth a SQLite commit. */
24279
+ volatileStateFields: ["lastFetchedAt"]
23871
24280
  };
23872
24281
  /**
23873
24282
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24252,7 +24661,14 @@ var petFeederCapability = {
24252
24661
  * the full slice via `device.state.petFeeder.value` and refresh on
24253
24662
  * every poll without re-querying the provider.
24254
24663
  */
24255
- runtimeState: PetFeederStatusSchema
24664
+ runtimeState: PetFeederStatusSchema,
24665
+ /**
24666
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
24667
+ *
24668
+ * See `RuntimeStateDurability`. Enforced by
24669
+ * `scripts/check-runtime-state-durability.ts`.
24670
+ */
24671
+ durability: "session"
24256
24672
  };
24257
24673
  var VehicleSchema = object({
24258
24674
  id: string(),
@@ -24564,7 +24980,17 @@ var powerMeterCapability = {
24564
24980
  schema: PowerMeterStatusSchema,
24565
24981
  kind: "push"
24566
24982
  },
24567
- runtimeState: PowerMeterStatusSchema
24983
+ runtimeState: PowerMeterStatusSchema,
24984
+ /**
24985
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
24986
+ *
24987
+ * See `RuntimeStateDurability`. Enforced by
24988
+ * `scripts/check-runtime-state-durability.ts`.
24989
+ */
24990
+ durability: "restored",
24991
+ /** Clock fields: written, but excluded from the compare that decides
24992
+ * whether persisting is worth a SQLite commit. */
24993
+ volatileStateFields: ["lastFetchedAt"]
24568
24994
  };
24569
24995
  /**
24570
24996
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -24621,7 +25047,17 @@ var presenceCapability = {
24621
25047
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
24622
25048
  * pre-fetch fast-path check).
24623
25049
  */
24624
- runtimeState: PresenceStatusSchema
25050
+ runtimeState: PresenceStatusSchema,
25051
+ /**
25052
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25053
+ *
25054
+ * See `RuntimeStateDurability`. Enforced by
25055
+ * `scripts/check-runtime-state-durability.ts`.
25056
+ */
25057
+ durability: "restored",
25058
+ /** Clock fields: written, but excluded from the compare that decides
25059
+ * whether persisting is worth a SQLite commit. */
25060
+ volatileStateFields: ["lastChangedAt"]
24625
25061
  };
24626
25062
  /**
24627
25063
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -24657,7 +25093,17 @@ var pressureSensorCapability = {
24657
25093
  schema: PressureSensorStatusSchema,
24658
25094
  kind: "push"
24659
25095
  },
24660
- runtimeState: PressureSensorStatusSchema
25096
+ runtimeState: PressureSensorStatusSchema,
25097
+ /**
25098
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25099
+ *
25100
+ * See `RuntimeStateDurability`. Enforced by
25101
+ * `scripts/check-runtime-state-durability.ts`.
25102
+ */
25103
+ durability: "restored",
25104
+ /** Clock fields: written, but excluded from the compare that decides
25105
+ * whether persisting is worth a SQLite commit. */
25106
+ volatileStateFields: ["lastFetchedAt"]
24661
25107
  };
24662
25108
  /**
24663
25109
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -24787,7 +25233,17 @@ var privacyMaskCapability = {
24787
25233
  schema: PrivacyMaskStatusSchema,
24788
25234
  kind: "poll"
24789
25235
  },
24790
- runtimeState: PrivacyMaskStatusSchema
25236
+ runtimeState: PrivacyMaskStatusSchema,
25237
+ /**
25238
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25239
+ *
25240
+ * See `RuntimeStateDurability`. Enforced by
25241
+ * `scripts/check-runtime-state-durability.ts`.
25242
+ */
25243
+ durability: "restored",
25244
+ /** Clock fields: written, but excluded from the compare that decides
25245
+ * whether persisting is worth a SQLite commit. */
25246
+ volatileStateFields: ["lastFetchedAt"]
24791
25247
  };
24792
25248
  var PtzPresetSchema = object({
24793
25249
  id: string(),
@@ -24953,7 +25409,14 @@ var ptzAutotrackCapability = {
24953
25409
  * fetch / cache / fallback logic out of the four cap methods —
24954
25410
  * they become trampolines over `runtimeState`.
24955
25411
  */
24956
- runtimeState: PtzAutotrackRuntimeStateSchema
25412
+ runtimeState: PtzAutotrackRuntimeStateSchema,
25413
+ /**
25414
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
25415
+ *
25416
+ * See `RuntimeStateDurability`. Enforced by
25417
+ * `scripts/check-runtime-state-durability.ts`.
25418
+ */
25419
+ durability: "session"
24957
25420
  };
24958
25421
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
24959
25422
  kind: "mutation",
@@ -25603,7 +26066,14 @@ var sceneMonitorCapability = {
25603
26066
  schema: SceneMonitorStatusSchema,
25604
26067
  kind: "push"
25605
26068
  },
25606
- runtimeState: SceneMonitorStatusSchema
26069
+ runtimeState: SceneMonitorStatusSchema,
26070
+ /**
26071
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26072
+ *
26073
+ * See `RuntimeStateDurability`. Enforced by
26074
+ * `scripts/check-runtime-state-durability.ts`.
26075
+ */
26076
+ durability: "session"
25607
26077
  };
25608
26078
  /**
25609
26079
  * Per-stage gating mode applied to the zones a rule references.
@@ -25747,7 +26217,14 @@ var scriptRunnerCapability = {
25747
26217
  * `isRunning` to render a spinner during execution and surfaces
25748
26218
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
25749
26219
  */
25750
- runtimeState: ScriptRunnerStatusSchema
26220
+ runtimeState: ScriptRunnerStatusSchema,
26221
+ /**
26222
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26223
+ *
26224
+ * See `RuntimeStateDurability`. Enforced by
26225
+ * `scripts/check-runtime-state-durability.ts`.
26226
+ */
26227
+ durability: "session"
25751
26228
  };
25752
26229
  /**
25753
26230
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -25774,7 +26251,17 @@ var smokeCapability = {
25774
26251
  schema: SmokeStatusSchema,
25775
26252
  kind: "push"
25776
26253
  },
25777
- runtimeState: SmokeStatusSchema
26254
+ runtimeState: SmokeStatusSchema,
26255
+ /**
26256
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26257
+ *
26258
+ * See `RuntimeStateDurability`. Enforced by
26259
+ * `scripts/check-runtime-state-durability.ts`.
26260
+ */
26261
+ durability: "restored",
26262
+ /** Clock fields: written, but excluded from the compare that decides
26263
+ * whether persisting is worth a SQLite commit. */
26264
+ volatileStateFields: ["lastChangedAt"]
25778
26265
  };
25779
26266
  /**
25780
26267
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -25960,7 +26447,17 @@ var streamParamsCapability = {
25960
26447
  schema: StreamParamsStatusSchema,
25961
26448
  kind: "poll"
25962
26449
  },
25963
- runtimeState: StreamParamsStatusSchema
26450
+ runtimeState: StreamParamsStatusSchema,
26451
+ /**
26452
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
26453
+ *
26454
+ * See `RuntimeStateDurability`. Enforced by
26455
+ * `scripts/check-runtime-state-durability.ts`.
26456
+ */
26457
+ durability: "restored",
26458
+ /** Clock fields: written, but excluded from the compare that decides
26459
+ * whether persisting is worth a SQLite commit. */
26460
+ volatileStateFields: ["lastFetchedAt"]
25964
26461
  };
25965
26462
  /**
25966
26463
  * Generic on/off switch cap for accessory children (siren, floodlight,
@@ -26006,6 +26503,16 @@ var switchCapability = {
26006
26503
  * not need to re-query the provider after a setState mutation.
26007
26504
  */
26008
26505
  runtimeState: SwitchStatusSchema,
26506
+ /**
26507
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
26508
+ *
26509
+ * See `RuntimeStateDurability`. Enforced by
26510
+ * `scripts/check-runtime-state-durability.ts`.
26511
+ */
26512
+ durability: "restored",
26513
+ /** Clock fields: written, but excluded from the compare that decides
26514
+ * whether persisting is worth a SQLite commit. */
26515
+ volatileStateFields: ["lastChangedAt"],
26009
26516
  settings: { bindings: [{
26010
26517
  kind: "scalar",
26011
26518
  statusPath: "on",
@@ -26085,7 +26592,17 @@ var tamperCapability = {
26085
26592
  schema: TamperStatusSchema,
26086
26593
  kind: "push"
26087
26594
  },
26088
- runtimeState: TamperStatusSchema
26595
+ runtimeState: TamperStatusSchema,
26596
+ /**
26597
+ * Runtime-state durability: **restored** — as `smoke`.
26598
+ *
26599
+ * See `RuntimeStateDurability`. Enforced by
26600
+ * `scripts/check-runtime-state-durability.ts`.
26601
+ */
26602
+ durability: "restored",
26603
+ /** Clock fields: written, but excluded from the compare that decides
26604
+ * whether persisting is worth a SQLite commit. */
26605
+ volatileStateFields: ["lastChangedAt"]
26089
26606
  };
26090
26607
  /**
26091
26608
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26130,7 +26647,17 @@ var temperatureSensorCapability = {
26130
26647
  schema: TemperatureSensorStatusSchema,
26131
26648
  kind: "push"
26132
26649
  },
26133
- runtimeState: TemperatureSensorStatusSchema
26650
+ runtimeState: TemperatureSensorStatusSchema,
26651
+ /**
26652
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
26653
+ *
26654
+ * See `RuntimeStateDurability`. Enforced by
26655
+ * `scripts/check-runtime-state-durability.ts`.
26656
+ */
26657
+ durability: "restored",
26658
+ /** Clock fields: written, but excluded from the compare that decides
26659
+ * whether persisting is worth a SQLite commit. */
26660
+ volatileStateFields: ["lastFetchedAt"]
26134
26661
  };
26135
26662
  /**
26136
26663
  * toast — system-scoped singleton capability that streams toast
@@ -26199,7 +26726,14 @@ var updateCapability = {
26199
26726
  schema: UpdateStatusSchema,
26200
26727
  kind: "poll"
26201
26728
  },
26202
- runtimeState: UpdateStatusSchema
26729
+ runtimeState: UpdateStatusSchema,
26730
+ /**
26731
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
26732
+ *
26733
+ * See `RuntimeStateDurability`. Enforced by
26734
+ * `scripts/check-runtime-state-durability.ts`.
26735
+ */
26736
+ durability: "session"
26203
26737
  };
26204
26738
  var UserSummarySchema = object({
26205
26739
  id: string(),
@@ -26533,7 +27067,14 @@ var vacuumControlCapability = {
26533
27067
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26534
27068
  * slice for live state + battery + fan-speed changes.
26535
27069
  */
26536
- runtimeState: VacuumControlStatusSchema
27070
+ runtimeState: VacuumControlStatusSchema,
27071
+ /**
27072
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27073
+ *
27074
+ * See `RuntimeStateDurability`. Enforced by
27075
+ * `scripts/check-runtime-state-durability.ts`.
27076
+ */
27077
+ durability: "session"
26537
27078
  };
26538
27079
  var ValveStatusSchema = object({
26539
27080
  /** Lifecycle state of the valve. */
@@ -26585,7 +27126,14 @@ var valveCapability = {
26585
27126
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26586
27127
  * slice for live position changes during a move.
26587
27128
  */
26588
- runtimeState: ValveStatusSchema
27129
+ runtimeState: ValveStatusSchema,
27130
+ /**
27131
+ * Runtime-state durability: **session** — as `brightness`.
27132
+ *
27133
+ * See `RuntimeStateDurability`. Enforced by
27134
+ * `scripts/check-runtime-state-durability.ts`.
27135
+ */
27136
+ durability: "session"
26589
27137
  };
26590
27138
  /**
26591
27139
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -26607,7 +27155,17 @@ var vibrationCapability = {
26607
27155
  schema: VibrationStatusSchema,
26608
27156
  kind: "push"
26609
27157
  },
26610
- runtimeState: VibrationStatusSchema
27158
+ runtimeState: VibrationStatusSchema,
27159
+ /**
27160
+ * Runtime-state durability: **restored** — as `smoke`.
27161
+ *
27162
+ * See `RuntimeStateDurability`. Enforced by
27163
+ * `scripts/check-runtime-state-durability.ts`.
27164
+ */
27165
+ durability: "restored",
27166
+ /** Clock fields: written, but excluded from the compare that decides
27167
+ * whether persisting is worth a SQLite commit. */
27168
+ volatileStateFields: ["lastChangedAt"]
26611
27169
  };
26612
27170
  /**
26613
27171
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -26681,7 +27239,14 @@ var waterHeaterCapability = {
26681
27239
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26682
27240
  * slice for live temperature / mode / away changes.
26683
27241
  */
26684
- runtimeState: WaterHeaterStatusSchema
27242
+ runtimeState: WaterHeaterStatusSchema,
27243
+ /**
27244
+ * Runtime-state durability: **session** — as `climate-control`.
27245
+ *
27246
+ * See `RuntimeStateDurability`. Enforced by
27247
+ * `scripts/check-runtime-state-durability.ts`.
27248
+ */
27249
+ durability: "session"
26685
27250
  };
26686
27251
  /**
26687
27252
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -26740,7 +27305,14 @@ var weatherCapability = {
26740
27305
  * Runtime-state slice — mirrored by the kernel. The UI reads the
26741
27306
  * current conditions directly from the slice on each weather push.
26742
27307
  */
26743
- runtimeState: WeatherStatusSchema
27308
+ runtimeState: WeatherStatusSchema,
27309
+ /**
27310
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27311
+ *
27312
+ * See `RuntimeStateDurability`. Enforced by
27313
+ * `scripts/check-runtime-state-durability.ts`.
27314
+ */
27315
+ durability: "session"
26744
27316
  };
26745
27317
  /**
26746
27318
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -26902,7 +27474,14 @@ var zoneAnalyticsCapability = {
26902
27474
  * automatically; the explicit `getCurrentSnapshot` cap method is
26903
27475
  * still useful for one-off polls without a subscription.
26904
27476
  */
26905
- runtimeState: CameraOccupancySnapshotSchema
27477
+ runtimeState: CameraOccupancySnapshotSchema,
27478
+ /**
27479
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
27480
+ *
27481
+ * See `RuntimeStateDurability`. Enforced by
27482
+ * `scripts/check-runtime-state-durability.ts`.
27483
+ */
27484
+ durability: "session"
26906
27485
  };
26907
27486
  /**
26908
27487
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -26980,7 +27559,14 @@ var zoneRulesCapability = {
26980
27559
  motion: array(ZoneRuleSchema).readonly(),
26981
27560
  detection: array(ZoneRuleSchema).readonly(),
26982
27561
  package: array(ZoneRuleSchema).readonly()
26983
- })
27562
+ }),
27563
+ /**
27564
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
27565
+ *
27566
+ * See `RuntimeStateDurability`. Enforced by
27567
+ * `scripts/check-runtime-state-durability.ts`.
27568
+ */
27569
+ durability: "restored"
26984
27570
  };
26985
27571
  /**
26986
27572
  * Accessory device helpers — shared across drivers.
@@ -33667,6 +34253,7 @@ Object.freeze({
33667
34253
  "network-access": "ingress",
33668
34254
  "smtp-provider": "email"
33669
34255
  });
34256
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
33670
34257
  new Set(["devices", "classes"]);
33671
34258
  /**
33672
34259
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.