@camstack/addon-provider-amcrest 0.2.16 → 0.2.17

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
@@ -10751,7 +10751,14 @@ var cameraStreamsCapability = {
10751
10751
  low: string().optional()
10752
10752
  }),
10753
10753
  lastChangedAt: number()
10754
- })
10754
+ }),
10755
+ /**
10756
+ * 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.
10757
+ *
10758
+ * See `RuntimeStateDurability`. Enforced by
10759
+ * `scripts/check-runtime-state-durability.ts`.
10760
+ */
10761
+ durability: "session"
10755
10762
  };
10756
10763
  /** Where a block runs. The operator chooses — a block driving a device on an
10757
10764
  * agent is the reason placement is not fixed to the hub. */
@@ -11312,6 +11319,13 @@ var deviceDiscoveryCapability = {
11312
11319
  kind: "poll"
11313
11320
  },
11314
11321
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11322
+ /**
11323
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11324
+ *
11325
+ * See `RuntimeStateDurability`. Enforced by
11326
+ * `scripts/check-runtime-state-durability.ts`.
11327
+ */
11328
+ durability: "session",
11315
11329
  methods: {
11316
11330
  /**
11317
11331
  * Snapshot of the current `discovered` list. Returns the
@@ -13211,7 +13225,23 @@ var NotificationActionSchema = object({
13211
13225
  * else — see `notification-center/action-token.ts` for what that does and
13212
13226
  * does not buy.
13213
13227
  */
13214
- destructive: boolean().optional()
13228
+ destructive: boolean().optional(),
13229
+ /**
13230
+ * How the tap should REACH the url.
13231
+ *
13232
+ * `navigate` (absent, and every button authored before this field) opens it:
13233
+ * the phone leaves the notification and shows whatever the callback returns.
13234
+ * That is right for a button whose answer the operator wants to read.
13235
+ *
13236
+ * `background` fires it as a POST and stays put. It exists for the buttons
13237
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13238
+ * an answer to the notification, and being thrown into a browser tab to
13239
+ * confirm it costs more attention than the notification did. A backend that
13240
+ * cannot do a background call renders it as an ordinary link (the adapters
13241
+ * fall back rather than dropping the button), so this is a preference, never
13242
+ * a requirement.
13243
+ */
13244
+ mode: _enum(["navigate", "background"]).optional()
13215
13245
  });
13216
13246
  /**
13217
13247
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14063,7 +14093,17 @@ var alarmPanelCapability = {
14063
14093
  * full slice; renders an arm button per `availableModes` entry and
14064
14094
  * a PIN field iff `requiresCode === true`.
14065
14095
  */
14066
- runtimeState: AlarmPanelStatusSchema
14096
+ runtimeState: AlarmPanelStatusSchema,
14097
+ /**
14098
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14099
+ *
14100
+ * See `RuntimeStateDurability`. Enforced by
14101
+ * `scripts/check-runtime-state-durability.ts`.
14102
+ */
14103
+ durability: "restored",
14104
+ /** Clock fields: written, but excluded from the compare that decides
14105
+ * whether persisting is worth a SQLite commit. */
14106
+ volatileStateFields: ["lastChangedAt"]
14067
14107
  };
