@camstack/addon-provider-reolink 1.2.24 → 1.2.26

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 +731 -76
  2. package/dist/addon.mjs +731 -76
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -10966,7 +10966,14 @@ var cameraStreamsCapability = {
10966
10966
  low: string().optional()
10967
10967
  }),
10968
10968
  lastChangedAt: number()
10969
- })
10969
+ }),
10970
+ /**
10971
+ * 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.
10972
+ *
10973
+ * See `RuntimeStateDurability`. Enforced by
10974
+ * `scripts/check-runtime-state-durability.ts`.
10975
+ */
10976
+ durability: "session"
10970
10977
  };
10971
10978
  /** Where a block runs. The operator chooses — a block driving a device on an
10972
10979
  * agent is the reason placement is not fixed to the hub. */
@@ -11539,6 +11546,13 @@ var deviceDiscoveryCapability = {
11539
11546
  kind: "poll"
11540
11547
  },
11541
11548
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11549
+ /**
11550
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11551
+ *
11552
+ * See `RuntimeStateDurability`. Enforced by
11553
+ * `scripts/check-runtime-state-durability.ts`.
11554
+ */
11555
+ durability: "session",
11542
11556
  methods: {
11543
11557
  /**
11544
11558
  * Snapshot of the current `discovered` list. Returns the
@@ -13408,11 +13422,33 @@ var NotificationFormatSchema = _enum([
13408
13422
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13409
13423
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13410
13424
  * differently.
13425
+ *
13426
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13427
+ *
13428
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13429
+ * the whole set onto its own renderer's vocabulary through a
13430
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13431
+ * fallback, so adding a member here fails every adapter's build until someone
13432
+ * decides its glyph, which is the only place that decision can be made
13433
+ * honestly.
13434
+ *
13435
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13436
+ * `disarm` straight through; iOS feeds that string to
13437
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13438
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13439
+ * mapping, and "the field is documented" is not "the value renders".
13440
+ *
13441
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13442
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13443
+ * so an addon that emits a token the running hub does not know does not lose an
13444
+ * icon — its whole `send` fails Zod validation and the notification never
13445
+ * arrives. Never emit a new token from an addon before the train carrying it.
13411
13446
  */
13412
13447
  var NotificationActionIconSchema = _enum([
13413
13448
  "acknowledge",
13414
13449
  "dismiss",
13415
13450
  "silence",
13451
+ "snooze",
13416
13452
  "view",
13417
13453
  "play",
13418
13454
  "open",
@@ -13420,9 +13456,13 @@ var NotificationActionIconSchema = _enum([
13420
13456
  "lock",
13421
13457
  "unlock",
13422
13458
  "arm",
13459
+ "arm-home",
13460
+ "arm-away",
13461
+ "arm-night",
13423
13462
  "disarm",
13424
13463
  "light",
13425
- "alert"
13464
+ "alert",
13465
+ "camera"
13426
13466
  ]);
13427
13467
  /** A single tap-through action button. */
13428
13468
  var NotificationActionSchema = object({
@@ -13438,7 +13478,23 @@ var NotificationActionSchema = object({
13438
13478
  * else — see `notification-center/action-token.ts` for what that does and
13439
13479
  * does not buy.
13440
13480
  */
13441
- destructive: boolean().optional()
13481
+ destructive: boolean().optional(),
13482
+ /**
13483
+ * How the tap should REACH the url.
13484
+ *
13485
+ * `navigate` (absent, and every button authored before this field) opens it:
13486
+ * the phone leaves the notification and shows whatever the callback returns.
13487
+ * That is right for a button whose answer the operator wants to read.
13488
+ *
13489
+ * `background` fires it as a POST and stays put. It exists for the buttons
13490
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13491
+ * an answer to the notification, and being thrown into a browser tab to
13492
+ * confirm it costs more attention than the notification did. A backend that
13493
+ * cannot do a background call renders it as an ordinary link (the adapters
13494
+ * fall back rather than dropping the button), so this is a preference, never
13495
+ * a requirement.
13496
+ */
13497
+ mode: _enum(["navigate", "background"]).optional()
13442
13498
  });
13443
13499
  /**
13444
13500
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -13606,6 +13662,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13606
13662
  targetId: string(),
13607
13663
  enabled: boolean()
13608
13664
  }), _void(), { kind: "mutation" });
13665
+ new Set([
13666
+ {
13667
+ id: "person",
13668
+ name: "Person"
13669
+ },
13670
+ {
13671
+ id: "vehicle",
13672
+ name: "Vehicle"
13673
+ },
13674
+ {
13675
+ id: "animal",
13676
+ name: "Animal"
13677
+ },
13678
+ {
13679
+ id: "package",
13680
+ name: "Package"
13681
+ }
13682
+ ].map((l) => l.id));
13609
13683
  var COCO_TO_MACRO = {
13610
13684
  mapping: {
13611
13685
  person: "person",
@@ -14290,7 +14364,17 @@ var alarmPanelCapability = {
14290
14364
  * full slice; renders an arm button per `availableModes` entry and
14291
14365
  * a PIN field iff `requiresCode === true`.
14292
14366
  */
14293
- runtimeState: AlarmPanelStatusSchema
14367
+ runtimeState: AlarmPanelStatusSchema,
14368
+ /**
14369
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14370
+ *
14371
+ * See `RuntimeStateDurability`. Enforced by
14372
+ * `scripts/check-runtime-state-durability.ts`.
14373
+ */
14374
+ durability: "restored",
14375
+ /** Clock fields: written, but excluded from the compare that decides
14376
+ * whether persisting is worth a SQLite commit. */
14377
+ volatileStateFields: ["lastChangedAt"]
14294
14378
  };
14295
14379
  /**
14296
14380
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14431,6 +14515,8 @@ var NcSystemEventKindSchema = _enum([
14431
14515
  "alarm-triggered",
14432
14516
  "alarm-armed",
14433
14517
  "alarm-disarmed",
14518
+ "alarm-arming",
14519
+ "alarm-arm-refused",
14434
14520
  "camera-online",
14435
14521
  "camera-offline",
14436
14522
  "camera-disabled",
@@ -14467,6 +14553,9 @@ var NcSystemEventConditionSchema = object({
14467
14553
  nodeIds: array(string().min(1)).min(1).optional(),
14468
14554
  packageNames: array(string().min(1)).min(1).optional()
14469
14555
  });
14556
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14557
+ * outage the operator asked for once and forgot. */
14558
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14470
14559
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14471
14560
  var NcScheduleSchema = object({
14472
14561
  windows: array(object({
@@ -14843,15 +14932,15 @@ var NcConditionsSchema = object({
14843
14932
  * (an `immediate` rule naming an `audio-*` class, one notification per
14844
14933
  * classified sample) stays exactly as it was for rules that already use it.
14845
14934
  *
14846
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14847
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14848
- * (`camstack/src/data/notification-center.ts`, guarded by
14849
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14935
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14936
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14937
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14938
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14850
14939
  * condition fields it does not know when a rule is saved from the phone.
14851
14940
  * Publishing an editor for a condition the app cannot round-trip is how an
14852
- * operator loses a rule's conditions by opening it — so the descriptor, the
14853
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14854
- * does an audio rule become authorable.
14941
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14942
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14943
+ * follows here.
14855
14944
  */
14856
14945
  audio: NcAudioConditionSchema.optional()
14857
14946
  });
@@ -15087,6 +15176,30 @@ var NcRuleInputSchema = object({
15087
15176
  */
15088
15177
  snoozeAllowGlobal: boolean().optional(),
15089
15178
  /**
15179
+ * The snooze durations THIS rule's notification offers as buttons, in
15180
+ * minutes.
15181
+ *
15182
+ * Three states, and all three are distinct — which is exactly why this is
15183
+ * `.optional()` and never `.default()`. A Zod default does not run on the
15184
+ * addon cap path (three production failures in one day), so a schema default
15185
+ * would collapse the first two:
15186
+ *
15187
+ * | value | meaning |
15188
+ * | --- | --- |
15189
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
15190
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
15191
+ * | a list | these choices, de-duplicated and sorted, at most four |
15192
+ *
15193
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
15194
+ * three buttons in total) and a rule that spent it all on snooze choices
15195
+ * would push its own tap-through actions off the notification.
15196
+ *
15197
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
15198
+ * that arms the panel, is exempt automatically and cannot be silenced by a
15199
+ * window from anywhere (D133).
15200
+ */
15201
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
15202
+ /**
15090
15203
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
15091
15204
  *
15092
15205
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -15186,6 +15299,7 @@ var NcConditionDescriptorSchema = object({
15186
15299
  "device",
15187
15300
  "package",
15188
15301
  "occupancy",
15302
+ "audio",
15189
15303
  "system"
15190
15304
  ]),
15191
15305
  label: string(),
@@ -15204,6 +15318,7 @@ var NcConditionDescriptorSchema = object({
15204
15318
  "crossingSelect",
15205
15319
  "polygonDraw",
15206
15320
  "occupancy",
15321
+ "audio",
15207
15322
  "deviceState",
15208
15323
  "systemEvent"
15209
15324
  ]),
@@ -15355,7 +15470,20 @@ var NcSnoozeInputSchema = object({
15355
15470
  ruleId: string().optional(),
15356
15471
  /** Required when `scope: 'device'`. */
15357
15472
  deviceId: number().int().optional(),
15358
- durationMinutes: number().int().min(1).max(1440),
15473
+ /**
15474
+ * Narrow the window to these subject classes — "the cat, not the person".
15475
+ *
15476
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15477
+ * what every window authored before this field meant, so no persisted row
15478
+ * changes meaning and no client has to learn anything to keep working.
15479
+ *
15480
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15481
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15482
+ * not at whichever of their four rules happened to produce the notification
15483
+ * they are dismissing.
15484
+ */
15485
+ classes: array(string().min(1)).min(1).optional(),
15486
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15359
15487
  /**
15360
15488
  * Silence this for EVERY recipient, not just the caller. Permission is
15361
15489
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15380,6 +15508,10 @@ var NcSnoozeSchema = object({
15380
15508
  scope: NcSnoozeScopeSchema,
15381
15509
  ruleId: string().optional(),
15382
15510
  deviceId: number().int().optional(),
15511
+ /** Subject classes this window covers. ABSENT = every class — see
15512
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15513
+ * no SQLite column: nothing queries a window by class. */
15514
+ classes: array(string().min(1)).min(1).optional(),
15383
15515
  startedAt: number(),
15384
15516
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15385
15517
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -17480,7 +17612,14 @@ var zonesCapability = {
17480
17612
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
17481
17613
  * (e.g. zone groupings) can sit alongside the polygon list.
17482
17614
  */
17483
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
17615
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
17616
+ /**
17617
+ * 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.
17618
+ *
17619
+ * See `RuntimeStateDurability`. Enforced by
17620
+ * `scripts/check-runtime-state-durability.ts`.
17621
+ */
17622
+ durability: "restored"
17484
17623
  };
17485
17624
  /**
17486
17625
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -17650,6 +17789,22 @@ var detectionFpsField = {
17650
17789
  default: 10,
17651
17790
  step: 1
17652
17791
  };
17792
+ /**
17793
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
17794
+ *
17795
+ * The recheck is now on by default (a parked car is invisible to occupancy
17796
+ * rules until the stationary registry has been rebuilt by motion, which after a
17797
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
17798
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
17799
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
17800
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
17801
+ *
17802
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
17803
+ * the host validates `attachCamera` against ITS copy of this schema, so a
17804
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
17805
+ * carrying the wider bound is installed everywhere. 300 is the widest value
17806
+ * that ships with an addon deploy.
17807
+ */
17653
17808
  var occupancyRecheckSecField = {
17654
17809
  min: 0,
17655
17810
  max: 300,
@@ -17851,15 +18006,21 @@ var RunnerCameraConfigSchema = object({
17851
18006
  */
17852
18007
  onboardMotionDrivesAnalyzer: boolean().default(true),
17853
18008
  /**
17854
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17855
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec`
17856
- * this is off by default because the recheck re-subscribes a detection session
17857
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17858
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18009
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18010
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17859
18011
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17860
18012
  * (and only render) when this is enabled.
18013
+ *
18014
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18015
+ * recheck re-subscribes a detection session every N seconds while `watching`
18016
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18017
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18018
+ * object is counted only while the stationary registry holds it, and the
18019
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18020
+ * to every occupancy rule until something moved in front of it. The churn is
18021
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
17861
18022
  */
17862
- occupancyRecheckEnabled: boolean().default(false),
18023
+ occupancyRecheckEnabled: boolean().default(true),
17863
18024
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17864
18025
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17865
18026
  /**
@@ -20374,7 +20535,17 @@ var airQualitySensorCapability = {
20374
20535
  schema: AirQualitySensorStatusSchema,
20375
20536
  kind: "push"
20376
20537
  },
20377
- runtimeState: AirQualitySensorStatusSchema
20538
+ runtimeState: AirQualitySensorStatusSchema,
20539
+ /**
20540
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20541
+ *
20542
+ * See `RuntimeStateDurability`. Enforced by
20543
+ * `scripts/check-runtime-state-durability.ts`.
20544
+ */
20545
+ durability: "restored",
20546
+ /** Clock fields: written, but excluded from the compare that decides
20547
+ * whether persisting is worth a SQLite commit. */
20548
+ volatileStateFields: ["lastFetchedAt"]
20378
20549
  };
20379
20550
  /**
20380
20551
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -20406,7 +20577,17 @@ var ambientLightSensorCapability = {
20406
20577
  schema: AmbientLightSensorStatusSchema,
20407
20578
  kind: "push"
20408
20579
  },
20409
- runtimeState: AmbientLightSensorStatusSchema
20580
+ runtimeState: AmbientLightSensorStatusSchema,
20581
+ /**
20582
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
20583
+ *
20584
+ * See `RuntimeStateDurability`. Enforced by
20585
+ * `scripts/check-runtime-state-durability.ts`.
20586
+ */
20587
+ durability: "restored",
20588
+ /** Clock fields: written, but excluded from the compare that decides
20589
+ * whether persisting is worth a SQLite commit. */
20590
+ volatileStateFields: ["lastFetchedAt"]
20410
20591
  };
20411
20592
  /**
20412
20593
  * Per-class audio metrics aggregated over a sliding window.
@@ -20524,7 +20705,14 @@ var audioMetricsCapability = {
20524
20705
  }), AudioMetricsHistorySchema)
20525
20706
  },
20526
20707
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
20527
- runtimeState: AudioMetricsSnapshotSchema
20708
+ runtimeState: AudioMetricsSnapshotSchema,
20709
+ /**
20710
+ * 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.
20711
+ *
20712
+ * See `RuntimeStateDurability`. Enforced by
20713
+ * `scripts/check-runtime-state-durability.ts`.
20714
+ */
20715
+ durability: "session"
20528
20716
  };
20529
20717
  /**
20530
20718
  * Automation-control cap. Models HA `automation.*` entities on
@@ -20586,7 +20774,14 @@ var automationControlCapability = {
20586
20774
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
20587
20775
  * (badge) directly.
20588
20776
  */
20589
- runtimeState: AutomationControlStatusSchema
20777
+ runtimeState: AutomationControlStatusSchema,
20778
+ /**
20779
+ * 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.
20780
+ *
20781
+ * See `RuntimeStateDurability`. Enforced by
20782
+ * `scripts/check-runtime-state-durability.ts`.
20783
+ */
20784
+ durability: "session"
20590
20785
  };
20591
20786
  /**
20592
20787
  * Battery status snapshot. Emitted by providers whose device is
@@ -20692,7 +20887,17 @@ onStatusChanged: { data: object({
20692
20887
  * via `device.runtimeState.getCapState('battery')` regardless of
20693
20888
  * the underlying driver.
20694
20889
  */
20695
- runtimeState: BatteryStatusSchema
20890
+ runtimeState: BatteryStatusSchema,
20891
+ /**
20892
+ * 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.
20893
+ *
20894
+ * See `RuntimeStateDurability`. Enforced by
20895
+ * `scripts/check-runtime-state-durability.ts`.
20896
+ */
20897
+ durability: "restored",
20898
+ /** Clock fields: written, but excluded from the compare that decides
20899
+ * whether persisting is worth a SQLite commit. */
20900
+ volatileStateFields: ["lastUpdated"]
20696
20901
  };
20697
20902
  /**
20698
20903
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -20721,7 +20926,17 @@ var binaryCapability = {
20721
20926
  schema: BinaryStatusSchema,
20722
20927
  kind: "push"
20723
20928
  },
20724
- runtimeState: BinaryStatusSchema
20929
+ runtimeState: BinaryStatusSchema,
20930
+ /**
20931
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
20932
+ *
20933
+ * See `RuntimeStateDurability`. Enforced by
20934
+ * `scripts/check-runtime-state-durability.ts`.
20935
+ */
20936
+ durability: "restored",
20937
+ /** Clock fields: written, but excluded from the compare that decides
20938
+ * whether persisting is worth a SQLite commit. */
20939
+ volatileStateFields: ["lastChangedAt"]
20725
20940
  };
20726
20941
  /**
20727
20942
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -20774,7 +20989,14 @@ onBrightnessChanged: { data: object({
20774
20989
  * by the kernel. Read via `device.state.brightness.value` so UI
20775
20990
  * sliders surface the current level without polling the provider.
20776
20991
  */
20777
- runtimeState: BrightnessStatusSchema
20992
+ runtimeState: BrightnessStatusSchema,
20993
+ /**
20994
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
20995
+ *
20996
+ * See `RuntimeStateDurability`. Enforced by
20997
+ * `scripts/check-runtime-state-durability.ts`.
20998
+ */
20999
+ durability: "session"
20778
21000
  };
20779
21001
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
20780
21002
  kind: "mutation",
@@ -20862,7 +21084,17 @@ var carbonMonoxideCapability = {
20862
21084
  schema: CarbonMonoxideStatusSchema,
20863
21085
  kind: "push"
20864
21086
  },
20865
- runtimeState: CarbonMonoxideStatusSchema
21087
+ runtimeState: CarbonMonoxideStatusSchema,
21088
+ /**
21089
+ * Runtime-state durability: **restored** — as `smoke`.
21090
+ *
21091
+ * See `RuntimeStateDurability`. Enforced by
21092
+ * `scripts/check-runtime-state-durability.ts`.
21093
+ */
21094
+ durability: "restored",
21095
+ /** Clock fields: written, but excluded from the compare that decides
21096
+ * whether persisting is worth a SQLite commit. */
21097
+ volatileStateFields: ["lastChangedAt"]
20866
21098
  };
20867
21099
  /**
20868
21100
  * HVAC / climate control cap. Models the full surface of a HA
@@ -21022,7 +21254,14 @@ var climateControlCapability = {
21022
21254
  * the full slice via `device.state.climate-control.value` and refresh
21023
21255
  * on every push without re-querying the provider.
21024
21256
  */
21025
- runtimeState: ClimateControlStatusSchema
21257
+ runtimeState: ClimateControlStatusSchema,
21258
+ /**
21259
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
21260
+ *
21261
+ * See `RuntimeStateDurability`. Enforced by
21262
+ * `scripts/check-runtime-state-durability.ts`.
21263
+ */
21264
+ durability: "session"
21026
21265
  };
21027
21266
  /**
21028
21267
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -21132,7 +21371,14 @@ onColorChanged: { data: object({
21132
21371
  * kernel. Read via `device.state.color.value` so UI pickers surface
21133
21372
  * the current chromaticity without polling the provider.
21134
21373
  */
21135
- runtimeState: ColorStatusSchema
21374
+ runtimeState: ColorStatusSchema,
21375
+ /**
21376
+ * Runtime-state durability: **session** — as `brightness`.
21377
+ *
21378
+ * See `RuntimeStateDurability`. Enforced by
21379
+ * `scripts/check-runtime-state-durability.ts`.
21380
+ */
21381
+ durability: "session"
21136
21382
  };
21137
21383
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
21138
21384
  object({
@@ -21190,7 +21436,17 @@ var connectivityCapability = {
21190
21436
  schema: ConnectivityStatusSchema,
21191
21437
  kind: "push"
21192
21438
  },
21193
- runtimeState: ConnectivityStatusSchema
21439
+ runtimeState: ConnectivityStatusSchema,
21440
+ /**
21441
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
21442
+ *
21443
+ * See `RuntimeStateDurability`. Enforced by
21444
+ * `scripts/check-runtime-state-durability.ts`.
21445
+ */
21446
+ durability: "restored",
21447
+ /** Clock fields: written, but excluded from the compare that decides
21448
+ * whether persisting is worth a SQLite commit. */
21449
+ volatileStateFields: ["lastChangedAt"]
21194
21450
  };
21195
21451
  /**
21196
21452
  * Generic device-consumables capability — surfaces a device's
@@ -21272,7 +21528,14 @@ reset: method(object({
21272
21528
  }
21273
21529
  }
21274
21530
  },
21275
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
21531
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
21532
+ /**
21533
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
21534
+ *
21535
+ * See `RuntimeStateDurability`. Enforced by
21536
+ * `scripts/check-runtime-state-durability.ts`.
21537
+ */
21538
+ durability: "session"
21276
21539
  };
21277
21540
  /**
21278
21541
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -21303,7 +21566,17 @@ var contactCapability = {
21303
21566
  schema: ContactStatusSchema,
21304
21567
  kind: "push"
21305
21568
  },
21306
- runtimeState: ContactStatusSchema
21569
+ runtimeState: ContactStatusSchema,
21570
+ /**
21571
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
21572
+ *
21573
+ * See `RuntimeStateDurability`. Enforced by
21574
+ * `scripts/check-runtime-state-durability.ts`.
21575
+ */
21576
+ durability: "restored",
21577
+ /** Clock fields: written, but excluded from the compare that decides
21578
+ * whether persisting is worth a SQLite commit. */
21579
+ volatileStateFields: ["lastChangedAt"]
21307
21580
  };
21308
21581
  /**
21309
21582
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -21409,7 +21682,14 @@ var controlCapability = {
21409
21682
  * dropdown / text field / date picker) read the slice's discriminant
21410
21683
  * and value directly without polling the provider.
21411
21684
  */
21412
- runtimeState: ControlStatusSchema
21685
+ runtimeState: ControlStatusSchema,
21686
+ /**
21687
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
21688
+ *
21689
+ * See `RuntimeStateDurability`. Enforced by
21690
+ * `scripts/check-runtime-state-durability.ts`.
21691
+ */
21692
+ durability: "session"
21413
21693
  };
21414
21694
  var CoverStatusSchema = object({
21415
21695
  /** Lifecycle state of the cover. */
@@ -21470,7 +21750,17 @@ var coverCapability = {
21470
21750
  * Runtime-state slice — mirrored by the kernel. UI controls watch
21471
21751
  * the slice for live position changes during a move.
21472
21752
  */
21473
- runtimeState: CoverStatusSchema
21753
+ runtimeState: CoverStatusSchema,
21754
+ /**
21755
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
21756
+ *
21757
+ * See `RuntimeStateDurability`. Enforced by
21758
+ * `scripts/check-runtime-state-durability.ts`.
21759
+ */
21760
+ durability: "restored",
21761
+ /** Clock fields: written, but excluded from the compare that decides
21762
+ * whether persisting is worth a SQLite commit. */
21763
+ volatileStateFields: ["lastChangedAt"]
21474
21764
  };
21475
21765
  /**
21476
21766
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -21564,7 +21854,17 @@ var dayNightCapability = {
21564
21854
  schema: DayNightStatusSchema,
21565
21855
  kind: "poll"
21566
21856
  },
21567
- runtimeState: DayNightStatusSchema
21857
+ runtimeState: DayNightStatusSchema,
21858
+ /**
21859
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
21860
+ *
21861
+ * See `RuntimeStateDurability`. Enforced by
21862
+ * `scripts/check-runtime-state-durability.ts`.
21863
+ */
21864
+ durability: "restored",
21865
+ /** Clock fields: written, but excluded from the compare that decides
21866
+ * whether persisting is worth a SQLite commit. */
21867
+ volatileStateFields: ["lastFetchedAt"]
21568
21868
  };
21569
21869
  /**
21570
21870
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -21611,7 +21911,17 @@ onStatusChanged: { data: object({
21611
21911
  schema: DeviceStatusSchema,
21612
21912
  kind: "push"
21613
21913
  },
21614
- runtimeState: DeviceStatusSchema
21914
+ runtimeState: DeviceStatusSchema,
21915
+ /**
21916
+ * 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.
21917
+ *
21918
+ * See `RuntimeStateDurability`. Enforced by
21919
+ * `scripts/check-runtime-state-durability.ts`.
21920
+ */
21921
+ durability: "restored",
21922
+ /** Clock fields: written, but excluded from the compare that decides
21923
+ * whether persisting is worth a SQLite commit. */
21924
+ volatileStateFields: ["lastChangedAt"]
21615
21925
  };
21616
21926
  /**
21617
21927
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -21673,7 +21983,14 @@ onPressed: { data: DoorbellPressEventSchema } },
21673
21983
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
21674
21984
  * without subscribing.
21675
21985
  */
21676
- runtimeState: DoorbellStatusSchema
21986
+ runtimeState: DoorbellStatusSchema,
21987
+ /**
21988
+ * 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.
21989
+ *
21990
+ * See `RuntimeStateDurability`. Enforced by
21991
+ * `scripts/check-runtime-state-durability.ts`.
21992
+ */
21993
+ durability: "restored"
21677
21994
  };
21678
21995
  /**
21679
21996
  * Enum-state sensor — a string value picked from a finite option set.
@@ -21713,7 +22030,17 @@ var enumSensorCapability = {
21713
22030
  schema: EnumSensorStatusSchema,
21714
22031
  kind: "push"
21715
22032
  },
21716
- runtimeState: EnumSensorStatusSchema
22033
+ runtimeState: EnumSensorStatusSchema,
22034
+ /**
22035
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
22036
+ *
22037
+ * See `RuntimeStateDurability`. Enforced by
22038
+ * `scripts/check-runtime-state-durability.ts`.
22039
+ */
22040
+ durability: "restored",
22041
+ /** Clock fields: written, but excluded from the compare that decides
22042
+ * whether persisting is worth a SQLite commit. */
22043
+ volatileStateFields: ["lastFetchedAt"]
21717
22044
  };
21718
22045
  /**
21719
22046
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -21749,7 +22076,14 @@ var eventEmitterCapability = {
21749
22076
  schema: EventEmitterStatusSchema,
21750
22077
  kind: "push"
21751
22078
  },
21752
- runtimeState: EventEmitterStatusSchema
22079
+ runtimeState: EventEmitterStatusSchema,
22080
+ /**
22081
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
22082
+ *
22083
+ * See `RuntimeStateDurability`. Enforced by
22084
+ * `scripts/check-runtime-state-durability.ts`.
22085
+ */
22086
+ durability: "session"
21753
22087
  };
