@camstack/addon-post-analysis 1.2.68 → 1.2.69

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.
@@ -10990,7 +10990,14 @@ var cameraStreamsCapability = {
10990
10990
  low: string().optional()
10991
10991
  }),
10992
10992
  lastChangedAt: number()
10993
- })
10993
+ }),
10994
+ /**
10995
+ * 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.
10996
+ *
10997
+ * See `RuntimeStateDurability`. Enforced by
10998
+ * `scripts/check-runtime-state-durability.ts`.
10999
+ */
11000
+ durability: "session"
10994
11001
  };
10995
11002
  /** kebab-case cap name → camelCase router-map key. */
10996
11003
  function kebabToCamel(s) {
@@ -11577,6 +11584,13 @@ var deviceDiscoveryCapability = {
11577
11584
  kind: "poll"
11578
11585
  },
11579
11586
  runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
11587
+ /**
11588
+ * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
11589
+ *
11590
+ * See `RuntimeStateDurability`. Enforced by
11591
+ * `scripts/check-runtime-state-durability.ts`.
11592
+ */
11593
+ durability: "session",
11580
11594
  methods: {
11581
11595
  /**
11582
11596
  * Snapshot of the current `discovered` list. Returns the
@@ -13431,7 +13445,23 @@ var NotificationActionSchema = object({
13431
13445
  * else — see `notification-center/action-token.ts` for what that does and
13432
13446
  * does not buy.
13433
13447
  */
13434
- destructive: boolean().optional()
13448
+ destructive: boolean().optional(),
13449
+ /**
13450
+ * How the tap should REACH the url.
13451
+ *
13452
+ * `navigate` (absent, and every button authored before this field) opens it:
13453
+ * the phone leaves the notification and shows whatever the callback returns.
13454
+ * That is right for a button whose answer the operator wants to read.
13455
+ *
13456
+ * `background` fires it as a POST and stays put. It exists for the buttons
13457
+ * whose whole point is not to interrupt — "silence this for 30 minutes" is
13458
+ * an answer to the notification, and being thrown into a browser tab to
13459
+ * confirm it costs more attention than the notification did. A backend that
13460
+ * cannot do a background call renders it as an ordinary link (the adapters
13461
+ * fall back rather than dropping the button), so this is a preference, never
13462
+ * a requirement.
13463
+ */
13464
+ mode: _enum(["navigate", "background"]).optional()
13435
13465
  });
13436
13466
  /**
13437
13467
  * The canonical notification. `body` is the only hard field (Apprise model).
@@ -14310,7 +14340,17 @@ var alarmPanelCapability = {
14310
14340
  * full slice; renders an arm button per `availableModes` entry and
14311
14341
  * a PIN field iff `requiresCode === true`.
14312
14342
  */
14313
- runtimeState: AlarmPanelStatusSchema
14343
+ runtimeState: AlarmPanelStatusSchema,
14344
+ /**
14345
+ * Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
14346
+ *
14347
+ * See `RuntimeStateDurability`. Enforced by
14348
+ * `scripts/check-runtime-state-durability.ts`.
14349
+ */
14350
+ durability: "restored",
14351
+ /** Clock fields: written, but excluded from the compare that decides
14352
+ * whether persisting is worth a SQLite commit. */
14353
+ volatileStateFields: ["lastChangedAt"]
14314
14354
  };
14315
14355
  /**
14316
14356
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
@@ -14465,6 +14505,19 @@ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
14465
14505
  ]);
14466
14506
  NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
14467
14507
  /**
14508
+ * The panel's three transitions, as ONE list.
14509
+ *
14510
+ * Named here rather than spelled out at each of the four sites that need them
14511
+ * (the emitter, the intake, the editor group, the combined-notification gate),
14512
+ * because a fourth transition added to the enum and forgotten at one of them is
14513
+ * an alarm state nobody can be notified about.
14514
+ */
14515
+ var NC_ALARM_SYSTEM_EVENT_KINDS = [
14516
+ "alarm-triggered",
14517
+ "alarm-armed",
14518
+ "alarm-disarmed"
14519
+ ];
14520
+ /**
14468
14521
  * One coherent system-event condition. `kinds` is the required opt-in safety
14469
14522
  * gate; the remaining lists are optional narrowing filters relevant to the
14470
14523
  * selected kinds.
@@ -14487,6 +14540,26 @@ var NcSystemEventConditionSchema = object({
14487
14540
  nodeIds: array(string().min(1)).min(1).optional(),
14488
14541
  packageNames: array(string().min(1)).min(1).optional()
14489
14542
  });
14543
+ /** Hard ceiling on a window (24h). A snooze that could not expire would be an
14544
+ * outage the operator asked for once and forgot. */
14545
+ var NC_SNOOZE_MAX_MINUTES = 1440;
14546
+ /**
14547
+ * The durations a notification offers when its rule does not say otherwise.
14548
+ *
14549
+ * MINUTES, and short ones: a snooze button is answered on a lock screen, and
14550
+ * the three choices that fit there are "the next few minutes", "the next half
14551
+ * hour" and "the next hour". Anything longer is a decision somebody sits down
14552
+ * to make, which is what the app's own snooze surface is for.
14553
+ *
14554
+ * Resolved in CODE (`snoozeChoices`), never as a Zod default — see
14555
+ * {@link NcRuleInputSchema.shape.snoozeOptions} for why the distinction is
14556
+ * load-bearing.
14557
+ */
14558
+ var NC_DEFAULT_SNOOZE_MINUTES = [
14559
+ 10,
14560
+ 30,
14561
+ 60
14562
+ ];
14490
14563
  /** Weekly schedule — OR of windows; absence on the rule = always active. */
