@camstack/addon-provider-hikvision 1.2.18 → 1.2.19

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
@@ -10928,7 +10928,14 @@ var cameraStreamsCapability = {
10928
10928
  low: string().optional()
10929
10929
  }),
10930
10930
  lastChangedAt: number()
10931
- })
10931
+ }),
10932
+ /**
10933
+ * 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.
10934
+ *
10935
+ * See `RuntimeStateDurability`. Enforced by
10936
+ * `scripts/check-runtime-state-durability.ts`.
10937
+ */
10938
+ durability: "session"
10932
10939
  };
10933
10940
  /** Where a block runs. The operator chooses — a block driving a device on an
10934
10941
  * agent is the reason placement is not fixed to the hub. */
@@ -11501,6 +11508,13 @@ var deviceDiscoveryCapability = {
11501
11508
  kind: "poll"
11502
11509
  },
11503
11510
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11511
+ /**
11512
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11513
+ *
11514
+ * See `RuntimeStateDurability`. Enforced by
11515
+ * `scripts/check-runtime-state-durability.ts`.
11516
+ */
11517
+ durability: "session",
11504
11518
  methods: {
11505
11519
  /**
11506
11520
  * Snapshot of the current `discovered` list. Returns the
@@ -13400,7 +13414,23 @@ var NotificationActionSchema = object({
13400
13414
  * else — see `notification-center/action-token.ts` for what that does and
13401
13415
  * does not buy.
13402
13416
  */
13403
- destructive: boolean().optional()
13417
+ destructive: boolean().optional(),
13418
+ /**
13419
+ * How the tap should REACH the url.
13420
+ *
13421
+ * `navigate` (absent, and every button authored before this field) opens it:
13422
+ * the phone leaves the notification and shows whatever the callback returns.
13423
+ * That is right for a button whose answer the operator wants to read.
13424
+ *
13425
+ * `background` fires it as a POST and stays put. It exists for the buttons
13426
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13427
+ * an answer to the notification, and being thrown into a browser tab to
13428
+ * confirm it costs more attention than the notification did. A backend that
13429
+ * cannot do a background call renders it as an ordinary link (the adapters
13430
+ * fall back rather than dropping the button), so this is a preference, never
13431
+ * a requirement.
13432
+ */
13433
+ mode: _enum(["navigate", "background"]).optional()
13404
13434
  });
13405
13435
  /**
13406
13436
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14252,7 +14282,17 @@ var alarmPanelCapability = {
14252
14282
  * full slice; renders an arm button per `availableModes` entry and
14253
14283
  * a PIN field iff `requiresCode === true`.
14254
14284
  */
14255
- runtimeState: AlarmPanelStatusSchema
14285
+ runtimeState: AlarmPanelStatusSchema,
14286
+ /**
14287
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14288
+ *
14289
+ * See `RuntimeStateDurability`. Enforced by
14290
+ * `scripts/check-runtime-state-durability.ts`.
14291
+ */
14292
+ durability: "restored",
14293
+ /** Clock fields: written, but excluded from the compare that decides
14294
+ * whether persisting is worth a SQLite commit. */
14295
+ volatileStateFields: ["lastChangedAt"]
14256
14296
  };
