@camstack/addon-provider-rademacher 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.js CHANGED
@@ -11756,7 +11756,14 @@ var cameraStreamsCapability = {
11756
11756
  low: string().optional()
11757
11757
  }),
11758
11758
  lastChangedAt: number()
11759
- })
11759
+ }),
11760
+ /**
11761
+ * 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.
11762
+ *
11763
+ * See `RuntimeStateDurability`. Enforced by
11764
+ * `scripts/check-runtime-state-durability.ts`.
11765
+ */
11766
+ durability: "session"
11760
11767
  };
11761
11768
  /** Where a block runs. The operator chooses — a block driving a device on an
11762
11769
  * agent is the reason placement is not fixed to the hub. */
@@ -12317,6 +12324,13 @@ var deviceDiscoveryCapability = {
12317
12324
  kind: "poll"
12318
12325
  },
12319
12326
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
12327
+ /**
12328
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
12329
+ *
12330
+ * See `RuntimeStateDurability`. Enforced by
12331
+ * `scripts/check-runtime-state-durability.ts`.
12332
+ */
12333
+ durability: "session",
12320
12334
  methods: {
12321
12335
  /**
12322
12336
  * Snapshot of the current `discovered` list. Returns the
@@ -14216,7 +14230,23 @@ var NotificationActionSchema = object({
14216
14230
  * else — see `notification-center/action-token.ts` for what that does and
14217
14231
  * does not buy.
14218
14232
  */
14219
- destructive: boolean().optional()
14233
+ destructive: boolean().optional(),
14234
+ /**
14235
+ * How the tap should REACH the url.
14236
+ *
14237
+ * `navigate` (absent, and every button authored before this field) opens it:
14238
+ * the phone leaves the notification and shows whatever the callback returns.
14239
+ * That is right for a button whose answer the operator wants to read.
14240
+ *
14241
+ * `background` fires it as a POST and stays put. It exists for the buttons
14242
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
14243
+ * an answer to the notification, and being thrown into a browser tab to
14244
+ * confirm it costs more attention than the notification did. A backend that
14245
+ * cannot do a background call renders it as an ordinary link (the adapters
14246
+ * fall back rather than dropping the button), so this is a preference, never
14247
+ * a requirement.
14248
+ */
14249
+ mode: _enum(["navigate", "background"]).optional()
14220
14250
  });
14221
14251
  /**
14222
14252
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -15068,7 +15098,17 @@ var alarmPanelCapability = {
15068
15098
  * full slice; renders an arm button per `availableModes` entry and
15069
15099
  * a PIN field iff `requiresCode === true`.
15070
15100
  */
15071
- runtimeState: AlarmPanelStatusSchema
15101
+ runtimeState: AlarmPanelStatusSchema,
15102
+ /**
15103
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
15104
+ *
15105
+ * See `RuntimeStateDurability`. Enforced by
15106
+ * `scripts/check-runtime-state-durability.ts`.
15107
+ */
15108
+ durability: "restored",
15109
+ /** Clock fields: written, but excluded from the compare that decides
15110
+ * whether persisting is worth a SQLite commit. */
15111
+ volatileStateFields: ["lastChangedAt"]
15072
15112
  };