21754
22088
  var EventItemSchema = object({
21755
22089
  id: string(),
@@ -22030,7 +22364,14 @@ var fanControlCapability = {
22030
22364
  * Runtime-state slice — mirrored by the kernel. UI fan speed
22031
22365
  * sliders read `percentage` for live updates.
22032
22366
  */
22033
- runtimeState: FanControlStatusSchema
22367
+ runtimeState: FanControlStatusSchema,
22368
+ /**
22369
+ * Runtime-state durability: **session** — as `brightness`.
22370
+ *
22371
+ * See `RuntimeStateDurability`. Enforced by
22372
+ * `scripts/check-runtime-state-durability.ts`.
22373
+ */
22374
+ durability: "session"
22034
22375
  };
22035
22376
  /**
22036
22377
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -22106,7 +22447,14 @@ onProbeChanged: { data: object({
22106
22447
  schema: FeatureProbeStatusSchema,
22107
22448
  kind: "push"
22108
22449
  },
22109
- runtimeState: FeatureProbeStatusSchema
22450
+ runtimeState: FeatureProbeStatusSchema,
22451
+ /**
22452
+ * 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.
22453
+ *
22454
+ * See `RuntimeStateDurability`. Enforced by
22455
+ * `scripts/check-runtime-state-durability.ts`.
22456
+ */
22457
+ durability: "session"
22110
22458
  };
22111
22459
  /**
22112
22460
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -22133,7 +22481,17 @@ var floodCapability = {
22133
22481
  schema: FloodStatusSchema,
22134
22482
  kind: "push"
22135
22483
  },
22136
- runtimeState: FloodStatusSchema
22484
+ runtimeState: FloodStatusSchema,
22485
+ /**
22486
+ * Runtime-state durability: **restored** — as `smoke`.
22487
+ *
22488
+ * See `RuntimeStateDurability`. Enforced by
22489
+ * `scripts/check-runtime-state-durability.ts`.
22490
+ */
22491
+ durability: "restored",
22492
+ /** Clock fields: written, but excluded from the compare that decides
22493
+ * whether persisting is worth a SQLite commit. */
22494
+ volatileStateFields: ["lastChangedAt"]
22137
22495
  };
