@camstack/addon-provider-rtsp 1.2.15 → 1.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
@@ -10803,7 +10803,14 @@ var cameraStreamsCapability = {
10803
10803
  low: string().optional()
10804
10804
  }),
10805
10805
  lastChangedAt: number()
10806
- })
10806
+ }),
10807
+ /**
10808
+ * 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.
10809
+ *
10810
+ * See `RuntimeStateDurability`. Enforced by
10811
+ * `scripts/check-runtime-state-durability.ts`.
10812
+ */
10813
+ durability: "session"
10807
10814
  };
10808
10815
  /** Where a block runs. The operator chooses — a block driving a device on an
10809
10816
  * agent is the reason placement is not fixed to the hub. */
@@ -11364,6 +11371,13 @@ var deviceDiscoveryCapability = {
11364
11371
  kind: "poll"
11365
11372
  },
11366
11373
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11374
+ /**
11375
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11376
+ *
11377
+ * See `RuntimeStateDurability`. Enforced by
11378
+ * `scripts/check-runtime-state-durability.ts`.
11379
+ */
11380
+ durability: "session",
11367
11381
  methods: {
11368
11382
  /**
11369
11383
  * Snapshot of the current `discovered` list. Returns the
@@ -13263,7 +13277,23 @@ var NotificationActionSchema = object({
13263
13277
  * else — see `notification-center/action-token.ts` for what that does and
13264
13278
  * does not buy.
13265
13279
  */
13266
- destructive: boolean().optional()
13280
+ destructive: boolean().optional(),
13281
+ /**
13282
+ * How the tap should REACH the url.
13283
+ *
13284
+ * `navigate` (absent, and every button authored before this field) opens it:
13285
+ * the phone leaves the notification and shows whatever the callback returns.
13286
+ * That is right for a button whose answer the operator wants to read.
13287
+ *
13288
+ * `background` fires it as a POST and stays put. It exists for the buttons
13289
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13290
+ * an answer to the notification, and being thrown into a browser tab to
13291
+ * confirm it costs more attention than the notification did. A backend that
13292
+ * cannot do a background call renders it as an ordinary link (the adapters
13293
+ * fall back rather than dropping the button), so this is a preference, never
13294
+ * a requirement.
13295
+ */
13296
+ mode: _enum(["navigate", "background"]).optional()
13267
13297
  });
13268
13298
  /**
13269
13299
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14115,7 +14145,17 @@ var alarmPanelCapability = {
14115
14145
  * full slice; renders an arm button per `availableModes` entry and
14116
14146
  * a PIN field iff `requiresCode === true`.
14117
14147
  */
14118
- runtimeState: AlarmPanelStatusSchema
14148
+ runtimeState: AlarmPanelStatusSchema,
14149
+ /**
14150
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14151
+ *
14152
+ * See `RuntimeStateDurability`. Enforced by
14153
+ * `scripts/check-runtime-state-durability.ts`.
14154
+ */
14155
+ durability: "restored",
14156
+ /** Clock fields: written, but excluded from the compare that decides
14157
+ * whether persisting is worth a SQLite commit. */
14158
+ volatileStateFields: ["lastChangedAt"]
14119
14159
  };