15073
15113
  /**
15074
15114
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -15245,6 +15285,9 @@ var NcSystemEventConditionSchema = object({
15245
15285
  nodeIds: array(string().min(1)).min(1).optional(),
15246
15286
  packageNames: array(string().min(1)).min(1).optional()
15247
15287
  });
15288
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
15289
+ * outage the operator asked for once and forgot. */
15290
+ var NC_SNOOZE_MAX_MINUTES = 1440;
15248
15291
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
15249
15292
  var NcScheduleSchema = object({
15250
15293
  windows: array(object({
@@ -15621,15 +15664,15 @@ var NcConditionsSchema = object({
15621
15664
  * (an `immediate` rule naming an `audio-*` class, one notification per
15622
15665
  * classified sample) stays exactly as it was for rules that already use it.
15623
15666
  *
15624
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
15625
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
15626
- * (`camstack/src/data/notification-center.ts`, guarded by
15627
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
15667
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
15668
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
15669
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
15670
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
15628
15671
  * condition fields it does not know when a rule is saved from the phone.
15629
15672
  * Publishing an editor for a condition the app cannot round-trip is how an
15630
- * operator loses a rule's conditions by opening it — so the descriptor, the
15631
- * admin widget and the viewer mirror land together (P2 + P3), and only then
15632
- * does an audio rule become authorable.
15673
+ * operator loses a rule's conditions by opening it — so the viewer mirror
15674
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
15675
+ * follows here.
15633
15676
  */
15634
15677
  audio: NcAudioConditionSchema.optional()
15635
15678
  });
@@ -15865,6 +15908,30 @@ var NcRuleInputSchema = object({
15865
15908
  */
15866
15909
  snoozeAllowGlobal: boolean().optional(),
15867
15910
  /**
15911
+ * The snooze durations THIS rule's notification offers as buttons, in
15912
+ * minutes.
15913
+ *
15914
+ * Three states, and all three are distinct — which is exactly why this is
15915
+ * `.optional()` and never `.default()`. A Zod default does not run on the
15916
+ * addon cap path (three production failures in one day), so a schema default
15917
+ * would collapse the first two:
15918
+ *
15919
+ * | value | meaning |
15920
+ * | --- | --- |
15921
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
15922
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
15923
+ * | a list | these choices, de-duplicated and sorted, at most four |
15924
+ *
15925
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
15926
+ * three buttons in total) and a rule that spent it all on snooze choices
15927
+ * would push its own tap-through actions off the notification.
15928
+ *
15929
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
15930
+ * that arms the panel, is exempt automatically and cannot be silenced by a
15931
+ * window from anywhere (D133).
15932
+ */
15933
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
15934
+ /**
15868
15935
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
15869
15936
  *
15870
15937
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -15964,6 +16031,7 @@ var NcConditionDescriptorSchema = object({
15964
16031
  "device",
15965
16032
  "package",
15966
16033
  "occupancy",
16034
+ "audio",
15967
16035
  "system"
15968
16036
  ]),
15969
16037
  label: string(),
@@ -15982,6 +16050,7 @@ var NcConditionDescriptorSchema = object({
15982
16050
  "crossingSelect",
15983
16051
  "polygonDraw",
15984
16052
  "occupancy",
16053
+ "audio",
15985
16054
  "deviceState",
15986
16055
  "systemEvent"
15987
16056
  ]),
@@ -16133,7 +16202,20 @@ var NcSnoozeInputSchema = object({
16133
16202
  ruleId: string().optional(),
16134
16203
  /** Required when `scope: 'device'`. */
16135
16204
  deviceId: number().int().optional(),
16136
- durationMinutes: number().int().min(1).max(1440),
16205
+ /**
16206
+ * Narrow the window to these subject classes — "the cat, not the person".
16207
+ *
16208
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
16209
+ * what every window authored before this field meant, so no persisted row
16210
+ * changes meaning and no client has to learn anything to keep working.
16211
+ *
16212
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
16213
+ * cross rules (D133): the operator points at a camera and a kind of thing,
16214
+ * not at whichever of their four rules happened to produce the notification
16215
+ * they are dismissing.
16216
+ */
16217
+ classes: array(string().min(1)).min(1).optional(),
16218
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
16137
16219
  /**
16138
16220
  * Silence this for EVERY recipient, not just the caller. Permission is
16139
16221
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -16158,6 +16240,10 @@ var NcSnoozeSchema = object({
16158
16240
  scope: NcSnoozeScopeSchema,
16159
16241
  ruleId: string().optional(),
16160
16242
  deviceId: number().int().optional(),
16243
+ /** Subject classes this window covers. ABSENT = every class — see
16244
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
16245
+ * no SQLite column: nothing queries a window by class. */
16246
+ classes: array(string().min(1)).min(1).optional(),
16161
16247
  startedAt: number(),
16162
16248
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
16163
16249
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -18258,7 +18344,14 @@ var zonesCapability = {
18258
18344
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
18259
18345
  * (e.g. zone groupings) can sit alongside the polygon list.
18260
18346
  */
18261
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
18347
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
18348
+ /**
18349
+ * 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.
18350
+ *
18351
+ * See `RuntimeStateDurability`. Enforced by
18352
+ * `scripts/check-runtime-state-durability.ts`.
18353
+ */
18354
+ durability: "restored"
18262
18355
  };
18263
18356
  /**
18264
18357
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -21057,7 +21150,17 @@ var airQualitySensorCapability = {
21057
21150
  schema: AirQualitySensorStatusSchema,
21058
21151
  kind: "push"
21059
21152
  },
21060
- runtimeState: AirQualitySensorStatusSchema
21153
+ runtimeState: AirQualitySensorStatusSchema,
21154
+ /**
21155
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
21156
+ *
21157
+ * See `RuntimeStateDurability`. Enforced by
21158
+ * `scripts/check-runtime-state-durability.ts`.
21159
+ */
21160
+ durability: "restored",
21161
+ /** Clock fields: written, but excluded from the compare that decides
21162
+ * whether persisting is worth a SQLite commit. */
21163
+ volatileStateFields: ["lastFetchedAt"]
21061
21164
  };
21062
21165
  /**
21063
21166
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -21089,7 +21192,17 @@ var ambientLightSensorCapability = {
21089
21192
  schema: AmbientLightSensorStatusSchema,
21090
21193
  kind: "push"
21091
21194
  },
21092
- runtimeState: AmbientLightSensorStatusSchema
21195
+ runtimeState: AmbientLightSensorStatusSchema,
21196
+ /**
21197
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
21198
+ *
21199
+ * See `RuntimeStateDurability`. Enforced by
21200
+ * `scripts/check-runtime-state-durability.ts`.
21201
+ */
21202
+ durability: "restored",
21203
+ /** Clock fields: written, but excluded from the compare that decides
21204
+ * whether persisting is worth a SQLite commit. */
21205
+ volatileStateFields: ["lastFetchedAt"]
21093
21206
  };
21094
21207
  /**
21095
21208
  * Per-class audio metrics aggregated over a sliding window.
@@ -21207,7 +21320,14 @@ var audioMetricsCapability = {
21207
21320
  }), AudioMetricsHistorySchema)
21208
21321
  },
21209
21322
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
21210
- runtimeState: AudioMetricsSnapshotSchema
21323
+ runtimeState: AudioMetricsSnapshotSchema,
21324
+ /**
21325
+ * 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.
21326
+ *
21327
+ * See `RuntimeStateDurability`. Enforced by
21328
+ * `scripts/check-runtime-state-durability.ts`.
21329
+ */
21330
+ durability: "session"
21211
21331
  };
21212
21332
  /**
21213
21333
  * Automation-control cap. Models HA `automation.*` entities on
@@ -21269,7 +21389,14 @@ var automationControlCapability = {
21269
21389
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
21270
21390
  * (badge) directly.
21271
21391
  */
21272
- runtimeState: AutomationControlStatusSchema
21392
+ runtimeState: AutomationControlStatusSchema,
21393
+ /**
21394
+ * 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.
21395
+ *
21396
+ * See `RuntimeStateDurability`. Enforced by
21397
+ * `scripts/check-runtime-state-durability.ts`.
21398
+ */
21399
+ durability: "session"
21273
21400
  };
21274
21401
  /**
21275
21402
  * Battery status snapshot. Emitted by providers whose device is
@@ -21375,7 +21502,17 @@ onStatusChanged: { data: object({
21375
21502
  * via `device.runtimeState.getCapState('battery')` regardless of
21376
21503
  * the underlying driver.
21377
21504
  */
21378
- runtimeState: BatteryStatusSchema
21505
+ runtimeState: BatteryStatusSchema,
21506
+ /**
21507
+ * 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.
21508
+ *
21509
+ * See `RuntimeStateDurability`. Enforced by
21510
+ * `scripts/check-runtime-state-durability.ts`.
21511
+ */
21512
+ durability: "restored",
21513
+ /** Clock fields: written, but excluded from the compare that decides
21514
+ * whether persisting is worth a SQLite commit. */
21515
+ volatileStateFields: ["lastUpdated"]
21379
21516
  };
21380
21517
  /**
21381
21518
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -21404,7 +21541,17 @@ var binaryCapability = {
21404
21541
  schema: BinaryStatusSchema,
21405
21542
  kind: "push"
21406
21543
  },
21407
- runtimeState: BinaryStatusSchema
21544
+ runtimeState: BinaryStatusSchema,
21545
+ /**
21546
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
21547
+ *
21548
+ * See `RuntimeStateDurability`. Enforced by
21549
+ * `scripts/check-runtime-state-durability.ts`.
21550
+ */
21551
+ durability: "restored",
21552
+ /** Clock fields: written, but excluded from the compare that decides
21553
+ * whether persisting is worth a SQLite commit. */
21554
+ volatileStateFields: ["lastChangedAt"]
21408
21555
  };
21409
21556
  /**
21410
21557
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -21457,7 +21604,14 @@ onBrightnessChanged: { data: object({
21457
21604
  * by the kernel. Read via `device.state.brightness.value` so UI
21458
21605
  * sliders surface the current level without polling the provider.
21459
21606
  */
21460
- runtimeState: BrightnessStatusSchema
21607
+ runtimeState: BrightnessStatusSchema,
21608
+ /**
21609
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
21610
+ *
21611
+ * See `RuntimeStateDurability`. Enforced by
21612
+ * `scripts/check-runtime-state-durability.ts`.
21613
+ */
21614
+ durability: "session"
21461
21615
  };
21462
21616
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
21463
21617
  kind: "mutation",
@@ -21545,7 +21699,17 @@ var carbonMonoxideCapability = {
21545
21699
  schema: CarbonMonoxideStatusSchema,
21546
21700
  kind: "push"
21547
21701
  },
21548
- runtimeState: CarbonMonoxideStatusSchema
21702
+ runtimeState: CarbonMonoxideStatusSchema,
21703
+ /**
21704
+ * Runtime-state durability: **restored** — as `smoke`.
21705
+ *
21706
+ * See `RuntimeStateDurability`. Enforced by
21707
+ * `scripts/check-runtime-state-durability.ts`.
21708
+ */
21709
+ durability: "restored",
21710
+ /** Clock fields: written, but excluded from the compare that decides
21711
+ * whether persisting is worth a SQLite commit. */
21712
+ volatileStateFields: ["lastChangedAt"]
21549
21713
  };