14491
14564
  var NcScheduleSchema = object({
14492
14565
  windows: array(object({
@@ -14863,15 +14936,15 @@ var NcConditionsSchema = object({
14863
14936
  * (an `immediate` rule naming an `audio-*` class, one notification per
14864
14937
  * classified sample) stays exactly as it was for rules that already use it.
14865
14938
  *
14866
- * NOT in {@link NC_CONDITION_CATALOG} yet, and that is the sequencing rule
14867
- * rather than an oversight: the viewer mirrors the descriptor enums BY HAND
14868
- * (`camstack/src/data/notification-center.ts`, guarded by
14869
- * `scripts/check-viewer-condition-mirror.ts`) and its rule editor STRIPS the
14939
+ * In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
14940
+ * rule rather than an accident: the viewer mirrors the descriptor enums BY
14941
+ * HAND (`camstack/src/data/notification-center.ts`, guarded by
14942
+ * `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
14870
14943
  * condition fields it does not know when a rule is saved from the phone.
14871
14944
  * Publishing an editor for a condition the app cannot round-trip is how an
14872
- * operator loses a rule's conditions by opening it — so the descriptor, the
14873
- * admin widget and the viewer mirror land together (P2 + P3), and only then
14874
- * does an audio rule become authorable.
14945
+ * operator loses a rule's conditions by opening it — so the viewer mirror
14946
+ * (P3, shipped) went FIRST, and the descriptor an editor renders from
14947
+ * follows here.
14875
14948
  */
14876
14949
  audio: NcAudioConditionSchema.optional()
14877
14950
  });
@@ -15107,6 +15180,30 @@ var NcRuleInputSchema = object({
15107
15180
  */
15108
15181
  snoozeAllowGlobal: boolean().optional(),
15109
15182
  /**
15183
+ * The snooze durations THIS rule's notification offers as buttons, in
15184
+ * minutes.
15185
+ *
15186
+ * Three states, and all three are distinct — which is exactly why this is
15187
+ * `.optional()` and never `.default()`. A Zod default does not run on the
15188
+ * addon cap path (three production failures in one day), so a schema default
15189
+ * would collapse the first two:
15190
+ *
15191
+ * | value | meaning |
15192
+ * | --- | --- |
15193
+ * | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
15194
+ * | `[]` | **no snooze buttons on this rule** — the explicit override |
15195
+ * | a list | these choices, de-duplicated and sorted, at most four |
15196
+ *
15197
+ * `.max(4)` because the notifier's own action budget is small (ntfy allows
15198
+ * three buttons in total) and a rule that spent it all on snooze choices
15199
+ * would push its own tap-through actions off the notification.
15200
+ *
15201
+ * An empty list is NOT an alarm exemption: a rule the alarm is about, or
15202
+ * that arms the panel, is exempt automatically and cannot be silenced by a
15203
+ * window from anywhere (D133).
15204
+ */
15205
+ snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
15206
+ /**
15110
15207
  * Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
15111
15208
  *
15112
15209
  * This is what makes the rule set the alarm's trigger set without the alarm
@@ -15206,6 +15303,7 @@ var NcConditionDescriptorSchema = object({
15206
15303
  "device",
15207
15304
  "package",
15208
15305
  "occupancy",
15306
+ "audio",
15209
15307
  "system"
15210
15308
  ]),
15211
15309
  label: string(),
@@ -15224,6 +15322,7 @@ var NcConditionDescriptorSchema = object({
15224
15322
  "crossingSelect",
15225
15323
  "polygonDraw",
15226
15324
  "occupancy",
15325
+ "audio",
15227
15326
  "deviceState",
15228
15327
  "systemEvent"
15229
15328
  ]),
@@ -15621,6 +15720,16 @@ var NC_CONDITION_CATALOG = [
15621
15720
  phase: "P1",
15622
15721
  description: "ZoneAnalytics occupancy edge (optionally zone/class-scoped): count crosses the threshold and holds for sustainSeconds. Fail-closed on a missing snapshot."
15623
15722
  },
15723
+ {
15724
+ id: "audio",
15725
+ group: "audio",
15726
+ label: "Sound",
15727
+ valueType: "audio",
15728
+ operator: "anyOf",
15729
+ appliesTo: ["immediate"],
15730
+ phase: "P2",
15731
+ description: "Fires when at least hitPercent% of the samples in a samplingSeconds window are hits — a hit clears the dBFS floor AND carries one of the chosen sounds. Both filters are optional and independent, but naming NEITHER never matches: every sample would be a hit, so the engine refuses rather than notifying on silence. dBFS is negative-going (0 = full scale, -96 = silence)."
15732
+ },
15624
15733
  {
15625
15734
  id: "customZones",
15626
15735
  group: "zones",
@@ -15765,7 +15874,20 @@ var NcSnoozeInputSchema = object({
15765
15874
  ruleId: string().optional(),
15766
15875
  /** Required when `scope: 'device'`. */
15767
15876
  deviceId: number().int().optional(),
15768
- durationMinutes: number().int().min(1).max(1440),
15877
+ /**
15878
+ * Narrow the window to these subject classes — "the cat, not the person".
15879
+ *
15880
+ * ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
15881
+ * what every window authored before this field meant, so no persisted row
15882
+ * changes meaning and no client has to learn anything to keep working.
15883
+ *
15884
+ * It is what makes the window's real key `(deviceId, classes[])` and lets it
15885
+ * cross rules (D133): the operator points at a camera and a kind of thing,
15886
+ * not at whichever of their four rules happened to produce the notification
15887
+ * they are dismissing.
15888
+ */
15889
+ classes: array(string().min(1)).min(1).optional(),
15890
+ durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
15769
15891
  /**
15770
15892
  * Silence this for EVERY recipient, not just the caller. Permission is
15771
15893
  * checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
@@ -15790,6 +15912,10 @@ var NcSnoozeSchema = object({
15790
15912
  scope: NcSnoozeScopeSchema,
15791
15913
  ruleId: string().optional(),
15792
15914
  deviceId: number().int().optional(),
15915
+ /** Subject classes this window covers. ABSENT = every class — see
15916
+ * {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
15917
+ * no SQLite column: nothing queries a window by class. */
15918
+ classes: array(string().min(1)).min(1).optional(),
15793
15919
  startedAt: number(),
15794
15920
  /** Exclusive: at exactly this instant the snooze is over. Expiry is a
15795
15921
  * COMPARISON, not a job — no sweeper can leave the operator silenced. */
@@ -18386,7 +18512,14 @@ var zonesCapability = {
18386
18512
  * handle. Slice shape is `{ zones: Zone[] }` so future extensions
18387
18513
  * (e.g. zone groupings) can sit alongside the polygon list.
18388
18514
  */
18389
- runtimeState: object({ zones: array(ZoneSchema).readonly() })
18515
+ runtimeState: object({ zones: array(ZoneSchema).readonly() }),
18516
+ /**
18517
+ * 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.
18518
+ *
18519
+ * See `RuntimeStateDurability`. Enforced by
18520
+ * `scripts/check-runtime-state-durability.ts`.
18521
+ */
18522
+ durability: "restored"
18390
18523
  };
18391
18524
  /**
18392
18525
  * A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
@@ -21229,7 +21362,17 @@ var airQualitySensorCapability = {
21229
21362
  schema: AirQualitySensorStatusSchema,
21230
21363
  kind: "push"
21231
21364
  },
21232
- runtimeState: AirQualitySensorStatusSchema
21365
+ runtimeState: AirQualitySensorStatusSchema,
21366
+ /**
21367
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
21368
+ *
21369
+ * See `RuntimeStateDurability`. Enforced by
21370
+ * `scripts/check-runtime-state-durability.ts`.
21371
+ */
21372
+ durability: "restored",
21373
+ /** Clock fields: written, but excluded from the compare that decides
21374
+ * whether persisting is worth a SQLite commit. */
21375
+ volatileStateFields: ["lastFetchedAt"]
21233
21376
  };
21234
21377
  /**
21235
21378
  * Ambient illuminance reading in lux. Drives Home Assistant `sensor`
@@ -21261,7 +21404,17 @@ var ambientLightSensorCapability = {
21261
21404
  schema: AmbientLightSensorStatusSchema,
21262
21405
  kind: "push"
21263
21406
  },
21264
- runtimeState: AmbientLightSensorStatusSchema
21407
+ runtimeState: AmbientLightSensorStatusSchema,
21408
+ /**
21409
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
21410
+ *
21411
+ * See `RuntimeStateDurability`. Enforced by
21412
+ * `scripts/check-runtime-state-durability.ts`.
21413
+ */
21414
+ durability: "restored",
21415
+ /** Clock fields: written, but excluded from the compare that decides
21416
+ * whether persisting is worth a SQLite commit. */
21417
+ volatileStateFields: ["lastFetchedAt"]
21265
21418
  };
21266
21419
  /**
21267
21420
  * Per-class audio metrics aggregated over a sliding window.
@@ -21379,7 +21532,14 @@ var audioMetricsCapability = {
21379
21532
  }), AudioMetricsHistorySchema)
21380
21533
  },
21381
21534
  /** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
21382
- runtimeState: AudioMetricsSnapshotSchema
21535
+ runtimeState: AudioMetricsSnapshotSchema,
21536
+ /**
21537
+ * 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.
21538
+ *
21539
+ * See `RuntimeStateDurability`. Enforced by
21540
+ * `scripts/check-runtime-state-durability.ts`.
21541
+ */
21542
+ durability: "session"
21383
21543
  };
21384
21544
  /**
21385
21545
  * Automation-control cap. Models HA `automation.*` entities on
@@ -21441,7 +21601,14 @@ var automationControlCapability = {
21441
21601
  * reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
21442
21602
  * (badge) directly.
21443
21603
  */
21444
- runtimeState: AutomationControlStatusSchema
21604
+ runtimeState: AutomationControlStatusSchema,
21605
+ /**
21606
+ * 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.
21607
+ *
21608
+ * See `RuntimeStateDurability`. Enforced by
21609
+ * `scripts/check-runtime-state-durability.ts`.
21610
+ */
21611
+ durability: "session"
21445
21612
  };
21446
21613
  /**
21447
21614
  * Battery status snapshot. Emitted by providers whose device is
@@ -21547,7 +21714,17 @@ onStatusChanged: { data: object({
21547
21714
  * via `device.runtimeState.getCapState('battery')` regardless of
21548
21715
  * the underlying driver.
21549
21716
  */
21550
- runtimeState: BatteryStatusSchema
21717
+ runtimeState: BatteryStatusSchema,
21718
+ /**
21719
+ * 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.
21720
+ *
21721
+ * See `RuntimeStateDurability`. Enforced by
21722
+ * `scripts/check-runtime-state-durability.ts`.
21723
+ */
21724
+ durability: "restored",
21725
+ /** Clock fields: written, but excluded from the compare that decides
21726
+ * whether persisting is worth a SQLite commit. */
21727
+ volatileStateFields: ["lastUpdated"]
21551
21728
  };
21552
21729
  /**
21553
21730
  * Generic boolean sensor — last-resort fallback when no domain-
@@ -21576,7 +21753,17 @@ var binaryCapability = {
21576
21753
  schema: BinaryStatusSchema,
21577
21754
  kind: "push"
21578
21755
  },
21579
- runtimeState: BinaryStatusSchema
21756
+ runtimeState: BinaryStatusSchema,
21757
+ /**
21758
+ * Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
21759
+ *
21760
+ * See `RuntimeStateDurability`. Enforced by
21761
+ * `scripts/check-runtime-state-durability.ts`.
21762
+ */
21763
+ durability: "restored",
21764
+ /** Clock fields: written, but excluded from the compare that decides
21765
+ * whether persisting is worth a SQLite commit. */
21766
+ volatileStateFields: ["lastChangedAt"]
21580
21767
  };
21581
21768
  /**
21582
21769
  * Dimmable-light brightness control. Co-exists with `switch` on the
@@ -21629,7 +21816,14 @@ onBrightnessChanged: { data: object({
21629
21816
  * by the kernel. Read via `device.state.brightness.value` so UI
21630
21817
  * sliders surface the current level without polling the provider.
21631
21818
  */
21632
- runtimeState: BrightnessStatusSchema
21819
+ runtimeState: BrightnessStatusSchema,
21820
+ /**
21821
+ * Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
21822
+ *
21823
+ * See `RuntimeStateDurability`. Enforced by
21824
+ * `scripts/check-runtime-state-durability.ts`.
21825
+ */
21826
+ durability: "session"
21633
21827
  };
21634
21828
  DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
21635
21829
  kind: "mutation",
@@ -21717,7 +21911,17 @@ var carbonMonoxideCapability = {
21717
21911
  schema: CarbonMonoxideStatusSchema,
21718
21912
  kind: "push"
21719
21913
  },
21720
- runtimeState: CarbonMonoxideStatusSchema
21914
+ runtimeState: CarbonMonoxideStatusSchema,
21915
+ /**
21916
+ * Runtime-state durability: **restored** — as `smoke`.
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"]
21721
21925
  };
21722
21926
  /**
21723
21927
  * HVAC / climate control cap. Models the full surface of a HA
@@ -21877,7 +22081,14 @@ var climateControlCapability = {
21877
22081
  * the full slice via `device.state.climate-control.value` and refresh
21878
22082
  * on every push without re-querying the provider.
21879
22083
  */
21880
- runtimeState: ClimateControlStatusSchema
22084
+ runtimeState: ClimateControlStatusSchema,
22085
+ /**
22086
+ * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
22087
+ *
22088
+ * See `RuntimeStateDurability`. Enforced by
22089
+ * `scripts/check-runtime-state-durability.ts`.
22090
+ */
22091
+ durability: "session"
21881
22092
  };
21882
22093
  /**
21883
22094
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
@@ -21987,7 +22198,14 @@ onColorChanged: { data: object({
21987
22198
  * kernel. Read via `device.state.color.value` so UI pickers surface
21988
22199
  * the current chromaticity without polling the provider.
21989
22200
  */
21990
- runtimeState: ColorStatusSchema
22201
+ runtimeState: ColorStatusSchema,
22202
+ /**
22203
+ * Runtime-state durability: **session** — as `brightness`.
22204
+ *
22205
+ * See `RuntimeStateDurability`. Enforced by
22206
+ * `scripts/check-runtime-state-durability.ts`.
22207
+ */
22208
+ durability: "session"
21991
22209
  };
21992
22210
  var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
21993
22211
  object({
@@ -22045,7 +22263,17 @@ var connectivityCapability = {
22045
22263
  schema: ConnectivityStatusSchema,
22046
22264
  kind: "push"
22047
22265
  },
22048
- runtimeState: ConnectivityStatusSchema
22266
+ runtimeState: ConnectivityStatusSchema,
22267
+ /**
22268
+ * Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
22269
+ *
22270
+ * See `RuntimeStateDurability`. Enforced by
22271
+ * `scripts/check-runtime-state-durability.ts`.
22272
+ */
22273
+ durability: "restored",
22274
+ /** Clock fields: written, but excluded from the compare that decides
22275
+ * whether persisting is worth a SQLite commit. */
22276
+ volatileStateFields: ["lastChangedAt"]
22049
22277
  };
22050
22278
  /**
22051
22279
  * Generic device-consumables capability — surfaces a device's
@@ -22127,7 +22355,14 @@ reset: method(object({
22127
22355
  }
22128
22356
  }
22129
22357
  },
22130
- runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
22358
+ runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
22359
+ /**
22360
+ * Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
22361
+ *
22362
+ * See `RuntimeStateDurability`. Enforced by
22363
+ * `scripts/check-runtime-state-durability.ts`.
22364
+ */
22365
+ durability: "session"
22131
22366
  };
22132
22367
  /**
22133
22368
  * Door / window / opening / garage / valve contact sensor. Boolean
@@ -22158,7 +22393,17 @@ var contactCapability = {
22158
22393
  schema: ContactStatusSchema,
22159
22394
  kind: "push"
22160
22395
  },
22161
- runtimeState: ContactStatusSchema
22396
+ runtimeState: ContactStatusSchema,
22397
+ /**
22398
+ * Runtime-state durability: **restored** — a door left open across a restart must still read open.
22399
+ *
22400
+ * See `RuntimeStateDurability`. Enforced by
22401
+ * `scripts/check-runtime-state-durability.ts`.
22402
+ */
22403
+ durability: "restored",
22404
+ /** Clock fields: written, but excluded from the compare that decides
22405
+ * whether persisting is worth a SQLite commit. */
22406
+ volatileStateFields: ["lastChangedAt"]
22162
22407
  };
22163
22408
  /**
22164
22409
  * Status slice — flat object (the framework's `runtimeState` contract
@@ -22264,7 +22509,14 @@ var controlCapability = {
22264
22509
  * dropdown / text field / date picker) read the slice's discriminant
22265
22510
  * and value directly without polling the provider.
22266
22511
  */
22267
- runtimeState: ControlStatusSchema
22512
+ runtimeState: ControlStatusSchema,
22513
+ /**
22514
+ * Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
22515
+ *
22516
+ * See `RuntimeStateDurability`. Enforced by
22517
+ * `scripts/check-runtime-state-durability.ts`.
22518
+ */
22519
+ durability: "session"
22268
22520
  };
22269
22521
  var CoverStatusSchema = object({
22270
22522
  /** Lifecycle state of the cover. */
@@ -22325,7 +22577,17 @@ var coverCapability = {
22325
22577
  * Runtime-state slice — mirrored by the kernel. UI controls watch
22326
22578
  * the slice for live position changes during a move.
22327
22579
  */
22328
- runtimeState: CoverStatusSchema
22580
+ runtimeState: CoverStatusSchema,
22581
+ /**
22582
+ * Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
22583
+ *
22584
+ * See `RuntimeStateDurability`. Enforced by
22585
+ * `scripts/check-runtime-state-durability.ts`.
22586
+ */
22587
+ durability: "restored",
22588
+ /** Clock fields: written, but excluded from the compare that decides
22589
+ * whether persisting is worth a SQLite commit. */
22590
+ volatileStateFields: ["lastChangedAt"]
22329
22591
  };
22330
22592
  /**
22331
22593
  * Vendor-neutral day/night (IR-cut) control — the per-camera config cap
@@ -22419,7 +22681,17 @@ var dayNightCapability = {
22419
22681
  schema: DayNightStatusSchema,
22420
22682
  kind: "poll"
22421
22683
  },
22422
- runtimeState: DayNightStatusSchema
22684
+ runtimeState: DayNightStatusSchema,
22685
+ /**
22686
+ * Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
22687
+ *
22688
+ * See `RuntimeStateDurability`. Enforced by
22689
+ * `scripts/check-runtime-state-durability.ts`.
22690
+ */
22691
+ durability: "restored",
22692
+ /** Clock fields: written, but excluded from the compare that decides
22693
+ * whether persisting is worth a SQLite commit. */
22694
+ volatileStateFields: ["lastFetchedAt"]
22423
22695
  };
22424
22696
  /**
22425
22697
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -22466,7 +22738,17 @@ onStatusChanged: { data: object({
22466
22738
  schema: DeviceStatusSchema,
22467
22739
  kind: "push"
22468
22740
  },
22469
- runtimeState: DeviceStatusSchema
22741
+ runtimeState: DeviceStatusSchema,
22742
+ /**
22743
+ * 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.
22744
+ *
22745
+ * See `RuntimeStateDurability`. Enforced by
22746
+ * `scripts/check-runtime-state-durability.ts`.
22747
+ */
22748
+ durability: "restored",
22749
+ /** Clock fields: written, but excluded from the compare that decides
22750
+ * whether persisting is worth a SQLite commit. */
22751
+ volatileStateFields: ["lastChangedAt"]
22470
22752
  };
22471
22753
  /**
22472
22754
  * Doorbell button cap. Two kinds of providers coexist behind this cap
@@ -22528,7 +22810,14 @@ onPressed: { data: DoorbellPressEventSchema } },
22528
22810
  * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
22529
22811
  * without subscribing.
22530
22812
  */
22531
- runtimeState: DoorbellStatusSchema
22813
+ runtimeState: DoorbellStatusSchema,
22814
+ /**
22815
+ * 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.
22816
+ *
22817
+ * See `RuntimeStateDurability`. Enforced by
22818
+ * `scripts/check-runtime-state-durability.ts`.
22819
+ */
22820
+ durability: "restored"
22532
22821
  };
22533
22822
  /**
22534
22823
  * Enum-state sensor — a string value picked from a finite option set.
@@ -22568,7 +22857,17 @@ var enumSensorCapability = {
22568
22857
  schema: EnumSensorStatusSchema,
22569
22858
  kind: "push"
22570
22859
  },
22571
- runtimeState: EnumSensorStatusSchema
22860
+ runtimeState: EnumSensorStatusSchema,
22861
+ /**
22862
+ * Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
22863
+ *
22864
+ * See `RuntimeStateDurability`. Enforced by
22865
+ * `scripts/check-runtime-state-durability.ts`.
22866
+ */
22867
+ durability: "restored",
22868
+ /** Clock fields: written, but excluded from the compare that decides
22869
+ * whether persisting is worth a SQLite commit. */
22870
+ volatileStateFields: ["lastFetchedAt"]
22572
22871
  };
22573
22872
  /**
22574
22873
  * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
@@ -22604,7 +22903,14 @@ var eventEmitterCapability = {
22604
22903
  schema: EventEmitterStatusSchema,
22605
22904
  kind: "push"
22606
22905
  },
22607
- runtimeState: EventEmitterStatusSchema
22906
+ runtimeState: EventEmitterStatusSchema,
22907
+ /**
22908
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
22909
+ *
22910
+ * See `RuntimeStateDurability`. Enforced by
22911
+ * `scripts/check-runtime-state-durability.ts`.
22912
+ */
22913
+ durability: "session"
22608
22914
  };
22609
22915
  var EventItemSchema = object({
22610
22916
  id: string(),
@@ -22911,7 +23217,14 @@ var fanControlCapability = {
22911
23217
  * Runtime-state slice — mirrored by the kernel. UI fan speed
22912
23218
  * sliders read `percentage` for live updates.
22913
23219
  */
22914
- runtimeState: FanControlStatusSchema
23220
+ runtimeState: FanControlStatusSchema,
23221
+ /**
23222
+ * Runtime-state durability: **session** — as `brightness`.
23223
+ *
23224
+ * See `RuntimeStateDurability`. Enforced by
23225
+ * `scripts/check-runtime-state-durability.ts`.
23226
+ */
23227
+ durability: "session"
22915
23228
  };
22916
23229
  /**
22917
23230
  * Per-device feature/identity probe slice. Holds the runtime-resolved
@@ -22987,7 +23300,14 @@ onProbeChanged: { data: object({
22987
23300
  schema: FeatureProbeStatusSchema,
22988
23301
  kind: "push"
22989
23302
  },
22990
- runtimeState: FeatureProbeStatusSchema
23303
+ runtimeState: FeatureProbeStatusSchema,
23304
+ /**
23305
+ * 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.
23306
+ *
23307
+ * See `RuntimeStateDurability`. Enforced by
23308
+ * `scripts/check-runtime-state-durability.ts`.
23309
+ */
23310
+ durability: "session"
22991
23311
  };
22992
23312
  /**
22993
23313
  * Water leak / moisture sensor. Boolean "is liquid currently
@@ -23014,7 +23334,17 @@ var floodCapability = {
23014
23334
  schema: FloodStatusSchema,
23015
23335
  kind: "push"
23016
23336
  },
23017
- runtimeState: FloodStatusSchema
23337
+ runtimeState: FloodStatusSchema,
23338
+ /**
23339
+ * Runtime-state durability: **restored** — as `smoke`.
23340
+ *
23341
+ * See `RuntimeStateDurability`. Enforced by
23342
+ * `scripts/check-runtime-state-durability.ts`.
23343
+ */
23344
+ durability: "restored",
23345
+ /** Clock fields: written, but excluded from the compare that decides
23346
+ * whether persisting is worth a SQLite commit. */
23347
+ volatileStateFields: ["lastChangedAt"]
23018
23348
  };
23019
23349
  /**
23020
23350
  * Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
@@ -23037,7 +23367,17 @@ var gasCapability = {
23037
23367
  schema: GasStatusSchema,
23038
23368
  kind: "push"
23039
23369
  },
23040
- runtimeState: GasStatusSchema
23370
+ runtimeState: GasStatusSchema,
23371
+ /**
23372
+ * Runtime-state durability: **restored** — as `smoke`.
23373
+ *
23374
+ * See `RuntimeStateDurability`. Enforced by
23375
+ * `scripts/check-runtime-state-durability.ts`.
23376
+ */
23377
+ durability: "restored",
23378
+ /** Clock fields: written, but excluded from the compare that decides
23379
+ * whether persisting is worth a SQLite commit. */
23380
+ volatileStateFields: ["lastChangedAt"]
23041
23381
  };
23042
23382
  /**
23043
23383
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
@@ -23113,7 +23453,14 @@ var humidifierCapability = {
23113
23453
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
23114
23454
  * slice for live humidity / mode changes.
23115
23455
  */
23116
- runtimeState: HumidifierStatusSchema
23456
+ runtimeState: HumidifierStatusSchema,
23457
+ /**
23458
+ * Runtime-state durability: **session** — as `climate-control`.
23459
+ *
23460
+ * See `RuntimeStateDurability`. Enforced by
23461
+ * `scripts/check-runtime-state-durability.ts`.
23462
+ */
23463
+ durability: "session"
23117
23464
  };
23118
23465
  /**
23119
23466
  * Single-metric humidity reading. Drives Home Assistant `sensor`
@@ -23149,7 +23496,17 @@ var humiditySensorCapability = {
23149
23496
  schema: HumiditySensorStatusSchema,
23150
23497
  kind: "push"
23151
23498
  },
23152
- runtimeState: HumiditySensorStatusSchema
23499
+ runtimeState: HumiditySensorStatusSchema,
23500
+ /**
23501
+ * Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
23502
+ *
23503
+ * See `RuntimeStateDurability`. Enforced by
23504
+ * `scripts/check-runtime-state-durability.ts`.
23505
+ */
23506
+ durability: "restored",
23507
+ /** Clock fields: written, but excluded from the compare that decides
23508
+ * whether persisting is worth a SQLite commit. */
23509
+ volatileStateFields: ["lastFetchedAt"]
23153
23510
  };
23154
23511
  /**
23155
23512
  * Image display cap. Models a single still image exposed by an integration —
@@ -23187,7 +23544,14 @@ var imageCapability = {
23187
23544
  * Runtime-state slice — mirrored by the kernel. The UI reads `url`
23188
23545
  * directly and renders the still image.
23189
23546
  */
23190
- runtimeState: ImageStatusSchema
23547
+ runtimeState: ImageStatusSchema,
23548
+ /**
23549
+ * Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
23550
+ *
23551
+ * See `RuntimeStateDurability`. Enforced by
23552
+ * `scripts/check-runtime-state-durability.ts`.
23553
+ */
23554
+ durability: "session"
23191
23555
  };
23192
23556
  /**
23193
23557
  * Vendor-neutral image / picture-adjustment cap — the per-camera config
@@ -23336,7 +23700,17 @@ var imageSettingsCapability = {
23336
23700
  schema: ImageSettingsStatusSchema,
23337
23701
  kind: "poll"
23338
23702
  },
23339
- runtimeState: ImageSettingsStatusSchema
23703
+ runtimeState: ImageSettingsStatusSchema,
23704
+ /**
23705
+ * Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
23706
+ *
23707
+ * See `RuntimeStateDurability`. Enforced by
23708
+ * `scripts/check-runtime-state-durability.ts`.
23709
+ */
23710
+ durability: "restored",
23711
+ /** Clock fields: written, but excluded from the compare that decides
23712
+ * whether persisting is worth a SQLite commit. */
23713
+ volatileStateFields: ["lastFetchedAt"]
23340
23714
  };
23341
23715
  /**
23342
23716
  * integrations — system-scoped singleton capability for integration
@@ -23676,7 +24050,14 @@ var lawnMowerControlCapability = {
23676
24050
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
23677
24051
  * slice for live activity + battery changes.
23678
24052
  */
23679
- runtimeState: LawnMowerControlStatusSchema
24053
+ runtimeState: LawnMowerControlStatusSchema,
24054
+ /**
24055
+ * Runtime-state durability: **session** — as `vacuum-control`.
24056
+ *
24057
+ * See `RuntimeStateDurability`. Enforced by
24058
+ * `scripts/check-runtime-state-durability.ts`.
24059
+ */
24060
+ durability: "session"
23680
24061
  };
23681
24062
  /**
23682
24063
  * local-network — hub-only singleton.
@@ -23882,7 +24263,17 @@ var lockControlCapability = {
23882
24263
  * read `state` and disable themselves during `locking`/`unlocking`
23883
24264
  * transitions.
23884
24265
  */
23885
- runtimeState: LockControlStatusSchema
24266
+ runtimeState: LockControlStatusSchema,
24267
+ /**
24268
+ * Runtime-state durability: **restored** — a lock left locked must still read locked.
24269
+ *
24270
+ * See `RuntimeStateDurability`. Enforced by
24271
+ * `scripts/check-runtime-state-durability.ts`.
24272
+ */
24273
+ durability: "restored",
24274
+ /** Clock fields: written, but excluded from the compare that decides
24275
+ * whether persisting is worth a SQLite commit. */
24276
+ volatileStateFields: ["lastChangedAt"]
23886
24277
  };
23887
24278
  /**
23888
24279
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -24044,7 +24435,14 @@ var mediaPlayerCapability = {
24044
24435
  * full slice for live now-playing, volume, and progress updates
24045
24436
  * without polling.
24046
24437
  */
24047
- runtimeState: MediaPlayerStatusSchema
24438
+ runtimeState: MediaPlayerStatusSchema,
24439
+ /**
24440
+ * Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
24441
+ *
24442
+ * See `RuntimeStateDurability`. Enforced by
24443
+ * `scripts/check-runtime-state-durability.ts`.
24444
+ */
24445
+ durability: "session"
24048
24446
  };
24049
24447
  /**
24050
24448
  * mesh-network — collection cap for mesh-VPN providers.
@@ -24308,7 +24706,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
24308
24706
  * `device.state.motion.value`. Reads never invoke the provider, so
24309
24707
  * UIs and other addons can poll the cached state safely.
24310
24708
  */
24311
- runtimeState: MotionStatusSchema
24709
+ runtimeState: MotionStatusSchema,
24710
+ /**
24711
+ * 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.
24712
+ *
24713
+ * See `RuntimeStateDurability`. Enforced by
24714
+ * `scripts/check-runtime-state-durability.ts`.
24715
+ */
24716
+ durability: "session"
24312
24717
  };
24313
24718
  /**
24314
24719
  * Motion-trigger toggle for accessory devices.
@@ -24373,7 +24778,14 @@ var motionTriggerCapability = {
24373
24778
  schema: MotionTriggerStatusSchema,
24374
24779
  kind: "command-driven"
24375
24780
  },
24376
- runtimeState: MotionTriggerRuntimeStateSchema
24781
+ runtimeState: MotionTriggerRuntimeStateSchema,
24782
+ /**
24783
+ * 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.
24784
+ *
24785
+ * See `RuntimeStateDurability`. Enforced by
24786
+ * `scripts/check-runtime-state-durability.ts`.
24787
+ */
24788
+ durability: "session"
24377
24789
  };
24378
24790
  /**
24379
24791
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
@@ -24440,7 +24852,17 @@ var motionZonesCapability = {
24440
24852
  schema: MotionZoneStatusSchema,
24441
24853
  kind: "poll"
24442
24854
  },
24443
- runtimeState: MotionZoneStatusSchema
24855
+ runtimeState: MotionZoneStatusSchema,
24856
+ /**
24857
+ * 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.
24858
+ *
24859
+ * See `RuntimeStateDurability`. Enforced by
24860
+ * `scripts/check-runtime-state-durability.ts`.
24861
+ */
24862
+ durability: "restored",
24863
+ /** Clock fields: written, but excluded from the compare that decides
24864
+ * whether persisting is worth a SQLite commit. */
24865
+ volatileStateFields: ["lastFetchedAt"]
24444
24866
  };
24445
24867
  /**
24446
24868
  * On-camera AI object detection cap. Surfaces per-device the classes
@@ -24514,7 +24936,17 @@ var nativeObjectDetectionCapability = {
24514
24936
  schema: NativeObjectDetectionStatusSchema,
24515
24937
  kind: "push"
24516
24938
  },
24517
- runtimeState: NativeObjectDetectionRuntimeStateSchema
24939
+ runtimeState: NativeObjectDetectionRuntimeStateSchema,
24940
+ /**
24941
+ * 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.
24942
+ *
24943
+ * See `RuntimeStateDurability`. Enforced by
24944
+ * `scripts/check-runtime-state-durability.ts`.
24945
+ */
24946
+ durability: "restored",
24947
+ /** Clock fields: written, but excluded from the compare that decides
24948
+ * whether persisting is worth a SQLite commit. */
24949
+ volatileStateFields: ["lastFetchedAt"]
24518
24950
  };
24519
24951
  /**
24520
24952
  * network-quality — system-scoped singleton capability tracking RTT,
@@ -24848,7 +25280,14 @@ onSent: { data: object({
24848
25280
  * form reads `supports` to gate optional fields; history pane reads
24849
25281
  * `lastSentAt` / `lastError` / `queueDepth`.
24850
25282
  */
24851
- runtimeState: NotifierStatusSchema
25283
+ runtimeState: NotifierStatusSchema,
25284
+ /**
25285
+ * Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
25286
+ *
25287
+ * See `RuntimeStateDurability`. Enforced by
25288
+ * `scripts/check-runtime-state-durability.ts`.
25289
+ */
25290
+ durability: "session"
24852
25291
  };
24853
25292
  /**
24854
25293
  * Generic numeric sensor — last-resort fallback when no typed numeric
@@ -24891,7 +25330,17 @@ var numericSensorCapability = {
24891
25330
  schema: NumericSensorStatusSchema,
24892
25331
  kind: "push"
24893
25332
  },
24894
- runtimeState: NumericSensorStatusSchema
25333
+ runtimeState: NumericSensorStatusSchema,
25334
+ /**
25335
+ * 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.
25336
+ *
25337
+ * See `RuntimeStateDurability`. Enforced by
25338
+ * `scripts/check-runtime-state-durability.ts`.
25339
+ */
25340
+ durability: "restored",
25341
+ /** Clock fields: written, but excluded from the compare that decides
25342
+ * whether persisting is worth a SQLite commit. */
25343
+ volatileStateFields: ["lastFetchedAt"]
24895
25344
  };
24896
25345
  /**
24897
25346
  * Generic on-screen-display (video overlay) cap. Each camera exposes
@@ -25276,7 +25725,14 @@ var petFeederCapability = {
25276
25725
  * the full slice via `device.state.petFeeder.value` and refresh on
25277
25726
  * every poll without re-querying the provider.
25278
25727
  */
25279
- runtimeState: PetFeederStatusSchema
25728
+ runtimeState: PetFeederStatusSchema,
25729
+ /**
25730
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
25731
+ *
25732
+ * See `RuntimeStateDurability`. Enforced by
25733
+ * `scripts/check-runtime-state-durability.ts`.
25734
+ */
25735
+ durability: "session"
25280
25736
  };
25281
25737
  var VehicleSchema = object({
25282
25738
  id: string(),
@@ -25622,7 +26078,17 @@ var powerMeterCapability = {
25622
26078
  schema: PowerMeterStatusSchema,
25623
26079
  kind: "push"
25624
26080
  },
25625
- runtimeState: PowerMeterStatusSchema
26081
+ runtimeState: PowerMeterStatusSchema,
26082
+ /**
26083
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
26084
+ *
26085
+ * See `RuntimeStateDurability`. Enforced by
26086
+ * `scripts/check-runtime-state-durability.ts`.
26087
+ */
26088
+ durability: "restored",
26089
+ /** Clock fields: written, but excluded from the compare that decides
26090
+ * whether persisting is worth a SQLite commit. */
26091
+ volatileStateFields: ["lastFetchedAt"]
25626
26092
  };
25627
26093
  /**
25628
26094
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
@@ -25679,7 +26145,17 @@ var presenceCapability = {
25679
26145
  * the map pin is rendered (use `DeviceFeature.PresenceGps` for the
25680
26146
  * pre-fetch fast-path check).
25681
26147
  */
25682
- runtimeState: PresenceStatusSchema
26148
+ runtimeState: PresenceStatusSchema,
26149
+ /**
26150
+ * Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
26151
+ *
26152
+ * See `RuntimeStateDurability`. Enforced by
26153
+ * `scripts/check-runtime-state-durability.ts`.
26154
+ */
26155
+ durability: "restored",
26156
+ /** Clock fields: written, but excluded from the compare that decides
26157
+ * whether persisting is worth a SQLite commit. */
26158
+ volatileStateFields: ["lastChangedAt"]
25683
26159
  };
25684
26160
  /**
25685
26161
  * Atmospheric pressure reading in hectopascals. Drives Home Assistant
@@ -25715,7 +26191,17 @@ var pressureSensorCapability = {
25715
26191
  schema: PressureSensorStatusSchema,
25716
26192
  kind: "push"
25717
26193
  },
25718
- runtimeState: PressureSensorStatusSchema
26194
+ runtimeState: PressureSensorStatusSchema,
26195
+ /**
26196
+ * Runtime-state durability: **restored** — as `numeric-sensor`.
26197
+ *
26198
+ * See `RuntimeStateDurability`. Enforced by
26199
+ * `scripts/check-runtime-state-durability.ts`.
26200
+ */
26201
+ durability: "restored",
26202
+ /** Clock fields: written, but excluded from the compare that decides
26203
+ * whether persisting is worth a SQLite commit. */
26204
+ volatileStateFields: ["lastFetchedAt"]
25719
26205
  };
25720
26206
  /**
25721
26207
  * PRIVACY — what the camera deliberately does not capture. Two planes:
@@ -25845,7 +26331,17 @@ var privacyMaskCapability = {
25845
26331
  schema: PrivacyMaskStatusSchema,
25846
26332
  kind: "poll"
25847
26333
  },
25848
- runtimeState: PrivacyMaskStatusSchema
26334
+ runtimeState: PrivacyMaskStatusSchema,
26335
+ /**
26336
+ * Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
26337
+ *
26338
+ * See `RuntimeStateDurability`. Enforced by
26339
+ * `scripts/check-runtime-state-durability.ts`.
26340
+ */
26341
+ durability: "restored",
26342
+ /** Clock fields: written, but excluded from the compare that decides
26343
+ * whether persisting is worth a SQLite commit. */
26344
+ volatileStateFields: ["lastFetchedAt"]
25849
26345
  };
25850
26346
  var PtzPresetSchema = object({
25851
26347
  id: string(),
@@ -26011,7 +26507,14 @@ var ptzAutotrackCapability = {
26011
26507
  * fetch / cache / fallback logic out of the four cap methods —
26012
26508
  * they become trampolines over `runtimeState`.
26013
26509
  */
26014
- runtimeState: PtzAutotrackRuntimeStateSchema
26510
+ runtimeState: PtzAutotrackRuntimeStateSchema,
26511
+ /**
26512
+ * Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
26513
+ *
26514
+ * See `RuntimeStateDurability`. Enforced by
26515
+ * `scripts/check-runtime-state-durability.ts`.
26516
+ */
26517
+ durability: "session"
26015
26518
  };
26016
26519
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
26017
26520
  kind: "mutation",
@@ -26680,7 +27183,14 @@ var sceneMonitorCapability = {
26680
27183
  schema: SceneMonitorStatusSchema,
26681
27184
  kind: "push"
26682
27185
  },
26683
- runtimeState: SceneMonitorStatusSchema
27186
+ runtimeState: SceneMonitorStatusSchema,
27187
+ /**
27188
+ * Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
27189
+ *
27190
+ * See `RuntimeStateDurability`. Enforced by
27191
+ * `scripts/check-runtime-state-durability.ts`.
27192
+ */
27193
+ durability: "session"
26684
27194
  };
26685
27195
  /**
26686
27196
  * Per-stage gating mode applied to the zones a rule references.
@@ -26824,7 +27334,14 @@ var scriptRunnerCapability = {
26824
27334
  * `isRunning` to render a spinner during execution and surfaces
26825
27335
  * `lastError` / `lastRunSuccess` in the recent-runs panel.
26826
27336
  */
26827
- runtimeState: ScriptRunnerStatusSchema
27337
+ runtimeState: ScriptRunnerStatusSchema,
27338
+ /**
27339
+ * Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
27340
+ *
27341
+ * See `RuntimeStateDurability`. Enforced by
27342
+ * `scripts/check-runtime-state-durability.ts`.
27343
+ */
27344
+ durability: "session"
26828
27345
  };
26829
27346
  /**
26830
27347
  * Smoke alarm sensor — boolean "is smoke currently detected" with
@@ -26851,7 +27368,17 @@ var smokeCapability = {
26851
27368
  schema: SmokeStatusSchema,
26852
27369
  kind: "push"
26853
27370
  },
26854
- runtimeState: SmokeStatusSchema
27371
+ runtimeState: SmokeStatusSchema,
27372
+ /**
27373
+ * Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
27374
+ *
27375
+ * See `RuntimeStateDurability`. Enforced by
27376
+ * `scripts/check-runtime-state-durability.ts`.
27377
+ */
27378
+ durability: "restored",
27379
+ /** Clock fields: written, but excluded from the compare that decides
27380
+ * whether persisting is worth a SQLite commit. */
27381
+ volatileStateFields: ["lastChangedAt"]
26855
27382
  };
26856
27383
  /**
26857
27384
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
@@ -27024,7 +27551,17 @@ var streamParamsCapability = {
27024
27551
  schema: StreamParamsStatusSchema,
27025
27552
  kind: "poll"
27026
27553
  },
27027
- runtimeState: StreamParamsStatusSchema
27554
+ runtimeState: StreamParamsStatusSchema,
27555
+ /**
27556
+ * Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
27557
+ *
27558
+ * See `RuntimeStateDurability`. Enforced by
27559
+ * `scripts/check-runtime-state-durability.ts`.
27560
+ */
27561
+ durability: "restored",
27562
+ /** Clock fields: written, but excluded from the compare that decides
27563
+ * whether persisting is worth a SQLite commit. */
27564
+ volatileStateFields: ["lastFetchedAt"]
27028
27565
  };
27029
27566
  /**
27030
27567
  * Generic on/off switch cap for accessory children (siren, floodlight,
@@ -27070,6 +27607,16 @@ var switchCapability = {
27070
27607
  * not need to re-query the provider after a setState mutation.
27071
27608
  */
27072
27609
  runtimeState: SwitchStatusSchema,
27610
+ /**
27611
+ * Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
27612
+ *
27613
+ * See `RuntimeStateDurability`. Enforced by
27614
+ * `scripts/check-runtime-state-durability.ts`.
27615
+ */
27616
+ durability: "restored",
27617
+ /** Clock fields: written, but excluded from the compare that decides
27618
+ * whether persisting is worth a SQLite commit. */
27619
+ volatileStateFields: ["lastChangedAt"],
27073
27620
  settings: { bindings: [{
27074
27621
  kind: "scalar",
27075
27622
  statusPath: "on",
@@ -27149,7 +27696,17 @@ var tamperCapability = {
27149
27696
  schema: TamperStatusSchema,
27150
27697
  kind: "push"
27151
27698
  },
27152
- runtimeState: TamperStatusSchema
27699
+ runtimeState: TamperStatusSchema,
27700
+ /**
27701
+ * Runtime-state durability: **restored** — as `smoke`.
27702
+ *
27703
+ * See `RuntimeStateDurability`. Enforced by
27704
+ * `scripts/check-runtime-state-durability.ts`.
27705
+ */
27706
+ durability: "restored",
27707
+ /** Clock fields: written, but excluded from the compare that decides
27708
+ * whether persisting is worth a SQLite commit. */
27709
+ volatileStateFields: ["lastChangedAt"]
27153
27710
  };
27154
27711
  /**
27155
27712
  * Single-metric temperature reading. Drives Home Assistant `sensor`
@@ -27194,7 +27751,17 @@ var temperatureSensorCapability = {
27194
27751
  schema: TemperatureSensorStatusSchema,
27195
27752
  kind: "push"
27196
27753
  },
27197
- runtimeState: TemperatureSensorStatusSchema
27754
+ runtimeState: TemperatureSensorStatusSchema,
27755
+ /**
27756
+ * Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
27757
+ *
27758
+ * See `RuntimeStateDurability`. Enforced by
27759
+ * `scripts/check-runtime-state-durability.ts`.
27760
+ */
27761
+ durability: "restored",
27762
+ /** Clock fields: written, but excluded from the compare that decides
27763
+ * whether persisting is worth a SQLite commit. */
27764
+ volatileStateFields: ["lastFetchedAt"]
27198
27765
  };
27199
27766
  /**
27200
27767
  * toast — system-scoped singleton capability that streams toast
@@ -27263,7 +27830,14 @@ var updateCapability = {
27263
27830
  schema: UpdateStatusSchema,
27264
27831
  kind: "poll"
27265
27832
  },
27266
- runtimeState: UpdateStatusSchema
27833
+ runtimeState: UpdateStatusSchema,
27834
+ /**
27835
+ * Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
27836
+ *
27837
+ * See `RuntimeStateDurability`. Enforced by
27838
+ * `scripts/check-runtime-state-durability.ts`.
27839
+ */
27840
+ durability: "session"
27267
27841
  };
27268
27842
  var UserSummarySchema = object({
27269
27843
  id: string(),
@@ -27597,7 +28171,14 @@ var vacuumControlCapability = {
27597
28171
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27598
28172
  * slice for live state + battery + fan-speed changes.
27599
28173
  */
27600
- runtimeState: VacuumControlStatusSchema
28174
+ runtimeState: VacuumControlStatusSchema,
28175
+ /**
28176
+ * Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
28177
+ *
28178
+ * See `RuntimeStateDurability`. Enforced by
28179
+ * `scripts/check-runtime-state-durability.ts`.
28180
+ */
28181
+ durability: "session"
27601
28182
  };
27602
28183
  var ValveStatusSchema = object({
27603
28184
  /** Lifecycle state of the valve. */
@@ -27649,7 +28230,14 @@ var valveCapability = {
27649
28230
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27650
28231
  * slice for live position changes during a move.
27651
28232
  */
27652
- runtimeState: ValveStatusSchema
28233
+ runtimeState: ValveStatusSchema,
28234
+ /**
28235
+ * Runtime-state durability: **session** — as `brightness`.
28236
+ *
28237
+ * See `RuntimeStateDurability`. Enforced by
28238
+ * `scripts/check-runtime-state-durability.ts`.
28239
+ */
28240
+ durability: "session"
27653
28241
  };
27654
28242
  /**
27655
28243
  * Vibration / shake / impact sensor. Drives Home Assistant
@@ -27671,7 +28259,17 @@ var vibrationCapability = {
27671
28259
  schema: VibrationStatusSchema,
27672
28260
  kind: "push"
27673
28261
  },
27674
- runtimeState: VibrationStatusSchema
28262
+ runtimeState: VibrationStatusSchema,
28263
+ /**
28264
+ * Runtime-state durability: **restored** — as `smoke`.
28265
+ *
28266
+ * See `RuntimeStateDurability`. Enforced by
28267
+ * `scripts/check-runtime-state-durability.ts`.
28268
+ */
28269
+ durability: "restored",
28270
+ /** Clock fields: written, but excluded from the compare that decides
28271
+ * whether persisting is worth a SQLite commit. */
28272
+ volatileStateFields: ["lastChangedAt"]
27675
28273
  };
27676
28274
  /**
27677
28275
  * Water heater / boiler cap. Models HA `water_heater.*` entities — a
@@ -27745,7 +28343,14 @@ var waterHeaterCapability = {
27745
28343
  * Runtime-state slice — mirrored by the kernel. UI controls watch the
27746
28344
  * slice for live temperature / mode / away changes.
27747
28345
  */
27748
- runtimeState: WaterHeaterStatusSchema
28346
+ runtimeState: WaterHeaterStatusSchema,
28347
+ /**
28348
+ * Runtime-state durability: **session** — as `climate-control`.
28349
+ *
28350
+ * See `RuntimeStateDurability`. Enforced by
28351
+ * `scripts/check-runtime-state-durability.ts`.
28352
+ */
28353
+ durability: "session"
27749
28354
  };
27750
28355
  /**
27751
28356
  * Weather provider cap. Models HA `weather.*` entities — a read-only
@@ -27804,7 +28409,14 @@ var weatherCapability = {
27804
28409
  * Runtime-state slice — mirrored by the kernel. The UI reads the
27805
28410
  * current conditions directly from the slice on each weather push.
27806
28411
  */
27807
- runtimeState: WeatherStatusSchema
28412
+ runtimeState: WeatherStatusSchema,
28413
+ /**
28414
+ * Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
28415
+ *
28416
+ * See `RuntimeStateDurability`. Enforced by
28417
+ * `scripts/check-runtime-state-durability.ts`.
28418
+ */
28419
+ durability: "session"
27808
28420
  };
27809
28421
  /**
27810
28422
  * Per-zone occupancy aggregation produced by the analytics frame
@@ -27966,7 +28578,14 @@ var zoneAnalyticsCapability = {
27966
28578
  * automatically; the explicit `getCurrentSnapshot` cap method is
27967
28579
  * still useful for one-off polls without a subscription.
27968
28580
  */
27969
- runtimeState: CameraOccupancySnapshotSchema
28581
+ runtimeState: CameraOccupancySnapshotSchema,
28582
+ /**
28583
+ * Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
28584
+ *
28585
+ * See `RuntimeStateDurability`. Enforced by
28586
+ * `scripts/check-runtime-state-durability.ts`.
28587
+ */
28588
+ durability: "session"
27970
28589
  };
27971
28590
  /**
27972
28591
  * Stages a {@link ZoneRule} can apply to. Discriminator on the rules
@@ -28044,7 +28663,14 @@ var zoneRulesCapability = {
28044
28663
  motion: array(ZoneRuleSchema).readonly(),
28045
28664
  detection: array(ZoneRuleSchema).readonly(),
28046
28665
  package: array(ZoneRuleSchema).readonly()
28047
- })
28666
+ }),
28667
+ /**
28668
+ * Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
28669
+ *
28670
+ * See `RuntimeStateDurability`. Enforced by
28671
+ * `scripts/check-runtime-state-durability.ts`.
28672
+ */
28673
+ durability: "restored"
28048
28674
  };
28049
28675
  /**
28050
28676
  * Most specific first. Extending this list is how a new device kind becomes
@@ -34784,6 +35410,7 @@ Object.freeze({
34784
35410
  "network-access": "ingress",
34785
35411
  "smtp-provider": "email"
34786
35412
  });
35413
+ new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
34787
35414
  new Set(["devices", "classes"]);
34788
35415
  var WEEKDAY_TO_DAY = {
34789
35416
  Sun: 0,
@@ -35327,4 +35954,4 @@ function vectorDimFromBase64(encoded) {
35327
35954
  return Math.floor(Buffer.from(encoded, "base64").byteLength / 4);
35328
35955
  }
35329
35956
  //#endregion
35330
- export { zoneAnalyticsCapability as $, addonWidgetsSourceCapability as A, encodeVectorBase64 as B, RECORDING_EXPORT_MAX_READ_BYTES as C, TimelapseRulePatchSchema as D, TimelapseRuleInputSchema as E, cosineSimilarity as F, notificationRulesCapability as G, hfModelUrl as H, customAction as I, readDeviceStateFrom as J, pipelineAnalyticsCapability as K, defineCustomActions as L, assertTimelapseCadences as M, audioMetricsCapability as N, TimelapseRuleSchema as O, buildEventKindDescriptor as P, videoclipsCapability as Q, deriveRecordingMode as R, OpsLogEntrySchema as S, TIMELAPSE_DENSE_FLOOR_SEC as T, isScheduleActive as U, faceGalleryCapability as V, kebabToCamel as W, subKindsOf as X, readTimelapseGeneratedAt as Y, vectorDimFromBase64 as Z, NcScheduleSchema as _, string as _t, DeclaredDevices as a, isDeviceScopedCap as at, NcSnoozeSuppressedSchema as b, LabelAttributionSchema as c, _enum as ct, NC_TAXONOMY as d, discriminatedUnion as dt, errMsg as et, NcConditionDescriptorSchema as f, literal as ft, NcRuleTargetSchema as g, record as gt, NcRuleSchema as h, partialRecord as ht, DETECTION_PIPELINE_CAP_NAME as i, hydrateSchema as it, alarmPanelCapability as j, TrackSourceSchema as k, MACRO_LABELS as l, array as lt, NcRulePatchSchema as m, object as mt, DEFAULT_EVENT_COLOR as n, DeviceType as nt, EVENT_KIND_BY_CAP as o, nodePin as ot, NcRuleInputSchema as p, number as pt, plateGalleryCapability as q, DEFAULT_TIMELAPSE_PREVIEW_TEXT as r, createEvent as rt, EVENT_PAD_MS as s, sleep as st, BaseDevice as t, BaseAddon as tt, NC_CONDITION_CATALOG as u, boolean as ut, NcSnoozeInputSchema as v, unknown as vt, RetrainStatusSchema as w, NcTaxonomySchema as x, NcSnoozeSchema as y, EventCategory as yt, embeddingEncoderCapability as z };
35957
+ export { subKindsOf as $, TimelapseRulePatchSchema as A, defineCustomActions as B, NcSnoozeSuppressedSchema as C, RetrainStatusSchema as D, RECORDING_EXPORT_MAX_READ_BYTES as E, assertTimelapseCadences as F, hfModelUrl as G, embeddingEncoderCapability as H, audioMetricsCapability as I, notificationRulesCapability as J, isScheduleActive as K, buildEventKindDescriptor as L, TrackSourceSchema as M, addonWidgetsSourceCapability as N, TIMELAPSE_DENSE_FLOOR_SEC as O, alarmPanelCapability as P, readTimelapseGeneratedAt as Q, cosineSimilarity as R, NcSnoozeSchema as S, EventCategory as St, OpsLogEntrySchema as T, encodeVectorBase64 as U, deriveRecordingMode as V, faceGalleryCapability as W, plateGalleryCapability as X, pipelineAnalyticsCapability as Y, readDeviceStateFrom as Z, NcRulePatchSchema as _, object as _t, DeclaredDevices as a, DeviceType as at, NcScheduleSchema as b, string as bt, LabelAttributionSchema as c, isDeviceScopedCap as ct, NC_CONDITION_CATALOG as d, _enum as dt, vectorDimFromBase64 as et, NC_DEFAULT_SNOOZE_MINUTES as f, array as ft, NcRuleInputSchema as g, number as gt, NcConditionDescriptorSchema as h, literal as ht, DETECTION_PIPELINE_CAP_NAME as i, BaseAddon as it, TimelapseRuleSchema as j, TimelapseRuleInputSchema as k, MACRO_LABELS as l, nodePin as lt, NC_TAXONOMY as m, discriminatedUnion as mt, DEFAULT_EVENT_COLOR as n, zoneAnalyticsCapability as nt, EVENT_KIND_BY_CAP as o, createEvent as ot, NC_SNOOZE_MAX_MINUTES as p, boolean as pt, kebabToCamel as q, DEFAULT_TIMELAPSE_PREVIEW_TEXT as r, errMsg as rt, EVENT_PAD_MS as s, hydrateSchema as st, BaseDevice as t, videoclipsCapability as tt, NC_ALARM_SYSTEM_EVENT_KINDS as u, sleep as ut, NcRuleSchema as v, partialRecord as vt, NcTaxonomySchema as w, NcSnoozeInputSchema as x, unknown as xt, NcRuleTargetSchema as y, record as yt, customAction as z };