22138
22496
  /**
22139
22497
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -22156,7 +22514,17 @@ var gasCapability = {
22156
22514
  schema: GasStatusSchema,
22157
22515
  kind: "push"
22158
22516
  },
22159
- runtimeState: GasStatusSchema
22517
+ runtimeState: GasStatusSchema,
22518
+ /**
22519
+ * Runtime-state durability: **restored** — as `smoke`.
22520
+ *
22521
+ * See `RuntimeStateDurability`. Enforced by
22522
+ * `scripts/check-runtime-state-durability.ts`.
22523
+ */
22524
+ durability: "restored",
22525
+ /** Clock fields: written, but excluded from the compare that decides
22526
+ * whether persisting is worth a SQLite commit. */
22527
+ volatileStateFields: ["lastChangedAt"]
22160
22528
  };
22161
22529
  /**
22162
22530
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -22232,7 +22600,14 @@ var humidifierCapability = {
22232
22600
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22233
22601
  * slice for live humidity / mode changes.
22234
22602
  */
22235
- runtimeState: HumidifierStatusSchema
22603
+ runtimeState: HumidifierStatusSchema,
22604
+ /**
22605
+ * Runtime-state durability: **session** — as `climate-control`.
22606
+ *
22607
+ * See `RuntimeStateDurability`. Enforced by
22608
+ * `scripts/check-runtime-state-durability.ts`.
22609
+ */
22610
+ durability: "session"
22236
22611
  };