14068
14108
  /**
14069
14109
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14240,6 +14280,9 @@ var NcSystemEventConditionSchema = object({
14240
14280
  nodeIds: array(string().min(1)).min(1).optional(),
14241
14281
  packageNames: array(string().min(1)).min(1).optional()
14242
14282
  });
14283
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14284
+ * outage the operator asked for once and forgot. */
14285
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14243
14286
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14244
14287
  var NcScheduleSchema = object({
14245
14288
  windows: array(object({
@@ -14616,15 +14659,15 @@ var NcConditionsSchema = object({
14616
14659
  * (an `immediate` rule naming an `audio-*` class, one notification per
14617
14660
  * classified sample) stays exactly as it was for rules that already use it.
14618
14661
  *
14619
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14620
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14621
- * (`camstack/src/data/notification-center.ts`, guarded by
14622
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14662
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14663
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14664
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14665
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14623
14666
  * condition fields it does not know when a rule is saved from the phone.
14624
14667
  * Publishing an editor for a condition the app cannot round-trip is how an
14625
- * operator loses a rule's conditions by opening it — so the descriptor, the
14626
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14627
- * does an audio rule become authorable.
14668
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14669
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14670
+ * follows here.
14628
14671
  */
14629
14672
  audio: NcAudioConditionSchema.optional()
14630
14673
  });
@@ -14860,6 +14903,30 @@ var NcRuleInputSchema = object({
14860
14903
  */
14861
14904
  snoozeAllowGlobal: boolean().optional(),
14862
14905
  /**
14906
+ * The snooze durations THIS rule's notification offers as buttons, in
14907
+ * minutes.
14908
+ *
14909
+ * Three states, and all three are distinct — which is exactly why this is
14910
+ * `.optional()` and never `.default()`. A Zod default does not run on the
14911
+ * addon cap path (three production failures in one day), so a schema default
14912
+ * would collapse the first two:
14913
+ *
14914
+ * | value | meaning |
14915
+ * | --- | --- |
14916
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
14917
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
14918
+ * | a list | these choices, de-duplicated and sorted, at most four |
14919
+ *
14920
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
14921
+ * three buttons in total) and a rule that spent it all on snooze choices
14922
+ * would push its own tap-through actions off the notification.
14923
+ *
14924
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
14925
+ * that arms the panel, is exempt automatically and cannot be silenced by a
14926
+ * window from anywhere (D133).
14927
+ */
14928
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
14929
+ /**
14863
14930
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
14864
14931
  *
14865
14932
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -14959,6 +15026,7 @@ var NcConditionDescriptorSchema = object({
14959
15026
  "device",
14960
15027
  "package",
14961
15028
  "occupancy",
15029
+ "audio",
14962
15030
  "system"
14963
15031
  ]),
14964
15032
  label: string(),
@@ -14977,6 +15045,7 @@ var NcConditionDescriptorSchema = object({
14977
15045
  "crossingSelect",
14978
15046
  "polygonDraw",
14979
15047
  "occupancy",
15048
+ "audio",
14980
15049
  "deviceState",
14981
15050
  "systemEvent"
14982
15051
  ]),
@@ -15128,7 +15197,20 @@ var NcSnoozeInputSchema = object({
15128
15197
  ruleId: string().optional(),
15129
15198
  /** Required when `scope: 'device'`. */
15130
15199
  deviceId: number().int().optional(),
15131
- durationMinutes: number().int().min(1).max(1440),
15200
+ /**
15201
+ * Narrow the window to these subject classes — "the cat, not the person".
15202
+ *
15203
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15204
+ * what every window authored before this field meant, so no persisted row
15205
+ * changes meaning and no client has to learn anything to keep working.
15206
+ *
15207
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15208
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15209
+ * not at whichever of their four rules happened to produce the notification
15210
+ * they are dismissing.
15211
+ */
15212
+ classes: array(string().min(1)).min(1).optional(),
15213
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15132
15214
  /**
15133
15215
  * Silence this for EVERY recipient, not just the caller. Permission is
15134
15216
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15153,6 +15235,10 @@ var NcSnoozeSchema = object({
15153
15235
  scope: NcSnoozeScopeSchema,
15154
15236
  ruleId: string().optional(),
15155
15237
  deviceId: number().int().optional(),
15238
+ /** Subject classes this window covers. ABSENT = every class — see
15239
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15240
+ * no SQLite column: nothing queries a window by class. */
15241
+ classes: array(string().min(1)).min(1).optional(),
15156
15242
  startedAt: number(),
15157
15243
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15158
15244
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17253,7 +17339,14 @@ var zonesCapability = {
17253
17339
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
17254
17340
  * (e.g. zone groupings) can sit alongside the polygon list.
17255
17341
  */
17256
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
17342
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
17343
+ /**
17344
+ * 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.
17345
+ *
17346
+ * See `RuntimeStateDurability`. Enforced by
17347
+ * `scripts/check-runtime-state-durability.ts`.
17348
+ */
17349
+ durability: "restored"
17257
17350
  };
17258
17351
  /**
17259
17352
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -20147,7 +20240,17 @@ var airQualitySensorCapability = {
20147
20240
  schema: AirQualitySensorStatusSchema,
20148
20241
  kind: "push"
20149
20242
  },
20150
- runtimeState: AirQualitySensorStatusSchema
20243
+ runtimeState: AirQualitySensorStatusSchema,
20244
+ /**
20245
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20246
+ *
20247
+ * See `RuntimeStateDurability`. Enforced by
20248
+ * `scripts/check-runtime-state-durability.ts`.
20249
+ */
20250
+ durability: "restored",
20251
+ /** Clock fields: written, but excluded from the compare that decides
20252
+ * whether persisting is worth a SQLite commit. */
20253
+ volatileStateFields: ["lastFetchedAt"]
20151
20254
  };
20152
20255
  /**
20153
20256
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20179,7 +20282,17 @@ var ambientLightSensorCapability = {
20179
20282
  schema: AmbientLightSensorStatusSchema,
20180
20283
  kind: "push"
20181
20284
  },
20182
- runtimeState: AmbientLightSensorStatusSchema
20285
+ runtimeState: AmbientLightSensorStatusSchema,
20286
+ /**
20287
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20288
+ *
20289
+ * See `RuntimeStateDurability`. Enforced by
20290
+ * `scripts/check-runtime-state-durability.ts`.
20291
+ */
20292
+ durability: "restored",
20293
+ /** Clock fields: written, but excluded from the compare that decides
20294
+ * whether persisting is worth a SQLite commit. */
20295
+ volatileStateFields: ["lastFetchedAt"]
20183
20296
  };
20184
20297
  /**
20185
20298
  * Per-class audio metrics aggregated over a sliding window.
@@ -20297,7 +20410,14 @@ var audioMetricsCapability = {
20297
20410
  }), AudioMetricsHistorySchema)
20298
20411
  },
20299
20412
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
20300
- runtimeState: AudioMetricsSnapshotSchema
20413
+ runtimeState: AudioMetricsSnapshotSchema,
20414
+ /**
20415
+ * 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.
20416
+ *
20417
+ * See `RuntimeStateDurability`. Enforced by
20418
+ * `scripts/check-runtime-state-durability.ts`.
20419
+ */
20420
+ durability: "session"
20301
20421
  };
20302
20422
  /**
20303
20423
  * Automation-control cap. Models HA `automation.*` entities on
@@ -20359,7 +20479,14 @@ var automationControlCapability = {
20359
20479
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
20360
20480
  * (badge) directly.
20361
20481
  */
20362
- runtimeState: AutomationControlStatusSchema
20482
+ runtimeState: AutomationControlStatusSchema,
20483
+ /**
20484
+ * 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.
20485
+ *
20486
+ * See `RuntimeStateDurability`. Enforced by
20487
+ * `scripts/check-runtime-state-durability.ts`.
20488
+ */
20489
+ durability: "session"
20363
20490
  };
20364
20491
  /**
20365
20492
  * Battery status snapshot. Emitted by providers whose device is
@@ -20465,7 +20592,17 @@ onStatusChanged: { data: object({
20465
20592
  * via `device.runtimeState.getCapState('battery')` regardless of
20466
20593
  * the underlying driver.
20467
20594
  */
20468
- runtimeState: BatteryStatusSchema
20595
+ runtimeState: BatteryStatusSchema,
20596
+ /**
20597
+ * 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.
20598
+ *
20599
+ * See `RuntimeStateDurability`. Enforced by
20600
+ * `scripts/check-runtime-state-durability.ts`.
20601
+ */
20602
+ durability: "restored",
20603
+ /** Clock fields: written, but excluded from the compare that decides
20604
+ * whether persisting is worth a SQLite commit. */
20605
+ volatileStateFields: ["lastUpdated"]
20469
20606
  };
20470
20607
  /**
20471
20608
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -20494,7 +20631,17 @@ var binaryCapability = {
20494
20631
  schema: BinaryStatusSchema,
20495
20632
  kind: "push"
20496
20633
  },
20497
- runtimeState: BinaryStatusSchema
20634
+ runtimeState: BinaryStatusSchema,
20635
+ /**
20636
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
20637
+ *
20638
+ * See `RuntimeStateDurability`. Enforced by
20639
+ * `scripts/check-runtime-state-durability.ts`.
20640
+ */
20641
+ durability: "restored",
20642
+ /** Clock fields: written, but excluded from the compare that decides
20643
+ * whether persisting is worth a SQLite commit. */
20644
+ volatileStateFields: ["lastChangedAt"]
20498
20645
  };
20499
20646
  /**
20500
20647
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -20547,7 +20694,14 @@ onBrightnessChanged: { data: object({
20547
20694
  * by the kernel. Read via `device.state.brightness.value` so UI
20548
20695
  * sliders surface the current level without polling the provider.
20549
20696
  */
20550
- runtimeState: BrightnessStatusSchema
20697
+ runtimeState: BrightnessStatusSchema,
20698
+ /**
20699
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
20700
+ *
20701
+ * See `RuntimeStateDurability`. Enforced by
20702
+ * `scripts/check-runtime-state-durability.ts`.
20703
+ */
20704
+ durability: "session"
20551
20705
  };
20552
20706
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
20553
20707
  kind: "mutation",
@@ -20635,7 +20789,17 @@ var carbonMonoxideCapability = {
20635
20789
  schema: CarbonMonoxideStatusSchema,
20636
20790
  kind: "push"
20637
20791
  },
20638
- runtimeState: CarbonMonoxideStatusSchema
20792
+ runtimeState: CarbonMonoxideStatusSchema,
20793
+ /**
20794
+ * Runtime-state durability: **restored** — as `smoke`.
20795
+ *
20796
+ * See `RuntimeStateDurability`. Enforced by
20797
+ * `scripts/check-runtime-state-durability.ts`.
20798
+ */
20799
+ durability: "restored",
20800
+ /** Clock fields: written, but excluded from the compare that decides
20801
+ * whether persisting is worth a SQLite commit. */
20802
+ volatileStateFields: ["lastChangedAt"]
20639
20803
  };