14257
14297
  /**
14258
14298
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14429,6 +14469,9 @@ var NcSystemEventConditionSchema = object({
14429
14469
  nodeIds: array(string().min(1)).min(1).optional(),
14430
14470
  packageNames: array(string().min(1)).min(1).optional()
14431
14471
  });
14472
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14473
+ * outage the operator asked for once and forgot. */
14474
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14432
14475
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14433
14476
  var NcScheduleSchema = object({
14434
14477
  windows: array(object({
@@ -14805,15 +14848,15 @@ var NcConditionsSchema = object({
14805
14848
  * (an `immediate` rule naming an `audio-*` class, one notification per
14806
14849
  * classified sample) stays exactly as it was for rules that already use it.
14807
14850
  *
14808
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14809
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14810
- * (`camstack/src/data/notification-center.ts`, guarded by
14811
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14851
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14852
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14853
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14854
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14812
14855
  * condition fields it does not know when a rule is saved from the phone.
14813
14856
  * Publishing an editor for a condition the app cannot round-trip is how an
14814
- * operator loses a rule's conditions by opening it — so the descriptor, the
14815
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14816
- * does an audio rule become authorable.
14857
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14858
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14859
+ * follows here.
14817
14860
  */
14818
14861
  audio: NcAudioConditionSchema.optional()
14819
14862
  });
@@ -15049,6 +15092,30 @@ var NcRuleInputSchema = object({
15049
15092
  */
15050
15093
  snoozeAllowGlobal: boolean().optional(),
15051
15094
  /**
15095
+ * The snooze durations THIS rule's notification offers as buttons, in
15096
+ * minutes.
15097
+ *
15098
+ * Three states, and all three are distinct — which is exactly why this is
15099
+ * `.optional()` and never `.default()`. A Zod default does not run on the
15100
+ * addon cap path (three production failures in one day), so a schema default
15101
+ * would collapse the first two:
15102
+ *
15103
+ * | value | meaning |
15104
+ * | --- | --- |
15105
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
15106
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
15107
+ * | a list | these choices, de-duplicated and sorted, at most four |
15108
+ *
15109
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
15110
+ * three buttons in total) and a rule that spent it all on snooze choices
15111
+ * would push its own tap-through actions off the notification.
15112
+ *
15113
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
15114
+ * that arms the panel, is exempt automatically and cannot be silenced by a
15115
+ * window from anywhere (D133).
15116
+ */
15117
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
15118
+ /**
15052
15119
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
15053
15120
  *
15054
15121
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -15148,6 +15215,7 @@ var NcConditionDescriptorSchema = object({
15148
15215
  "device",
15149
15216
  "package",
15150
15217
  "occupancy",
15218
+ "audio",
15151
15219
  "system"
15152
15220
  ]),
15153
15221
  label: string(),
@@ -15166,6 +15234,7 @@ var NcConditionDescriptorSchema = object({
15166
15234
  "crossingSelect",
15167
15235
  "polygonDraw",
15168
15236
  "occupancy",
15237
+ "audio",
15169
15238
  "deviceState",
15170
15239
  "systemEvent"
15171
15240
  ]),
@@ -15317,7 +15386,20 @@ var NcSnoozeInputSchema = object({
15317
15386
  ruleId: string().optional(),
15318
15387
  /** Required when `scope: 'device'`. */
15319
15388
  deviceId: number().int().optional(),
15320
- durationMinutes: number().int().min(1).max(1440),
15389
+ /**
15390
+ * Narrow the window to these subject classes — "the cat, not the person".
15391
+ *
15392
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15393
+ * what every window authored before this field meant, so no persisted row
15394
+ * changes meaning and no client has to learn anything to keep working.
15395
+ *
15396
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15397
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15398
+ * not at whichever of their four rules happened to produce the notification
15399
+ * they are dismissing.
15400
+ */
15401
+ classes: array(string().min(1)).min(1).optional(),
15402
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15321
15403
  /**
15322
15404
  * Silence this for EVERY recipient, not just the caller. Permission is
15323
15405
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15342,6 +15424,10 @@ var NcSnoozeSchema = object({
15342
15424
  scope: NcSnoozeScopeSchema,
15343
15425
  ruleId: string().optional(),
15344
15426
  deviceId: number().int().optional(),
15427
+ /** Subject classes this window covers. ABSENT = every class — see
15428
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15429
+ * no SQLite column: nothing queries a window by class. */
15430
+ classes: array(string().min(1)).min(1).optional(),
15345
15431
  startedAt: number(),
15346
15432
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15347
15433
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17442,7 +17528,14 @@ var zonesCapability = {
17442
17528
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
17443
17529
  * (e.g. zone groupings) can sit alongside the polygon list.
17444
17530
  */
17445
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
17531
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
17532
+ /**
17533
+ * 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.
17534
+ *
17535
+ * See `RuntimeStateDurability`. Enforced by
17536
+ * `scripts/check-runtime-state-durability.ts`.
17537
+ */
17538
+ durability: "restored"
17446
17539
  };
17447
17540
  /**
17448
17541
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -20336,7 +20429,17 @@ var airQualitySensorCapability = {
20336
20429
  schema: AirQualitySensorStatusSchema,
20337
20430
  kind: "push"
20338
20431
  },
20339
- runtimeState: AirQualitySensorStatusSchema
20432
+ runtimeState: AirQualitySensorStatusSchema,
20433
+ /**
20434
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20435
+ *
20436
+ * See `RuntimeStateDurability`. Enforced by
20437
+ * `scripts/check-runtime-state-durability.ts`.
20438
+ */
20439
+ durability: "restored",
20440
+ /** Clock fields: written, but excluded from the compare that decides
20441
+ * whether persisting is worth a SQLite commit. */
20442
+ volatileStateFields: ["lastFetchedAt"]
20340
20443
  };
20341
20444
  /**
20342
20445
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20368,7 +20471,17 @@ var ambientLightSensorCapability = {
20368
20471
  schema: AmbientLightSensorStatusSchema,
20369
20472
  kind: "push"
20370
20473
  },
20371
- runtimeState: AmbientLightSensorStatusSchema
20474
+ runtimeState: AmbientLightSensorStatusSchema,
20475
+ /**
20476
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20477
+ *
20478
+ * See `RuntimeStateDurability`. Enforced by
20479
+ * `scripts/check-runtime-state-durability.ts`.
20480
+ */
20481
+ durability: "restored",
20482
+ /** Clock fields: written, but excluded from the compare that decides
20483
+ * whether persisting is worth a SQLite commit. */
20484
+ volatileStateFields: ["lastFetchedAt"]
20372
20485
  };
20373
20486
  /**
20374
20487
  * Per-class audio metrics aggregated over a sliding window.
@@ -20486,7 +20599,14 @@ var audioMetricsCapability = {
20486
20599
  }), AudioMetricsHistorySchema)
20487
20600
  },
20488
20601
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
20489
- runtimeState: AudioMetricsSnapshotSchema
20602
+ runtimeState: AudioMetricsSnapshotSchema,
20603
+ /**
20604
+ * 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.
20605
+ *
20606
+ * See `RuntimeStateDurability`. Enforced by
20607
+ * `scripts/check-runtime-state-durability.ts`.
20608
+ */
20609
+ durability: "session"
20490
20610
  };
20491
20611
  /**
20492
20612
  * Automation-control cap. Models HA `automation.*` entities on
@@ -20548,7 +20668,14 @@ var automationControlCapability = {
20548
20668
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
20549
20669
  * (badge) directly.
20550
20670
  */
20551
- runtimeState: AutomationControlStatusSchema
20671
+ runtimeState: AutomationControlStatusSchema,
20672
+ /**
20673
+ * 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.
20674
+ *
20675
+ * See `RuntimeStateDurability`. Enforced by
20676
+ * `scripts/check-runtime-state-durability.ts`.
20677
+ */
20678
+ durability: "session"
20552
20679
  };
20553
20680
  /**
20554
20681
  * Battery status snapshot. Emitted by providers whose device is
@@ -20654,7 +20781,17 @@ onStatusChanged: { data: object({
20654
20781
  * via `device.runtimeState.getCapState('battery')` regardless of
20655
20782
  * the underlying driver.
20656
20783
  */
20657
- runtimeState: BatteryStatusSchema
20784
+ runtimeState: BatteryStatusSchema,
20785
+ /**
20786
+ * 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.
20787
+ *
20788
+ * See `RuntimeStateDurability`. Enforced by
20789
+ * `scripts/check-runtime-state-durability.ts`.
20790
+ */
20791
+ durability: "restored",
20792
+ /** Clock fields: written, but excluded from the compare that decides
20793
+ * whether persisting is worth a SQLite commit. */
20794
+ volatileStateFields: ["lastUpdated"]
20658
20795
  };
20659
20796
  /**
20660
20797
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -20683,7 +20820,17 @@ var binaryCapability = {
20683
20820
  schema: BinaryStatusSchema,
20684
20821
  kind: "push"
20685
20822
  },
20686
- runtimeState: BinaryStatusSchema
20823
+ runtimeState: BinaryStatusSchema,
20824
+ /**
20825
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
20826
+ *
20827
+ * See `RuntimeStateDurability`. Enforced by
20828
+ * `scripts/check-runtime-state-durability.ts`.
20829
+ */
20830
+ durability: "restored",
20831
+ /** Clock fields: written, but excluded from the compare that decides
20832
+ * whether persisting is worth a SQLite commit. */
20833
+ volatileStateFields: ["lastChangedAt"]
20687
20834
  };
20688
20835
  /**
20689
20836
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -20736,7 +20883,14 @@ onBrightnessChanged: { data: object({
20736
20883
  * by the kernel. Read via `device.state.brightness.value` so UI
20737
20884
  * sliders surface the current level without polling the provider.
20738
20885
  */
20739
- runtimeState: BrightnessStatusSchema
20886
+ runtimeState: BrightnessStatusSchema,
20887
+ /**
20888
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
20889
+ *
20890
+ * See `RuntimeStateDurability`. Enforced by
20891
+ * `scripts/check-runtime-state-durability.ts`.
20892
+ */
20893
+ durability: "session"
20740
20894
  };
20741
20895
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
20742
20896
  kind: "mutation",
@@ -20824,7 +20978,17 @@ var carbonMonoxideCapability = {
20824
20978
  schema: CarbonMonoxideStatusSchema,
20825
20979
  kind: "push"
20826
20980
  },
20827
- runtimeState: CarbonMonoxideStatusSchema
20981
+ runtimeState: CarbonMonoxideStatusSchema,
20982
+ /**
20983
+ * Runtime-state durability: **restored** — as `smoke`.
20984
+ *
20985
+ * See `RuntimeStateDurability`. Enforced by
20986
+ * `scripts/check-runtime-state-durability.ts`.
20987
+ */
20988
+ durability: "restored",
20989
+ /** Clock fields: written, but excluded from the compare that decides
20990
+ * whether persisting is worth a SQLite commit. */
20991
+ volatileStateFields: ["lastChangedAt"]
20828
20992
  };