22237
22612
  /**
22238
22613
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -22268,7 +22643,17 @@ var humiditySensorCapability = {
22268
22643
  schema: HumiditySensorStatusSchema,
22269
22644
  kind: "push"
22270
22645
  },
22271
- runtimeState: HumiditySensorStatusSchema
22646
+ runtimeState: HumiditySensorStatusSchema,
22647
+ /**
22648
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
22649
+ *
22650
+ * See `RuntimeStateDurability`. Enforced by
22651
+ * `scripts/check-runtime-state-durability.ts`.
22652
+ */
22653
+ durability: "restored",
22654
+ /** Clock fields: written, but excluded from the compare that decides
22655
+ * whether persisting is worth a SQLite commit. */
22656
+ volatileStateFields: ["lastFetchedAt"]
22272
22657
  };
22273
22658
  /**
22274
22659
  * Image display cap. Models a single still image exposed by an integration —
@@ -22306,7 +22691,14 @@ var imageCapability = {
22306
22691
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
22307
22692
  * directly and renders the still image.
22308
22693
  */
22309
- runtimeState: ImageStatusSchema
22694
+ runtimeState: ImageStatusSchema,
22695
+ /**
22696
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
22697
+ *
22698
+ * See `RuntimeStateDurability`. Enforced by
22699
+ * `scripts/check-runtime-state-durability.ts`.
22700
+ */
22701
+ durability: "session"
22310
22702
  };