14120
14160
  /**
14121
14161
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14292,6 +14332,9 @@ var NcSystemEventConditionSchema = object({
14292
14332
  nodeIds: array(string().min(1)).min(1).optional(),
14293
14333
  packageNames: array(string().min(1)).min(1).optional()
14294
14334
  });
14335
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14336
+ * outage the operator asked for once and forgot. */
14337
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14295
14338
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14296
14339
  var NcScheduleSchema = object({
14297
14340
  windows: array(object({
@@ -14668,15 +14711,15 @@ var NcConditionsSchema = object({
14668
14711
  * (an `immediate` rule naming an `audio-*` class, one notification per
14669
14712
  * classified sample) stays exactly as it was for rules that already use it.
14670
14713
  *
14671
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14672
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14673
- * (`camstack/src/data/notification-center.ts`, guarded by
14674
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14714
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14715
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14716
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14717
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14675
14718
  * condition fields it does not know when a rule is saved from the phone.
14676
14719
  * Publishing an editor for a condition the app cannot round-trip is how an
14677
- * operator loses a rule's conditions by opening it — so the descriptor, the
14678
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14679
- * does an audio rule become authorable.
14720
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14721
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14722
+ * follows here.
14680
14723
  */
14681
14724
  audio: NcAudioConditionSchema.optional()
14682
14725
  });
@@ -14912,6 +14955,30 @@ var NcRuleInputSchema = object({
14912
14955
  */
14913
14956
  snoozeAllowGlobal: boolean().optional(),
14914
14957
  /**
14958
+ * The snooze durations THIS rule's notification offers as buttons, in
14959
+ * minutes.
14960
+ *
14961
+ * Three states, and all three are distinct — which is exactly why this is
14962
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14963
+ * addon cap path (three production failures in one day), so a schema default
14964
+ * would collapse the first two:
14965
+ *
14966
+ * | value | meaning |
14967
+ * | --- | --- |
14968
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14969
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14970
+ * | a list | these choices, de-duplicated and sorted, at most four |
14971
+ *
14972
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14973
+ * three buttons in total) and a rule that spent it all on snooze choices
14974
+ * would push its own tap-through actions off the notification.
14975
+ *
14976
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14977
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14978
+ * window from anywhere (D133).
14979
+ */
14980
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14981
+ /**
14915
14982
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14916
14983
  *
14917
14984
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -15011,6 +15078,7 @@ var NcConditionDescriptorSchema = object({
15011
15078
  "device",
15012
15079
  "package",
15013
15080
  "occupancy",
15081
+ "audio",
15014
15082
  "system"
15015
15083
  ]),
15016
15084
  label: string(),
@@ -15029,6 +15097,7 @@ var NcConditionDescriptorSchema = object({
15029
15097
  "crossingSelect",
15030
15098
  "polygonDraw",
15031
15099
  "occupancy",
15100
+ "audio",
15032
15101
  "deviceState",
15033
15102
  "systemEvent"
15034
15103
  ]),
@@ -15180,7 +15249,20 @@ var NcSnoozeInputSchema = object({
15180
15249
  ruleId: string().optional(),
15181
15250
  /** Required when `scope: 'device'`. */
15182
15251
  deviceId: number().int().optional(),
15183
- durationMinutes: number().int().min(1).max(1440),
15252
+ /**
15253
+ * Narrow the window to these subject classes — "the cat, not the person".
15254
+ *
15255
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15256
+ * what every window authored before this field meant, so no persisted row
15257
+ * changes meaning and no client has to learn anything to keep working.
15258
+ *
15259
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15260
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15261
+ * not at whichever of their four rules happened to produce the notification
15262
+ * they are dismissing.
15263
+ */
15264
+ classes: array(string().min(1)).min(1).optional(),
15265
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15184
15266
  /**
15185
15267
  * Silence this for EVERY recipient, not just the caller. Permission is
15186
15268
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15205,6 +15287,10 @@ var NcSnoozeSchema = object({
15205
15287
  scope: NcSnoozeScopeSchema,
15206
15288
  ruleId: string().optional(),
15207
15289
  deviceId: number().int().optional(),
15290
+ /** Subject classes this window covers. ABSENT = every class — see
15291
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15292
+ * no SQLite column: nothing queries a window by class. */
15293
+ classes: array(string().min(1)).min(1).optional(),
15208
15294
  startedAt: number(),
15209
15295
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15210
15296
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17305,7 +17391,14 @@ var zonesCapability = {
17305
17391
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
17306
17392
  * (e.g. zone groupings) can sit alongside the polygon list.
17307
17393
  */
17308
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
17394
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
17395
+ /**
17396
+ * 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.
17397
+ *
17398
+ * See `RuntimeStateDurability`. Enforced by
17399
+ * `scripts/check-runtime-state-durability.ts`.
17400
+ */
17401
+ durability: "restored"
17309
17402
  };
17310
17403
  /**
17311
17404
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -20199,7 +20292,17 @@ var airQualitySensorCapability = {
20199
20292
  schema: AirQualitySensorStatusSchema,
20200
20293
  kind: "push"
20201
20294
  },
20202
- runtimeState: AirQualitySensorStatusSchema
20295
+ runtimeState: AirQualitySensorStatusSchema,
20296
+ /**
20297
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20298
+ *
20299
+ * See `RuntimeStateDurability`. Enforced by
20300
+ * `scripts/check-runtime-state-durability.ts`.
20301
+ */
20302
+ durability: "restored",
20303
+ /** Clock fields: written, but excluded from the compare that decides
20304
+ * whether persisting is worth a SQLite commit. */
20305
+ volatileStateFields: ["lastFetchedAt"]
20203
20306
  };
20204
20307
  /**
20205
20308
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20231,7 +20334,17 @@ var ambientLightSensorCapability = {
20231
20334
  schema: AmbientLightSensorStatusSchema,
20232
20335
  kind: "push"
20233
20336
  },
20234
- runtimeState: AmbientLightSensorStatusSchema
20337
+ runtimeState: AmbientLightSensorStatusSchema,
20338
+ /**
20339
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20340
+ *
20341
+ * See `RuntimeStateDurability`. Enforced by
20342
+ * `scripts/check-runtime-state-durability.ts`.
20343
+ */
20344
+ durability: "restored",
20345
+ /** Clock fields: written, but excluded from the compare that decides
20346
+ * whether persisting is worth a SQLite commit. */
20347
+ volatileStateFields: ["lastFetchedAt"]
20235
20348
  };
20236
20349
  /**
20237
20350
  * Per-class audio metrics aggregated over a sliding window.
@@ -20349,7 +20462,14 @@ var audioMetricsCapability = {
20349
20462
  }), AudioMetricsHistorySchema)
20350
20463
  },
20351
20464
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
20352
- runtimeState: AudioMetricsSnapshotSchema
20465
+ runtimeState: AudioMetricsSnapshotSchema,
20466
+ /**
20467
+ * 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.
20468
+ *
20469
+ * See `RuntimeStateDurability`. Enforced by
20470
+ * `scripts/check-runtime-state-durability.ts`.
20471
+ */
20472
+ durability: "session"
20353
20473
  };
20354
20474
  /**
20355
20475
  * Automation-control cap. Models HA `automation.*` entities on
@@ -20411,7 +20531,14 @@ var automationControlCapability = {
20411
20531
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
20412
20532
  * (badge) directly.
20413
20533
  */
20414
- runtimeState: AutomationControlStatusSchema
20534
+ runtimeState: AutomationControlStatusSchema,
20535
+ /**
20536
+ * 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.
20537
+ *
20538
+ * See `RuntimeStateDurability`. Enforced by
20539
+ * `scripts/check-runtime-state-durability.ts`.
20540
+ */
20541
+ durability: "session"
20415
20542
  };
20416
20543
  /**
20417
20544
  * Battery status snapshot. Emitted by providers whose device is
@@ -20517,7 +20644,17 @@ onStatusChanged: { data: object({
20517
20644
  * via `device.runtimeState.getCapState('battery')` regardless of
20518
20645
  * the underlying driver.
20519
20646
  */
20520
- runtimeState: BatteryStatusSchema
20647
+ runtimeState: BatteryStatusSchema,
20648
+ /**
20649
+ * 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.
20650
+ *
20651
+ * See `RuntimeStateDurability`. Enforced by
20652
+ * `scripts/check-runtime-state-durability.ts`.
20653
+ */
20654
+ durability: "restored",
20655
+ /** Clock fields: written, but excluded from the compare that decides
20656
+ * whether persisting is worth a SQLite commit. */
20657
+ volatileStateFields: ["lastUpdated"]
20521
20658
  };
20522
20659
  /**
20523
20660
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -20546,7 +20683,17 @@ var binaryCapability = {
20546
20683
  schema: BinaryStatusSchema,
20547
20684
  kind: "push"
20548
20685
  },
20549
- runtimeState: BinaryStatusSchema
20686
+ runtimeState: BinaryStatusSchema,
20687
+ /**
20688
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
20689
+ *
20690
+ * See `RuntimeStateDurability`. Enforced by
20691
+ * `scripts/check-runtime-state-durability.ts`.
20692
+ */
20693
+ durability: "restored",
20694
+ /** Clock fields: written, but excluded from the compare that decides
20695
+ * whether persisting is worth a SQLite commit. */
20696
+ volatileStateFields: ["lastChangedAt"]
20550
20697
  };
20551
20698
  /**
20552
20699
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -20599,7 +20746,14 @@ onBrightnessChanged: { data: object({
20599
20746
  * by the kernel. Read via `device.state.brightness.value` so UI
20600
20747
  * sliders surface the current level without polling the provider.
20601
20748
  */
20602
- runtimeState: BrightnessStatusSchema
20749
+ runtimeState: BrightnessStatusSchema,
20750
+ /**
20751
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
20752
+ *
20753
+ * See `RuntimeStateDurability`. Enforced by
20754
+ * `scripts/check-runtime-state-durability.ts`.
20755
+ */
20756
+ durability: "session"
20603
20757
  };
20604
20758
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
20605
20759
  kind: "mutation",
@@ -20687,7 +20841,17 @@ var carbonMonoxideCapability = {
20687
20841
  schema: CarbonMonoxideStatusSchema,
20688
20842
  kind: "push"
20689
20843
  },
20690
- runtimeState: CarbonMonoxideStatusSchema
20844
+ runtimeState: CarbonMonoxideStatusSchema,
20845
+ /**
20846
+ * Runtime-state durability: **restored** — as `smoke`.
20847
+ *
20848
+ * See `RuntimeStateDurability`. Enforced by
20849
+ * `scripts/check-runtime-state-durability.ts`.
20850
+ */
20851
+ durability: "restored",
20852
+ /** Clock fields: written, but excluded from the compare that decides
20853
+ * whether persisting is worth a SQLite commit. */
20854
+ volatileStateFields: ["lastChangedAt"]
20691
20855
  };