20829
20993
  /**
20830
20994
  * HVAC / climate control cap. Models the full surface of a HA
@@ -20984,7 +21148,14 @@ var climateControlCapability = {
20984
21148
  * the full slice via `device.state.climate-control.value` and refresh
20985
21149
  * on every push without re-querying the provider.
20986
21150
  */
20987
- runtimeState: ClimateControlStatusSchema
21151
+ runtimeState: ClimateControlStatusSchema,
21152
+ /**
21153
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
21154
+ *
21155
+ * See `RuntimeStateDurability`. Enforced by
21156
+ * `scripts/check-runtime-state-durability.ts`.
21157
+ */
21158
+ durability: "session"
20988
21159
  };
20989
21160
  /**
20990
21161
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -21094,7 +21265,14 @@ onColorChanged: { data: object({
21094
21265
  * kernel. Read via `device.state.color.value` so UI pickers surface
21095
21266
  * the current chromaticity without polling the provider.
21096
21267
  */
21097
- runtimeState: ColorStatusSchema
21268
+ runtimeState: ColorStatusSchema,
21269
+ /**
21270
+ * Runtime-state durability: **session** — as `brightness`.
21271
+ *
21272
+ * See `RuntimeStateDurability`. Enforced by
21273
+ * `scripts/check-runtime-state-durability.ts`.
21274
+ */
21275
+ durability: "session"
21098
21276
  };
21099
21277
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
21100
21278
  object({
@@ -21152,7 +21330,17 @@ var connectivityCapability = {
21152
21330
  schema: ConnectivityStatusSchema,
21153
21331
  kind: "push"
21154
21332
  },
21155
- runtimeState: ConnectivityStatusSchema
21333
+ runtimeState: ConnectivityStatusSchema,
21334
+ /**
21335
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21336
+ *
21337
+ * See `RuntimeStateDurability`. Enforced by
21338
+ * `scripts/check-runtime-state-durability.ts`.
21339
+ */
21340
+ durability: "restored",
21341
+ /** Clock fields: written, but excluded from the compare that decides
21342
+ * whether persisting is worth a SQLite commit. */
21343
+ volatileStateFields: ["lastChangedAt"]
21156
21344
  };
21157
21345
  /**
21158
21346
  * Generic device-consumables capability — surfaces a device's
@@ -21234,7 +21422,14 @@ reset: method(object({
21234
21422
  }
21235
21423
  }
21236
21424
  },
21237
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
21425
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
21426
+ /**
21427
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
21428
+ *
21429
+ * See `RuntimeStateDurability`. Enforced by
21430
+ * `scripts/check-runtime-state-durability.ts`.
21431
+ */
21432
+ durability: "session"
21238
21433
  };
21239
21434
  /**
21240
21435
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21265,7 +21460,17 @@ var contactCapability = {
21265
21460
  schema: ContactStatusSchema,
21266
21461
  kind: "push"
21267
21462
  },
21268
- runtimeState: ContactStatusSchema
21463
+ runtimeState: ContactStatusSchema,
21464
+ /**
21465
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
21466
+ *
21467
+ * See `RuntimeStateDurability`. Enforced by
21468
+ * `scripts/check-runtime-state-durability.ts`.
21469
+ */
21470
+ durability: "restored",
21471
+ /** Clock fields: written, but excluded from the compare that decides
21472
+ * whether persisting is worth a SQLite commit. */
21473
+ volatileStateFields: ["lastChangedAt"]
21269
21474
  };
21270
21475
  /**
21271
21476
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21371,7 +21576,14 @@ var controlCapability = {
21371
21576
  * dropdown / text field / date picker) read the slice's discriminant
21372
21577
  * and value directly without polling the provider.
21373
21578
  */
21374
- runtimeState: ControlStatusSchema
21579
+ runtimeState: ControlStatusSchema,
21580
+ /**
21581
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
21582
+ *
21583
+ * See `RuntimeStateDurability`. Enforced by
21584
+ * `scripts/check-runtime-state-durability.ts`.
21585
+ */
21586
+ durability: "session"
21375
21587
  };