22311
22703
  /**
22312
22704
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -22455,7 +22847,17 @@ var imageSettingsCapability = {
22455
22847
  schema: ImageSettingsStatusSchema,
22456
22848
  kind: "poll"
22457
22849
  },
22458
- runtimeState: ImageSettingsStatusSchema
22850
+ runtimeState: ImageSettingsStatusSchema,
22851
+ /**
22852
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
22853
+ *
22854
+ * See `RuntimeStateDurability`. Enforced by
22855
+ * `scripts/check-runtime-state-durability.ts`.
22856
+ */
22857
+ durability: "restored",
22858
+ /** Clock fields: written, but excluded from the compare that decides
22859
+ * whether persisting is worth a SQLite commit. */
22860
+ volatileStateFields: ["lastFetchedAt"]
22459
22861
  };
22460
22862
  /**
22461
22863
  * integrations — system-scoped singleton capability for integration
@@ -22846,7 +23248,14 @@ var lawnMowerControlCapability = {
22846
23248
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
22847
23249
  * slice for live activity + battery changes.
22848
23250
  */
22849
- runtimeState: LawnMowerControlStatusSchema
23251
+ runtimeState: LawnMowerControlStatusSchema,
23252
+ /**
23253
+ * Runtime-state durability: **session** — as `vacuum-control`.
23254
+ *
23255
+ * See `RuntimeStateDurability`. Enforced by
23256
+ * `scripts/check-runtime-state-durability.ts`.
23257
+ */
23258
+ durability: "session"
22850
23259
  };
22851
23260
  /**
22852
23261
  * local-network — hub-only singleton.
@@ -23052,7 +23461,17 @@ var lockControlCapability = {
23052
23461
  * read `state` and disable themselves during `locking`/`unlocking`
23053
23462
  * transitions.
23054
23463
  */
23055
- runtimeState: LockControlStatusSchema
23464
+ runtimeState: LockControlStatusSchema,
23465
+ /**
23466
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
23467
+ *
23468
+ * See `RuntimeStateDurability`. Enforced by
23469
+ * `scripts/check-runtime-state-durability.ts`.
23470
+ */
23471
+ durability: "restored",
23472
+ /** Clock fields: written, but excluded from the compare that decides
23473
+ * whether persisting is worth a SQLite commit. */
23474
+ volatileStateFields: ["lastChangedAt"]
23056
23475
  };