21550
21714
  /**
21551
21715
  * HVAC / climate control cap. Models the full surface of a HA
@@ -21705,7 +21869,14 @@ var climateControlCapability = {
21705
21869
  * the full slice via `device.state.climate-control.value` and refresh
21706
21870
  * on every push without re-querying the provider.
21707
21871
  */
21708
- runtimeState: ClimateControlStatusSchema
21872
+ runtimeState: ClimateControlStatusSchema,
21873
+ /**
21874
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
21875
+ *
21876
+ * See `RuntimeStateDurability`. Enforced by
21877
+ * `scripts/check-runtime-state-durability.ts`.
21878
+ */
21879
+ durability: "session"
21709
21880
  };
21710
21881
  /**
21711
21882
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -21815,7 +21986,14 @@ onColorChanged: { data: object({
21815
21986
  * kernel. Read via `device.state.color.value` so UI pickers surface
21816
21987
  * the current chromaticity without polling the provider.
21817
21988
  */
21818
- runtimeState: ColorStatusSchema
21989
+ runtimeState: ColorStatusSchema,
21990
+ /**
21991
+ * Runtime-state durability: **session** — as `brightness`.
21992
+ *
21993
+ * See `RuntimeStateDurability`. Enforced by
21994
+ * `scripts/check-runtime-state-durability.ts`.
21995
+ */
21996
+ durability: "session"
21819
21997
  };
21820
21998
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
21821
21999
  object({
@@ -21873,7 +22051,17 @@ var connectivityCapability = {
21873
22051
  schema: ConnectivityStatusSchema,
21874
22052
  kind: "push"
21875
22053
  },
21876
- runtimeState: ConnectivityStatusSchema
22054
+ runtimeState: ConnectivityStatusSchema,
22055
+ /**
22056
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
22057
+ *
22058
+ * See `RuntimeStateDurability`. Enforced by
22059
+ * `scripts/check-runtime-state-durability.ts`.
22060
+ */
22061
+ durability: "restored",
22062
+ /** Clock fields: written, but excluded from the compare that decides
22063
+ * whether persisting is worth a SQLite commit. */
22064
+ volatileStateFields: ["lastChangedAt"]
21877
22065
  };
21878
22066
  /**
21879
22067
  * Generic device-consumables capability — surfaces a device's
@@ -21955,7 +22143,14 @@ reset: method(object({
21955
22143
  }
21956
22144
  }
21957
22145
  },
21958
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
22146
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
22147
+ /**
22148
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
22149
+ *
22150
+ * See `RuntimeStateDurability`. Enforced by
22151
+ * `scripts/check-runtime-state-durability.ts`.
22152
+ */
22153
+ durability: "session"
21959
22154
  };
21960
22155
  /**
21961
22156
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21986,7 +22181,17 @@ var contactCapability = {
21986
22181
  schema: ContactStatusSchema,
21987
22182
  kind: "push"
21988
22183
  },
21989
- runtimeState: ContactStatusSchema
22184
+ runtimeState: ContactStatusSchema,
22185
+ /**
22186
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
22187
+ *
22188
+ * See `RuntimeStateDurability`. Enforced by
22189
+ * `scripts/check-runtime-state-durability.ts`.
22190
+ */
22191
+ durability: "restored",
22192
+ /** Clock fields: written, but excluded from the compare that decides
22193
+ * whether persisting is worth a SQLite commit. */
22194
+ volatileStateFields: ["lastChangedAt"]
21990
22195
  };
21991
22196
  /**
21992
22197
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -22092,7 +22297,14 @@ var controlCapability = {
22092
22297
  * dropdown / text field / date picker) read the slice's discriminant
22093
22298
  * and value directly without polling the provider.
22094
22299
  */
22095
- runtimeState: ControlStatusSchema
22300
+ runtimeState: ControlStatusSchema,
22301
+ /**
22302
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
22303
+ *
22304
+ * See `RuntimeStateDurability`. Enforced by
22305
+ * `scripts/check-runtime-state-durability.ts`.
22306
+ */
22307
+ durability: "session"
22096
22308
  };