21376
21588
  var CoverStatusSchema = object({
21377
21589
  /** Lifecycle state of the cover. */
@@ -21432,7 +21644,17 @@ var coverCapability = {
21432
21644
  * Runtime-state slice — mirrored by the kernel. UI controls watch
21433
21645
  * the slice for live position changes during a move.
21434
21646
  */
21435
- runtimeState: CoverStatusSchema
21647
+ runtimeState: CoverStatusSchema,
21648
+ /**
21649
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
21650
+ *
21651
+ * See `RuntimeStateDurability`. Enforced by
21652
+ * `scripts/check-runtime-state-durability.ts`.
21653
+ */
21654
+ durability: "restored",
21655
+ /** Clock fields: written, but excluded from the compare that decides
21656
+ * whether persisting is worth a SQLite commit. */
21657
+ volatileStateFields: ["lastChangedAt"]
21436
21658
  };
21437
21659
  /**
21438
21660
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -21526,7 +21748,17 @@ var dayNightCapability = {
21526
21748
  schema: DayNightStatusSchema,
21527
21749
  kind: "poll"
21528
21750
  },
21529
- runtimeState: DayNightStatusSchema
21751
+ runtimeState: DayNightStatusSchema,
21752
+ /**
21753
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
21754
+ *
21755
+ * See `RuntimeStateDurability`. Enforced by
21756
+ * `scripts/check-runtime-state-durability.ts`.
21757
+ */
21758
+ durability: "restored",
21759
+ /** Clock fields: written, but excluded from the compare that decides
21760
+ * whether persisting is worth a SQLite commit. */
21761
+ volatileStateFields: ["lastFetchedAt"]
21530
21762
  };
21531
21763
  /**
21532
21764
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -21573,7 +21805,17 @@ onStatusChanged: { data: object({
21573
21805
  schema: DeviceStatusSchema,
21574
21806
  kind: "push"
21575
21807
  },
21576
- runtimeState: DeviceStatusSchema
21808
+ runtimeState: DeviceStatusSchema,
21809
+ /**
21810
+ * 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.
21811
+ *
21812
+ * See `RuntimeStateDurability`. Enforced by
21813
+ * `scripts/check-runtime-state-durability.ts`.
21814
+ */
21815
+ durability: "restored",
21816
+ /** Clock fields: written, but excluded from the compare that decides
21817
+ * whether persisting is worth a SQLite commit. */
21818
+ volatileStateFields: ["lastChangedAt"]
21577
21819
  };
21578
21820
  /**
21579
21821
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -21635,7 +21877,14 @@ onPressed: { data: DoorbellPressEventSchema } },
21635
21877
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
21636
21878
  * without subscribing.
21637
21879
  */
21638
- runtimeState: DoorbellStatusSchema
21880
+ runtimeState: DoorbellStatusSchema,
21881
+ /**
21882
+ * 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.
21883
+ *
21884
+ * See `RuntimeStateDurability`. Enforced by
21885
+ * `scripts/check-runtime-state-durability.ts`.
21886
+ */
21887
+ durability: "restored"
21639
21888
  };
21640
21889
  /**
21641
21890
  * Enum-state sensor — a string value picked from a finite option set.
@@ -21675,7 +21924,17 @@ var enumSensorCapability = {
21675
21924
  schema: EnumSensorStatusSchema,
21676
21925
  kind: "push"
21677
21926
  },
21678
- runtimeState: EnumSensorStatusSchema
21927
+ runtimeState: EnumSensorStatusSchema,
21928
+ /**
21929
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
21930
+ *
21931
+ * See `RuntimeStateDurability`. Enforced by
21932
+ * `scripts/check-runtime-state-durability.ts`.
21933
+ */
21934
+ durability: "restored",
21935
+ /** Clock fields: written, but excluded from the compare that decides
21936
+ * whether persisting is worth a SQLite commit. */
21937
+ volatileStateFields: ["lastFetchedAt"]
21679
21938
  };
21680
21939
  /**
21681
21940
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -21711,7 +21970,14 @@ var eventEmitterCapability = {
21711
21970
  schema: EventEmitterStatusSchema,
21712
21971
  kind: "push"
21713
21972
  },
21714
- runtimeState: EventEmitterStatusSchema
21973
+ runtimeState: EventEmitterStatusSchema,
21974
+ /**
21975
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
21976
+ *
21977
+ * See `RuntimeStateDurability`. Enforced by
21978
+ * `scripts/check-runtime-state-durability.ts`.
21979
+ */
21980
+ durability: "session"
21715
21981
  };
21716
21982
  var EventItemSchema = object({
21717
21983
  id: string(),
@@ -21992,7 +22258,14 @@ var fanControlCapability = {
21992
22258
  * Runtime-state slice — mirrored by the kernel. UI fan speed
21993
22259
  * sliders read `percentage` for live updates.
21994
22260
  */
21995
- runtimeState: FanControlStatusSchema
22261
+ runtimeState: FanControlStatusSchema,
22262
+ /**
22263
+ * Runtime-state durability: **session** — as `brightness`.
22264
+ *
22265
+ * See `RuntimeStateDurability`. Enforced by
22266
+ * `scripts/check-runtime-state-durability.ts`.
22267
+ */
22268
+ durability: "session"
21996
22269
  };
21997
22270
  /**
21998
22271
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -22068,7 +22341,14 @@ onProbeChanged: { data: object({
22068
22341
  schema: FeatureProbeStatusSchema,
22069
22342
  kind: "push"
22070
22343
  },
22071
- runtimeState: FeatureProbeStatusSchema
22344
+ runtimeState: FeatureProbeStatusSchema,
22345
+ /**
22346
+ * 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.
22347
+ *
22348
+ * See `RuntimeStateDurability`. Enforced by
22349
+ * `scripts/check-runtime-state-durability.ts`.
22350
+ */
22351
+ durability: "session"
22072
22352
  };
22073
22353
  /**
22074
22354
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -22095,7 +22375,17 @@ var floodCapability = {
22095
22375
  schema: FloodStatusSchema,
22096
22376
  kind: "push"
22097
22377
  },
22098
- runtimeState: FloodStatusSchema
22378
+ runtimeState: FloodStatusSchema,
22379
+ /**
22380
+ * Runtime-state durability: **restored** — as `smoke`.
22381
+ *
22382
+ * See `RuntimeStateDurability`. Enforced by
22383
+ * `scripts/check-runtime-state-durability.ts`.
22384
+ */
22385
+ durability: "restored",
22386
+ /** Clock fields: written, but excluded from the compare that decides
22387
+ * whether persisting is worth a SQLite commit. */
22388
+ volatileStateFields: ["lastChangedAt"]
22099
22389
  };