23057
23476
  /**
23058
23477
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -23214,7 +23633,14 @@ var mediaPlayerCapability = {
23214
23633
  * full slice for live now-playing, volume, and progress updates
23215
23634
  * without polling.
23216
23635
  */
23217
- runtimeState: MediaPlayerStatusSchema
23636
+ runtimeState: MediaPlayerStatusSchema,
23637
+ /**
23638
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
23639
+ *
23640
+ * See `RuntimeStateDurability`. Enforced by
23641
+ * `scripts/check-runtime-state-durability.ts`.
23642
+ */
23643
+ durability: "session"
23218
23644
  };
23219
23645
  /**
23220
23646
  * mesh-network — collection cap for mesh-VPN providers.
@@ -23478,7 +23904,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
23478
23904
  * `device.state.motion.value`. Reads never invoke the provider, so
23479
23905
  * UIs and other addons can poll the cached state safely.
23480
23906
  */
23481
- runtimeState: MotionStatusSchema
23907
+ runtimeState: MotionStatusSchema,
23908
+ /**
23909
+ * 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.
23910
+ *
23911
+ * See `RuntimeStateDurability`. Enforced by
23912
+ * `scripts/check-runtime-state-durability.ts`.
23913
+ */
23914
+ durability: "session"
23482
23915
  };
23483
23916
  /**
23484
23917
  * Motion-trigger toggle for accessory devices.
@@ -23543,7 +23976,14 @@ var motionTriggerCapability = {
23543
23976
  schema: MotionTriggerStatusSchema,
23544
23977
  kind: "command-driven"
23545
23978
  },
23546
- runtimeState: MotionTriggerRuntimeStateSchema
23979
+ runtimeState: MotionTriggerRuntimeStateSchema,
23980
+ /**
23981
+ * 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.
23982
+ *
23983
+ * See `RuntimeStateDurability`. Enforced by
23984
+ * `scripts/check-runtime-state-durability.ts`.
23985
+ */
23986
+ durability: "session"
23547
23987
  };
23548
23988
  /**
23549
23989
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -23610,7 +24050,17 @@ var motionZonesCapability = {
23610
24050
  schema: MotionZoneStatusSchema,
23611
24051
  kind: "poll"
23612
24052
  },
23613
- runtimeState: MotionZoneStatusSchema
24053
+ runtimeState: MotionZoneStatusSchema,
24054
+ /**
24055
+ * 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.
24056
+ *
24057
+ * See `RuntimeStateDurability`. Enforced by
24058
+ * `scripts/check-runtime-state-durability.ts`.
24059
+ */
24060
+ durability: "restored",
24061
+ /** Clock fields: written, but excluded from the compare that decides
24062
+ * whether persisting is worth a SQLite commit. */
24063
+ volatileStateFields: ["lastFetchedAt"]
23614
24064
  };
23615
24065
  /**
23616
24066
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -23684,7 +24134,17 @@ var nativeObjectDetectionCapability = {
23684
24134
  schema: NativeObjectDetectionStatusSchema,
23685
24135
  kind: "push"
23686
24136
  },
23687
- runtimeState: NativeObjectDetectionRuntimeStateSchema
24137
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
24138
+ /**
24139
+ * 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.
24140
+ *
24141
+ * See `RuntimeStateDurability`. Enforced by
24142
+ * `scripts/check-runtime-state-durability.ts`.
24143
+ */
24144
+ durability: "restored",
24145
+ /** Clock fields: written, but excluded from the compare that decides
24146
+ * whether persisting is worth a SQLite commit. */
24147
+ volatileStateFields: ["lastFetchedAt"]
23688
24148
  };
23689
24149
  /**
23690
24150
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -24018,7 +24478,14 @@ onSent: { data: object({
24018
24478
  * form reads `supports` to gate optional fields; history pane reads
24019
24479
  * `lastSentAt` / `lastError` / `queueDepth`.
24020
24480
  */
24021
- runtimeState: NotifierStatusSchema
24481
+ runtimeState: NotifierStatusSchema,
24482
+ /**
24483
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
24484
+ *
24485
+ * See `RuntimeStateDurability`. Enforced by
24486
+ * `scripts/check-runtime-state-durability.ts`.
24487
+ */
24488
+ durability: "session"
24022
24489
  };
24023
24490
  /**
24024
24491
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -24061,7 +24528,17 @@ var numericSensorCapability = {
24061
24528
  schema: NumericSensorStatusSchema,
24062
24529
  kind: "push"
24063
24530
  },
24064
- runtimeState: NumericSensorStatusSchema
24531
+ runtimeState: NumericSensorStatusSchema,
24532
+ /**
24533
+ * 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.
24534
+ *
24535
+ * See `RuntimeStateDurability`. Enforced by
24536
+ * `scripts/check-runtime-state-durability.ts`.
24537
+ */
24538
+ durability: "restored",
24539
+ /** Clock fields: written, but excluded from the compare that decides
24540
+ * whether persisting is worth a SQLite commit. */
24541
+ volatileStateFields: ["lastFetchedAt"]
24065
24542
  };
24066
24543
  /**
24067
24544
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -24446,7 +24923,14 @@ var petFeederCapability = {
24446
24923
  * the full slice via `device.state.petFeeder.value` and refresh on
24447
24924
  * every poll without re-querying the provider.
24448
24925
  */
24449
- runtimeState: PetFeederStatusSchema
24926
+ runtimeState: PetFeederStatusSchema,
24927
+ /**
24928
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
24929
+ *
24930
+ * See `RuntimeStateDurability`. Enforced by
24931
+ * `scripts/check-runtime-state-durability.ts`.
24932
+ */
24933
+ durability: "session"
24450
24934
  };
24451
24935
  var VehicleSchema = object({
24452
24936
  id: string(),
@@ -24758,7 +25242,17 @@ var powerMeterCapability = {
24758
25242
  schema: PowerMeterStatusSchema,
24759
25243
  kind: "push"
24760
25244
  },
24761
- runtimeState: PowerMeterStatusSchema
25245
+ runtimeState: PowerMeterStatusSchema,
25246
+ /**
25247
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
25248
+ *
25249
+ * See `RuntimeStateDurability`. Enforced by
25250
+ * `scripts/check-runtime-state-durability.ts`.
25251
+ */
25252
+ durability: "restored",
25253
+ /** Clock fields: written, but excluded from the compare that decides
25254
+ * whether persisting is worth a SQLite commit. */
25255
+ volatileStateFields: ["lastFetchedAt"]
24762
25256
  };
24763
25257
  /**
24764
25258
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -24815,7 +25309,17 @@ var presenceCapability = {
24815
25309
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
24816
25310
  * pre-fetch fast-path check).
24817
25311
  */
24818
- runtimeState: PresenceStatusSchema
25312
+ runtimeState: PresenceStatusSchema,
25313
+ /**
25314
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
25315
+ *
25316
+ * See `RuntimeStateDurability`. Enforced by
25317
+ * `scripts/check-runtime-state-durability.ts`.
25318
+ */
25319
+ durability: "restored",
25320
+ /** Clock fields: written, but excluded from the compare that decides
25321
+ * whether persisting is worth a SQLite commit. */
25322
+ volatileStateFields: ["lastChangedAt"]
24819
25323
  };