22097
22309
  var CoverStatusSchema = object({
22098
22310
  /** Lifecycle state of the cover. */
@@ -22153,7 +22365,17 @@ var coverCapability = {
22153
22365
  * Runtime-state slice — mirrored by the kernel. UI controls watch
22154
22366
  * the slice for live position changes during a move.
22155
22367
  */
22156
- runtimeState: CoverStatusSchema
22368
+ runtimeState: CoverStatusSchema,
22369
+ /**
22370
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
22371
+ *
22372
+ * See `RuntimeStateDurability`. Enforced by
22373
+ * `scripts/check-runtime-state-durability.ts`.
22374
+ */
22375
+ durability: "restored",
22376
+ /** Clock fields: written, but excluded from the compare that decides
22377
+ * whether persisting is worth a SQLite commit. */
22378
+ volatileStateFields: ["lastChangedAt"]
22157
22379
  };
22158
22380
  /**
22159
22381
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -22247,7 +22469,17 @@ var dayNightCapability = {
22247
22469
  schema: DayNightStatusSchema,
22248
22470
  kind: "poll"
22249
22471
  },
22250
- runtimeState: DayNightStatusSchema
22472
+ runtimeState: DayNightStatusSchema,
22473
+ /**
22474
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
22475
+ *
22476
+ * See `RuntimeStateDurability`. Enforced by
22477
+ * `scripts/check-runtime-state-durability.ts`.
22478
+ */
22479
+ durability: "restored",
22480
+ /** Clock fields: written, but excluded from the compare that decides
22481
+ * whether persisting is worth a SQLite commit. */
22482
+ volatileStateFields: ["lastFetchedAt"]
22251
22483
  };
22252
22484
  /**
22253
22485
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -22294,7 +22526,17 @@ onStatusChanged: { data: object({
22294
22526
  schema: DeviceStatusSchema,
22295
22527
  kind: "push"
22296
22528
  },
22297
- runtimeState: DeviceStatusSchema
22529
+ runtimeState: DeviceStatusSchema,
22530
+ /**
22531
+ * 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.
22532
+ *
22533
+ * See `RuntimeStateDurability`. Enforced by
22534
+ * `scripts/check-runtime-state-durability.ts`.
22535
+ */
22536
+ durability: "restored",
22537
+ /** Clock fields: written, but excluded from the compare that decides
22538
+ * whether persisting is worth a SQLite commit. */
22539
+ volatileStateFields: ["lastChangedAt"]
22298
22540
  };
22299
22541
  /**
22300
22542
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -22356,7 +22598,14 @@ onPressed: { data: DoorbellPressEventSchema } },
22356
22598
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
22357
22599
  * without subscribing.
22358
22600
  */
22359
- runtimeState: DoorbellStatusSchema
22601
+ runtimeState: DoorbellStatusSchema,
22602
+ /**
22603
+ * 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.
22604
+ *
22605
+ * See `RuntimeStateDurability`. Enforced by
22606
+ * `scripts/check-runtime-state-durability.ts`.
22607
+ */
22608
+ durability: "restored"
22360
22609
  };
22361
22610
  /**
22362
22611
  * Enum-state sensor — a string value picked from a finite option set.
@@ -22396,7 +22645,17 @@ var enumSensorCapability = {
22396
22645
  schema: EnumSensorStatusSchema,
22397
22646
  kind: "push"
22398
22647
  },
22399
- runtimeState: EnumSensorStatusSchema
22648
+ runtimeState: EnumSensorStatusSchema,
22649
+ /**
22650
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
22651
+ *
22652
+ * See `RuntimeStateDurability`. Enforced by
22653
+ * `scripts/check-runtime-state-durability.ts`.
22654
+ */
22655
+ durability: "restored",
22656
+ /** Clock fields: written, but excluded from the compare that decides
22657
+ * whether persisting is worth a SQLite commit. */
22658
+ volatileStateFields: ["lastFetchedAt"]
22400
22659
  };
22401
22660
  /**
22402
22661
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -22432,7 +22691,14 @@ var eventEmitterCapability = {
22432
22691
  schema: EventEmitterStatusSchema,
22433
22692
  kind: "push"
22434
22693
  },
22435
- runtimeState: EventEmitterStatusSchema
22694
+ runtimeState: EventEmitterStatusSchema,
22695
+ /**
22696
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
22697
+ *
22698
+ * See `RuntimeStateDurability`. Enforced by
22699
+ * `scripts/check-runtime-state-durability.ts`.
22700
+ */
22701
+ durability: "session"
22436
22702
  };
22437
22703
  var EventItemSchema = object({
22438
22704
  id: string(),
@@ -22713,7 +22979,14 @@ var fanControlCapability = {
22713
22979
  * Runtime-state slice — mirrored by the kernel. UI fan speed
22714
22980
  * sliders read `percentage` for live updates.
22715
22981
  */
22716
- runtimeState: FanControlStatusSchema
22982
+ runtimeState: FanControlStatusSchema,
22983
+ /**
22984
+ * Runtime-state durability: **session** — as `brightness`.
22985
+ *
22986
+ * See `RuntimeStateDurability`. Enforced by
22987
+ * `scripts/check-runtime-state-durability.ts`.
22988
+ */
22989
+ durability: "session"
22717
22990
  };
22718
22991
  /**
22719
22992
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -22789,7 +23062,14 @@ onProbeChanged: { data: object({
22789
23062
  schema: FeatureProbeStatusSchema,
22790
23063
  kind: "push"
22791
23064
  },
22792
- runtimeState: FeatureProbeStatusSchema
23065
+ runtimeState: FeatureProbeStatusSchema,
23066
+ /**
23067
+ * 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.
23068
+ *
23069
+ * See `RuntimeStateDurability`. Enforced by
23070
+ * `scripts/check-runtime-state-durability.ts`.
23071
+ */
23072
+ durability: "session"
22793
23073
  };
22794
23074
  /**
22795
23075
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -22816,7 +23096,17 @@ var floodCapability = {
22816
23096
  schema: FloodStatusSchema,
22817
23097
  kind: "push"
22818
23098
  },
22819
- runtimeState: FloodStatusSchema
23099
+ runtimeState: FloodStatusSchema,
23100
+ /**
23101
+ * Runtime-state durability: **restored** — as `smoke`.
23102
+ *
23103
+ * See `RuntimeStateDurability`. Enforced by
23104
+ * `scripts/check-runtime-state-durability.ts`.
23105
+ */
23106
+ durability: "restored",
23107
+ /** Clock fields: written, but excluded from the compare that decides
23108
+ * whether persisting is worth a SQLite commit. */
23109
+ volatileStateFields: ["lastChangedAt"]
22820
23110
  };