20692
20856
  /**
20693
20857
  * HVAC / climate control cap. Models the full surface of a HA
@@ -20847,7 +21011,14 @@ var climateControlCapability = {
20847
21011
  * the full slice via `device.state.climate-control.value` and refresh
20848
21012
  * on every push without re-querying the provider.
20849
21013
  */
20850
- runtimeState: ClimateControlStatusSchema
21014
+ runtimeState: ClimateControlStatusSchema,
21015
+ /**
21016
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
21017
+ *
21018
+ * See `RuntimeStateDurability`. Enforced by
21019
+ * `scripts/check-runtime-state-durability.ts`.
21020
+ */
21021
+ durability: "session"
20851
21022
  };
20852
21023
  /**
20853
21024
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -20957,7 +21128,14 @@ onColorChanged: { data: object({
20957
21128
  * kernel. Read via `device.state.color.value` so UI pickers surface
20958
21129
  * the current chromaticity without polling the provider.
20959
21130
  */
20960
- runtimeState: ColorStatusSchema
21131
+ runtimeState: ColorStatusSchema,
21132
+ /**
21133
+ * Runtime-state durability: **session** — as `brightness`.
21134
+ *
21135
+ * See `RuntimeStateDurability`. Enforced by
21136
+ * `scripts/check-runtime-state-durability.ts`.
21137
+ */
21138
+ durability: "session"
20961
21139
  };
20962
21140
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
20963
21141
  object({
@@ -21023,7 +21201,17 @@ var connectivityCapability = {
21023
21201
  schema: ConnectivityStatusSchema,
21024
21202
  kind: "push"
21025
21203
  },
21026
- runtimeState: ConnectivityStatusSchema
21204
+ runtimeState: ConnectivityStatusSchema,
21205
+ /**
21206
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21207
+ *
21208
+ * See `RuntimeStateDurability`. Enforced by
21209
+ * `scripts/check-runtime-state-durability.ts`.
21210
+ */
21211
+ durability: "restored",
21212
+ /** Clock fields: written, but excluded from the compare that decides
21213
+ * whether persisting is worth a SQLite commit. */
21214
+ volatileStateFields: ["lastChangedAt"]
21027
21215
  };
21028
21216
  /**
21029
21217
  * Generic device-consumables capability — surfaces a device's
@@ -21105,7 +21293,14 @@ reset: method(object({
21105
21293
  }
21106
21294
  }
21107
21295
  },
21108
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
21296
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
21297
+ /**
21298
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
21299
+ *
21300
+ * See `RuntimeStateDurability`. Enforced by
21301
+ * `scripts/check-runtime-state-durability.ts`.
21302
+ */
21303
+ durability: "session"
21109
21304
  };
21110
21305
  /**
21111
21306
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21136,7 +21331,17 @@ var contactCapability = {
21136
21331
  schema: ContactStatusSchema,
21137
21332
  kind: "push"
21138
21333
  },
21139
- runtimeState: ContactStatusSchema
21334
+ runtimeState: ContactStatusSchema,
21335
+ /**
21336
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
21337
+ *
21338
+ * See `RuntimeStateDurability`. Enforced by
21339
+ * `scripts/check-runtime-state-durability.ts`.
21340
+ */
21341
+ durability: "restored",
21342
+ /** Clock fields: written, but excluded from the compare that decides
21343
+ * whether persisting is worth a SQLite commit. */
21344
+ volatileStateFields: ["lastChangedAt"]
21140
21345
  };
21141
21346
  /**
21142
21347
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21242,7 +21447,14 @@ var controlCapability = {
21242
21447
  * dropdown / text field / date picker) read the slice's discriminant
21243
21448
  * and value directly without polling the provider.
21244
21449
  */
21245
- runtimeState: ControlStatusSchema
21450
+ runtimeState: ControlStatusSchema,
21451
+ /**
21452
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
21453
+ *
21454
+ * See `RuntimeStateDurability`. Enforced by
21455
+ * `scripts/check-runtime-state-durability.ts`.
21456
+ */
21457
+ durability: "session"
21246
21458
  };