20640
20804
  /**
20641
20805
  * HVAC / climate control cap. Models the full surface of a HA
@@ -20795,7 +20959,14 @@ var climateControlCapability = {
20795
20959
  * the full slice via `device.state.climate-control.value` and refresh
20796
20960
  * on every push without re-querying the provider.
20797
20961
  */
20798
- runtimeState: ClimateControlStatusSchema
20962
+ runtimeState: ClimateControlStatusSchema,
20963
+ /**
20964
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
20965
+ *
20966
+ * See `RuntimeStateDurability`. Enforced by
20967
+ * `scripts/check-runtime-state-durability.ts`.
20968
+ */
20969
+ durability: "session"
20799
20970
  };
20800
20971
  /**
20801
20972
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -20905,7 +21076,14 @@ onColorChanged: { data: object({
20905
21076
  * kernel. Read via `device.state.color.value` so UI pickers surface
20906
21077
  * the current chromaticity without polling the provider.
20907
21078
  */
20908
- runtimeState: ColorStatusSchema
21079
+ runtimeState: ColorStatusSchema,
21080
+ /**
21081
+ * Runtime-state durability: **session** — as `brightness`.
21082
+ *
21083
+ * See `RuntimeStateDurability`. Enforced by
21084
+ * `scripts/check-runtime-state-durability.ts`.
21085
+ */
21086
+ durability: "session"
20909
21087
  };
20910
21088
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
20911
21089
  object({
@@ -20963,7 +21141,17 @@ var connectivityCapability = {
20963
21141
  schema: ConnectivityStatusSchema,
20964
21142
  kind: "push"
20965
21143
  },
20966
- runtimeState: ConnectivityStatusSchema
21144
+ runtimeState: ConnectivityStatusSchema,
21145
+ /**
21146
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21147
+ *
21148
+ * See `RuntimeStateDurability`. Enforced by
21149
+ * `scripts/check-runtime-state-durability.ts`.
21150
+ */
21151
+ durability: "restored",
21152
+ /** Clock fields: written, but excluded from the compare that decides
21153
+ * whether persisting is worth a SQLite commit. */
21154
+ volatileStateFields: ["lastChangedAt"]
20967
21155
  };
20968
21156
  /**
20969
21157
  * Generic device-consumables capability — surfaces a device's
@@ -21045,7 +21233,14 @@ reset: method(object({
21045
21233
  }
21046
21234
  }
21047
21235
  },
21048
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
21236
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
21237
+ /**
21238
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
21239
+ *
21240
+ * See `RuntimeStateDurability`. Enforced by
21241
+ * `scripts/check-runtime-state-durability.ts`.
21242
+ */
21243
+ durability: "session"
21049
21244
  };
21050
21245
  /**
21051
21246
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21076,7 +21271,17 @@ var contactCapability = {
21076
21271
  schema: ContactStatusSchema,
21077
21272
  kind: "push"
21078
21273
  },
21079
- runtimeState: ContactStatusSchema
21274
+ runtimeState: ContactStatusSchema,
21275
+ /**
21276
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
21277
+ *
21278
+ * See `RuntimeStateDurability`. Enforced by
21279
+ * `scripts/check-runtime-state-durability.ts`.
21280
+ */
21281
+ durability: "restored",
21282
+ /** Clock fields: written, but excluded from the compare that decides
21283
+ * whether persisting is worth a SQLite commit. */
21284
+ volatileStateFields: ["lastChangedAt"]
21080
21285
  };
21081
21286
  /**
21082
21287
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21182,7 +21387,14 @@ var controlCapability = {
21182
21387
  * dropdown / text field / date picker) read the slice's discriminant
21183
21388
  * and value directly without polling the provider.
21184
21389
  */
21185
- runtimeState: ControlStatusSchema
21390
+ runtimeState: ControlStatusSchema,
21391
+ /**
21392
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
21393
+ *
21394
+ * See `RuntimeStateDurability`. Enforced by
21395
+ * `scripts/check-runtime-state-durability.ts`.
21396
+ */
21397
+ durability: "session"
21186
21398
  };