22821
23111
  /**
22822
23112
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -22839,7 +23129,17 @@ var gasCapability = {
22839
23129
  schema: GasStatusSchema,
22840
23130
  kind: "push"
22841
23131
  },
22842
- runtimeState: GasStatusSchema
23132
+ runtimeState: GasStatusSchema,
23133
+ /**
23134
+ * Runtime-state durability: **restored** — as `smoke`.
23135
+ *
23136
+ * See `RuntimeStateDurability`. Enforced by
23137
+ * `scripts/check-runtime-state-durability.ts`.
23138
+ */
23139
+ durability: "restored",
23140
+ /** Clock fields: written, but excluded from the compare that decides
23141
+ * whether persisting is worth a SQLite commit. */
23142
+ volatileStateFields: ["lastChangedAt"]
22843
23143
  };
22844
23144
  /**
22845
23145
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22915,7 +23215,14 @@ var humidifierCapability = {
22915
23215
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22916
23216
  * slice for live humidity / mode changes.
22917
23217
  */
22918
- runtimeState: HumidifierStatusSchema
23218
+ runtimeState: HumidifierStatusSchema,
23219
+ /**
23220
+ * Runtime-state durability: **session** — as `climate-control`.
23221
+ *
23222
+ * See `RuntimeStateDurability`. Enforced by
23223
+ * `scripts/check-runtime-state-durability.ts`.
23224
+ */
23225
+ durability: "session"
22919
23226
  };
22920
23227
  /**
22921
23228
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22951,7 +23258,17 @@ var humiditySensorCapability = {
22951
23258
  schema: HumiditySensorStatusSchema,
22952
23259
  kind: "push"
22953
23260
  },
22954
- runtimeState: HumiditySensorStatusSchema
23261
+ runtimeState: HumiditySensorStatusSchema,
23262
+ /**
23263
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
23264
+ *
23265
+ * See `RuntimeStateDurability`. Enforced by
23266
+ * `scripts/check-runtime-state-durability.ts`.
23267
+ */
23268
+ durability: "restored",
23269
+ /** Clock fields: written, but excluded from the compare that decides
23270
+ * whether persisting is worth a SQLite commit. */
23271
+ volatileStateFields: ["lastFetchedAt"]
22955
23272
  };
22956
23273
  /**
22957
23274
  * Image display cap. Models a single still image exposed by an integration —
@@ -22989,7 +23306,14 @@ var imageCapability = {
22989
23306
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22990
23307
  * directly and renders the still image.
22991
23308
  */
22992
- runtimeState: ImageStatusSchema
23309
+ runtimeState: ImageStatusSchema,
23310
+ /**
23311
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
23312
+ *
23313
+ * See `RuntimeStateDurability`. Enforced by
23314
+ * `scripts/check-runtime-state-durability.ts`.
23315
+ */
23316
+ durability: "session"
22993
23317
  };
22994
23318
  /**
22995
23319
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -23138,7 +23462,17 @@ var imageSettingsCapability = {
23138
23462
  schema: ImageSettingsStatusSchema,
23139
23463
  kind: "poll"
23140
23464
  },
23141
- runtimeState: ImageSettingsStatusSchema
23465
+ runtimeState: ImageSettingsStatusSchema,
23466
+ /**
23467
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
23468
+ *
23469
+ * See `RuntimeStateDurability`. Enforced by
23470
+ * `scripts/check-runtime-state-durability.ts`.
23471
+ */
23472
+ durability: "restored",
23473
+ /** Clock fields: written, but excluded from the compare that decides
23474
+ * whether persisting is worth a SQLite commit. */
23475
+ volatileStateFields: ["lastFetchedAt"]
23142
23476
  };
23143
23477
  /**
23144
23478
  * integrations — system-scoped singleton capability for integration
@@ -23478,7 +23812,14 @@ var lawnMowerControlCapability = {
23478
23812
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
23479
23813
  * slice for live activity + battery changes.
23480
23814
  */
23481
- runtimeState: LawnMowerControlStatusSchema
23815
+ runtimeState: LawnMowerControlStatusSchema,
23816
+ /**
23817
+ * Runtime-state durability: **session** — as `vacuum-control`.
23818
+ *
23819
+ * See `RuntimeStateDurability`. Enforced by
23820
+ * `scripts/check-runtime-state-durability.ts`.
23821
+ */
23822
+ durability: "session"
23482
23823
  };
23483
23824
  /**
23484
23825
  * local-network — hub-only singleton.
@@ -23684,7 +24025,17 @@ var lockControlCapability = {
23684
24025
  * read `state` and disable themselves during `locking`/`unlocking`
23685
24026
  * transitions.
23686
24027
  */
23687
- runtimeState: LockControlStatusSchema
24028
+ runtimeState: LockControlStatusSchema,
24029
+ /**
24030
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
24031
+ *
24032
+ * See `RuntimeStateDurability`. Enforced by
24033
+ * `scripts/check-runtime-state-durability.ts`.
24034
+ */
24035
+ durability: "restored",
24036
+ /** Clock fields: written, but excluded from the compare that decides
24037
+ * whether persisting is worth a SQLite commit. */
24038
+ volatileStateFields: ["lastChangedAt"]
23688
24039
  };
23689
24040
  /**
23690
24041
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -23846,7 +24197,14 @@ var mediaPlayerCapability = {
23846
24197
  * full slice for live now-playing, volume, and progress updates
23847
24198
  * without polling.
23848
24199
  */
23849
- runtimeState: MediaPlayerStatusSchema
24200
+ runtimeState: MediaPlayerStatusSchema,
24201
+ /**
24202
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
24203
+ *
24204
+ * See `RuntimeStateDurability`. Enforced by
24205
+ * `scripts/check-runtime-state-durability.ts`.
24206
+ */
24207
+ durability: "session"
23850
24208
  };
23851
24209
  /**
23852
24210
  * mesh-network — collection cap for mesh-VPN providers.
@@ -24110,7 +24468,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
24110
24468
  * `device.state.motion.value`. Reads never invoke the provider, so
24111
24469
  * UIs and other addons can poll the cached state safely.
24112
24470
  */
24113
- runtimeState: MotionStatusSchema
24471
+ runtimeState: MotionStatusSchema,
24472
+ /**
24473
+ * 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.
24474
+ *
24475
+ * See `RuntimeStateDurability`. Enforced by
24476
+ * `scripts/check-runtime-state-durability.ts`.
24477
+ */
24478
+ durability: "session"
24114
24479
  };