21247
21459
  var CoverStatusSchema = object({
21248
21460
  /** Lifecycle state of the cover. */
@@ -21303,7 +21515,17 @@ var coverCapability = {
21303
21515
  * Runtime-state slice — mirrored by the kernel. UI controls watch
21304
21516
  * the slice for live position changes during a move.
21305
21517
  */
21306
- runtimeState: CoverStatusSchema
21518
+ runtimeState: CoverStatusSchema,
21519
+ /**
21520
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
21521
+ *
21522
+ * See `RuntimeStateDurability`. Enforced by
21523
+ * `scripts/check-runtime-state-durability.ts`.
21524
+ */
21525
+ durability: "restored",
21526
+ /** Clock fields: written, but excluded from the compare that decides
21527
+ * whether persisting is worth a SQLite commit. */
21528
+ volatileStateFields: ["lastChangedAt"]
21307
21529
  };
21308
21530
  /**
21309
21531
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -21397,7 +21619,17 @@ var dayNightCapability = {
21397
21619
  schema: DayNightStatusSchema,
21398
21620
  kind: "poll"
21399
21621
  },
21400
- runtimeState: DayNightStatusSchema
21622
+ runtimeState: DayNightStatusSchema,
21623
+ /**
21624
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
21625
+ *
21626
+ * See `RuntimeStateDurability`. Enforced by
21627
+ * `scripts/check-runtime-state-durability.ts`.
21628
+ */
21629
+ durability: "restored",
21630
+ /** Clock fields: written, but excluded from the compare that decides
21631
+ * whether persisting is worth a SQLite commit. */
21632
+ volatileStateFields: ["lastFetchedAt"]
21401
21633
  };
21402
21634
  /**
21403
21635
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -21444,7 +21676,17 @@ onStatusChanged: { data: object({
21444
21676
  schema: DeviceStatusSchema,
21445
21677
  kind: "push"
21446
21678
  },
21447
- runtimeState: DeviceStatusSchema
21679
+ runtimeState: DeviceStatusSchema,
21680
+ /**
21681
+ * 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.
21682
+ *
21683
+ * See `RuntimeStateDurability`. Enforced by
21684
+ * `scripts/check-runtime-state-durability.ts`.
21685
+ */
21686
+ durability: "restored",
21687
+ /** Clock fields: written, but excluded from the compare that decides
21688
+ * whether persisting is worth a SQLite commit. */
21689
+ volatileStateFields: ["lastChangedAt"]
21448
21690
  };
21449
21691
  /**
21450
21692
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -21506,7 +21748,14 @@ onPressed: { data: DoorbellPressEventSchema } },
21506
21748
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
21507
21749
  * without subscribing.
21508
21750
  */
21509
- runtimeState: DoorbellStatusSchema
21751
+ runtimeState: DoorbellStatusSchema,
21752
+ /**
21753
+ * 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.
21754
+ *
21755
+ * See `RuntimeStateDurability`. Enforced by
21756
+ * `scripts/check-runtime-state-durability.ts`.
21757
+ */
21758
+ durability: "restored"
21510
21759
  };
21511
21760
  /**
21512
21761
  * Enum-state sensor — a string value picked from a finite option set.
@@ -21546,7 +21795,17 @@ var enumSensorCapability = {
21546
21795
  schema: EnumSensorStatusSchema,
21547
21796
  kind: "push"
21548
21797
  },
21549
- runtimeState: EnumSensorStatusSchema
21798
+ runtimeState: EnumSensorStatusSchema,
21799
+ /**
21800
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
21801
+ *
21802
+ * See `RuntimeStateDurability`. Enforced by
21803
+ * `scripts/check-runtime-state-durability.ts`.
21804
+ */
21805
+ durability: "restored",
21806
+ /** Clock fields: written, but excluded from the compare that decides
21807
+ * whether persisting is worth a SQLite commit. */
21808
+ volatileStateFields: ["lastFetchedAt"]
21550
21809
  };
21551
21810
  /**
21552
21811
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -21582,7 +21841,14 @@ var eventEmitterCapability = {
21582
21841
  schema: EventEmitterStatusSchema,
21583
21842
  kind: "push"
21584
21843
  },
21585
- runtimeState: EventEmitterStatusSchema
21844
+ runtimeState: EventEmitterStatusSchema,
21845
+ /**
21846
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
21847
+ *
21848
+ * See `RuntimeStateDurability`. Enforced by
21849
+ * `scripts/check-runtime-state-durability.ts`.
21850
+ */
21851
+ durability: "session"
21586
21852
  };
21587
21853
  var EventItemSchema = object({
21588
21854
  id: string(),
@@ -21863,7 +22129,14 @@ var fanControlCapability = {
21863
22129
  * Runtime-state slice — mirrored by the kernel. UI fan speed
21864
22130
  * sliders read `percentage` for live updates.
21865
22131
  */
21866
- runtimeState: FanControlStatusSchema
22132
+ runtimeState: FanControlStatusSchema,
22133
+ /**
22134
+ * Runtime-state durability: **session** — as `brightness`.
22135
+ *
22136
+ * See `RuntimeStateDurability`. Enforced by
22137
+ * `scripts/check-runtime-state-durability.ts`.
22138
+ */
22139
+ durability: "session"
21867
22140
  };
21868
22141
  /**
21869
22142
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -21939,7 +22212,14 @@ onProbeChanged: { data: object({
21939
22212
  schema: FeatureProbeStatusSchema,
21940
22213
  kind: "push"
21941
22214
  },
21942
- runtimeState: FeatureProbeStatusSchema
22215
+ runtimeState: FeatureProbeStatusSchema,
22216
+ /**
22217
+ * 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.
22218
+ *
22219
+ * See `RuntimeStateDurability`. Enforced by
22220
+ * `scripts/check-runtime-state-durability.ts`.
22221
+ */
22222
+ durability: "session"
21943
22223
  };
21944
22224
  /**
21945
22225
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -21966,7 +22246,17 @@ var floodCapability = {
21966
22246
  schema: FloodStatusSchema,
21967
22247
  kind: "push"
21968
22248
  },
21969
- runtimeState: FloodStatusSchema
22249
+ runtimeState: FloodStatusSchema,
22250
+ /**
22251
+ * Runtime-state durability: **restored** — as `smoke`.
22252
+ *
22253
+ * See `RuntimeStateDurability`. Enforced by
22254
+ * `scripts/check-runtime-state-durability.ts`.
22255
+ */
22256
+ durability: "restored",
22257
+ /** Clock fields: written, but excluded from the compare that decides
22258
+ * whether persisting is worth a SQLite commit. */
22259
+ volatileStateFields: ["lastChangedAt"]
21970
22260
  };
21971
22261
  /**
21972
22262
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -21989,7 +22279,17 @@ var gasCapability = {
21989
22279
  schema: GasStatusSchema,
21990
22280
  kind: "push"
21991
22281
  },
21992
- runtimeState: GasStatusSchema
22282
+ runtimeState: GasStatusSchema,
22283
+ /**
22284
+ * Runtime-state durability: **restored** — as `smoke`.
22285
+ *
22286
+ * See `RuntimeStateDurability`. Enforced by
22287
+ * `scripts/check-runtime-state-durability.ts`.
22288
+ */
22289
+ durability: "restored",
22290
+ /** Clock fields: written, but excluded from the compare that decides
22291
+ * whether persisting is worth a SQLite commit. */
22292
+ volatileStateFields: ["lastChangedAt"]
21993
22293
  };