22100
22390
  /**
22101
22391
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -22118,7 +22408,17 @@ var gasCapability = {
22118
22408
  schema: GasStatusSchema,
22119
22409
  kind: "push"
22120
22410
  },
22121
- runtimeState: GasStatusSchema
22411
+ runtimeState: GasStatusSchema,
22412
+ /**
22413
+ * Runtime-state durability: **restored** — as `smoke`.
22414
+ *
22415
+ * See `RuntimeStateDurability`. Enforced by
22416
+ * `scripts/check-runtime-state-durability.ts`.
22417
+ */
22418
+ durability: "restored",
22419
+ /** Clock fields: written, but excluded from the compare that decides
22420
+ * whether persisting is worth a SQLite commit. */
22421
+ volatileStateFields: ["lastChangedAt"]
22122
22422
  };
22123
22423
  /**
22124
22424
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22194,7 +22494,14 @@ var humidifierCapability = {
22194
22494
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22195
22495
  * slice for live humidity / mode changes.
22196
22496
  */
22197
- runtimeState: HumidifierStatusSchema
22497
+ runtimeState: HumidifierStatusSchema,
22498
+ /**
22499
+ * Runtime-state durability: **session** — as `climate-control`.
22500
+ *
22501
+ * See `RuntimeStateDurability`. Enforced by
22502
+ * `scripts/check-runtime-state-durability.ts`.
22503
+ */
22504
+ durability: "session"
22198
22505
  };
22199
22506
  /**
22200
22507
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22230,7 +22537,17 @@ var humiditySensorCapability = {
22230
22537
  schema: HumiditySensorStatusSchema,
22231
22538
  kind: "push"
22232
22539
  },
22233
- runtimeState: HumiditySensorStatusSchema
22540
+ runtimeState: HumiditySensorStatusSchema,
22541
+ /**
22542
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
22543
+ *
22544
+ * See `RuntimeStateDurability`. Enforced by
22545
+ * `scripts/check-runtime-state-durability.ts`.
22546
+ */
22547
+ durability: "restored",
22548
+ /** Clock fields: written, but excluded from the compare that decides
22549
+ * whether persisting is worth a SQLite commit. */
22550
+ volatileStateFields: ["lastFetchedAt"]
22234
22551
  };
22235
22552
  /**
22236
22553
  * Image display cap. Models a single still image exposed by an integration —
@@ -22268,7 +22585,14 @@ var imageCapability = {
22268
22585
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22269
22586
  * directly and renders the still image.
22270
22587
  */
22271
- runtimeState: ImageStatusSchema
22588
+ runtimeState: ImageStatusSchema,
22589
+ /**
22590
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
22591
+ *
22592
+ * See `RuntimeStateDurability`. Enforced by
22593
+ * `scripts/check-runtime-state-durability.ts`.
22594
+ */
22595
+ durability: "session"
22272
22596
  };
22273
22597
  /**
22274
22598
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22417,7 +22741,17 @@ var imageSettingsCapability = {
22417
22741
  schema: ImageSettingsStatusSchema,
22418
22742
  kind: "poll"
22419
22743
  },
22420
- runtimeState: ImageSettingsStatusSchema
22744
+ runtimeState: ImageSettingsStatusSchema,
22745
+ /**
22746
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
22747
+ *
22748
+ * See `RuntimeStateDurability`. Enforced by
22749
+ * `scripts/check-runtime-state-durability.ts`.
22750
+ */
22751
+ durability: "restored",
22752
+ /** Clock fields: written, but excluded from the compare that decides
22753
+ * whether persisting is worth a SQLite commit. */
22754
+ volatileStateFields: ["lastFetchedAt"]
22421
22755
  };
22422
22756
  /**
22423
22757
  * integrations — system-scoped singleton capability for integration
@@ -22808,7 +23142,14 @@ var lawnMowerControlCapability = {
22808
23142
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22809
23143
  * slice for live activity + battery changes.
22810
23144
  */
22811
- runtimeState: LawnMowerControlStatusSchema
23145
+ runtimeState: LawnMowerControlStatusSchema,
23146
+ /**
23147
+ * Runtime-state durability: **session** — as `vacuum-control`.
23148
+ *
23149
+ * See `RuntimeStateDurability`. Enforced by
23150
+ * `scripts/check-runtime-state-durability.ts`.
23151
+ */
23152
+ durability: "session"
22812
23153
  };
22813
23154
  /**
22814
23155
  * local-network — hub-only singleton.
@@ -23014,7 +23355,17 @@ var lockControlCapability = {
23014
23355
  * read `state` and disable themselves during `locking`/`unlocking`
23015
23356
  * transitions.
23016
23357
  */
23017
- runtimeState: LockControlStatusSchema
23358
+ runtimeState: LockControlStatusSchema,
23359
+ /**
23360
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23361
+ *
23362
+ * See `RuntimeStateDurability`. Enforced by
23363
+ * `scripts/check-runtime-state-durability.ts`.
23364
+ */
23365
+ durability: "restored",
23366
+ /** Clock fields: written, but excluded from the compare that decides
23367
+ * whether persisting is worth a SQLite commit. */
23368
+ volatileStateFields: ["lastChangedAt"]
23018
23369
  };
23019
23370
  /**
23020
23371
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -23176,7 +23527,14 @@ var mediaPlayerCapability = {
23176
23527
  * full slice for live now-playing, volume, and progress updates
23177
23528
  * without polling.
23178
23529
  */
23179
- runtimeState: MediaPlayerStatusSchema
23530
+ runtimeState: MediaPlayerStatusSchema,
23531
+ /**
23532
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
23533
+ *
23534
+ * See `RuntimeStateDurability`. Enforced by
23535
+ * `scripts/check-runtime-state-durability.ts`.
23536
+ */
23537
+ durability: "session"
23180
23538
  };
23181
23539
  /**
23182
23540
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23440,7 +23798,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23440
23798
  * `device.state.motion.value`. Reads never invoke the provider, so
23441
23799
  * UIs and other addons can poll the cached state safely.
23442
23800
  */
23443
- runtimeState: MotionStatusSchema
23801
+ runtimeState: MotionStatusSchema,
23802
+ /**
23803
+ * 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.
23804
+ *
23805
+ * See `RuntimeStateDurability`. Enforced by
23806
+ * `scripts/check-runtime-state-durability.ts`.
23807
+ */
23808
+ durability: "session"
23444
23809
  };