24115
24480
  /**
24116
24481
  * Motion-trigger toggle for accessory devices.
@@ -24175,7 +24540,14 @@ var motionTriggerCapability = {
24175
24540
  schema: MotionTriggerStatusSchema,
24176
24541
  kind: "command-driven"
24177
24542
  },
24178
- runtimeState: MotionTriggerRuntimeStateSchema
24543
+ runtimeState: MotionTriggerRuntimeStateSchema,
24544
+ /**
24545
+ * 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.
24546
+ *
24547
+ * See `RuntimeStateDurability`. Enforced by
24548
+ * `scripts/check-runtime-state-durability.ts`.
24549
+ */
24550
+ durability: "session"
24179
24551
  };
24180
24552
  /**
24181
24553
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -24242,7 +24614,17 @@ var motionZonesCapability = {
24242
24614
  schema: MotionZoneStatusSchema,
24243
24615
  kind: "poll"
24244
24616
  },
24245
- runtimeState: MotionZoneStatusSchema
24617
+ runtimeState: MotionZoneStatusSchema,
24618
+ /**
24619
+ * 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.
24620
+ *
24621
+ * See `RuntimeStateDurability`. Enforced by
24622
+ * `scripts/check-runtime-state-durability.ts`.
24623
+ */
24624
+ durability: "restored",
24625
+ /** Clock fields: written, but excluded from the compare that decides
24626
+ * whether persisting is worth a SQLite commit. */
24627
+ volatileStateFields: ["lastFetchedAt"]
24246
24628
  };
24247
24629
  /**
24248
24630
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -24316,7 +24698,17 @@ var nativeObjectDetectionCapability = {
24316
24698
  schema: NativeObjectDetectionStatusSchema,
24317
24699
  kind: "push"
24318
24700
  },
24319
- runtimeState: NativeObjectDetectionRuntimeStateSchema
24701
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
24702
+ /**
24703
+ * 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.
24704
+ *
24705
+ * See `RuntimeStateDurability`. Enforced by
24706
+ * `scripts/check-runtime-state-durability.ts`.
24707
+ */
24708
+ durability: "restored",
24709
+ /** Clock fields: written, but excluded from the compare that decides
24710
+ * whether persisting is worth a SQLite commit. */
24711
+ volatileStateFields: ["lastFetchedAt"]
24320
24712
  };
24321
24713
  /**
24322
24714
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -24650,7 +25042,14 @@ onSent: { data: object({
24650
25042
  * form reads `supports` to gate optional fields; history pane reads
24651
25043
  * `lastSentAt` / `lastError` / `queueDepth`.
24652
25044
  */
24653
- runtimeState: NotifierStatusSchema
25045
+ runtimeState: NotifierStatusSchema,
25046
+ /**
25047
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
25048
+ *
25049
+ * See `RuntimeStateDurability`. Enforced by
25050
+ * `scripts/check-runtime-state-durability.ts`.
25051
+ */
25052
+ durability: "session"
24654
25053
  };
24655
25054
  /**
24656
25055
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -24693,7 +25092,17 @@ var numericSensorCapability = {
24693
25092
  schema: NumericSensorStatusSchema,
24694
25093
  kind: "push"
24695
25094
  },
24696
- runtimeState: NumericSensorStatusSchema
25095
+ runtimeState: NumericSensorStatusSchema,
25096
+ /**
25097
+ * 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.
25098
+ *
25099
+ * See `RuntimeStateDurability`. Enforced by
25100
+ * `scripts/check-runtime-state-durability.ts`.
25101
+ */
25102
+ durability: "restored",
25103
+ /** Clock fields: written, but excluded from the compare that decides
25104
+ * whether persisting is worth a SQLite commit. */
25105
+ volatileStateFields: ["lastFetchedAt"]
24697
25106
  };
24698
25107
  /**
24699
25108
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -25078,7 +25487,14 @@ var petFeederCapability = {
25078
25487
  * the full slice via `device.state.petFeeder.value` and refresh on
25079
25488
  * every poll without re-querying the provider.
25080
25489
  */
25081
- runtimeState: PetFeederStatusSchema
25490
+ runtimeState: PetFeederStatusSchema,
25491
+ /**
25492
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
25493
+ *
25494
+ * See `RuntimeStateDurability`. Enforced by
25495
+ * `scripts/check-runtime-state-durability.ts`.
25496
+ */
25497
+ durability: "session"
25082
25498
  };
25083
25499
  var VehicleSchema = object({
25084
25500
  id: string(),
@@ -25390,7 +25806,17 @@ var powerMeterCapability = {
25390
25806
  schema: PowerMeterStatusSchema,
25391
25807
  kind: "push"
25392
25808
  },
25393
- runtimeState: PowerMeterStatusSchema
25809
+ runtimeState: PowerMeterStatusSchema,
25810
+ /**
25811
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
25812
+ *
25813
+ * See `RuntimeStateDurability`. Enforced by
25814
+ * `scripts/check-runtime-state-durability.ts`.
25815
+ */
25816
+ durability: "restored",
25817
+ /** Clock fields: written, but excluded from the compare that decides
25818
+ * whether persisting is worth a SQLite commit. */
25819
+ volatileStateFields: ["lastFetchedAt"]
25394
25820
  };
25395
25821
  /**
25396
25822
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -25447,7 +25873,17 @@ var presenceCapability = {
25447
25873
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
25448
25874
  * pre-fetch fast-path check).
25449
25875
  */
25450
- runtimeState: PresenceStatusSchema
25876
+ runtimeState: PresenceStatusSchema,
25877
+ /**
25878
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25879
+ *
25880
+ * See `RuntimeStateDurability`. Enforced by
25881
+ * `scripts/check-runtime-state-durability.ts`.
25882
+ */
25883
+ durability: "restored",
25884
+ /** Clock fields: written, but excluded from the compare that decides
25885
+ * whether persisting is worth a SQLite commit. */
25886
+ volatileStateFields: ["lastChangedAt"]
25451
25887
  };
25452
25888
  /**
25453
25889
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -25483,7 +25919,17 @@ var pressureSensorCapability = {
25483
25919
  schema: PressureSensorStatusSchema,
25484
25920
  kind: "push"
25485
25921
  },
25486
- runtimeState: PressureSensorStatusSchema
25922
+ runtimeState: PressureSensorStatusSchema,
25923
+ /**
25924
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25925
+ *
25926
+ * See `RuntimeStateDurability`. Enforced by
25927
+ * `scripts/check-runtime-state-durability.ts`.
25928
+ */
25929
+ durability: "restored",
25930
+ /** Clock fields: written, but excluded from the compare that decides
25931
+ * whether persisting is worth a SQLite commit. */
25932
+ volatileStateFields: ["lastFetchedAt"]
25487
25933
  };