21994
22294
  /**
21995
22295
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22065,7 +22365,14 @@ var humidifierCapability = {
22065
22365
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22066
22366
  * slice for live humidity / mode changes.
22067
22367
  */
22068
- runtimeState: HumidifierStatusSchema
22368
+ runtimeState: HumidifierStatusSchema,
22369
+ /**
22370
+ * Runtime-state durability: **session** — as `climate-control`.
22371
+ *
22372
+ * See `RuntimeStateDurability`. Enforced by
22373
+ * `scripts/check-runtime-state-durability.ts`.
22374
+ */
22375
+ durability: "session"
22069
22376
  };
22070
22377
  /**
22071
22378
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22101,7 +22408,17 @@ var humiditySensorCapability = {
22101
22408
  schema: HumiditySensorStatusSchema,
22102
22409
  kind: "push"
22103
22410
  },
22104
- runtimeState: HumiditySensorStatusSchema
22411
+ runtimeState: HumiditySensorStatusSchema,
22412
+ /**
22413
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
22414
+ *
22415
+ * See `RuntimeStateDurability`. Enforced by
22416
+ * `scripts/check-runtime-state-durability.ts`.
22417
+ */
22418
+ durability: "restored",
22419
+ /** Clock fields: written, but excluded from the compare that decides
22420
+ * whether persisting is worth a SQLite commit. */
22421
+ volatileStateFields: ["lastFetchedAt"]
22105
22422
  };
22106
22423
  /**
22107
22424
  * Image display cap. Models a single still image exposed by an integration —
@@ -22139,7 +22456,14 @@ var imageCapability = {
22139
22456
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22140
22457
  * directly and renders the still image.
22141
22458
  */
22142
- runtimeState: ImageStatusSchema
22459
+ runtimeState: ImageStatusSchema,
22460
+ /**
22461
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
22462
+ *
22463
+ * See `RuntimeStateDurability`. Enforced by
22464
+ * `scripts/check-runtime-state-durability.ts`.
22465
+ */
22466
+ durability: "session"
22143
22467
  };
22144
22468
  /**
22145
22469
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22288,7 +22612,17 @@ var imageSettingsCapability = {
22288
22612
  schema: ImageSettingsStatusSchema,
22289
22613
  kind: "poll"
22290
22614
  },
22291
- runtimeState: ImageSettingsStatusSchema
22615
+ runtimeState: ImageSettingsStatusSchema,
22616
+ /**
22617
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
22618
+ *
22619
+ * See `RuntimeStateDurability`. Enforced by
22620
+ * `scripts/check-runtime-state-durability.ts`.
22621
+ */
22622
+ durability: "restored",
22623
+ /** Clock fields: written, but excluded from the compare that decides
22624
+ * whether persisting is worth a SQLite commit. */
22625
+ volatileStateFields: ["lastFetchedAt"]
22292
22626
  };
22293
22627
  /**
22294
22628
  * integrations — system-scoped singleton capability for integration
@@ -22628,7 +22962,14 @@ var lawnMowerControlCapability = {
22628
22962
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22629
22963
  * slice for live activity + battery changes.
22630
22964
  */
22631
- runtimeState: LawnMowerControlStatusSchema
22965
+ runtimeState: LawnMowerControlStatusSchema,
22966
+ /**
22967
+ * Runtime-state durability: **session** — as `vacuum-control`.
22968
+ *
22969
+ * See `RuntimeStateDurability`. Enforced by
22970
+ * `scripts/check-runtime-state-durability.ts`.
22971
+ */
22972
+ durability: "session"
22632
22973
  };
22633
22974
  /**
22634
22975
  * local-network — hub-only singleton.
@@ -22834,7 +23175,17 @@ var lockControlCapability = {
22834
23175
  * read `state` and disable themselves during `locking`/`unlocking`
22835
23176
  * transitions.
22836
23177
  */
22837
- runtimeState: LockControlStatusSchema
23178
+ runtimeState: LockControlStatusSchema,
23179
+ /**
23180
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23181
+ *
23182
+ * See `RuntimeStateDurability`. Enforced by
23183
+ * `scripts/check-runtime-state-durability.ts`.
23184
+ */
23185
+ durability: "restored",
23186
+ /** Clock fields: written, but excluded from the compare that decides
23187
+ * whether persisting is worth a SQLite commit. */
23188
+ volatileStateFields: ["lastChangedAt"]
22838
23189
  };
22839
23190
  /**
22840
23191
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -22996,7 +23347,14 @@ var mediaPlayerCapability = {
22996
23347
  * full slice for live now-playing, volume, and progress updates
22997
23348
  * without polling.
22998
23349
  */
22999
- runtimeState: MediaPlayerStatusSchema
23350
+ runtimeState: MediaPlayerStatusSchema,
23351
+ /**
23352
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
23353
+ *
23354
+ * See `RuntimeStateDurability`. Enforced by
23355
+ * `scripts/check-runtime-state-durability.ts`.
23356
+ */
23357
+ durability: "session"
23000
23358
  };
23001
23359
  /**
23002
23360
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23260,7 +23618,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23260
23618
  * `device.state.motion.value`. Reads never invoke the provider, so
23261
23619
  * UIs and other addons can poll the cached state safely.
23262
23620
  */
23263
- runtimeState: MotionStatusSchema
23621
+ runtimeState: MotionStatusSchema,
23622
+ /**
23623
+ * 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.
23624
+ *
23625
+ * See `RuntimeStateDurability`. Enforced by
23626
+ * `scripts/check-runtime-state-durability.ts`.
23627
+ */
23628
+ durability: "session"
23264
23629
  };
23265
23630
  /**
23266
23631
  * Motion-trigger toggle for accessory devices.
@@ -23325,7 +23690,14 @@ var motionTriggerCapability = {
23325
23690
  schema: MotionTriggerStatusSchema,
23326
23691
  kind: "command-driven"
23327
23692
  },
23328
- runtimeState: MotionTriggerRuntimeStateSchema
23693
+ runtimeState: MotionTriggerRuntimeStateSchema,
23694
+ /**
23695
+ * 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.
23696
+ *
23697
+ * See `RuntimeStateDurability`. Enforced by
23698
+ * `scripts/check-runtime-state-durability.ts`.
23699
+ */
23700
+ durability: "session"
23329
23701
  };