23445
23810
  /**
23446
23811
  * Motion-trigger toggle for accessory devices.
@@ -23505,7 +23870,14 @@ var motionTriggerCapability = {
23505
23870
  schema: MotionTriggerStatusSchema,
23506
23871
  kind: "command-driven"
23507
23872
  },
23508
- runtimeState: MotionTriggerRuntimeStateSchema
23873
+ runtimeState: MotionTriggerRuntimeStateSchema,
23874
+ /**
23875
+ * 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.
23876
+ *
23877
+ * See `RuntimeStateDurability`. Enforced by
23878
+ * `scripts/check-runtime-state-durability.ts`.
23879
+ */
23880
+ durability: "session"
23509
23881
  };
23510
23882
  /**
23511
23883
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -23572,7 +23944,17 @@ var motionZonesCapability = {
23572
23944
  schema: MotionZoneStatusSchema,
23573
23945
  kind: "poll"
23574
23946
  },
23575
- runtimeState: MotionZoneStatusSchema
23947
+ runtimeState: MotionZoneStatusSchema,
23948
+ /**
23949
+ * 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.
23950
+ *
23951
+ * See `RuntimeStateDurability`. Enforced by
23952
+ * `scripts/check-runtime-state-durability.ts`.
23953
+ */
23954
+ durability: "restored",
23955
+ /** Clock fields: written, but excluded from the compare that decides
23956
+ * whether persisting is worth a SQLite commit. */
23957
+ volatileStateFields: ["lastFetchedAt"]
23576
23958
  };
23577
23959
  /**
23578
23960
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -23646,7 +24028,17 @@ var nativeObjectDetectionCapability = {
23646
24028
  schema: NativeObjectDetectionStatusSchema,
23647
24029
  kind: "push"
23648
24030
  },
23649
- runtimeState: NativeObjectDetectionRuntimeStateSchema
24031
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
24032
+ /**
24033
+ * 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.
24034
+ *
24035
+ * See `RuntimeStateDurability`. Enforced by
24036
+ * `scripts/check-runtime-state-durability.ts`.
24037
+ */
24038
+ durability: "restored",
24039
+ /** Clock fields: written, but excluded from the compare that decides
24040
+ * whether persisting is worth a SQLite commit. */
24041
+ volatileStateFields: ["lastFetchedAt"]
23650
24042
  };
23651
24043
  /**
23652
24044
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -23980,7 +24372,14 @@ onSent: { data: object({
23980
24372
  * form reads `supports` to gate optional fields; history pane reads
23981
24373
  * `lastSentAt` / `lastError` / `queueDepth`.
23982
24374
  */
23983
- runtimeState: NotifierStatusSchema
24375
+ runtimeState: NotifierStatusSchema,
24376
+ /**
24377
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24378
+ *
24379
+ * See `RuntimeStateDurability`. Enforced by
24380
+ * `scripts/check-runtime-state-durability.ts`.
24381
+ */
24382
+ durability: "session"
23984
24383
  };
23985
24384
  /**
23986
24385
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -24023,7 +24422,17 @@ var numericSensorCapability = {
24023
24422
  schema: NumericSensorStatusSchema,
24024
24423
  kind: "push"
24025
24424
  },
24026
- runtimeState: NumericSensorStatusSchema
24425
+ runtimeState: NumericSensorStatusSchema,
24426
+ /**
24427
+ * 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.
24428
+ *
24429
+ * See `RuntimeStateDurability`. Enforced by
24430
+ * `scripts/check-runtime-state-durability.ts`.
24431
+ */
24432
+ durability: "restored",
24433
+ /** Clock fields: written, but excluded from the compare that decides
24434
+ * whether persisting is worth a SQLite commit. */
24435
+ volatileStateFields: ["lastFetchedAt"]
24027
24436
  };
24028
24437
  /**
24029
24438
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24454,7 +24863,14 @@ var petFeederCapability = {
24454
24863
  * the full slice via `device.state.petFeeder.value` and refresh on
24455
24864
  * every poll without re-querying the provider.
24456
24865
  */
24457
- runtimeState: PetFeederStatusSchema
24866
+ runtimeState: PetFeederStatusSchema,
24867
+ /**
24868
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
24869
+ *
24870
+ * See `RuntimeStateDurability`. Enforced by
24871
+ * `scripts/check-runtime-state-durability.ts`.
24872
+ */
24873
+ durability: "session"
24458
24874
  };
24459
24875
  var VehicleSchema = object({
24460
24876
  id: string(),
@@ -24766,7 +25182,17 @@ var powerMeterCapability = {
24766
25182
  schema: PowerMeterStatusSchema,
24767
25183
  kind: "push"
24768
25184
  },
24769
- runtimeState: PowerMeterStatusSchema
25185
+ runtimeState: PowerMeterStatusSchema,
25186
+ /**
25187
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
25188
+ *
25189
+ * See `RuntimeStateDurability`. Enforced by
25190
+ * `scripts/check-runtime-state-durability.ts`.
25191
+ */
25192
+ durability: "restored",
25193
+ /** Clock fields: written, but excluded from the compare that decides
25194
+ * whether persisting is worth a SQLite commit. */
25195
+ volatileStateFields: ["lastFetchedAt"]
24770
25196
  };
24771
25197
  /**
24772
25198
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -24823,7 +25249,17 @@ var presenceCapability = {
24823
25249
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
24824
25250
  * pre-fetch fast-path check).
24825
25251
  */
24826
- runtimeState: PresenceStatusSchema
25252
+ runtimeState: PresenceStatusSchema,
25253
+ /**
25254
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25255
+ *
25256
+ * See `RuntimeStateDurability`. Enforced by
25257
+ * `scripts/check-runtime-state-durability.ts`.
25258
+ */
25259
+ durability: "restored",
25260
+ /** Clock fields: written, but excluded from the compare that decides
25261
+ * whether persisting is worth a SQLite commit. */
25262
+ volatileStateFields: ["lastChangedAt"]
24827
25263
  };
24828
25264
  /**
24829
25265
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -24859,7 +25295,17 @@ var pressureSensorCapability = {
24859
25295
  schema: PressureSensorStatusSchema,
24860
25296
  kind: "push"
24861
25297
  },
24862
- runtimeState: PressureSensorStatusSchema
25298
+ runtimeState: PressureSensorStatusSchema,
25299
+ /**
25300
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25301
+ *
25302
+ * See `RuntimeStateDurability`. Enforced by
25303
+ * `scripts/check-runtime-state-durability.ts`.
25304
+ */
25305
+ durability: "restored",
25306
+ /** Clock fields: written, but excluded from the compare that decides
25307
+ * whether persisting is worth a SQLite commit. */
25308
+ volatileStateFields: ["lastFetchedAt"]
24863
25309
  };
