@camstack/addon-provider-dreo 0.2.14 → 0.2.16
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.
- package/dist/addon.js +723 -95
- package/dist/addon.mjs +723 -95
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -10794,7 +10794,14 @@ var cameraStreamsCapability = {
|
|
|
10794
10794
|
low: string().optional()
|
|
10795
10795
|
}),
|
|
10796
10796
|
lastChangedAt: number()
|
|
10797
|
-
})
|
|
10797
|
+
}),
|
|
10798
|
+
/**
|
|
10799
|
+
* 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.
|
|
10800
|
+
*
|
|
10801
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
10802
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
10803
|
+
*/
|
|
10804
|
+
durability: "session"
|
|
10798
10805
|
};
|
|
10799
10806
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
10800
10807
|
* agent is the reason placement is not fixed to the hub. */
|
|
@@ -11355,6 +11362,13 @@ var deviceDiscoveryCapability = {
|
|
|
11355
11362
|
kind: "poll"
|
|
11356
11363
|
},
|
|
11357
11364
|
runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
|
|
11365
|
+
/**
|
|
11366
|
+
* Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
|
|
11367
|
+
*
|
|
11368
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11369
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11370
|
+
*/
|
|
11371
|
+
durability: "session",
|
|
11358
11372
|
methods: {
|
|
11359
11373
|
/**
|
|
11360
11374
|
* Snapshot of the current `discovered` list. Returns the
|
|
@@ -13271,7 +13285,23 @@ var NotificationActionSchema = object({
|
|
|
13271
13285
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
13272
13286
|
* does not buy.
|
|
13273
13287
|
*/
|
|
13274
|
-
destructive: boolean().optional()
|
|
13288
|
+
destructive: boolean().optional(),
|
|
13289
|
+
/**
|
|
13290
|
+
* How the tap should REACH the url.
|
|
13291
|
+
*
|
|
13292
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
13293
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
13294
|
+
* That is right for a button whose answer the operator wants to read.
|
|
13295
|
+
*
|
|
13296
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
13297
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
13298
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
13299
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
13300
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
13301
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
13302
|
+
* a requirement.
|
|
13303
|
+
*/
|
|
13304
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
13275
13305
|
});
|
|
13276
13306
|
/**
|
|
13277
13307
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -14123,7 +14153,17 @@ var alarmPanelCapability = {
|
|
|
14123
14153
|
* full slice; renders an arm button per `availableModes` entry and
|
|
14124
14154
|
* a PIN field iff `requiresCode === true`.
|
|
14125
14155
|
*/
|
|
14126
|
-
runtimeState: AlarmPanelStatusSchema
|
|
14156
|
+
runtimeState: AlarmPanelStatusSchema,
|
|
14157
|
+
/**
|
|
14158
|
+
* Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
|
|
14159
|
+
*
|
|
14160
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
14161
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
14162
|
+
*/
|
|
14163
|
+
durability: "restored",
|
|
14164
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
14165
|
+
* whether persisting is worth a SQLite commit. */
|
|
14166
|
+
volatileStateFields: ["lastChangedAt"]
|
|
14127
14167
|
};
|
|
14128
14168
|
/**
|
|
14129
14169
|
* Shared geometry vocabulary for on-frame shape caps — privacy-mask,
|
|
@@ -14300,6 +14340,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
14300
14340
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
14301
14341
|
packageNames: array(string().min(1)).min(1).optional()
|
|
14302
14342
|
});
|
|
14343
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
14344
|
+
* outage the operator asked for once and forgot. */
|
|
14345
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
14303
14346
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
14304
14347
|
var NcScheduleSchema = object({
|
|
14305
14348
|
windows: array(object({
|
|
@@ -14676,15 +14719,15 @@ var NcConditionsSchema = object({
|
|
|
14676
14719
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
14677
14720
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
14678
14721
|
*
|
|
14679
|
-
*
|
|
14680
|
-
* rather than an
|
|
14681
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
14682
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
14722
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
14723
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
14724
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
14725
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
14683
14726
|
* condition fields it does not know when a rule is saved from the phone.
|
|
14684
14727
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
14685
|
-
* operator loses a rule's conditions by opening it — so the
|
|
14686
|
-
*
|
|
14687
|
-
*
|
|
14728
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
14729
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
14730
|
+
* follows here.
|
|
14688
14731
|
*/
|
|
14689
14732
|
audio: NcAudioConditionSchema.optional()
|
|
14690
14733
|
});
|
|
@@ -14920,6 +14963,30 @@ var NcRuleInputSchema = object({
|
|
|
14920
14963
|
*/
|
|
14921
14964
|
snoozeAllowGlobal: boolean().optional(),
|
|
14922
14965
|
/**
|
|
14966
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
14967
|
+
* minutes.
|
|
14968
|
+
*
|
|
14969
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
14970
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
14971
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
14972
|
+
* would collapse the first two:
|
|
14973
|
+
*
|
|
14974
|
+
* | value | meaning |
|
|
14975
|
+
* | --- | --- |
|
|
14976
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
14977
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
14978
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
14979
|
+
*
|
|
14980
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
14981
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
14982
|
+
* would push its own tap-through actions off the notification.
|
|
14983
|
+
*
|
|
14984
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
14985
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
14986
|
+
* window from anywhere (D133).
|
|
14987
|
+
*/
|
|
14988
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
14989
|
+
/**
|
|
14923
14990
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
14924
14991
|
*
|
|
14925
14992
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -15019,6 +15086,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
15019
15086
|
"device",
|
|
15020
15087
|
"package",
|
|
15021
15088
|
"occupancy",
|
|
15089
|
+
"audio",
|
|
15022
15090
|
"system"
|
|
15023
15091
|
]),
|
|
15024
15092
|
label: string(),
|
|
@@ -15037,6 +15105,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
15037
15105
|
"crossingSelect",
|
|
15038
15106
|
"polygonDraw",
|
|
15039
15107
|
"occupancy",
|
|
15108
|
+
"audio",
|
|
15040
15109
|
"deviceState",
|
|
15041
15110
|
"systemEvent"
|
|
15042
15111
|
]),
|
|
@@ -15188,7 +15257,20 @@ var NcSnoozeInputSchema = object({
|
|
|
15188
15257
|
ruleId: string().optional(),
|
|
15189
15258
|
/** Required when `scope: 'device'`. */
|
|
15190
15259
|
deviceId: number().int().optional(),
|
|
15191
|
-
|
|
15260
|
+
/**
|
|
15261
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
15262
|
+
*
|
|
15263
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
15264
|
+
* what every window authored before this field meant, so no persisted row
|
|
15265
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
15266
|
+
*
|
|
15267
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
15268
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
15269
|
+
* not at whichever of their four rules happened to produce the notification
|
|
15270
|
+
* they are dismissing.
|
|
15271
|
+
*/
|
|
15272
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15273
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
15192
15274
|
/**
|
|
15193
15275
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
15194
15276
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -15213,6 +15295,10 @@ var NcSnoozeSchema = object({
|
|
|
15213
15295
|
scope: NcSnoozeScopeSchema,
|
|
15214
15296
|
ruleId: string().optional(),
|
|
15215
15297
|
deviceId: number().int().optional(),
|
|
15298
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
15299
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
15300
|
+
* no SQLite column: nothing queries a window by class. */
|
|
15301
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
15216
15302
|
startedAt: number(),
|
|
15217
15303
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
15218
15304
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -17313,7 +17399,14 @@ var zonesCapability = {
|
|
|
17313
17399
|
* handle. Slice shape is `{ zones: Zone[] }` so future extensions
|
|
17314
17400
|
* (e.g. zone groupings) can sit alongside the polygon list.
|
|
17315
17401
|
*/
|
|
17316
|
-
runtimeState: object({ zones: array(ZoneSchema).readonly() })
|
|
17402
|
+
runtimeState: object({ zones: array(ZoneSchema).readonly() }),
|
|
17403
|
+
/**
|
|
17404
|
+
* 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.
|
|
17405
|
+
*
|
|
17406
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
17407
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
17408
|
+
*/
|
|
17409
|
+
durability: "restored"
|
|
17317
17410
|
};
|
|
17318
17411
|
/**
|
|
17319
17412
|
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
@@ -20112,7 +20205,17 @@ var airQualitySensorCapability = {
|
|
|
20112
20205
|
schema: AirQualitySensorStatusSchema,
|
|
20113
20206
|
kind: "push"
|
|
20114
20207
|
},
|
|
20115
|
-
runtimeState: AirQualitySensorStatusSchema
|
|
20208
|
+
runtimeState: AirQualitySensorStatusSchema,
|
|
20209
|
+
/**
|
|
20210
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
20211
|
+
*
|
|
20212
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20213
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20214
|
+
*/
|
|
20215
|
+
durability: "restored",
|
|
20216
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20217
|
+
* whether persisting is worth a SQLite commit. */
|
|
20218
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
20116
20219
|
};
|
|
20117
20220
|
/**
|
|
20118
20221
|
* Ambient illuminance reading in lux. Drives Home Assistant `sensor`
|
|
@@ -20144,7 +20247,17 @@ var ambientLightSensorCapability = {
|
|
|
20144
20247
|
schema: AmbientLightSensorStatusSchema,
|
|
20145
20248
|
kind: "push"
|
|
20146
20249
|
},
|
|
20147
|
-
runtimeState: AmbientLightSensorStatusSchema
|
|
20250
|
+
runtimeState: AmbientLightSensorStatusSchema,
|
|
20251
|
+
/**
|
|
20252
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
20253
|
+
*
|
|
20254
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20255
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20256
|
+
*/
|
|
20257
|
+
durability: "restored",
|
|
20258
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20259
|
+
* whether persisting is worth a SQLite commit. */
|
|
20260
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
20148
20261
|
};
|
|
20149
20262
|
/**
|
|
20150
20263
|
* Per-class audio metrics aggregated over a sliding window.
|
|
@@ -20262,7 +20375,14 @@ var audioMetricsCapability = {
|
|
|
20262
20375
|
}), AudioMetricsHistorySchema)
|
|
20263
20376
|
},
|
|
20264
20377
|
/** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
|
|
20265
|
-
runtimeState: AudioMetricsSnapshotSchema
|
|
20378
|
+
runtimeState: AudioMetricsSnapshotSchema,
|
|
20379
|
+
/**
|
|
20380
|
+
* 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.
|
|
20381
|
+
*
|
|
20382
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20383
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20384
|
+
*/
|
|
20385
|
+
durability: "session"
|
|
20266
20386
|
};
|
|
20267
20387
|
/**
|
|
20268
20388
|
* Automation-control cap. Models HA `automation.*` entities on
|
|
@@ -20324,7 +20444,14 @@ var automationControlCapability = {
|
|
|
20324
20444
|
* reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
|
|
20325
20445
|
* (badge) directly.
|
|
20326
20446
|
*/
|
|
20327
|
-
runtimeState: AutomationControlStatusSchema
|
|
20447
|
+
runtimeState: AutomationControlStatusSchema,
|
|
20448
|
+
/**
|
|
20449
|
+
* 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.
|
|
20450
|
+
*
|
|
20451
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20452
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20453
|
+
*/
|
|
20454
|
+
durability: "session"
|
|
20328
20455
|
};
|
|
20329
20456
|
/**
|
|
20330
20457
|
* Battery status snapshot. Emitted by providers whose device is
|
|
@@ -20430,7 +20557,17 @@ onStatusChanged: { data: object({
|
|
|
20430
20557
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
20431
20558
|
* the underlying driver.
|
|
20432
20559
|
*/
|
|
20433
|
-
runtimeState: BatteryStatusSchema
|
|
20560
|
+
runtimeState: BatteryStatusSchema,
|
|
20561
|
+
/**
|
|
20562
|
+
* 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.
|
|
20563
|
+
*
|
|
20564
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20565
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20566
|
+
*/
|
|
20567
|
+
durability: "restored",
|
|
20568
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20569
|
+
* whether persisting is worth a SQLite commit. */
|
|
20570
|
+
volatileStateFields: ["lastUpdated"]
|
|
20434
20571
|
};
|
|
20435
20572
|
/**
|
|
20436
20573
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
@@ -20459,7 +20596,17 @@ var binaryCapability = {
|
|
|
20459
20596
|
schema: BinaryStatusSchema,
|
|
20460
20597
|
kind: "push"
|
|
20461
20598
|
},
|
|
20462
|
-
runtimeState: BinaryStatusSchema
|
|
20599
|
+
runtimeState: BinaryStatusSchema,
|
|
20600
|
+
/**
|
|
20601
|
+
* Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
|
|
20602
|
+
*
|
|
20603
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20604
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20605
|
+
*/
|
|
20606
|
+
durability: "restored",
|
|
20607
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20608
|
+
* whether persisting is worth a SQLite commit. */
|
|
20609
|
+
volatileStateFields: ["lastChangedAt"]
|
|
20463
20610
|
};
|
|
20464
20611
|
/**
|
|
20465
20612
|
* Dimmable-light brightness control. Co-exists with `switch` on the
|
|
@@ -20512,7 +20659,14 @@ onBrightnessChanged: { data: object({
|
|
|
20512
20659
|
* by the kernel. Read via `device.state.brightness.value` so UI
|
|
20513
20660
|
* sliders surface the current level without polling the provider.
|
|
20514
20661
|
*/
|
|
20515
|
-
runtimeState: BrightnessStatusSchema
|
|
20662
|
+
runtimeState: BrightnessStatusSchema,
|
|
20663
|
+
/**
|
|
20664
|
+
* Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
|
|
20665
|
+
*
|
|
20666
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20667
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20668
|
+
*/
|
|
20669
|
+
durability: "session"
|
|
20516
20670
|
};
|
|
20517
20671
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
20518
20672
|
kind: "mutation",
|
|
@@ -20600,7 +20754,17 @@ var carbonMonoxideCapability = {
|
|
|
20600
20754
|
schema: CarbonMonoxideStatusSchema,
|
|
20601
20755
|
kind: "push"
|
|
20602
20756
|
},
|
|
20603
|
-
runtimeState: CarbonMonoxideStatusSchema
|
|
20757
|
+
runtimeState: CarbonMonoxideStatusSchema,
|
|
20758
|
+
/**
|
|
20759
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
20760
|
+
*
|
|
20761
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20762
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20763
|
+
*/
|
|
20764
|
+
durability: "restored",
|
|
20765
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
20766
|
+
* whether persisting is worth a SQLite commit. */
|
|
20767
|
+
volatileStateFields: ["lastChangedAt"]
|
|
20604
20768
|
};
|
|
20605
20769
|
/**
|
|
20606
20770
|
* HVAC / climate control cap. Models the full surface of a HA
|
|
@@ -20760,7 +20924,14 @@ var climateControlCapability = {
|
|
|
20760
20924
|
* the full slice via `device.state.climate-control.value` and refresh
|
|
20761
20925
|
* on every push without re-querying the provider.
|
|
20762
20926
|
*/
|
|
20763
|
-
runtimeState: ClimateControlStatusSchema
|
|
20927
|
+
runtimeState: ClimateControlStatusSchema,
|
|
20928
|
+
/**
|
|
20929
|
+
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
20930
|
+
*
|
|
20931
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
20932
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
20933
|
+
*/
|
|
20934
|
+
durability: "session"
|
|
20764
20935
|
};
|
|
20765
20936
|
/**
|
|
20766
20937
|
* Color-light cap. Coexists with `switch` (on/off) and `brightness`
|
|
@@ -20870,7 +21041,14 @@ onColorChanged: { data: object({
|
|
|
20870
21041
|
* kernel. Read via `device.state.color.value` so UI pickers surface
|
|
20871
21042
|
* the current chromaticity without polling the provider.
|
|
20872
21043
|
*/
|
|
20873
|
-
runtimeState: ColorStatusSchema
|
|
21044
|
+
runtimeState: ColorStatusSchema,
|
|
21045
|
+
/**
|
|
21046
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
21047
|
+
*
|
|
21048
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21049
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21050
|
+
*/
|
|
21051
|
+
durability: "session"
|
|
20874
21052
|
};
|
|
20875
21053
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
20876
21054
|
object({
|
|
@@ -20936,7 +21114,17 @@ var connectivityCapability = {
|
|
|
20936
21114
|
schema: ConnectivityStatusSchema,
|
|
20937
21115
|
kind: "push"
|
|
20938
21116
|
},
|
|
20939
|
-
runtimeState: ConnectivityStatusSchema
|
|
21117
|
+
runtimeState: ConnectivityStatusSchema,
|
|
21118
|
+
/**
|
|
21119
|
+
* Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
|
|
21120
|
+
*
|
|
21121
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21122
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21123
|
+
*/
|
|
21124
|
+
durability: "restored",
|
|
21125
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21126
|
+
* whether persisting is worth a SQLite commit. */
|
|
21127
|
+
volatileStateFields: ["lastChangedAt"]
|
|
20940
21128
|
};
|
|
20941
21129
|
/**
|
|
20942
21130
|
* Generic device-consumables capability — surfaces a device's
|
|
@@ -21018,7 +21206,14 @@ reset: method(object({
|
|
|
21018
21206
|
}
|
|
21019
21207
|
}
|
|
21020
21208
|
},
|
|
21021
|
-
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
|
|
21209
|
+
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
|
|
21210
|
+
/**
|
|
21211
|
+
* Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
|
|
21212
|
+
*
|
|
21213
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21214
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21215
|
+
*/
|
|
21216
|
+
durability: "session"
|
|
21022
21217
|
};
|
|
21023
21218
|
/**
|
|
21024
21219
|
* Door / window / opening / garage / valve contact sensor. Boolean
|
|
@@ -21049,7 +21244,17 @@ var contactCapability = {
|
|
|
21049
21244
|
schema: ContactStatusSchema,
|
|
21050
21245
|
kind: "push"
|
|
21051
21246
|
},
|
|
21052
|
-
runtimeState: ContactStatusSchema
|
|
21247
|
+
runtimeState: ContactStatusSchema,
|
|
21248
|
+
/**
|
|
21249
|
+
* Runtime-state durability: **restored** — a door left open across a restart must still read open.
|
|
21250
|
+
*
|
|
21251
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21252
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21253
|
+
*/
|
|
21254
|
+
durability: "restored",
|
|
21255
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21256
|
+
* whether persisting is worth a SQLite commit. */
|
|
21257
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21053
21258
|
};
|
|
21054
21259
|
/**
|
|
21055
21260
|
* Status slice — flat object (the framework's `runtimeState` contract
|
|
@@ -21155,7 +21360,14 @@ var controlCapability = {
|
|
|
21155
21360
|
* dropdown / text field / date picker) read the slice's discriminant
|
|
21156
21361
|
* and value directly without polling the provider.
|
|
21157
21362
|
*/
|
|
21158
|
-
runtimeState: ControlStatusSchema
|
|
21363
|
+
runtimeState: ControlStatusSchema,
|
|
21364
|
+
/**
|
|
21365
|
+
* Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
|
|
21366
|
+
*
|
|
21367
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21368
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21369
|
+
*/
|
|
21370
|
+
durability: "session"
|
|
21159
21371
|
};
|
|
21160
21372
|
var CoverStatusSchema = object({
|
|
21161
21373
|
/** Lifecycle state of the cover. */
|
|
@@ -21216,7 +21428,17 @@ var coverCapability = {
|
|
|
21216
21428
|
* Runtime-state slice — mirrored by the kernel. UI controls watch
|
|
21217
21429
|
* the slice for live position changes during a move.
|
|
21218
21430
|
*/
|
|
21219
|
-
runtimeState: CoverStatusSchema
|
|
21431
|
+
runtimeState: CoverStatusSchema,
|
|
21432
|
+
/**
|
|
21433
|
+
* Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
|
|
21434
|
+
*
|
|
21435
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21436
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21437
|
+
*/
|
|
21438
|
+
durability: "restored",
|
|
21439
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21440
|
+
* whether persisting is worth a SQLite commit. */
|
|
21441
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21220
21442
|
};
|
|
21221
21443
|
/**
|
|
21222
21444
|
* Vendor-neutral day/night (IR-cut) control — the per-camera config cap
|
|
@@ -21310,7 +21532,17 @@ var dayNightCapability = {
|
|
|
21310
21532
|
schema: DayNightStatusSchema,
|
|
21311
21533
|
kind: "poll"
|
|
21312
21534
|
},
|
|
21313
|
-
runtimeState: DayNightStatusSchema
|
|
21535
|
+
runtimeState: DayNightStatusSchema,
|
|
21536
|
+
/**
|
|
21537
|
+
* Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
|
|
21538
|
+
*
|
|
21539
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21540
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21541
|
+
*/
|
|
21542
|
+
durability: "restored",
|
|
21543
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21544
|
+
* whether persisting is worth a SQLite commit. */
|
|
21545
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21314
21546
|
};
|
|
21315
21547
|
/**
|
|
21316
21548
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
@@ -21357,7 +21589,17 @@ onStatusChanged: { data: object({
|
|
|
21357
21589
|
schema: DeviceStatusSchema,
|
|
21358
21590
|
kind: "push"
|
|
21359
21591
|
},
|
|
21360
|
-
runtimeState: DeviceStatusSchema
|
|
21592
|
+
runtimeState: DeviceStatusSchema,
|
|
21593
|
+
/**
|
|
21594
|
+
* 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.
|
|
21595
|
+
*
|
|
21596
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21597
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21598
|
+
*/
|
|
21599
|
+
durability: "restored",
|
|
21600
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21601
|
+
* whether persisting is worth a SQLite commit. */
|
|
21602
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21361
21603
|
};
|
|
21362
21604
|
/**
|
|
21363
21605
|
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
@@ -21419,7 +21661,14 @@ onPressed: { data: DoorbellPressEventSchema } },
|
|
|
21419
21661
|
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
21420
21662
|
* without subscribing.
|
|
21421
21663
|
*/
|
|
21422
|
-
runtimeState: DoorbellStatusSchema
|
|
21664
|
+
runtimeState: DoorbellStatusSchema,
|
|
21665
|
+
/**
|
|
21666
|
+
* 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.
|
|
21667
|
+
*
|
|
21668
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21669
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21670
|
+
*/
|
|
21671
|
+
durability: "restored"
|
|
21423
21672
|
};
|
|
21424
21673
|
/**
|
|
21425
21674
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -21459,7 +21708,17 @@ var enumSensorCapability = {
|
|
|
21459
21708
|
schema: EnumSensorStatusSchema,
|
|
21460
21709
|
kind: "push"
|
|
21461
21710
|
},
|
|
21462
|
-
runtimeState: EnumSensorStatusSchema
|
|
21711
|
+
runtimeState: EnumSensorStatusSchema,
|
|
21712
|
+
/**
|
|
21713
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
|
|
21714
|
+
*
|
|
21715
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21716
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21717
|
+
*/
|
|
21718
|
+
durability: "restored",
|
|
21719
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21720
|
+
* whether persisting is worth a SQLite commit. */
|
|
21721
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21463
21722
|
};
|
|
21464
21723
|
/**
|
|
21465
21724
|
* Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
|
|
@@ -21495,7 +21754,14 @@ var eventEmitterCapability = {
|
|
|
21495
21754
|
schema: EventEmitterStatusSchema,
|
|
21496
21755
|
kind: "push"
|
|
21497
21756
|
},
|
|
21498
|
-
runtimeState: EventEmitterStatusSchema
|
|
21757
|
+
runtimeState: EventEmitterStatusSchema,
|
|
21758
|
+
/**
|
|
21759
|
+
* Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
|
|
21760
|
+
*
|
|
21761
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21762
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21763
|
+
*/
|
|
21764
|
+
durability: "session"
|
|
21499
21765
|
};
|
|
21500
21766
|
var EventItemSchema = object({
|
|
21501
21767
|
id: string(),
|
|
@@ -21776,7 +22042,14 @@ var fanControlCapability = {
|
|
|
21776
22042
|
* Runtime-state slice — mirrored by the kernel. UI fan speed
|
|
21777
22043
|
* sliders read `percentage` for live updates.
|
|
21778
22044
|
*/
|
|
21779
|
-
runtimeState: FanControlStatusSchema
|
|
22045
|
+
runtimeState: FanControlStatusSchema,
|
|
22046
|
+
/**
|
|
22047
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
22048
|
+
*
|
|
22049
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22050
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22051
|
+
*/
|
|
22052
|
+
durability: "session"
|
|
21780
22053
|
};
|
|
21781
22054
|
/**
|
|
21782
22055
|
* Per-device feature/identity probe slice. Holds the runtime-resolved
|
|
@@ -21852,7 +22125,14 @@ onProbeChanged: { data: object({
|
|
|
21852
22125
|
schema: FeatureProbeStatusSchema,
|
|
21853
22126
|
kind: "push"
|
|
21854
22127
|
},
|
|
21855
|
-
runtimeState: FeatureProbeStatusSchema
|
|
22128
|
+
runtimeState: FeatureProbeStatusSchema,
|
|
22129
|
+
/**
|
|
22130
|
+
* 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.
|
|
22131
|
+
*
|
|
22132
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22133
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22134
|
+
*/
|
|
22135
|
+
durability: "session"
|
|
21856
22136
|
};
|
|
21857
22137
|
/**
|
|
21858
22138
|
* Water leak / moisture sensor. Boolean "is liquid currently
|
|
@@ -21879,7 +22159,17 @@ var floodCapability = {
|
|
|
21879
22159
|
schema: FloodStatusSchema,
|
|
21880
22160
|
kind: "push"
|
|
21881
22161
|
},
|
|
21882
|
-
runtimeState: FloodStatusSchema
|
|
22162
|
+
runtimeState: FloodStatusSchema,
|
|
22163
|
+
/**
|
|
22164
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
22165
|
+
*
|
|
22166
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22167
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22168
|
+
*/
|
|
22169
|
+
durability: "restored",
|
|
22170
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22171
|
+
* whether persisting is worth a SQLite commit. */
|
|
22172
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21883
22173
|
};
|
|
21884
22174
|
/**
|
|
21885
22175
|
* Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
|
|
@@ -21902,7 +22192,17 @@ var gasCapability = {
|
|
|
21902
22192
|
schema: GasStatusSchema,
|
|
21903
22193
|
kind: "push"
|
|
21904
22194
|
},
|
|
21905
|
-
runtimeState: GasStatusSchema
|
|
22195
|
+
runtimeState: GasStatusSchema,
|
|
22196
|
+
/**
|
|
22197
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
22198
|
+
*
|
|
22199
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22200
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22201
|
+
*/
|
|
22202
|
+
durability: "restored",
|
|
22203
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22204
|
+
* whether persisting is worth a SQLite commit. */
|
|
22205
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21906
22206
|
};
|
|
21907
22207
|
/**
|
|
21908
22208
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
@@ -21978,7 +22278,14 @@ var humidifierCapability = {
|
|
|
21978
22278
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
21979
22279
|
* slice for live humidity / mode changes.
|
|
21980
22280
|
*/
|
|
21981
|
-
runtimeState: HumidifierStatusSchema
|
|
22281
|
+
runtimeState: HumidifierStatusSchema,
|
|
22282
|
+
/**
|
|
22283
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
22284
|
+
*
|
|
22285
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22286
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22287
|
+
*/
|
|
22288
|
+
durability: "session"
|
|
21982
22289
|
};
|
|
21983
22290
|
/**
|
|
21984
22291
|
* Single-metric humidity reading. Drives Home Assistant `sensor`
|
|
@@ -22014,7 +22321,17 @@ var humiditySensorCapability = {
|
|
|
22014
22321
|
schema: HumiditySensorStatusSchema,
|
|
22015
22322
|
kind: "push"
|
|
22016
22323
|
},
|
|
22017
|
-
runtimeState: HumiditySensorStatusSchema
|
|
22324
|
+
runtimeState: HumiditySensorStatusSchema,
|
|
22325
|
+
/**
|
|
22326
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
|
|
22327
|
+
*
|
|
22328
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22329
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22330
|
+
*/
|
|
22331
|
+
durability: "restored",
|
|
22332
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22333
|
+
* whether persisting is worth a SQLite commit. */
|
|
22334
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22018
22335
|
};
|
|
22019
22336
|
/**
|
|
22020
22337
|
* Image display cap. Models a single still image exposed by an integration —
|
|
@@ -22052,7 +22369,14 @@ var imageCapability = {
|
|
|
22052
22369
|
* Runtime-state slice — mirrored by the kernel. The UI reads `url`
|
|
22053
22370
|
* directly and renders the still image.
|
|
22054
22371
|
*/
|
|
22055
|
-
runtimeState: ImageStatusSchema
|
|
22372
|
+
runtimeState: ImageStatusSchema,
|
|
22373
|
+
/**
|
|
22374
|
+
* Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
|
|
22375
|
+
*
|
|
22376
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22377
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22378
|
+
*/
|
|
22379
|
+
durability: "session"
|
|
22056
22380
|
};
|
|
22057
22381
|
/**
|
|
22058
22382
|
* Vendor-neutral image / picture-adjustment cap — the per-camera config
|
|
@@ -22201,7 +22525,17 @@ var imageSettingsCapability = {
|
|
|
22201
22525
|
schema: ImageSettingsStatusSchema,
|
|
22202
22526
|
kind: "poll"
|
|
22203
22527
|
},
|
|
22204
|
-
runtimeState: ImageSettingsStatusSchema
|
|
22528
|
+
runtimeState: ImageSettingsStatusSchema,
|
|
22529
|
+
/**
|
|
22530
|
+
* Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
|
|
22531
|
+
*
|
|
22532
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22533
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22534
|
+
*/
|
|
22535
|
+
durability: "restored",
|
|
22536
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22537
|
+
* whether persisting is worth a SQLite commit. */
|
|
22538
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22205
22539
|
};
|
|
22206
22540
|
/**
|
|
22207
22541
|
* integrations — system-scoped singleton capability for integration
|
|
@@ -22541,7 +22875,14 @@ var lawnMowerControlCapability = {
|
|
|
22541
22875
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
22542
22876
|
* slice for live activity + battery changes.
|
|
22543
22877
|
*/
|
|
22544
|
-
runtimeState: LawnMowerControlStatusSchema
|
|
22878
|
+
runtimeState: LawnMowerControlStatusSchema,
|
|
22879
|
+
/**
|
|
22880
|
+
* Runtime-state durability: **session** — as `vacuum-control`.
|
|
22881
|
+
*
|
|
22882
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22883
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22884
|
+
*/
|
|
22885
|
+
durability: "session"
|
|
22545
22886
|
};
|
|
22546
22887
|
/**
|
|
22547
22888
|
* local-network — hub-only singleton.
|
|
@@ -22747,7 +23088,17 @@ var lockControlCapability = {
|
|
|
22747
23088
|
* read `state` and disable themselves during `locking`/`unlocking`
|
|
22748
23089
|
* transitions.
|
|
22749
23090
|
*/
|
|
22750
|
-
runtimeState: LockControlStatusSchema
|
|
23091
|
+
runtimeState: LockControlStatusSchema,
|
|
23092
|
+
/**
|
|
23093
|
+
* Runtime-state durability: **restored** — a lock left locked must still read locked.
|
|
23094
|
+
*
|
|
23095
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23096
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23097
|
+
*/
|
|
23098
|
+
durability: "restored",
|
|
23099
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23100
|
+
* whether persisting is worth a SQLite commit. */
|
|
23101
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22751
23102
|
};
|
|
22752
23103
|
/**
|
|
22753
23104
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
@@ -22909,7 +23260,14 @@ var mediaPlayerCapability = {
|
|
|
22909
23260
|
* full slice for live now-playing, volume, and progress updates
|
|
22910
23261
|
* without polling.
|
|
22911
23262
|
*/
|
|
22912
|
-
runtimeState: MediaPlayerStatusSchema
|
|
23263
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
23264
|
+
/**
|
|
23265
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
23266
|
+
*
|
|
23267
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23268
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23269
|
+
*/
|
|
23270
|
+
durability: "session"
|
|
22913
23271
|
};
|
|
22914
23272
|
/**
|
|
22915
23273
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -23173,7 +23531,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
23173
23531
|
* `device.state.motion.value`. Reads never invoke the provider, so
|
|
23174
23532
|
* UIs and other addons can poll the cached state safely.
|
|
23175
23533
|
*/
|
|
23176
|
-
runtimeState: MotionStatusSchema
|
|
23534
|
+
runtimeState: MotionStatusSchema,
|
|
23535
|
+
/**
|
|
23536
|
+
* 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.
|
|
23537
|
+
*
|
|
23538
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23539
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23540
|
+
*/
|
|
23541
|
+
durability: "session"
|
|
23177
23542
|
};
|
|
23178
23543
|
/**
|
|
23179
23544
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -23238,7 +23603,14 @@ var motionTriggerCapability = {
|
|
|
23238
23603
|
schema: MotionTriggerStatusSchema,
|
|
23239
23604
|
kind: "command-driven"
|
|
23240
23605
|
},
|
|
23241
|
-
runtimeState: MotionTriggerRuntimeStateSchema
|
|
23606
|
+
runtimeState: MotionTriggerRuntimeStateSchema,
|
|
23607
|
+
/**
|
|
23608
|
+
* 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.
|
|
23609
|
+
*
|
|
23610
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23611
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23612
|
+
*/
|
|
23613
|
+
durability: "session"
|
|
23242
23614
|
};
|
|
23243
23615
|
/**
|
|
23244
23616
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
@@ -23305,7 +23677,17 @@ var motionZonesCapability = {
|
|
|
23305
23677
|
schema: MotionZoneStatusSchema,
|
|
23306
23678
|
kind: "poll"
|
|
23307
23679
|
},
|
|
23308
|
-
runtimeState: MotionZoneStatusSchema
|
|
23680
|
+
runtimeState: MotionZoneStatusSchema,
|
|
23681
|
+
/**
|
|
23682
|
+
* 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.
|
|
23683
|
+
*
|
|
23684
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23685
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23686
|
+
*/
|
|
23687
|
+
durability: "restored",
|
|
23688
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23689
|
+
* whether persisting is worth a SQLite commit. */
|
|
23690
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23309
23691
|
};
|
|
23310
23692
|
/**
|
|
23311
23693
|
* On-camera AI object detection cap. Surfaces per-device the classes
|
|
@@ -23379,7 +23761,17 @@ var nativeObjectDetectionCapability = {
|
|
|
23379
23761
|
schema: NativeObjectDetectionStatusSchema,
|
|
23380
23762
|
kind: "push"
|
|
23381
23763
|
},
|
|
23382
|
-
runtimeState: NativeObjectDetectionRuntimeStateSchema
|
|
23764
|
+
runtimeState: NativeObjectDetectionRuntimeStateSchema,
|
|
23765
|
+
/**
|
|
23766
|
+
* 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.
|
|
23767
|
+
*
|
|
23768
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23769
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23770
|
+
*/
|
|
23771
|
+
durability: "restored",
|
|
23772
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23773
|
+
* whether persisting is worth a SQLite commit. */
|
|
23774
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23383
23775
|
};
|
|
23384
23776
|
/**
|
|
23385
23777
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
@@ -23713,7 +24105,14 @@ onSent: { data: object({
|
|
|
23713
24105
|
* form reads `supports` to gate optional fields; history pane reads
|
|
23714
24106
|
* `lastSentAt` / `lastError` / `queueDepth`.
|
|
23715
24107
|
*/
|
|
23716
|
-
runtimeState: NotifierStatusSchema
|
|
24108
|
+
runtimeState: NotifierStatusSchema,
|
|
24109
|
+
/**
|
|
24110
|
+
* Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
|
|
24111
|
+
*
|
|
24112
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24113
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24114
|
+
*/
|
|
24115
|
+
durability: "session"
|
|
23717
24116
|
};
|
|
23718
24117
|
/**
|
|
23719
24118
|
* Generic numeric sensor — last-resort fallback when no typed numeric
|
|
@@ -23756,7 +24155,17 @@ var numericSensorCapability = {
|
|
|
23756
24155
|
schema: NumericSensorStatusSchema,
|
|
23757
24156
|
kind: "push"
|
|
23758
24157
|
},
|
|
23759
|
-
runtimeState: NumericSensorStatusSchema
|
|
24158
|
+
runtimeState: NumericSensorStatusSchema,
|
|
24159
|
+
/**
|
|
24160
|
+
* 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.
|
|
24161
|
+
*
|
|
24162
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24163
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24164
|
+
*/
|
|
24165
|
+
durability: "restored",
|
|
24166
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24167
|
+
* whether persisting is worth a SQLite commit. */
|
|
24168
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23760
24169
|
};
|
|
23761
24170
|
/**
|
|
23762
24171
|
* Generic on-screen-display (video overlay) cap. Each camera exposes
|
|
@@ -24141,7 +24550,14 @@ var petFeederCapability = {
|
|
|
24141
24550
|
* the full slice via `device.state.petFeeder.value` and refresh on
|
|
24142
24551
|
* every poll without re-querying the provider.
|
|
24143
24552
|
*/
|
|
24144
|
-
runtimeState: PetFeederStatusSchema
|
|
24553
|
+
runtimeState: PetFeederStatusSchema,
|
|
24554
|
+
/**
|
|
24555
|
+
* Runtime-state durability: **session** — live appliance state re-published on connect.
|
|
24556
|
+
*
|
|
24557
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24558
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24559
|
+
*/
|
|
24560
|
+
durability: "session"
|
|
24145
24561
|
};
|
|
24146
24562
|
var VehicleSchema = object({
|
|
24147
24563
|
id: string(),
|
|
@@ -24453,7 +24869,17 @@ var powerMeterCapability = {
|
|
|
24453
24869
|
schema: PowerMeterStatusSchema,
|
|
24454
24870
|
kind: "push"
|
|
24455
24871
|
},
|
|
24456
|
-
runtimeState: PowerMeterStatusSchema
|
|
24872
|
+
runtimeState: PowerMeterStatusSchema,
|
|
24873
|
+
/**
|
|
24874
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
|
|
24875
|
+
*
|
|
24876
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24877
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24878
|
+
*/
|
|
24879
|
+
durability: "restored",
|
|
24880
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24881
|
+
* whether persisting is worth a SQLite commit. */
|
|
24882
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24457
24883
|
};
|
|
24458
24884
|
/**
|
|
24459
24885
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
@@ -24510,7 +24936,17 @@ var presenceCapability = {
|
|
|
24510
24936
|
* the map pin is rendered (use `DeviceFeature.PresenceGps` for the
|
|
24511
24937
|
* pre-fetch fast-path check).
|
|
24512
24938
|
*/
|
|
24513
|
-
runtimeState: PresenceStatusSchema
|
|
24939
|
+
runtimeState: PresenceStatusSchema,
|
|
24940
|
+
/**
|
|
24941
|
+
* Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
|
|
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: ["lastChangedAt"]
|
|
24514
24950
|
};
|
|
24515
24951
|
/**
|
|
24516
24952
|
* Atmospheric pressure reading in hectopascals. Drives Home Assistant
|
|
@@ -24546,7 +24982,17 @@ var pressureSensorCapability = {
|
|
|
24546
24982
|
schema: PressureSensorStatusSchema,
|
|
24547
24983
|
kind: "push"
|
|
24548
24984
|
},
|
|
24549
|
-
runtimeState: PressureSensorStatusSchema
|
|
24985
|
+
runtimeState: PressureSensorStatusSchema,
|
|
24986
|
+
/**
|
|
24987
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
24988
|
+
*
|
|
24989
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24990
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24991
|
+
*/
|
|
24992
|
+
durability: "restored",
|
|
24993
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24994
|
+
* whether persisting is worth a SQLite commit. */
|
|
24995
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24550
24996
|
};
|
|
24551
24997
|
/**
|
|
24552
24998
|
* PRIVACY — what the camera deliberately does not capture. Two planes:
|
|
@@ -24676,7 +25122,17 @@ var privacyMaskCapability = {
|
|
|
24676
25122
|
schema: PrivacyMaskStatusSchema,
|
|
24677
25123
|
kind: "poll"
|
|
24678
25124
|
},
|
|
24679
|
-
runtimeState: PrivacyMaskStatusSchema
|
|
25125
|
+
runtimeState: PrivacyMaskStatusSchema,
|
|
25126
|
+
/**
|
|
25127
|
+
* Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
|
|
25128
|
+
*
|
|
25129
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25130
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25131
|
+
*/
|
|
25132
|
+
durability: "restored",
|
|
25133
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25134
|
+
* whether persisting is worth a SQLite commit. */
|
|
25135
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24680
25136
|
};
|
|
24681
25137
|
var PtzPresetSchema = object({
|
|
24682
25138
|
id: string(),
|
|
@@ -24842,7 +25298,14 @@ var ptzAutotrackCapability = {
|
|
|
24842
25298
|
* fetch / cache / fallback logic out of the four cap methods —
|
|
24843
25299
|
* they become trampolines over `runtimeState`.
|
|
24844
25300
|
*/
|
|
24845
|
-
runtimeState: PtzAutotrackRuntimeStateSchema
|
|
25301
|
+
runtimeState: PtzAutotrackRuntimeStateSchema,
|
|
25302
|
+
/**
|
|
25303
|
+
* Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
|
|
25304
|
+
*
|
|
25305
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25306
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25307
|
+
*/
|
|
25308
|
+
durability: "session"
|
|
24846
25309
|
};
|
|
24847
25310
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
24848
25311
|
kind: "mutation",
|
|
@@ -25189,13 +25652,24 @@ method(object({
|
|
|
25189
25652
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
25190
25653
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
25191
25654
|
/**
|
|
25192
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25655
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
25656
|
+
*
|
|
25657
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
25658
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
25659
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
25660
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
25661
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
25662
|
+
* the render side knows the segments, so the translation lives there
|
|
25663
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
25664
|
+
*
|
|
25665
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
25666
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
25667
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
25668
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
25669
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
25193
25670
|
*
|
|
25194
|
-
* Relative and not absolute epoch
|
|
25195
|
-
*
|
|
25196
|
-
* playlist. Handing it absolute epochs would make every call site responsible
|
|
25197
|
-
* for the same subtraction, and the one that forgot would emit a filter that
|
|
25198
|
-
* selects nothing — silently, as a uniform timelapse.
|
|
25671
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
25672
|
+
* call site responsible for the same subtraction.
|
|
25199
25673
|
*/
|
|
25200
25674
|
var ExportDenseRangeSchema = object({
|
|
25201
25675
|
fromSec: number().nonnegative(),
|
|
@@ -25481,7 +25955,14 @@ var sceneMonitorCapability = {
|
|
|
25481
25955
|
schema: SceneMonitorStatusSchema,
|
|
25482
25956
|
kind: "push"
|
|
25483
25957
|
},
|
|
25484
|
-
runtimeState: SceneMonitorStatusSchema
|
|
25958
|
+
runtimeState: SceneMonitorStatusSchema,
|
|
25959
|
+
/**
|
|
25960
|
+
* Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
|
|
25961
|
+
*
|
|
25962
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25963
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25964
|
+
*/
|
|
25965
|
+
durability: "session"
|
|
25485
25966
|
};
|
|
25486
25967
|
/**
|
|
25487
25968
|
* Per-stage gating mode applied to the zones a rule references.
|
|
@@ -25625,7 +26106,14 @@ var scriptRunnerCapability = {
|
|
|
25625
26106
|
* `isRunning` to render a spinner during execution and surfaces
|
|
25626
26107
|
* `lastError` / `lastRunSuccess` in the recent-runs panel.
|
|
25627
26108
|
*/
|
|
25628
|
-
runtimeState: ScriptRunnerStatusSchema
|
|
26109
|
+
runtimeState: ScriptRunnerStatusSchema,
|
|
26110
|
+
/**
|
|
26111
|
+
* Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
|
|
26112
|
+
*
|
|
26113
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26114
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26115
|
+
*/
|
|
26116
|
+
durability: "session"
|
|
25629
26117
|
};
|
|
25630
26118
|
/**
|
|
25631
26119
|
* Smoke alarm sensor — boolean "is smoke currently detected" with
|
|
@@ -25652,7 +26140,17 @@ var smokeCapability = {
|
|
|
25652
26140
|
schema: SmokeStatusSchema,
|
|
25653
26141
|
kind: "push"
|
|
25654
26142
|
},
|
|
25655
|
-
runtimeState: SmokeStatusSchema
|
|
26143
|
+
runtimeState: SmokeStatusSchema,
|
|
26144
|
+
/**
|
|
26145
|
+
* Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
|
|
26146
|
+
*
|
|
26147
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26148
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26149
|
+
*/
|
|
26150
|
+
durability: "restored",
|
|
26151
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26152
|
+
* whether persisting is worth a SQLite commit. */
|
|
26153
|
+
volatileStateFields: ["lastChangedAt"]
|
|
25656
26154
|
};
|
|
25657
26155
|
/**
|
|
25658
26156
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
@@ -25825,7 +26323,17 @@ var streamParamsCapability = {
|
|
|
25825
26323
|
schema: StreamParamsStatusSchema,
|
|
25826
26324
|
kind: "poll"
|
|
25827
26325
|
},
|
|
25828
|
-
runtimeState: StreamParamsStatusSchema
|
|
26326
|
+
runtimeState: StreamParamsStatusSchema,
|
|
26327
|
+
/**
|
|
26328
|
+
* Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
|
|
26329
|
+
*
|
|
26330
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26331
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26332
|
+
*/
|
|
26333
|
+
durability: "restored",
|
|
26334
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26335
|
+
* whether persisting is worth a SQLite commit. */
|
|
26336
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25829
26337
|
};
|
|
25830
26338
|
/**
|
|
25831
26339
|
* Generic on/off switch cap for accessory children (siren, floodlight,
|
|
@@ -25871,6 +26379,16 @@ var switchCapability = {
|
|
|
25871
26379
|
* not need to re-query the provider after a setState mutation.
|
|
25872
26380
|
*/
|
|
25873
26381
|
runtimeState: SwitchStatusSchema,
|
|
26382
|
+
/**
|
|
26383
|
+
* Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
|
|
26384
|
+
*
|
|
26385
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26386
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26387
|
+
*/
|
|
26388
|
+
durability: "restored",
|
|
26389
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26390
|
+
* whether persisting is worth a SQLite commit. */
|
|
26391
|
+
volatileStateFields: ["lastChangedAt"],
|
|
25874
26392
|
settings: { bindings: [{
|
|
25875
26393
|
kind: "scalar",
|
|
25876
26394
|
statusPath: "on",
|
|
@@ -25950,7 +26468,17 @@ var tamperCapability = {
|
|
|
25950
26468
|
schema: TamperStatusSchema,
|
|
25951
26469
|
kind: "push"
|
|
25952
26470
|
},
|
|
25953
|
-
runtimeState: TamperStatusSchema
|
|
26471
|
+
runtimeState: TamperStatusSchema,
|
|
26472
|
+
/**
|
|
26473
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
26474
|
+
*
|
|
26475
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26476
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26477
|
+
*/
|
|
26478
|
+
durability: "restored",
|
|
26479
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26480
|
+
* whether persisting is worth a SQLite commit. */
|
|
26481
|
+
volatileStateFields: ["lastChangedAt"]
|
|
25954
26482
|
};
|
|
25955
26483
|
/**
|
|
25956
26484
|
* Single-metric temperature reading. Drives Home Assistant `sensor`
|
|
@@ -25995,7 +26523,17 @@ var temperatureSensorCapability = {
|
|
|
25995
26523
|
schema: TemperatureSensorStatusSchema,
|
|
25996
26524
|
kind: "push"
|
|
25997
26525
|
},
|
|
25998
|
-
runtimeState: TemperatureSensorStatusSchema
|
|
26526
|
+
runtimeState: TemperatureSensorStatusSchema,
|
|
26527
|
+
/**
|
|
26528
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
|
|
26529
|
+
*
|
|
26530
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26531
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26532
|
+
*/
|
|
26533
|
+
durability: "restored",
|
|
26534
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26535
|
+
* whether persisting is worth a SQLite commit. */
|
|
26536
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25999
26537
|
};
|
|
26000
26538
|
/**
|
|
26001
26539
|
* toast — system-scoped singleton capability that streams toast
|
|
@@ -26064,7 +26602,14 @@ var updateCapability = {
|
|
|
26064
26602
|
schema: UpdateStatusSchema,
|
|
26065
26603
|
kind: "poll"
|
|
26066
26604
|
},
|
|
26067
|
-
runtimeState: UpdateStatusSchema
|
|
26605
|
+
runtimeState: UpdateStatusSchema,
|
|
26606
|
+
/**
|
|
26607
|
+
* Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
|
|
26608
|
+
*
|
|
26609
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26610
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26611
|
+
*/
|
|
26612
|
+
durability: "session"
|
|
26068
26613
|
};
|
|
26069
26614
|
var UserSummarySchema = object({
|
|
26070
26615
|
id: string(),
|
|
@@ -26398,7 +26943,14 @@ var vacuumControlCapability = {
|
|
|
26398
26943
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
26399
26944
|
* slice for live state + battery + fan-speed changes.
|
|
26400
26945
|
*/
|
|
26401
|
-
runtimeState: VacuumControlStatusSchema
|
|
26946
|
+
runtimeState: VacuumControlStatusSchema,
|
|
26947
|
+
/**
|
|
26948
|
+
* Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
|
|
26949
|
+
*
|
|
26950
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26951
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26952
|
+
*/
|
|
26953
|
+
durability: "session"
|
|
26402
26954
|
};
|
|
26403
26955
|
var ValveStatusSchema = object({
|
|
26404
26956
|
/** Lifecycle state of the valve. */
|
|
@@ -26450,7 +27002,14 @@ var valveCapability = {
|
|
|
26450
27002
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
26451
27003
|
* slice for live position changes during a move.
|
|
26452
27004
|
*/
|
|
26453
|
-
runtimeState: ValveStatusSchema
|
|
27005
|
+
runtimeState: ValveStatusSchema,
|
|
27006
|
+
/**
|
|
27007
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
27008
|
+
*
|
|
27009
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27010
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27011
|
+
*/
|
|
27012
|
+
durability: "session"
|
|
26454
27013
|
};
|
|
26455
27014
|
/**
|
|
26456
27015
|
* Vibration / shake / impact sensor. Drives Home Assistant
|
|
@@ -26472,7 +27031,17 @@ var vibrationCapability = {
|
|
|
26472
27031
|
schema: VibrationStatusSchema,
|
|
26473
27032
|
kind: "push"
|
|
26474
27033
|
},
|
|
26475
|
-
runtimeState: VibrationStatusSchema
|
|
27034
|
+
runtimeState: VibrationStatusSchema,
|
|
27035
|
+
/**
|
|
27036
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
27037
|
+
*
|
|
27038
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27039
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27040
|
+
*/
|
|
27041
|
+
durability: "restored",
|
|
27042
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27043
|
+
* whether persisting is worth a SQLite commit. */
|
|
27044
|
+
volatileStateFields: ["lastChangedAt"]
|
|
26476
27045
|
};
|
|
26477
27046
|
/**
|
|
26478
27047
|
* Water heater / boiler cap. Models HA `water_heater.*` entities — a
|
|
@@ -26546,7 +27115,14 @@ var waterHeaterCapability = {
|
|
|
26546
27115
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
26547
27116
|
* slice for live temperature / mode / away changes.
|
|
26548
27117
|
*/
|
|
26549
|
-
runtimeState: WaterHeaterStatusSchema
|
|
27118
|
+
runtimeState: WaterHeaterStatusSchema,
|
|
27119
|
+
/**
|
|
27120
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
27121
|
+
*
|
|
27122
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27123
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27124
|
+
*/
|
|
27125
|
+
durability: "session"
|
|
26550
27126
|
};
|
|
26551
27127
|
/**
|
|
26552
27128
|
* Weather provider cap. Models HA `weather.*` entities — a read-only
|
|
@@ -26605,7 +27181,14 @@ var weatherCapability = {
|
|
|
26605
27181
|
* Runtime-state slice — mirrored by the kernel. The UI reads the
|
|
26606
27182
|
* current conditions directly from the slice on each weather push.
|
|
26607
27183
|
*/
|
|
26608
|
-
runtimeState: WeatherStatusSchema
|
|
27184
|
+
runtimeState: WeatherStatusSchema,
|
|
27185
|
+
/**
|
|
27186
|
+
* Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
|
|
27187
|
+
*
|
|
27188
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27189
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27190
|
+
*/
|
|
27191
|
+
durability: "session"
|
|
26609
27192
|
};
|
|
26610
27193
|
/**
|
|
26611
27194
|
* Per-zone occupancy aggregation produced by the analytics frame
|
|
@@ -26767,7 +27350,14 @@ var zoneAnalyticsCapability = {
|
|
|
26767
27350
|
* automatically; the explicit `getCurrentSnapshot` cap method is
|
|
26768
27351
|
* still useful for one-off polls without a subscription.
|
|
26769
27352
|
*/
|
|
26770
|
-
runtimeState: CameraOccupancySnapshotSchema
|
|
27353
|
+
runtimeState: CameraOccupancySnapshotSchema,
|
|
27354
|
+
/**
|
|
27355
|
+
* Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
|
|
27356
|
+
*
|
|
27357
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27358
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27359
|
+
*/
|
|
27360
|
+
durability: "session"
|
|
26771
27361
|
};
|
|
26772
27362
|
/**
|
|
26773
27363
|
* Stages a {@link ZoneRule} can apply to. Discriminator on the rules
|
|
@@ -26845,7 +27435,14 @@ var zoneRulesCapability = {
|
|
|
26845
27435
|
motion: array(ZoneRuleSchema).readonly(),
|
|
26846
27436
|
detection: array(ZoneRuleSchema).readonly(),
|
|
26847
27437
|
package: array(ZoneRuleSchema).readonly()
|
|
26848
|
-
})
|
|
27438
|
+
}),
|
|
27439
|
+
/**
|
|
27440
|
+
* Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
|
|
27441
|
+
*
|
|
27442
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27443
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27444
|
+
*/
|
|
27445
|
+
durability: "restored"
|
|
26849
27446
|
};
|
|
26850
27447
|
/**
|
|
26851
27448
|
* Accessory device helpers — shared across drivers.
|
|
@@ -33532,6 +34129,7 @@ Object.freeze({
|
|
|
33532
34129
|
"network-access": "ingress",
|
|
33533
34130
|
"smtp-provider": "email"
|
|
33534
34131
|
});
|
|
34132
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
33535
34133
|
new Set(["devices", "classes"]);
|
|
33536
34134
|
/**
|
|
33537
34135
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -33809,25 +34407,32 @@ object({
|
|
|
33809
34407
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
33810
34408
|
object({
|
|
33811
34409
|
/**
|
|
33812
|
-
* How
|
|
34410
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
34411
|
+
* detection result.
|
|
33813
34412
|
*
|
|
33814
|
-
*
|
|
33815
|
-
*
|
|
33816
|
-
*
|
|
33817
|
-
*
|
|
33818
|
-
*
|
|
34413
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
34414
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
34415
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
34416
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
34417
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
34418
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
34419
|
+
*
|
|
34420
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
34421
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
34422
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
34423
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
34424
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
33819
34425
|
*/
|
|
33820
|
-
|
|
34426
|
+
holdFrames: number().int().min(1).max(64),
|
|
33821
34427
|
/**
|
|
33822
34428
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
33823
34429
|
*
|
|
33824
|
-
*
|
|
33825
|
-
*
|
|
33826
|
-
*
|
|
33827
|
-
*
|
|
33828
|
-
*
|
|
33829
|
-
*
|
|
33830
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
34430
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
34431
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
34432
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
34433
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
34434
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
34435
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
33831
34436
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
33832
34437
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
33833
34438
|
* to replace).
|
|
@@ -33853,22 +34458,45 @@ object({
|
|
|
33853
34458
|
* there is the signal that some caller names frames outside the inference set
|
|
33854
34459
|
* and that this must go back to `all`.
|
|
33855
34460
|
*/
|
|
33856
|
-
admission: NativeLeaseAdmissionSchema
|
|
34461
|
+
admission: NativeLeaseAdmissionSchema,
|
|
34462
|
+
/**
|
|
34463
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
34464
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
34465
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
34466
|
+
*
|
|
34467
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
34468
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
34469
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
34470
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
34471
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
34472
|
+
* was interrogated per SUBJECT.
|
|
34473
|
+
*
|
|
34474
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
34475
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
34476
|
+
* reproduce that.
|
|
34477
|
+
*/
|
|
34478
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
33857
34479
|
});
|
|
33858
34480
|
/**
|
|
33859
|
-
* The values in force when the operator has set nothing
|
|
33860
|
-
*
|
|
33861
|
-
*
|
|
34481
|
+
* The values in force when the operator has set nothing.
|
|
34482
|
+
*
|
|
34483
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
34484
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
34485
|
+
* in the same change that redefines it would make a regression and a retune
|
|
34486
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
34487
|
+
* live traffic.
|
|
33862
34488
|
*/
|
|
33863
34489
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
33864
|
-
|
|
34490
|
+
holdFrames: 8,
|
|
33865
34491
|
budgetMb: 1024,
|
|
33866
34492
|
activityMs: 15e3,
|
|
34493
|
+
tileBudgetMb: 64,
|
|
33867
34494
|
admission: "inferred"
|
|
33868
34495
|
};
|
|
33869
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
34496
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
33870
34497
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
33871
34498
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
34499
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
33872
34500
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
33873
34501
|
//#endregion
|
|
33874
34502
|
//#region src/config.ts
|