23330
23702
  /**
23331
23703
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -23392,7 +23764,17 @@ var motionZonesCapability = {
23392
23764
  schema: MotionZoneStatusSchema,
23393
23765
  kind: "poll"
23394
23766
  },
23395
- runtimeState: MotionZoneStatusSchema
23767
+ runtimeState: MotionZoneStatusSchema,
23768
+ /**
23769
+ * 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.
23770
+ *
23771
+ * See `RuntimeStateDurability`. Enforced by
23772
+ * `scripts/check-runtime-state-durability.ts`.
23773
+ */
23774
+ durability: "restored",
23775
+ /** Clock fields: written, but excluded from the compare that decides
23776
+ * whether persisting is worth a SQLite commit. */
23777
+ volatileStateFields: ["lastFetchedAt"]
23396
23778
  };
23397
23779
  /**
23398
23780
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -23466,7 +23848,17 @@ var nativeObjectDetectionCapability = {
23466
23848
  schema: NativeObjectDetectionStatusSchema,
23467
23849
  kind: "push"
23468
23850
  },
23469
- runtimeState: NativeObjectDetectionRuntimeStateSchema
23851
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
23852
+ /**
23853
+ * 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.
23854
+ *
23855
+ * See `RuntimeStateDurability`. Enforced by
23856
+ * `scripts/check-runtime-state-durability.ts`.
23857
+ */
23858
+ durability: "restored",
23859
+ /** Clock fields: written, but excluded from the compare that decides
23860
+ * whether persisting is worth a SQLite commit. */
23861
+ volatileStateFields: ["lastFetchedAt"]
23470
23862
  };
23471
23863
  /**
23472
23864
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -23800,7 +24192,14 @@ onSent: { data: object({
23800
24192
  * form reads `supports` to gate optional fields; history pane reads
23801
24193
  * `lastSentAt` / `lastError` / `queueDepth`.
23802
24194
  */
23803
- runtimeState: NotifierStatusSchema
24195
+ runtimeState: NotifierStatusSchema,
24196
+ /**
24197
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24198
+ *
24199
+ * See `RuntimeStateDurability`. Enforced by
24200
+ * `scripts/check-runtime-state-durability.ts`.
24201
+ */
24202
+ durability: "session"
23804
24203
  };
23805
24204
  /**
23806
24205
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -23843,7 +24242,17 @@ var numericSensorCapability = {
23843
24242
  schema: NumericSensorStatusSchema,
23844
24243
  kind: "push"
23845
24244
  },
23846
- runtimeState: NumericSensorStatusSchema
24245
+ runtimeState: NumericSensorStatusSchema,
24246
+ /**
24247
+ * 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.
24248
+ *
24249
+ * See `RuntimeStateDurability`. Enforced by
24250
+ * `scripts/check-runtime-state-durability.ts`.
24251
+ */
24252
+ durability: "restored",
24253
+ /** Clock fields: written, but excluded from the compare that decides
24254
+ * whether persisting is worth a SQLite commit. */
24255
+ volatileStateFields: ["lastFetchedAt"]
23847
24256
  };
23848
24257
  /**
23849
24258
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24228,7 +24637,14 @@ var petFeederCapability = {
24228
24637
  * the full slice via `device.state.petFeeder.value` and refresh on
24229
24638
  * every poll without re-querying the provider.
24230
24639
  */
24231
- runtimeState: PetFeederStatusSchema
24640
+ runtimeState: PetFeederStatusSchema,
24641
+ /**
24642
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
24643
+ *
24644
+ * See `RuntimeStateDurability`. Enforced by
24645
+ * `scripts/check-runtime-state-durability.ts`.
24646
+ */
24647
+ durability: "session"
24232
24648
  };
24233
24649
  var VehicleSchema = object({
24234
24650
  id: string(),
@@ -24540,7 +24956,17 @@ var powerMeterCapability = {
24540
24956
  schema: PowerMeterStatusSchema,
24541
24957
  kind: "push"
24542
24958
  },
24543
- runtimeState: PowerMeterStatusSchema
24959
+ runtimeState: PowerMeterStatusSchema,
24960
+ /**
24961
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
24962
+ *
24963
+ * See `RuntimeStateDurability`. Enforced by
24964
+ * `scripts/check-runtime-state-durability.ts`.
24965
+ */
24966
+ durability: "restored",
24967
+ /** Clock fields: written, but excluded from the compare that decides
24968
+ * whether persisting is worth a SQLite commit. */
24969
+ volatileStateFields: ["lastFetchedAt"]
24544
24970
  };
24545
24971
  /**
24546
24972
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -24597,7 +25023,17 @@ var presenceCapability = {
24597
25023
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
24598
25024
  * pre-fetch fast-path check).
24599
25025
  */
24600
- runtimeState: PresenceStatusSchema
25026
+ runtimeState: PresenceStatusSchema,
25027
+ /**
25028
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25029
+ *
25030
+ * See `RuntimeStateDurability`. Enforced by
25031
+ * `scripts/check-runtime-state-durability.ts`.
25032
+ */
25033
+ durability: "restored",
25034
+ /** Clock fields: written, but excluded from the compare that decides
25035
+ * whether persisting is worth a SQLite commit. */
25036
+ volatileStateFields: ["lastChangedAt"]
24601
25037
  };
24602
25038
  /**
24603
25039
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -24633,7 +25069,17 @@ var pressureSensorCapability = {
24633
25069
  schema: PressureSensorStatusSchema,
24634
25070
  kind: "push"
24635
25071
  },
24636
- runtimeState: PressureSensorStatusSchema
25072
+ runtimeState: PressureSensorStatusSchema,
25073
+ /**
25074
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25075
+ *
25076
+ * See `RuntimeStateDurability`. Enforced by
25077
+ * `scripts/check-runtime-state-durability.ts`.
25078
+ */
25079
+ durability: "restored",
25080
+ /** Clock fields: written, but excluded from the compare that decides
25081
+ * whether persisting is worth a SQLite commit. */
25082
+ volatileStateFields: ["lastFetchedAt"]
24637
25083
  };