21187
21399
  var CoverStatusSchema = object({
21188
21400
  /** Lifecycle state of the cover. */
@@ -21243,7 +21455,17 @@ var coverCapability = {
21243
21455
  * Runtime-state slice — mirrored by the kernel. UI controls watch
21244
21456
  * the slice for live position changes during a move.
21245
21457
  */
21246
- runtimeState: CoverStatusSchema
21458
+ runtimeState: CoverStatusSchema,
21459
+ /**
21460
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
21461
+ *
21462
+ * See `RuntimeStateDurability`. Enforced by
21463
+ * `scripts/check-runtime-state-durability.ts`.
21464
+ */
21465
+ durability: "restored",
21466
+ /** Clock fields: written, but excluded from the compare that decides
21467
+ * whether persisting is worth a SQLite commit. */
21468
+ volatileStateFields: ["lastChangedAt"]
21247
21469
  };
21248
21470
  /**
21249
21471
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -21337,7 +21559,17 @@ var dayNightCapability = {
21337
21559
  schema: DayNightStatusSchema,
21338
21560
  kind: "poll"
21339
21561
  },
21340
- runtimeState: DayNightStatusSchema
21562
+ runtimeState: DayNightStatusSchema,
21563
+ /**
21564
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
21565
+ *
21566
+ * See `RuntimeStateDurability`. Enforced by
21567
+ * `scripts/check-runtime-state-durability.ts`.
21568
+ */
21569
+ durability: "restored",
21570
+ /** Clock fields: written, but excluded from the compare that decides
21571
+ * whether persisting is worth a SQLite commit. */
21572
+ volatileStateFields: ["lastFetchedAt"]
21341
21573
  };
21342
21574
  /**
21343
21575
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -21384,7 +21616,17 @@ onStatusChanged: { data: object({
21384
21616
  schema: DeviceStatusSchema,
21385
21617
  kind: "push"
21386
21618
  },
21387
- runtimeState: DeviceStatusSchema
21619
+ runtimeState: DeviceStatusSchema,
21620
+ /**
21621
+ * 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.
21622
+ *
21623
+ * See `RuntimeStateDurability`. Enforced by
21624
+ * `scripts/check-runtime-state-durability.ts`.
21625
+ */
21626
+ durability: "restored",
21627
+ /** Clock fields: written, but excluded from the compare that decides
21628
+ * whether persisting is worth a SQLite commit. */
21629
+ volatileStateFields: ["lastChangedAt"]
21388
21630
  };
21389
21631
  /**
21390
21632
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -21446,7 +21688,14 @@ onPressed: { data: DoorbellPressEventSchema } },
21446
21688
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
21447
21689
  * without subscribing.
21448
21690
  */
21449
- runtimeState: DoorbellStatusSchema
21691
+ runtimeState: DoorbellStatusSchema,
21692
+ /**
21693
+ * 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.
21694
+ *
21695
+ * See `RuntimeStateDurability`. Enforced by
21696
+ * `scripts/check-runtime-state-durability.ts`.
21697
+ */
21698
+ durability: "restored"
21450
21699
  };
21451
21700
  /**
21452
21701
  * Enum-state sensor — a string value picked from a finite option set.
@@ -21486,7 +21735,17 @@ var enumSensorCapability = {
21486
21735
  schema: EnumSensorStatusSchema,
21487
21736
  kind: "push"
21488
21737
  },
21489
- runtimeState: EnumSensorStatusSchema
21738
+ runtimeState: EnumSensorStatusSchema,
21739
+ /**
21740
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
21741
+ *
21742
+ * See `RuntimeStateDurability`. Enforced by
21743
+ * `scripts/check-runtime-state-durability.ts`.
21744
+ */
21745
+ durability: "restored",
21746
+ /** Clock fields: written, but excluded from the compare that decides
21747
+ * whether persisting is worth a SQLite commit. */
21748
+ volatileStateFields: ["lastFetchedAt"]
21490
21749
  };
21491
21750
  /**
21492
21751
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -21522,7 +21781,14 @@ var eventEmitterCapability = {
21522
21781
  schema: EventEmitterStatusSchema,
21523
21782
  kind: "push"
21524
21783
  },
21525
- runtimeState: EventEmitterStatusSchema
21784
+ runtimeState: EventEmitterStatusSchema,
21785
+ /**
21786
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
21787
+ *
21788
+ * See `RuntimeStateDurability`. Enforced by
21789
+ * `scripts/check-runtime-state-durability.ts`.
21790
+ */
21791
+ durability: "session"
21526
21792
  };
21527
21793
  var EventItemSchema = object({
21528
21794
  id: string(),
@@ -21803,7 +22069,14 @@ var fanControlCapability = {
21803
22069
  * Runtime-state slice — mirrored by the kernel. UI fan speed
21804
22070
  * sliders read `percentage` for live updates.
21805
22071
  */
21806
- runtimeState: FanControlStatusSchema
22072
+ runtimeState: FanControlStatusSchema,
22073
+ /**
22074
+ * Runtime-state durability: **session** — as `brightness`.
22075
+ *
22076
+ * See `RuntimeStateDurability`. Enforced by
22077
+ * `scripts/check-runtime-state-durability.ts`.
22078
+ */
22079
+ durability: "session"
21807
22080
  };
21808
22081
  /**
21809
22082
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -21879,7 +22152,14 @@ onProbeChanged: { data: object({
21879
22152
  schema: FeatureProbeStatusSchema,
21880
22153
  kind: "push"
21881
22154
  },
21882
- runtimeState: FeatureProbeStatusSchema
22155
+ runtimeState: FeatureProbeStatusSchema,
22156
+ /**
22157
+ * 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.
22158
+ *
22159
+ * See `RuntimeStateDurability`. Enforced by
22160
+ * `scripts/check-runtime-state-durability.ts`.
22161
+ */
22162
+ durability: "session"
21883
22163
  };
21884
22164
  /**
21885
22165
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -21906,7 +22186,17 @@ var floodCapability = {
21906
22186
  schema: FloodStatusSchema,
21907
22187
  kind: "push"
21908
22188
  },
21909
- runtimeState: FloodStatusSchema
22189
+ runtimeState: FloodStatusSchema,
22190
+ /**
22191
+ * Runtime-state durability: **restored** — as `smoke`.
22192
+ *
22193
+ * See `RuntimeStateDurability`. Enforced by
22194
+ * `scripts/check-runtime-state-durability.ts`.
22195
+ */
22196
+ durability: "restored",
22197
+ /** Clock fields: written, but excluded from the compare that decides
22198
+ * whether persisting is worth a SQLite commit. */
22199
+ volatileStateFields: ["lastChangedAt"]
21910
22200
  };