24864
25310
  /**
24865
25311
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -24989,7 +25435,17 @@ var privacyMaskCapability = {
24989
25435
  schema: PrivacyMaskStatusSchema,
24990
25436
  kind: "poll"
24991
25437
  },
24992
- runtimeState: PrivacyMaskStatusSchema
25438
+ runtimeState: PrivacyMaskStatusSchema,
25439
+ /**
25440
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25441
+ *
25442
+ * See `RuntimeStateDurability`. Enforced by
25443
+ * `scripts/check-runtime-state-durability.ts`.
25444
+ */
25445
+ durability: "restored",
25446
+ /** Clock fields: written, but excluded from the compare that decides
25447
+ * whether persisting is worth a SQLite commit. */
25448
+ volatileStateFields: ["lastFetchedAt"]
24993
25449
  };
24994
25450
  /**
24995
25451
  * Collapse a camera's PER-PROFILE audio flags into the one answer
@@ -25217,7 +25673,14 @@ var ptzAutotrackCapability = {
25217
25673
  * fetch / cache / fallback logic out of the four cap methods —
25218
25674
  * they become trampolines over `runtimeState`.
25219
25675
  */
25220
- runtimeState: PtzAutotrackRuntimeStateSchema
25676
+ runtimeState: PtzAutotrackRuntimeStateSchema,
25677
+ /**
25678
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
25679
+ *
25680
+ * See `RuntimeStateDurability`. Enforced by
25681
+ * `scripts/check-runtime-state-durability.ts`.
25682
+ */
25683
+ durability: "session"
25221
25684
  };
25222
25685
  /**
25223
25686
  * reboot — device-scoped capability for "soft" device reboots (firmware
@@ -25892,7 +26355,14 @@ var sceneMonitorCapability = {
25892
26355
  schema: SceneMonitorStatusSchema,
25893
26356
  kind: "push"
25894
26357
  },
25895
- runtimeState: SceneMonitorStatusSchema
26358
+ runtimeState: SceneMonitorStatusSchema,
26359
+ /**
26360
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26361
+ *
26362
+ * See `RuntimeStateDurability`. Enforced by
26363
+ * `scripts/check-runtime-state-durability.ts`.
26364
+ */
26365
+ durability: "session"
25896
26366
  };
25897
26367
  /**
25898
26368
  * Per-stage gating mode applied to the zones a rule references.
@@ -26036,7 +26506,14 @@ var scriptRunnerCapability = {
26036
26506
  * `isRunning` to render a spinner during execution and surfaces
26037
26507
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
26038
26508
  */
26039
- runtimeState: ScriptRunnerStatusSchema
26509
+ runtimeState: ScriptRunnerStatusSchema,
26510
+ /**
26511
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26512
+ *
26513
+ * See `RuntimeStateDurability`. Enforced by
26514
+ * `scripts/check-runtime-state-durability.ts`.
26515
+ */
26516
+ durability: "session"
26040
26517
  };
26041
26518
  /**
26042
26519
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -26063,7 +26540,17 @@ var smokeCapability = {
26063
26540
  schema: SmokeStatusSchema,
26064
26541
  kind: "push"
26065
26542
  },
26066
- runtimeState: SmokeStatusSchema
26543
+ runtimeState: SmokeStatusSchema,
26544
+ /**
26545
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26546
+ *
26547
+ * See `RuntimeStateDurability`. Enforced by
26548
+ * `scripts/check-runtime-state-durability.ts`.
26549
+ */
26550
+ durability: "restored",
26551
+ /** Clock fields: written, but excluded from the compare that decides
26552
+ * whether persisting is worth a SQLite commit. */
26553
+ volatileStateFields: ["lastChangedAt"]
26067
26554
  };
26068
26555
  /**
26069
26556
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -26249,7 +26736,17 @@ var streamParamsCapability = {
26249
26736
  schema: StreamParamsStatusSchema,
26250
26737
  kind: "poll"
26251
26738
  },
26252
- runtimeState: StreamParamsStatusSchema
26739
+ runtimeState: StreamParamsStatusSchema,
26740
+ /**
26741
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
26742
+ *
26743
+ * See `RuntimeStateDurability`. Enforced by
26744
+ * `scripts/check-runtime-state-durability.ts`.
26745
+ */
26746
+ durability: "restored",
26747
+ /** Clock fields: written, but excluded from the compare that decides
26748
+ * whether persisting is worth a SQLite commit. */
26749
+ volatileStateFields: ["lastFetchedAt"]
26253
26750
  };
26254
26751
  /**
26255
26752
  * The three well-known stream profiles in render order. Exported so the
@@ -26493,6 +26990,16 @@ var switchCapability = {
26493
26990
  * not need to re-query the provider after a setState mutation.
26494
26991
  */
26495
26992
  runtimeState: SwitchStatusSchema,
26993
+ /**
26994
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
26995
+ *
26996
+ * See `RuntimeStateDurability`. Enforced by
26997
+ * `scripts/check-runtime-state-durability.ts`.
26998
+ */
26999
+ durability: "restored",
27000
+ /** Clock fields: written, but excluded from the compare that decides
27001
+ * whether persisting is worth a SQLite commit. */
27002
+ volatileStateFields: ["lastChangedAt"],
26496
27003
  settings: { bindings: [{
26497
27004
  kind: "scalar",
26498
27005
  statusPath: "on",
@@ -26572,7 +27079,17 @@ var tamperCapability = {
26572
27079
  schema: TamperStatusSchema,
26573
27080
  kind: "push"
26574
27081
  },
26575
- runtimeState: TamperStatusSchema
27082
+ runtimeState: TamperStatusSchema,
27083
+ /**
27084
+ * Runtime-state durability: **restored** — as `smoke`.
27085
+ *
27086
+ * See `RuntimeStateDurability`. Enforced by
27087
+ * `scripts/check-runtime-state-durability.ts`.
27088
+ */
27089
+ durability: "restored",
27090
+ /** Clock fields: written, but excluded from the compare that decides
27091
+ * whether persisting is worth a SQLite commit. */
27092
+ volatileStateFields: ["lastChangedAt"]
26576
27093
  };
26577
27094
  /**
26578
27095
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26617,7 +27134,17 @@ var temperatureSensorCapability = {
26617
27134
  schema: TemperatureSensorStatusSchema,
26618
27135
  kind: "push"
26619
27136
  },
26620
- runtimeState: TemperatureSensorStatusSchema
27137
+ runtimeState: TemperatureSensorStatusSchema,
27138
+ /**
27139
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
27140
+ *
27141
+ * See `RuntimeStateDurability`. Enforced by
27142
+ * `scripts/check-runtime-state-durability.ts`.
27143
+ */
27144
+ durability: "restored",
27145
+ /** Clock fields: written, but excluded from the compare that decides
27146
+ * whether persisting is worth a SQLite commit. */
27147
+ volatileStateFields: ["lastFetchedAt"]
26621
27148
  };
26622
27149
  /**
26623
27150
  * toast — system-scoped singleton capability that streams toast
@@ -26686,7 +27213,14 @@ var updateCapability = {
26686
27213
  schema: UpdateStatusSchema,
26687
27214
  kind: "poll"
26688
27215
  },
26689
- runtimeState: UpdateStatusSchema
27216
+ runtimeState: UpdateStatusSchema,
27217
+ /**
27218
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
27219
+ *
27220
+ * See `RuntimeStateDurability`. Enforced by
27221
+ * `scripts/check-runtime-state-durability.ts`.
27222
+ */
27223
+ durability: "session"
26690
27224
  };