24638
25084
  /**
24639
25085
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -24763,7 +25209,17 @@ var privacyMaskCapability = {
24763
25209
  schema: PrivacyMaskStatusSchema,
24764
25210
  kind: "poll"
24765
25211
  },
24766
- runtimeState: PrivacyMaskStatusSchema
25212
+ runtimeState: PrivacyMaskStatusSchema,
25213
+ /**
25214
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25215
+ *
25216
+ * See `RuntimeStateDurability`. Enforced by
25217
+ * `scripts/check-runtime-state-durability.ts`.
25218
+ */
25219
+ durability: "restored",
25220
+ /** Clock fields: written, but excluded from the compare that decides
25221
+ * whether persisting is worth a SQLite commit. */
25222
+ volatileStateFields: ["lastFetchedAt"]
24767
25223
  };
24768
25224
  var PtzPresetSchema = object({
24769
25225
  id: string(),
@@ -24929,7 +25385,14 @@ var ptzAutotrackCapability = {
24929
25385
  * fetch / cache / fallback logic out of the four cap methods —
24930
25386
  * they become trampolines over `runtimeState`.
24931
25387
  */
24932
- runtimeState: PtzAutotrackRuntimeStateSchema
25388
+ runtimeState: PtzAutotrackRuntimeStateSchema,
25389
+ /**
25390
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
25391
+ *
25392
+ * See `RuntimeStateDurability`. Enforced by
25393
+ * `scripts/check-runtime-state-durability.ts`.
25394
+ */
25395
+ durability: "session"
24933
25396
  };
24934
25397
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
24935
25398
  kind: "mutation",
@@ -25579,7 +26042,14 @@ var sceneMonitorCapability = {
25579
26042
  schema: SceneMonitorStatusSchema,
25580
26043
  kind: "push"
25581
26044
  },
25582
- runtimeState: SceneMonitorStatusSchema
26045
+ runtimeState: SceneMonitorStatusSchema,
26046
+ /**
26047
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26048
+ *
26049
+ * See `RuntimeStateDurability`. Enforced by
26050
+ * `scripts/check-runtime-state-durability.ts`.
26051
+ */
26052
+ durability: "session"
25583
26053
  };
25584
26054
  /**
25585
26055
  * Per-stage gating mode applied to the zones a rule references.
@@ -25723,7 +26193,14 @@ var scriptRunnerCapability = {
25723
26193
  * `isRunning` to render a spinner during execution and surfaces
25724
26194
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
25725
26195
  */
25726
- runtimeState: ScriptRunnerStatusSchema
26196
+ runtimeState: ScriptRunnerStatusSchema,
26197
+ /**
26198
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26199
+ *
26200
+ * See `RuntimeStateDurability`. Enforced by
26201
+ * `scripts/check-runtime-state-durability.ts`.
26202
+ */
26203
+ durability: "session"
25727
26204
  };
25728
26205
  /**
25729
26206
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -25750,7 +26227,17 @@ var smokeCapability = {
25750
26227
  schema: SmokeStatusSchema,
25751
26228
  kind: "push"
25752
26229
  },
25753
- runtimeState: SmokeStatusSchema
26230
+ runtimeState: SmokeStatusSchema,
26231
+ /**
26232
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26233
+ *
26234
+ * See `RuntimeStateDurability`. Enforced by
26235
+ * `scripts/check-runtime-state-durability.ts`.
26236
+ */
26237
+ durability: "restored",
26238
+ /** Clock fields: written, but excluded from the compare that decides
26239
+ * whether persisting is worth a SQLite commit. */
26240
+ volatileStateFields: ["lastChangedAt"]
25754
26241
  };
25755
26242
  /**
25756
26243
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -25936,7 +26423,17 @@ var streamParamsCapability = {
25936
26423
  schema: StreamParamsStatusSchema,
25937
26424
  kind: "poll"
25938
26425
  },
25939
- runtimeState: StreamParamsStatusSchema
26426
+ runtimeState: StreamParamsStatusSchema,
26427
+ /**
26428
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
26429
+ *
26430
+ * See `RuntimeStateDurability`. Enforced by
26431
+ * `scripts/check-runtime-state-durability.ts`.
26432
+ */
26433
+ durability: "restored",
26434
+ /** Clock fields: written, but excluded from the compare that decides
26435
+ * whether persisting is worth a SQLite commit. */
26436
+ volatileStateFields: ["lastFetchedAt"]
25940
26437
  };
25941
26438
  /**
25942
26439
  * Generic on/off switch cap for accessory children (siren, floodlight,
@@ -25982,6 +26479,16 @@ var switchCapability = {
25982
26479
  * not need to re-query the provider after a setState mutation.
25983
26480
  */
25984
26481
  runtimeState: SwitchStatusSchema,
26482
+ /**
26483
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
26484
+ *
26485
+ * See `RuntimeStateDurability`. Enforced by
26486
+ * `scripts/check-runtime-state-durability.ts`.
26487
+ */
26488
+ durability: "restored",
26489
+ /** Clock fields: written, but excluded from the compare that decides
26490
+ * whether persisting is worth a SQLite commit. */
26491
+ volatileStateFields: ["lastChangedAt"],
25985
26492
  settings: { bindings: [{
25986
26493
  kind: "scalar",
25987
26494
  statusPath: "on",
@@ -26061,7 +26568,17 @@ var tamperCapability = {
26061
26568
  schema: TamperStatusSchema,
26062
26569
  kind: "push"
26063
26570
  },
26064
- runtimeState: TamperStatusSchema
26571
+ runtimeState: TamperStatusSchema,
26572
+ /**
26573
+ * Runtime-state durability: **restored** — as `smoke`.
26574
+ *
26575
+ * See `RuntimeStateDurability`. Enforced by
26576
+ * `scripts/check-runtime-state-durability.ts`.
26577
+ */
26578
+ durability: "restored",
26579
+ /** Clock fields: written, but excluded from the compare that decides
26580
+ * whether persisting is worth a SQLite commit. */
26581
+ volatileStateFields: ["lastChangedAt"]
26065
26582
  };
26066
26583
  /**
26067
26584
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26106,7 +26623,17 @@ var temperatureSensorCapability = {
26106
26623
  schema: TemperatureSensorStatusSchema,
26107
26624
  kind: "push"
26108
26625
  },
26109
- runtimeState: TemperatureSensorStatusSchema
26626
+ runtimeState: TemperatureSensorStatusSchema,
26627
+ /**
26628
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
26629
+ *
26630
+ * See `RuntimeStateDurability`. Enforced by
26631
+ * `scripts/check-runtime-state-durability.ts`.
26632
+ */
26633
+ durability: "restored",
26634
+ /** Clock fields: written, but excluded from the compare that decides
26635
+ * whether persisting is worth a SQLite commit. */
26636
+ volatileStateFields: ["lastFetchedAt"]
26110
26637
  };
26111
26638
  /**
26112
26639
  * toast — system-scoped singleton capability that streams toast
@@ -26175,7 +26702,14 @@ var updateCapability = {
26175
26702
  schema: UpdateStatusSchema,
26176
26703
  kind: "poll"
26177
26704
  },
26178
- runtimeState: UpdateStatusSchema
26705
+ runtimeState: UpdateStatusSchema,
26706
+ /**
26707
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
26708
+ *
26709
+ * See `RuntimeStateDurability`. Enforced by
26710
+ * `scripts/check-runtime-state-durability.ts`.
26711
+ */
26712
+ durability: "session"
26179
26713
  };