21911
22201
  /**
21912
22202
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -21929,7 +22219,17 @@ var gasCapability = {
21929
22219
  schema: GasStatusSchema,
21930
22220
  kind: "push"
21931
22221
  },
21932
- runtimeState: GasStatusSchema
22222
+ runtimeState: GasStatusSchema,
22223
+ /**
22224
+ * Runtime-state durability: **restored** — as `smoke`.
22225
+ *
22226
+ * See `RuntimeStateDurability`. Enforced by
22227
+ * `scripts/check-runtime-state-durability.ts`.
22228
+ */
22229
+ durability: "restored",
22230
+ /** Clock fields: written, but excluded from the compare that decides
22231
+ * whether persisting is worth a SQLite commit. */
22232
+ volatileStateFields: ["lastChangedAt"]
21933
22233
  };
21934
22234
  /**
21935
22235
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22005,7 +22305,14 @@ var humidifierCapability = {
22005
22305
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22006
22306
  * slice for live humidity / mode changes.
22007
22307
  */
22008
- runtimeState: HumidifierStatusSchema
22308
+ runtimeState: HumidifierStatusSchema,
22309
+ /**
22310
+ * Runtime-state durability: **session** — as `climate-control`.
22311
+ *
22312
+ * See `RuntimeStateDurability`. Enforced by
22313
+ * `scripts/check-runtime-state-durability.ts`.
22314
+ */
22315
+ durability: "session"
22009
22316
  };
22010
22317
  /**
22011
22318
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22041,7 +22348,17 @@ var humiditySensorCapability = {
22041
22348
  schema: HumiditySensorStatusSchema,
22042
22349
  kind: "push"
22043
22350
  },
22044
- runtimeState: HumiditySensorStatusSchema
22351
+ runtimeState: HumiditySensorStatusSchema,
22352
+ /**
22353
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
22354
+ *
22355
+ * See `RuntimeStateDurability`. Enforced by
22356
+ * `scripts/check-runtime-state-durability.ts`.
22357
+ */
22358
+ durability: "restored",
22359
+ /** Clock fields: written, but excluded from the compare that decides
22360
+ * whether persisting is worth a SQLite commit. */
22361
+ volatileStateFields: ["lastFetchedAt"]
22045
22362
  };
22046
22363
  /**
22047
22364
  * Image display cap. Models a single still image exposed by an integration —
@@ -22079,7 +22396,14 @@ var imageCapability = {
22079
22396
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22080
22397
  * directly and renders the still image.
22081
22398
  */
22082
- runtimeState: ImageStatusSchema
22399
+ runtimeState: ImageStatusSchema,
22400
+ /**
22401
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
22402
+ *
22403
+ * See `RuntimeStateDurability`. Enforced by
22404
+ * `scripts/check-runtime-state-durability.ts`.
22405
+ */
22406
+ durability: "session"
22083
22407
  };
22084
22408
  /**
22085
22409
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22228,7 +22552,17 @@ var imageSettingsCapability = {
22228
22552
  schema: ImageSettingsStatusSchema,
22229
22553
  kind: "poll"
22230
22554
  },
22231
- runtimeState: ImageSettingsStatusSchema
22555
+ runtimeState: ImageSettingsStatusSchema,
22556
+ /**
22557
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
22558
+ *
22559
+ * See `RuntimeStateDurability`. Enforced by
22560
+ * `scripts/check-runtime-state-durability.ts`.
22561
+ */
22562
+ durability: "restored",
22563
+ /** Clock fields: written, but excluded from the compare that decides
22564
+ * whether persisting is worth a SQLite commit. */
22565
+ volatileStateFields: ["lastFetchedAt"]
22232
22566
  };
22233
22567
  /**
22234
22568
  * integrations — system-scoped singleton capability for integration
@@ -22568,7 +22902,14 @@ var lawnMowerControlCapability = {
22568
22902
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22569
22903
  * slice for live activity + battery changes.
22570
22904
  */
22571
- runtimeState: LawnMowerControlStatusSchema
22905
+ runtimeState: LawnMowerControlStatusSchema,
22906
+ /**
22907
+ * Runtime-state durability: **session** — as `vacuum-control`.
22908
+ *
22909
+ * See `RuntimeStateDurability`. Enforced by
22910
+ * `scripts/check-runtime-state-durability.ts`.
22911
+ */
22912
+ durability: "session"
22572
22913
  };
22573
22914
  /**
22574
22915
  * local-network — hub-only singleton.
@@ -22774,7 +23115,17 @@ var lockControlCapability = {
22774
23115
  * read `state` and disable themselves during `locking`/`unlocking`
22775
23116
  * transitions.
22776
23117
  */
22777
- runtimeState: LockControlStatusSchema
23118
+ runtimeState: LockControlStatusSchema,
23119
+ /**
23120
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23121
+ *
23122
+ * See `RuntimeStateDurability`. Enforced by
23123
+ * `scripts/check-runtime-state-durability.ts`.
23124
+ */
23125
+ durability: "restored",
23126
+ /** Clock fields: written, but excluded from the compare that decides
23127
+ * whether persisting is worth a SQLite commit. */
23128
+ volatileStateFields: ["lastChangedAt"]
22778
23129
  };
22779
23130
  /**
22780
23131
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -22936,7 +23287,14 @@ var mediaPlayerCapability = {
22936
23287
  * full slice for live now-playing, volume, and progress updates
22937
23288
  * without polling.
22938
23289
  */
22939
- runtimeState: MediaPlayerStatusSchema
23290
+ runtimeState: MediaPlayerStatusSchema,
23291
+ /**
23292
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
23293
+ *
23294
+ * See `RuntimeStateDurability`. Enforced by
23295
+ * `scripts/check-runtime-state-durability.ts`.
23296
+ */
23297
+ durability: "session"
22940
23298
  };
22941
23299
  /**
22942
23300
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23200,7 +23558,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23200
23558
  * `device.state.motion.value`. Reads never invoke the provider, so
23201
23559
  * UIs and other addons can poll the cached state safely.
23202
23560
  */
23203
- runtimeState: MotionStatusSchema
23561
+ runtimeState: MotionStatusSchema,
23562
+ /**
23563
+ * 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.
23564
+ *
23565
+ * See `RuntimeStateDurability`. Enforced by
23566
+ * `scripts/check-runtime-state-durability.ts`.
23567
+ */
23568
+ durability: "session"
23204
23569
  };