25488
25934
  /**
25489
25935
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -25613,7 +26059,17 @@ var privacyMaskCapability = {
25613
26059
  schema: PrivacyMaskStatusSchema,
25614
26060
  kind: "poll"
25615
26061
  },
25616
- runtimeState: PrivacyMaskStatusSchema
26062
+ runtimeState: PrivacyMaskStatusSchema,
26063
+ /**
26064
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
26065
+ *
26066
+ * See `RuntimeStateDurability`. Enforced by
26067
+ * `scripts/check-runtime-state-durability.ts`.
26068
+ */
26069
+ durability: "restored",
26070
+ /** Clock fields: written, but excluded from the compare that decides
26071
+ * whether persisting is worth a SQLite commit. */
26072
+ volatileStateFields: ["lastFetchedAt"]
25617
26073
  };
25618
26074
  var PtzPresetSchema = object({
25619
26075
  id: string(),
@@ -25779,7 +26235,14 @@ var ptzAutotrackCapability = {
25779
26235
  * fetch / cache / fallback logic out of the four cap methods —
25780
26236
  * they become trampolines over `runtimeState`.
25781
26237
  */
25782
- runtimeState: PtzAutotrackRuntimeStateSchema
26238
+ runtimeState: PtzAutotrackRuntimeStateSchema,
26239
+ /**
26240
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
26241
+ *
26242
+ * See `RuntimeStateDurability`. Enforced by
26243
+ * `scripts/check-runtime-state-durability.ts`.
26244
+ */
26245
+ durability: "session"
25783
26246
  };
25784
26247
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
25785
26248
  kind: "mutation",
@@ -26429,7 +26892,14 @@ var sceneMonitorCapability = {
26429
26892
  schema: SceneMonitorStatusSchema,
26430
26893
  kind: "push"
26431
26894
  },
26432
- runtimeState: SceneMonitorStatusSchema
26895
+ runtimeState: SceneMonitorStatusSchema,
26896
+ /**
26897
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26898
+ *
26899
+ * See `RuntimeStateDurability`. Enforced by
26900
+ * `scripts/check-runtime-state-durability.ts`.
26901
+ */
26902
+ durability: "session"
26433
26903
  };
26434
26904
  /**
26435
26905
  * Per-stage gating mode applied to the zones a rule references.
@@ -26573,7 +27043,14 @@ var scriptRunnerCapability = {
26573
27043
  * `isRunning` to render a spinner during execution and surfaces
26574
27044
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
26575
27045
  */
26576
- runtimeState: ScriptRunnerStatusSchema
27046
+ runtimeState: ScriptRunnerStatusSchema,
27047
+ /**
27048
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
27049
+ *
27050
+ * See `RuntimeStateDurability`. Enforced by
27051
+ * `scripts/check-runtime-state-durability.ts`.
27052
+ */
27053
+ durability: "session"
26577
27054
  };
26578
27055
  /**
26579
27056
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -26600,7 +27077,17 @@ var smokeCapability = {
26600
27077
  schema: SmokeStatusSchema,
26601
27078
  kind: "push"
26602
27079
  },
26603
- runtimeState: SmokeStatusSchema
27080
+ runtimeState: SmokeStatusSchema,
27081
+ /**
27082
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
27083
+ *
27084
+ * See `RuntimeStateDurability`. Enforced by
27085
+ * `scripts/check-runtime-state-durability.ts`.
27086
+ */
27087
+ durability: "restored",
27088
+ /** Clock fields: written, but excluded from the compare that decides
27089
+ * whether persisting is worth a SQLite commit. */
27090
+ volatileStateFields: ["lastChangedAt"]
26604
27091
  };
26605
27092
  /**
26606
27093
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -26773,7 +27260,17 @@ var streamParamsCapability = {
26773
27260
  schema: StreamParamsStatusSchema,
26774
27261
  kind: "poll"
26775
27262
  },
26776
- runtimeState: StreamParamsStatusSchema
27263
+ runtimeState: StreamParamsStatusSchema,
27264
+ /**
27265
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
27266
+ *
27267
+ * See `RuntimeStateDurability`. Enforced by
27268
+ * `scripts/check-runtime-state-durability.ts`.
27269
+ */
27270
+ durability: "restored",
27271
+ /** Clock fields: written, but excluded from the compare that decides
27272
+ * whether persisting is worth a SQLite commit. */
27273
+ volatileStateFields: ["lastFetchedAt"]
26777
27274
  };
26778
27275
  /**
26779
27276
  * Generic on/off switch cap for accessory children (siren, floodlight,
@@ -26819,6 +27316,16 @@ var switchCapability = {
26819
27316
  * not need to re-query the provider after a setState mutation.
26820
27317
  */
26821
27318
  runtimeState: SwitchStatusSchema,
27319
+ /**
27320
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
27321
+ *
27322
+ * See `RuntimeStateDurability`. Enforced by
27323
+ * `scripts/check-runtime-state-durability.ts`.
27324
+ */
27325
+ durability: "restored",
27326
+ /** Clock fields: written, but excluded from the compare that decides
27327
+ * whether persisting is worth a SQLite commit. */
27328
+ volatileStateFields: ["lastChangedAt"],
26822
27329
  settings: { bindings: [{
26823
27330
  kind: "scalar",
26824
27331
  statusPath: "on",
@@ -26898,7 +27405,17 @@ var tamperCapability = {
26898
27405
  schema: TamperStatusSchema,
26899
27406
  kind: "push"
26900
27407
  },
26901
- runtimeState: TamperStatusSchema
27408
+ runtimeState: TamperStatusSchema,
27409
+ /**
27410
+ * Runtime-state durability: **restored** — as `smoke`.
27411
+ *
27412
+ * See `RuntimeStateDurability`. Enforced by
27413
+ * `scripts/check-runtime-state-durability.ts`.
27414
+ */
27415
+ durability: "restored",
27416
+ /** Clock fields: written, but excluded from the compare that decides
27417
+ * whether persisting is worth a SQLite commit. */
27418
+ volatileStateFields: ["lastChangedAt"]
26902
27419
  };
26903
27420
  /**
26904
27421
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26943,7 +27460,17 @@ var temperatureSensorCapability = {
26943
27460
  schema: TemperatureSensorStatusSchema,
26944
27461
  kind: "push"
26945
27462
  },
26946
- runtimeState: TemperatureSensorStatusSchema
27463
+ runtimeState: TemperatureSensorStatusSchema,
27464
+ /**
27465
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
27466
+ *
27467
+ * See `RuntimeStateDurability`. Enforced by
27468
+ * `scripts/check-runtime-state-durability.ts`.
27469
+ */
27470
+ durability: "restored",
27471
+ /** Clock fields: written, but excluded from the compare that decides
27472
+ * whether persisting is worth a SQLite commit. */
27473
+ volatileStateFields: ["lastFetchedAt"]
26947
27474
  };
26948
27475
  /**
26949
27476
  * toast — system-scoped singleton capability that streams toast
@@ -27012,7 +27539,14 @@ var updateCapability = {
27012
27539
  schema: UpdateStatusSchema,
27013
27540
  kind: "poll"
27014
27541
  },
27015
- runtimeState: UpdateStatusSchema
27542
+ runtimeState: UpdateStatusSchema,
27543
+ /**
27544
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
27545
+ *
27546
+ * See `RuntimeStateDurability`. Enforced by
27547
+ * `scripts/check-runtime-state-durability.ts`.
27548
+ */
27549
+ durability: "session"
27016
27550
  };