26691
27225
  var UserSummarySchema = object({
26692
27226
  id: string(),
@@ -27020,7 +27554,14 @@ var vacuumControlCapability = {
27020
27554
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27021
27555
  * slice for live state + battery + fan-speed changes.
27022
27556
  */
27023
- runtimeState: VacuumControlStatusSchema
27557
+ runtimeState: VacuumControlStatusSchema,
27558
+ /**
27559
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27560
+ *
27561
+ * See `RuntimeStateDurability`. Enforced by
27562
+ * `scripts/check-runtime-state-durability.ts`.
27563
+ */
27564
+ durability: "session"
27024
27565
  };
27025
27566
  var ValveStatusSchema = object({
27026
27567
  /** Lifecycle state of the valve. */
@@ -27072,7 +27613,14 @@ var valveCapability = {
27072
27613
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27073
27614
  * slice for live position changes during a move.
27074
27615
  */
27075
- runtimeState: ValveStatusSchema
27616
+ runtimeState: ValveStatusSchema,
27617
+ /**
27618
+ * Runtime-state durability: **session** — as `brightness`.
27619
+ *
27620
+ * See `RuntimeStateDurability`. Enforced by
27621
+ * `scripts/check-runtime-state-durability.ts`.
27622
+ */
27623
+ durability: "session"
27076
27624
  };
27077
27625
  /**
27078
27626
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -27094,7 +27642,17 @@ var vibrationCapability = {
27094
27642
  schema: VibrationStatusSchema,
27095
27643
  kind: "push"
27096
27644
  },
27097
- runtimeState: VibrationStatusSchema
27645
+ runtimeState: VibrationStatusSchema,
27646
+ /**
27647
+ * Runtime-state durability: **restored** — as `smoke`.
27648
+ *
27649
+ * See `RuntimeStateDurability`. Enforced by
27650
+ * `scripts/check-runtime-state-durability.ts`.
27651
+ */
27652
+ durability: "restored",
27653
+ /** Clock fields: written, but excluded from the compare that decides
27654
+ * whether persisting is worth a SQLite commit. */
27655
+ volatileStateFields: ["lastChangedAt"]
27098
27656
  };
27099
27657
  /**
27100
27658
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -27168,7 +27726,14 @@ var waterHeaterCapability = {
27168
27726
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27169
27727
  * slice for live temperature / mode / away changes.
27170
27728
  */
27171
- runtimeState: WaterHeaterStatusSchema
27729
+ runtimeState: WaterHeaterStatusSchema,
27730
+ /**
27731
+ * Runtime-state durability: **session** — as `climate-control`.
27732
+ *
27733
+ * See `RuntimeStateDurability`. Enforced by
27734
+ * `scripts/check-runtime-state-durability.ts`.
27735
+ */
27736
+ durability: "session"
27172
27737
  };
27173
27738
  /**
27174
27739
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -27227,7 +27792,14 @@ var weatherCapability = {
27227
27792
  * Runtime-state slice — mirrored by the kernel. The UI reads the
27228
27793
  * current conditions directly from the slice on each weather push.
27229
27794
  */
27230
- runtimeState: WeatherStatusSchema
27795
+ runtimeState: WeatherStatusSchema,
27796
+ /**
27797
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27798
+ *
27799
+ * See `RuntimeStateDurability`. Enforced by
27800
+ * `scripts/check-runtime-state-durability.ts`.
27801
+ */
27802
+ durability: "session"
27231
27803
  };
27232
27804
  /**
27233
27805
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -27389,7 +27961,14 @@ var zoneAnalyticsCapability = {
27389
27961
  * automatically; the explicit `getCurrentSnapshot` cap method is
27390
27962
  * still useful for one-off polls without a subscription.
27391
27963
  */
27392
- runtimeState: CameraOccupancySnapshotSchema
27964
+ runtimeState: CameraOccupancySnapshotSchema,
27965
+ /**
27966
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
27967
+ *
27968
+ * See `RuntimeStateDurability`. Enforced by
27969
+ * `scripts/check-runtime-state-durability.ts`.
27970
+ */
27971
+ durability: "session"
27393
27972
  };
27394
27973
  /**
27395
27974
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -27467,7 +28046,14 @@ var zoneRulesCapability = {
27467
28046
  motion: array(ZoneRuleSchema).readonly(),
27468
28047
  detection: array(ZoneRuleSchema).readonly(),
27469
28048
  package: array(ZoneRuleSchema).readonly()
27470
- })
28049
+ }),
28050
+ /**
28051
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
28052
+ *
28053
+ * See `RuntimeStateDurability`. Enforced by
28054
+ * `scripts/check-runtime-state-durability.ts`.
28055
+ */
28056
+ durability: "restored"
27471
28057
  };
27472
28058
  /**
27473
28059
  * Accessory device helpers — shared across drivers.
@@ -34300,6 +34886,7 @@ Object.freeze({
34300
34886
  "network-access": "ingress",
34301
34887
  "smtp-provider": "email"
34302
34888
  });
34889
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
34303
34890
  new Set(["devices", "classes"]);
34304
34891
  /**
34305
34892
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.