23205
23570
  /**
23206
23571
  * Motion-trigger toggle for accessory devices.
@@ -23265,7 +23630,14 @@ var motionTriggerCapability = {
23265
23630
  schema: MotionTriggerStatusSchema,
23266
23631
  kind: "command-driven"
23267
23632
  },
23268
- runtimeState: MotionTriggerRuntimeStateSchema
23633
+ runtimeState: MotionTriggerRuntimeStateSchema,
23634
+ /**
23635
+ * 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.
23636
+ *
23637
+ * See `RuntimeStateDurability`. Enforced by
23638
+ * `scripts/check-runtime-state-durability.ts`.
23639
+ */
23640
+ durability: "session"
23269
23641
  };
23270
23642
  /**
23271
23643
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -23332,7 +23704,17 @@ var motionZonesCapability = {
23332
23704
  schema: MotionZoneStatusSchema,
23333
23705
  kind: "poll"
23334
23706
  },
23335
- runtimeState: MotionZoneStatusSchema
23707
+ runtimeState: MotionZoneStatusSchema,
23708
+ /**
23709
+ * 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.
23710
+ *
23711
+ * See `RuntimeStateDurability`. Enforced by
23712
+ * `scripts/check-runtime-state-durability.ts`.
23713
+ */
23714
+ durability: "restored",
23715
+ /** Clock fields: written, but excluded from the compare that decides
23716
+ * whether persisting is worth a SQLite commit. */
23717
+ volatileStateFields: ["lastFetchedAt"]
23336
23718
  };
23337
23719
  /**
23338
23720
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -23406,7 +23788,17 @@ var nativeObjectDetectionCapability = {
23406
23788
  schema: NativeObjectDetectionStatusSchema,
23407
23789
  kind: "push"
23408
23790
  },
23409
- runtimeState: NativeObjectDetectionRuntimeStateSchema
23791
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
23792
+ /**
23793
+ * 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.
23794
+ *
23795
+ * See `RuntimeStateDurability`. Enforced by
23796
+ * `scripts/check-runtime-state-durability.ts`.
23797
+ */
23798
+ durability: "restored",
23799
+ /** Clock fields: written, but excluded from the compare that decides
23800
+ * whether persisting is worth a SQLite commit. */
23801
+ volatileStateFields: ["lastFetchedAt"]
23410
23802
  };
23411
23803
  /**
23412
23804
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -23740,7 +24132,14 @@ onSent: { data: object({
23740
24132
  * form reads `supports` to gate optional fields; history pane reads
23741
24133
  * `lastSentAt` / `lastError` / `queueDepth`.
23742
24134
  */
23743
- runtimeState: NotifierStatusSchema
24135
+ runtimeState: NotifierStatusSchema,
24136
+ /**
24137
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24138
+ *
24139
+ * See `RuntimeStateDurability`. Enforced by
24140
+ * `scripts/check-runtime-state-durability.ts`.
24141
+ */
24142
+ durability: "session"
23744
24143
  };
23745
24144
  /**
23746
24145
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -23783,7 +24182,17 @@ var numericSensorCapability = {
23783
24182
  schema: NumericSensorStatusSchema,
23784
24183
  kind: "push"
23785
24184
  },
23786
- runtimeState: NumericSensorStatusSchema
24185
+ runtimeState: NumericSensorStatusSchema,
24186
+ /**
24187
+ * 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.
24188
+ *
24189
+ * See `RuntimeStateDurability`. Enforced by
24190
+ * `scripts/check-runtime-state-durability.ts`.
24191
+ */
24192
+ durability: "restored",
24193
+ /** Clock fields: written, but excluded from the compare that decides
24194
+ * whether persisting is worth a SQLite commit. */
24195
+ volatileStateFields: ["lastFetchedAt"]
23787
24196
  };
23788
24197
  /**
23789
24198
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24214,7 +24623,14 @@ var petFeederCapability = {
24214
24623
  * the full slice via `device.state.petFeeder.value` and refresh on
24215
24624
  * every poll without re-querying the provider.
24216
24625
  */
24217
- runtimeState: PetFeederStatusSchema
24626
+ runtimeState: PetFeederStatusSchema,
24627
+ /**
24628
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
24629
+ *
24630
+ * See `RuntimeStateDurability`. Enforced by
24631
+ * `scripts/check-runtime-state-durability.ts`.
24632
+ */
24633
+ durability: "session"
24218
24634
  };
24219
24635
  var VehicleSchema = object({
24220
24636
  id: string(),
@@ -24526,7 +24942,17 @@ var powerMeterCapability = {
24526
24942
  schema: PowerMeterStatusSchema,
24527
24943
  kind: "push"
24528
24944
  },
24529
- runtimeState: PowerMeterStatusSchema
24945
+ runtimeState: PowerMeterStatusSchema,
24946
+ /**
24947
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
24948
+ *
24949
+ * See `RuntimeStateDurability`. Enforced by
24950
+ * `scripts/check-runtime-state-durability.ts`.
24951
+ */
24952
+ durability: "restored",
24953
+ /** Clock fields: written, but excluded from the compare that decides
24954
+ * whether persisting is worth a SQLite commit. */
24955
+ volatileStateFields: ["lastFetchedAt"]
24530
24956
  };
24531
24957
  /**
24532
24958
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -24583,7 +25009,17 @@ var presenceCapability = {
24583
25009
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
24584
25010
  * pre-fetch fast-path check).
24585
25011
  */
24586
- runtimeState: PresenceStatusSchema
25012
+ runtimeState: PresenceStatusSchema,
25013
+ /**
25014
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25015
+ *
25016
+ * See `RuntimeStateDurability`. Enforced by
25017
+ * `scripts/check-runtime-state-durability.ts`.
25018
+ */
25019
+ durability: "restored",
25020
+ /** Clock fields: written, but excluded from the compare that decides
25021
+ * whether persisting is worth a SQLite commit. */
25022
+ volatileStateFields: ["lastChangedAt"]
24587
25023
  };
24588
25024
  /**
24589
25025
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -24619,7 +25055,17 @@ var pressureSensorCapability = {
24619
25055
  schema: PressureSensorStatusSchema,
24620
25056
  kind: "push"
24621
25057
  },
24622
- runtimeState: PressureSensorStatusSchema
25058
+ runtimeState: PressureSensorStatusSchema,
25059
+ /**
25060
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25061
+ *
25062
+ * See `RuntimeStateDurability`. Enforced by
25063
+ * `scripts/check-runtime-state-durability.ts`.
25064
+ */
25065
+ durability: "restored",
25066
+ /** Clock fields: written, but excluded from the compare that decides
25067
+ * whether persisting is worth a SQLite commit. */
25068
+ volatileStateFields: ["lastFetchedAt"]
24623
25069
  };