27017
27551
  var UserSummarySchema = object({
27018
27552
  id: string(),
@@ -27346,7 +27880,14 @@ var vacuumControlCapability = {
27346
27880
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27347
27881
  * slice for live state + battery + fan-speed changes.
27348
27882
  */
27349
- runtimeState: VacuumControlStatusSchema
27883
+ runtimeState: VacuumControlStatusSchema,
27884
+ /**
27885
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27886
+ *
27887
+ * See `RuntimeStateDurability`. Enforced by
27888
+ * `scripts/check-runtime-state-durability.ts`.
27889
+ */
27890
+ durability: "session"
27350
27891
  };
27351
27892
  var ValveStatusSchema = object({
27352
27893
  /** Lifecycle state of the valve. */
@@ -27398,7 +27939,14 @@ var valveCapability = {
27398
27939
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27399
27940
  * slice for live position changes during a move.
27400
27941
  */
27401
- runtimeState: ValveStatusSchema
27942
+ runtimeState: ValveStatusSchema,
27943
+ /**
27944
+ * Runtime-state durability: **session** — as `brightness`.
27945
+ *
27946
+ * See `RuntimeStateDurability`. Enforced by
27947
+ * `scripts/check-runtime-state-durability.ts`.
27948
+ */
27949
+ durability: "session"
27402
27950
  };
27403
27951
  /**
27404
27952
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -27420,7 +27968,17 @@ var vibrationCapability = {
27420
27968
  schema: VibrationStatusSchema,
27421
27969
  kind: "push"
27422
27970
  },
27423
- runtimeState: VibrationStatusSchema
27971
+ runtimeState: VibrationStatusSchema,
27972
+ /**
27973
+ * Runtime-state durability: **restored** — as `smoke`.
27974
+ *
27975
+ * See `RuntimeStateDurability`. Enforced by
27976
+ * `scripts/check-runtime-state-durability.ts`.
27977
+ */
27978
+ durability: "restored",
27979
+ /** Clock fields: written, but excluded from the compare that decides
27980
+ * whether persisting is worth a SQLite commit. */
27981
+ volatileStateFields: ["lastChangedAt"]
27424
27982
  };
27425
27983
  /**
27426
27984
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -27494,7 +28052,14 @@ var waterHeaterCapability = {
27494
28052
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27495
28053
  * slice for live temperature / mode / away changes.
27496
28054
  */
27497
- runtimeState: WaterHeaterStatusSchema
28055
+ runtimeState: WaterHeaterStatusSchema,
28056
+ /**
28057
+ * Runtime-state durability: **session** — as `climate-control`.
28058
+ *
28059
+ * See `RuntimeStateDurability`. Enforced by
28060
+ * `scripts/check-runtime-state-durability.ts`.
28061
+ */
28062
+ durability: "session"
27498
28063
  };
27499
28064
  /**
27500
28065
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -27553,7 +28118,14 @@ var weatherCapability = {
27553
28118
  * Runtime-state slice — mirrored by the kernel. The UI reads the
27554
28119
  * current conditions directly from the slice on each weather push.
27555
28120
  */
27556
- runtimeState: WeatherStatusSchema
28121
+ runtimeState: WeatherStatusSchema,
28122
+ /**
28123
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
28124
+ *
28125
+ * See `RuntimeStateDurability`. Enforced by
28126
+ * `scripts/check-runtime-state-durability.ts`.
28127
+ */
28128
+ durability: "session"
27557
28129
  };
27558
28130
  /**
27559
28131
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -27715,7 +28287,14 @@ var zoneAnalyticsCapability = {
27715
28287
  * automatically; the explicit `getCurrentSnapshot` cap method is
27716
28288
  * still useful for one-off polls without a subscription.
27717
28289
  */
27718
- runtimeState: CameraOccupancySnapshotSchema
28290
+ runtimeState: CameraOccupancySnapshotSchema,
28291
+ /**
28292
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
28293
+ *
28294
+ * See `RuntimeStateDurability`. Enforced by
28295
+ * `scripts/check-runtime-state-durability.ts`.
28296
+ */
28297
+ durability: "session"
27719
28298
  };
27720
28299
  /**
27721
28300
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -27793,7 +28372,14 @@ var zoneRulesCapability = {
27793
28372
  motion: array(ZoneRuleSchema).readonly(),
27794
28373
  detection: array(ZoneRuleSchema).readonly(),
27795
28374
  package: array(ZoneRuleSchema).readonly()
27796
- })
28375
+ }),
28376
+ /**
28377
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
28378
+ *
28379
+ * See `RuntimeStateDurability`. Enforced by
28380
+ * `scripts/check-runtime-state-durability.ts`.
28381
+ */
28382
+ durability: "restored"
27797
28383
  };
27798
28384
  /**
27799
28385
  * Accessory device helpers — shared across drivers.
@@ -34480,6 +35066,7 @@ Object.freeze({
34480
35066
  "network-access": "ingress",
34481
35067
  "smtp-provider": "email"
34482
35068
  });
35069
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
34483
35070
  new Set(["devices", "classes"]);
34484
35071
  /**
34485
35072
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.