26180
26714
  var UserSummarySchema = object({
26181
26715
  id: string(),
@@ -26509,7 +27043,14 @@ var vacuumControlCapability = {
26509
27043
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26510
27044
  * slice for live state + battery + fan-speed changes.
26511
27045
  */
26512
- runtimeState: VacuumControlStatusSchema
27046
+ runtimeState: VacuumControlStatusSchema,
27047
+ /**
27048
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27049
+ *
27050
+ * See `RuntimeStateDurability`. Enforced by
27051
+ * `scripts/check-runtime-state-durability.ts`.
27052
+ */
27053
+ durability: "session"
26513
27054
  };
26514
27055
  var ValveStatusSchema = object({
26515
27056
  /** Lifecycle state of the valve. */
@@ -26561,7 +27102,14 @@ var valveCapability = {
26561
27102
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26562
27103
  * slice for live position changes during a move.
26563
27104
  */
26564
- runtimeState: ValveStatusSchema
27105
+ runtimeState: ValveStatusSchema,
27106
+ /**
27107
+ * Runtime-state durability: **session** — as `brightness`.
27108
+ *
27109
+ * See `RuntimeStateDurability`. Enforced by
27110
+ * `scripts/check-runtime-state-durability.ts`.
27111
+ */
27112
+ durability: "session"
26565
27113
  };
26566
27114
  /**
26567
27115
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -26583,7 +27131,17 @@ var vibrationCapability = {
26583
27131
  schema: VibrationStatusSchema,
26584
27132
  kind: "push"
26585
27133
  },
26586
- runtimeState: VibrationStatusSchema
27134
+ runtimeState: VibrationStatusSchema,
27135
+ /**
27136
+ * Runtime-state durability: **restored** — as `smoke`.
27137
+ *
27138
+ * See `RuntimeStateDurability`. Enforced by
27139
+ * `scripts/check-runtime-state-durability.ts`.
27140
+ */
27141
+ durability: "restored",
27142
+ /** Clock fields: written, but excluded from the compare that decides
27143
+ * whether persisting is worth a SQLite commit. */
27144
+ volatileStateFields: ["lastChangedAt"]
26587
27145
  };
26588
27146
  /**
26589
27147
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -26657,7 +27215,14 @@ var waterHeaterCapability = {
26657
27215
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26658
27216
  * slice for live temperature / mode / away changes.
26659
27217
  */
26660
- runtimeState: WaterHeaterStatusSchema
27218
+ runtimeState: WaterHeaterStatusSchema,
27219
+ /**
27220
+ * Runtime-state durability: **session** — as `climate-control`.
27221
+ *
27222
+ * See `RuntimeStateDurability`. Enforced by
27223
+ * `scripts/check-runtime-state-durability.ts`.
27224
+ */
27225
+ durability: "session"
26661
27226
  };
26662
27227
  /**
26663
27228
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -26716,7 +27281,14 @@ var weatherCapability = {
26716
27281
  * Runtime-state slice — mirrored by the kernel. The UI reads the
26717
27282
  * current conditions directly from the slice on each weather push.
26718
27283
  */
26719
- runtimeState: WeatherStatusSchema
27284
+ runtimeState: WeatherStatusSchema,
27285
+ /**
27286
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27287
+ *
27288
+ * See `RuntimeStateDurability`. Enforced by
27289
+ * `scripts/check-runtime-state-durability.ts`.
27290
+ */
27291
+ durability: "session"
26720
27292
  };
26721
27293
  /**
26722
27294
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -26878,7 +27450,14 @@ var zoneAnalyticsCapability = {
26878
27450
  * automatically; the explicit `getCurrentSnapshot` cap method is
26879
27451
  * still useful for one-off polls without a subscription.
26880
27452
  */
26881
- runtimeState: CameraOccupancySnapshotSchema
27453
+ runtimeState: CameraOccupancySnapshotSchema,
27454
+ /**
27455
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
27456
+ *
27457
+ * See `RuntimeStateDurability`. Enforced by
27458
+ * `scripts/check-runtime-state-durability.ts`.
27459
+ */
27460
+ durability: "session"
26882
27461
  };
26883
27462
  /**
26884
27463
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -26956,7 +27535,14 @@ var zoneRulesCapability = {
26956
27535
  motion: array(ZoneRuleSchema).readonly(),
26957
27536
  detection: array(ZoneRuleSchema).readonly(),
26958
27537
  package: array(ZoneRuleSchema).readonly()
26959
- })
27538
+ }),
27539
+ /**
27540
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
27541
+ *
27542
+ * See `RuntimeStateDurability`. Enforced by
27543
+ * `scripts/check-runtime-state-durability.ts`.
27544
+ */
27545
+ durability: "restored"
26960
27546
  };
26961
27547
  /**
26962
27548
  * Accessory device helpers — shared across drivers.
@@ -33709,6 +34295,7 @@ Object.freeze({
33709
34295
  "network-access": "ingress",
33710
34296
  "smtp-provider": "email"
33711
34297
  });
34298
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
33712
34299
  new Set(["devices", "classes"]);
33713
34300
  /**
33714
34301
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.