24624
25070
  /**
24625
25071
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -24749,7 +25195,17 @@ var privacyMaskCapability = {
24749
25195
  schema: PrivacyMaskStatusSchema,
24750
25196
  kind: "poll"
24751
25197
  },
24752
- runtimeState: PrivacyMaskStatusSchema
25198
+ runtimeState: PrivacyMaskStatusSchema,
25199
+ /**
25200
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25201
+ *
25202
+ * See `RuntimeStateDurability`. Enforced by
25203
+ * `scripts/check-runtime-state-durability.ts`.
25204
+ */
25205
+ durability: "restored",
25206
+ /** Clock fields: written, but excluded from the compare that decides
25207
+ * whether persisting is worth a SQLite commit. */
25208
+ volatileStateFields: ["lastFetchedAt"]
24753
25209
  };
24754
25210
  var PtzPresetSchema = object({
24755
25211
  id: string(),
@@ -24957,7 +25413,14 @@ var ptzAutotrackCapability = {
24957
25413
  * fetch / cache / fallback logic out of the four cap methods —
24958
25414
  * they become trampolines over `runtimeState`.
24959
25415
  */
24960
- runtimeState: PtzAutotrackRuntimeStateSchema
25416
+ runtimeState: PtzAutotrackRuntimeStateSchema,
25417
+ /**
25418
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
25419
+ *
25420
+ * See `RuntimeStateDurability`. Enforced by
25421
+ * `scripts/check-runtime-state-durability.ts`.
25422
+ */
25423
+ durability: "session"
24961
25424
  };
24962
25425
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
24963
25426
  kind: "mutation",
@@ -25607,7 +26070,14 @@ var sceneMonitorCapability = {
25607
26070
  schema: SceneMonitorStatusSchema,
25608
26071
  kind: "push"
25609
26072
  },
25610
- runtimeState: SceneMonitorStatusSchema
26073
+ runtimeState: SceneMonitorStatusSchema,
26074
+ /**
26075
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26076
+ *
26077
+ * See `RuntimeStateDurability`. Enforced by
26078
+ * `scripts/check-runtime-state-durability.ts`.
26079
+ */
26080
+ durability: "session"
25611
26081
  };
25612
26082
  /**
25613
26083
  * Per-stage gating mode applied to the zones a rule references.
@@ -25751,7 +26221,14 @@ var scriptRunnerCapability = {
25751
26221
  * `isRunning` to render a spinner during execution and surfaces
25752
26222
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
25753
26223
  */
25754
- runtimeState: ScriptRunnerStatusSchema
26224
+ runtimeState: ScriptRunnerStatusSchema,
26225
+ /**
26226
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26227
+ *
26228
+ * See `RuntimeStateDurability`. Enforced by
26229
+ * `scripts/check-runtime-state-durability.ts`.
26230
+ */
26231
+ durability: "session"
25755
26232
  };
25756
26233
  /**
25757
26234
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -25778,7 +26255,17 @@ var smokeCapability = {
25778
26255
  schema: SmokeStatusSchema,
25779
26256
  kind: "push"
25780
26257
  },
25781
- runtimeState: SmokeStatusSchema
26258
+ runtimeState: SmokeStatusSchema,
26259
+ /**
26260
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26261
+ *
26262
+ * See `RuntimeStateDurability`. Enforced by
26263
+ * `scripts/check-runtime-state-durability.ts`.
26264
+ */
26265
+ durability: "restored",
26266
+ /** Clock fields: written, but excluded from the compare that decides
26267
+ * whether persisting is worth a SQLite commit. */
26268
+ volatileStateFields: ["lastChangedAt"]
25782
26269
  };
25783
26270
  /**
25784
26271
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -25964,7 +26451,17 @@ var streamParamsCapability = {
25964
26451
  schema: StreamParamsStatusSchema,
25965
26452
  kind: "poll"
25966
26453
  },
25967
- runtimeState: StreamParamsStatusSchema
26454
+ runtimeState: StreamParamsStatusSchema,
26455
+ /**
26456
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
26457
+ *
26458
+ * See `RuntimeStateDurability`. Enforced by
26459
+ * `scripts/check-runtime-state-durability.ts`.
26460
+ */
26461
+ durability: "restored",
26462
+ /** Clock fields: written, but excluded from the compare that decides
26463
+ * whether persisting is worth a SQLite commit. */
26464
+ volatileStateFields: ["lastFetchedAt"]
25968
26465
  };
25969
26466
  /**
25970
26467
  * The three well-known stream profiles in render order. Exported so the
@@ -26208,6 +26705,16 @@ var switchCapability = {
26208
26705
  * not need to re-query the provider after a setState mutation.
26209
26706
  */
26210
26707
  runtimeState: SwitchStatusSchema,
26708
+ /**
26709
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
26710
+ *
26711
+ * See `RuntimeStateDurability`. Enforced by
26712
+ * `scripts/check-runtime-state-durability.ts`.
26713
+ */
26714
+ durability: "restored",
26715
+ /** Clock fields: written, but excluded from the compare that decides
26716
+ * whether persisting is worth a SQLite commit. */
26717
+ volatileStateFields: ["lastChangedAt"],
26211
26718
  settings: { bindings: [{
26212
26719
  kind: "scalar",
26213
26720
  statusPath: "on",
@@ -26287,7 +26794,17 @@ var tamperCapability = {
26287
26794
  schema: TamperStatusSchema,
26288
26795
  kind: "push"
26289
26796
  },
26290
- runtimeState: TamperStatusSchema
26797
+ runtimeState: TamperStatusSchema,
26798
+ /**
26799
+ * Runtime-state durability: **restored** — as `smoke`.
26800
+ *
26801
+ * See `RuntimeStateDurability`. Enforced by
26802
+ * `scripts/check-runtime-state-durability.ts`.
26803
+ */
26804
+ durability: "restored",
26805
+ /** Clock fields: written, but excluded from the compare that decides
26806
+ * whether persisting is worth a SQLite commit. */
26807
+ volatileStateFields: ["lastChangedAt"]
26291
26808
  };
26292
26809
  /**
26293
26810
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26332,7 +26849,17 @@ var temperatureSensorCapability = {
26332
26849
  schema: TemperatureSensorStatusSchema,
26333
26850
  kind: "push"
26334
26851
  },
26335
- runtimeState: TemperatureSensorStatusSchema
26852
+ runtimeState: TemperatureSensorStatusSchema,
26853
+ /**
26854
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
26855
+ *
26856
+ * See `RuntimeStateDurability`. Enforced by
26857
+ * `scripts/check-runtime-state-durability.ts`.
26858
+ */
26859
+ durability: "restored",
26860
+ /** Clock fields: written, but excluded from the compare that decides
26861
+ * whether persisting is worth a SQLite commit. */
26862
+ volatileStateFields: ["lastFetchedAt"]
26336
26863
  };
26337
26864
  /**
26338
26865
  * toast — system-scoped singleton capability that streams toast
@@ -26401,7 +26928,14 @@ var updateCapability = {
26401
26928
  schema: UpdateStatusSchema,
26402
26929
  kind: "poll"
26403
26930
  },
26404
- runtimeState: UpdateStatusSchema
26931
+ runtimeState: UpdateStatusSchema,
26932
+ /**
26933
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
26934
+ *
26935
+ * See `RuntimeStateDurability`. Enforced by
26936
+ * `scripts/check-runtime-state-durability.ts`.
26937
+ */
26938
+ durability: "session"
26405
26939
  };