24820
25324
  /**
24821
25325
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -24851,7 +25355,17 @@ var pressureSensorCapability = {
24851
25355
  schema: PressureSensorStatusSchema,
24852
25356
  kind: "push"
24853
25357
  },
24854
- runtimeState: PressureSensorStatusSchema
25358
+ runtimeState: PressureSensorStatusSchema,
25359
+ /**
25360
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
25361
+ *
25362
+ * See `RuntimeStateDurability`. Enforced by
25363
+ * `scripts/check-runtime-state-durability.ts`.
25364
+ */
25365
+ durability: "restored",
25366
+ /** Clock fields: written, but excluded from the compare that decides
25367
+ * whether persisting is worth a SQLite commit. */
25368
+ volatileStateFields: ["lastFetchedAt"]
24855
25369
  };
24856
25370
  /**
24857
25371
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -24981,7 +25495,17 @@ var privacyMaskCapability = {
24981
25495
  schema: PrivacyMaskStatusSchema,
24982
25496
  kind: "poll"
24983
25497
  },
24984
- runtimeState: PrivacyMaskStatusSchema
25498
+ runtimeState: PrivacyMaskStatusSchema,
25499
+ /**
25500
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
25501
+ *
25502
+ * See `RuntimeStateDurability`. Enforced by
25503
+ * `scripts/check-runtime-state-durability.ts`.
25504
+ */
25505
+ durability: "restored",
25506
+ /** Clock fields: written, but excluded from the compare that decides
25507
+ * whether persisting is worth a SQLite commit. */
25508
+ volatileStateFields: ["lastFetchedAt"]
24985
25509
  };
24986
25510
  /**
24987
25511
  * Collapse a camera's PER-PROFILE audio flags into the one answer
@@ -25209,7 +25733,14 @@ var ptzAutotrackCapability = {
25209
25733
  * fetch / cache / fallback logic out of the four cap methods —
25210
25734
  * they become trampolines over `runtimeState`.
25211
25735
  */
25212
- runtimeState: PtzAutotrackRuntimeStateSchema
25736
+ runtimeState: PtzAutotrackRuntimeStateSchema,
25737
+ /**
25738
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
25739
+ *
25740
+ * See `RuntimeStateDurability`. Enforced by
25741
+ * `scripts/check-runtime-state-durability.ts`.
25742
+ */
25743
+ durability: "session"
25213
25744
  };
25214
25745
  /**
25215
25746
  * reboot — device-scoped capability for "soft" device reboots (firmware
@@ -25884,7 +26415,14 @@ var sceneMonitorCapability = {
25884
26415
  schema: SceneMonitorStatusSchema,
25885
26416
  kind: "push"
25886
26417
  },
25887
- runtimeState: SceneMonitorStatusSchema
26418
+ runtimeState: SceneMonitorStatusSchema,
26419
+ /**
26420
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
26421
+ *
26422
+ * See `RuntimeStateDurability`. Enforced by
26423
+ * `scripts/check-runtime-state-durability.ts`.
26424
+ */
26425
+ durability: "session"
25888
26426
  };
25889
26427
  /**
25890
26428
  * Per-stage gating mode applied to the zones a rule references.
@@ -26028,7 +26566,14 @@ var scriptRunnerCapability = {
26028
26566
  * `isRunning` to render a spinner during execution and surfaces
26029
26567
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
26030
26568
  */
26031
- runtimeState: ScriptRunnerStatusSchema
26569
+ runtimeState: ScriptRunnerStatusSchema,
26570
+ /**
26571
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
26572
+ *
26573
+ * See `RuntimeStateDurability`. Enforced by
26574
+ * `scripts/check-runtime-state-durability.ts`.
26575
+ */
26576
+ durability: "session"
26032
26577
  };
26033
26578
  /**
26034
26579
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -26055,7 +26600,17 @@ var smokeCapability = {
26055
26600
  schema: SmokeStatusSchema,
26056
26601
  kind: "push"
26057
26602
  },
26058
- runtimeState: SmokeStatusSchema
26603
+ runtimeState: SmokeStatusSchema,
26604
+ /**
26605
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
26606
+ *
26607
+ * See `RuntimeStateDurability`. Enforced by
26608
+ * `scripts/check-runtime-state-durability.ts`.
26609
+ */
26610
+ durability: "restored",
26611
+ /** Clock fields: written, but excluded from the compare that decides
26612
+ * whether persisting is worth a SQLite commit. */
26613
+ volatileStateFields: ["lastChangedAt"]
26059
26614
  };
26060
26615
  /**
26061
26616
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -26241,7 +26796,17 @@ var streamParamsCapability = {
26241
26796
  schema: StreamParamsStatusSchema,
26242
26797
  kind: "poll"
26243
26798
  },
26244
- runtimeState: StreamParamsStatusSchema
26799
+ runtimeState: StreamParamsStatusSchema,
26800
+ /**
26801
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
26802
+ *
26803
+ * See `RuntimeStateDurability`. Enforced by
26804
+ * `scripts/check-runtime-state-durability.ts`.
26805
+ */
26806
+ durability: "restored",
26807
+ /** Clock fields: written, but excluded from the compare that decides
26808
+ * whether persisting is worth a SQLite commit. */
26809
+ volatileStateFields: ["lastFetchedAt"]
26245
26810
  };
26246
26811
  /**
26247
26812
  * The three well-known stream profiles in render order. Exported so the
@@ -26485,6 +27050,16 @@ var switchCapability = {
26485
27050
  * not need to re-query the provider after a setState mutation.
26486
27051
  */
26487
27052
  runtimeState: SwitchStatusSchema,