26406
26940
  var UserSummarySchema = object({
26407
26941
  id: string(),
@@ -26735,7 +27269,14 @@ var vacuumControlCapability = {
26735
27269
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26736
27270
  * slice for live state + battery + fan-speed changes.
26737
27271
  */
26738
- runtimeState: VacuumControlStatusSchema
27272
+ runtimeState: VacuumControlStatusSchema,
27273
+ /**
27274
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27275
+ *
27276
+ * See `RuntimeStateDurability`. Enforced by
27277
+ * `scripts/check-runtime-state-durability.ts`.
27278
+ */
27279
+ durability: "session"
26739
27280
  };
26740
27281
  var ValveStatusSchema = object({
26741
27282
  /** Lifecycle state of the valve. */
@@ -26787,7 +27328,14 @@ var valveCapability = {
26787
27328
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26788
27329
  * slice for live position changes during a move.
26789
27330
  */
26790
- runtimeState: ValveStatusSchema
27331
+ runtimeState: ValveStatusSchema,
27332
+ /**
27333
+ * Runtime-state durability: **session** — as `brightness`.
27334
+ *
27335
+ * See `RuntimeStateDurability`. Enforced by
27336
+ * `scripts/check-runtime-state-durability.ts`.
27337
+ */
27338
+ durability: "session"
26791
27339
  };
26792
27340
  /**
26793
27341
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -26809,7 +27357,17 @@ var vibrationCapability = {
26809
27357
  schema: VibrationStatusSchema,
26810
27358
  kind: "push"
26811
27359
  },
26812
- runtimeState: VibrationStatusSchema
27360
+ runtimeState: VibrationStatusSchema,
27361
+ /**
27362
+ * Runtime-state durability: **restored** — as `smoke`.
27363
+ *
27364
+ * See `RuntimeStateDurability`. Enforced by
27365
+ * `scripts/check-runtime-state-durability.ts`.
27366
+ */
27367
+ durability: "restored",
27368
+ /** Clock fields: written, but excluded from the compare that decides
27369
+ * whether persisting is worth a SQLite commit. */
27370
+ volatileStateFields: ["lastChangedAt"]
26813
27371
  };
26814
27372
  /**
26815
27373
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -26883,7 +27441,14 @@ var waterHeaterCapability = {
26883
27441
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
26884
27442
  * slice for live temperature / mode / away changes.
26885
27443
  */
26886
- runtimeState: WaterHeaterStatusSchema
27444
+ runtimeState: WaterHeaterStatusSchema,
27445
+ /**
27446
+ * Runtime-state durability: **session** — as `climate-control`.
27447
+ *
27448
+ * See `RuntimeStateDurability`. Enforced by
27449
+ * `scripts/check-runtime-state-durability.ts`.
27450
+ */
27451
+ durability: "session"
26887
27452
  };
26888
27453
  /**
26889
27454
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -26942,7 +27507,14 @@ var weatherCapability = {
26942
27507
  * Runtime-state slice — mirrored by the kernel. The UI reads the
26943
27508
  * current conditions directly from the slice on each weather push.
26944
27509
  */
26945
- runtimeState: WeatherStatusSchema
27510
+ runtimeState: WeatherStatusSchema,
27511
+ /**
27512
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27513
+ *
27514
+ * See `RuntimeStateDurability`. Enforced by
27515
+ * `scripts/check-runtime-state-durability.ts`.
27516
+ */
27517
+ durability: "session"
26946
27518
  };
26947
27519
  /**
26948
27520
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -27104,7 +27676,14 @@ var zoneAnalyticsCapability = {
27104
27676
  * automatically; the explicit `getCurrentSnapshot` cap method is
27105
27677
  * still useful for one-off polls without a subscription.
27106
27678
  */
27107
- runtimeState: CameraOccupancySnapshotSchema
27679
+ runtimeState: CameraOccupancySnapshotSchema,
27680
+ /**
27681
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
27682
+ *
27683
+ * See `RuntimeStateDurability`. Enforced by
27684
+ * `scripts/check-runtime-state-durability.ts`.
27685
+ */
27686
+ durability: "session"
27108
27687
  };
27109
27688
  /**
27110
27689
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -27182,7 +27761,14 @@ var zoneRulesCapability = {
27182
27761
  motion: array(ZoneRuleSchema).readonly(),
27183
27762
  detection: array(ZoneRuleSchema).readonly(),
27184
27763
  package: array(ZoneRuleSchema).readonly()
27185
- })
27764
+ }),
27765
+ /**
27766
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
27767
+ *
27768
+ * See `RuntimeStateDurability`. Enforced by
27769
+ * `scripts/check-runtime-state-durability.ts`.
27770
+ */
27771
+ durability: "restored"
27186
27772
  };
27187
27773
  /**
27188
27774
  * Accessory device helpers — shared across drivers.
@@ -34000,6 +34586,7 @@ Object.freeze({
34000
34586
  "network-access": "ingress",
34001
34587
  "smtp-provider": "email"
34002
34588
  });
34589
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
34003
34590
  new Set(["devices", "classes"]);
34004
34591
  /**
34005
34592
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.