27053
+ /**
27054
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
27055
+ *
27056
+ * See `RuntimeStateDurability`. Enforced by
27057
+ * `scripts/check-runtime-state-durability.ts`.
27058
+ */
27059
+ durability: "restored",
27060
+ /** Clock fields: written, but excluded from the compare that decides
27061
+ * whether persisting is worth a SQLite commit. */
27062
+ volatileStateFields: ["lastChangedAt"],
26488
27063
  settings: { bindings: [{
26489
27064
  kind: "scalar",
26490
27065
  statusPath: "on",
@@ -26564,7 +27139,17 @@ var tamperCapability = {
26564
27139
  schema: TamperStatusSchema,
26565
27140
  kind: "push"
26566
27141
  },
26567
- runtimeState: TamperStatusSchema
27142
+ runtimeState: TamperStatusSchema,
27143
+ /**
27144
+ * Runtime-state durability: **restored** — as `smoke`.
27145
+ *
27146
+ * See `RuntimeStateDurability`. Enforced by
27147
+ * `scripts/check-runtime-state-durability.ts`.
27148
+ */
27149
+ durability: "restored",
27150
+ /** Clock fields: written, but excluded from the compare that decides
27151
+ * whether persisting is worth a SQLite commit. */
27152
+ volatileStateFields: ["lastChangedAt"]
26568
27153
  };
26569
27154
  /**
26570
27155
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -26609,7 +27194,17 @@ var temperatureSensorCapability = {
26609
27194
  schema: TemperatureSensorStatusSchema,
26610
27195
  kind: "push"
26611
27196
  },
26612
- runtimeState: TemperatureSensorStatusSchema
27197
+ runtimeState: TemperatureSensorStatusSchema,
27198
+ /**
27199
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
27200
+ *
27201
+ * See `RuntimeStateDurability`. Enforced by
27202
+ * `scripts/check-runtime-state-durability.ts`.
27203
+ */
27204
+ durability: "restored",
27205
+ /** Clock fields: written, but excluded from the compare that decides
27206
+ * whether persisting is worth a SQLite commit. */
27207
+ volatileStateFields: ["lastFetchedAt"]
26613
27208
  };
26614
27209
  /**
26615
27210
  * toast — system-scoped singleton capability that streams toast
@@ -26678,7 +27273,14 @@ var updateCapability = {
26678
27273
  schema: UpdateStatusSchema,
26679
27274
  kind: "poll"
26680
27275
  },
26681
- runtimeState: UpdateStatusSchema
27276
+ runtimeState: UpdateStatusSchema,
27277
+ /**
27278
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
27279
+ *
27280
+ * See `RuntimeStateDurability`. Enforced by
27281
+ * `scripts/check-runtime-state-durability.ts`.
27282
+ */
27283
+ durability: "session"
26682
27284
  };
26683
27285
  var UserSummarySchema = object({
26684
27286
  id: string(),
@@ -27012,7 +27614,14 @@ var vacuumControlCapability = {
27012
27614
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27013
27615
  * slice for live state + battery + fan-speed changes.
27014
27616
  */
27015
- runtimeState: VacuumControlStatusSchema
27617
+ runtimeState: VacuumControlStatusSchema,
27618
+ /**
27619
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
27620
+ *
27621
+ * See `RuntimeStateDurability`. Enforced by
27622
+ * `scripts/check-runtime-state-durability.ts`.
27623
+ */
27624
+ durability: "session"
27016
27625
  };
27017
27626
  var ValveStatusSchema = object({
27018
27627
  /** Lifecycle state of the valve. */
@@ -27064,7 +27673,14 @@ var valveCapability = {
27064
27673
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27065
27674
  * slice for live position changes during a move.
27066
27675
  */
27067
- runtimeState: ValveStatusSchema
27676
+ runtimeState: ValveStatusSchema,
27677
+ /**
27678
+ * Runtime-state durability: **session** — as `brightness`.
27679
+ *
27680
+ * See `RuntimeStateDurability`. Enforced by
27681
+ * `scripts/check-runtime-state-durability.ts`.
27682
+ */
27683
+ durability: "session"
27068
27684
  };
27069
27685
  /**
27070
27686
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -27086,7 +27702,17 @@ var vibrationCapability = {
27086
27702
  schema: VibrationStatusSchema,
27087
27703
  kind: "push"
27088
27704
  },
27089
- runtimeState: VibrationStatusSchema
27705
+ runtimeState: VibrationStatusSchema,
27706
+ /**
27707
+ * Runtime-state durability: **restored** — as `smoke`.
27708
+ *
27709
+ * See `RuntimeStateDurability`. Enforced by
27710
+ * `scripts/check-runtime-state-durability.ts`.
27711
+ */
27712
+ durability: "restored",
27713
+ /** Clock fields: written, but excluded from the compare that decides
27714
+ * whether persisting is worth a SQLite commit. */
27715
+ volatileStateFields: ["lastChangedAt"]
27090
27716
  };
27091
27717
  /**
27092
27718
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -27160,7 +27786,14 @@ var waterHeaterCapability = {
27160
27786
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27161
27787
  * slice for live temperature / mode / away changes.
27162
27788
  */
27163
- runtimeState: WaterHeaterStatusSchema
27789
+ runtimeState: WaterHeaterStatusSchema,
27790
+ /**
27791
+ * Runtime-state durability: **session** — as `climate-control`.
27792
+ *
27793
+ * See `RuntimeStateDurability`. Enforced by
27794
+ * `scripts/check-runtime-state-durability.ts`.
27795
+ */
27796
+ durability: "session"
27164
27797
  };
27165
27798
  /**
27166
27799
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -27219,7 +27852,14 @@ var weatherCapability = {
27219
27852
  * Runtime-state slice — mirrored by the kernel. The UI reads the
27220
27853
  * current conditions directly from the slice on each weather push.
27221
27854
  */
27222
- runtimeState: WeatherStatusSchema
27855
+ runtimeState: WeatherStatusSchema,
27856
+ /**
27857
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
27858
+ *
27859
+ * See `RuntimeStateDurability`. Enforced by
27860
+ * `scripts/check-runtime-state-durability.ts`.
27861
+ */
27862
+ durability: "session"
27223
27863
  };
27224
27864
  /**
27225
27865
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -27381,7 +28021,14 @@ var zoneAnalyticsCapability = {
27381
28021
  * automatically; the explicit `getCurrentSnapshot` cap method is
27382
28022
  * still useful for one-off polls without a subscription.
27383
28023
  */
27384
- runtimeState: CameraOccupancySnapshotSchema
28024
+ runtimeState: CameraOccupancySnapshotSchema,
28025
+ /**
28026
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
28027
+ *
28028
+ * See `RuntimeStateDurability`. Enforced by
28029
+ * `scripts/check-runtime-state-durability.ts`.
28030
+ */
28031
+ durability: "session"
27385
28032
  };
27386
28033
  /**
27387
28034
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -27459,7 +28106,14 @@ var zoneRulesCapability = {
27459
28106
  motion: array(ZoneRuleSchema).readonly(),
27460
28107
  detection: array(ZoneRuleSchema).readonly(),
27461
28108
  package: array(ZoneRuleSchema).readonly()
27462
- })
28109
+ }),
28110
+ /**
28111
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
28112
+ *
28113
+ * See `RuntimeStateDurability`. Enforced by
28114
+ * `scripts/check-runtime-state-durability.ts`.
28115
+ */
28116
+ durability: "restored"
27463
28117
  };
27464
28118
  /**
27465
28119
  * Accessory device helpers — shared across drivers.
@@ -34226,6 +34880,7 @@ Object.freeze({
34226
34880
  "network-access": "ingress",
34227
34881
  "smtp-provider": "email"
34228
34882
  });
34883
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
34229
34884
  new Set(["devices", "classes"]);
34230
34885
  /**
34231
34886
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.