@camstack/addon-provider-petkit 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.js
CHANGED
|
@@ -11873,7 +11873,14 @@ var cameraStreamsCapability = {
|
|
|
11873
11873
|
low: string().optional()
|
|
11874
11874
|
}),
|
|
11875
11875
|
lastChangedAt: number()
|
|
11876
|
-
})
|
|
11876
|
+
}),
|
|
11877
|
+
/**
|
|
11878
|
+
* 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.
|
|
11879
|
+
*
|
|
11880
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11881
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11882
|
+
*/
|
|
11883
|
+
durability: "session"
|
|
11877
11884
|
};
|
|
11878
11885
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
11879
11886
|
* agent is the reason placement is not fixed to the hub. */
|
|
@@ -12434,6 +12441,13 @@ var deviceDiscoveryCapability = {
|
|
|
12434
12441
|
kind: "poll"
|
|
12435
12442
|
},
|
|
12436
12443
|
runtimeState: DeviceDiscoveryStatusSchema.extend({ lastFetchedAt: number().int().nonnegative() }),
|
|
12444
|
+
/**
|
|
12445
|
+
* Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
|
|
12446
|
+
*
|
|
12447
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
12448
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
12449
|
+
*/
|
|
12450
|
+
durability: "session",
|
|
12437
12451
|
methods: {
|
|
12438
12452
|
/**
|
|
12439
12453
|
* Snapshot of the current `discovered` list. Returns the
|
|
@@ -14350,7 +14364,23 @@ var NotificationActionSchema = object({
|
|
|
14350
14364
|
* else — see `notification-center/action-token.ts` for what that does and
|
|
14351
14365
|
* does not buy.
|
|
14352
14366
|
*/
|
|
14353
|
-
destructive: boolean().optional()
|
|
14367
|
+
destructive: boolean().optional(),
|
|
14368
|
+
/**
|
|
14369
|
+
* How the tap should REACH the url.
|
|
14370
|
+
*
|
|
14371
|
+
* `navigate` (absent, and every button authored before this field) opens it:
|
|
14372
|
+
* the phone leaves the notification and shows whatever the callback returns.
|
|
14373
|
+
* That is right for a button whose answer the operator wants to read.
|
|
14374
|
+
*
|
|
14375
|
+
* `background` fires it as a POST and stays put. It exists for the buttons
|
|
14376
|
+
* whose whole point is not to interrupt — "silence this for 30 minutes" is
|
|
14377
|
+
* an answer to the notification, and being thrown into a browser tab to
|
|
14378
|
+
* confirm it costs more attention than the notification did. A backend that
|
|
14379
|
+
* cannot do a background call renders it as an ordinary link (the adapters
|
|
14380
|
+
* fall back rather than dropping the button), so this is a preference, never
|
|
14381
|
+
* a requirement.
|
|
14382
|
+
*/
|
|
14383
|
+
mode: _enum(["navigate", "background"]).optional()
|
|
14354
14384
|
});
|
|
14355
14385
|
/**
|
|
14356
14386
|
* The canonical notification. `body` is the only hard field (Apprise model).
|
|
@@ -15202,7 +15232,17 @@ var alarmPanelCapability = {
|
|
|
15202
15232
|
* full slice; renders an arm button per `availableModes` entry and
|
|
15203
15233
|
* a PIN field iff `requiresCode === true`.
|
|
15204
15234
|
*/
|
|
15205
|
-
runtimeState: AlarmPanelStatusSchema
|
|
15235
|
+
runtimeState: AlarmPanelStatusSchema,
|
|
15236
|
+
/**
|
|
15237
|
+
* Runtime-state durability: **restored** — armed state is the one thing a panel must not lose across a restart.
|
|
15238
|
+
*
|
|
15239
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
15240
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
15241
|
+
*/
|
|
15242
|
+
durability: "restored",
|
|
15243
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
15244
|
+
* whether persisting is worth a SQLite commit. */
|
|
15245
|
+
volatileStateFields: ["lastChangedAt"]
|
|
15206
15246
|
};
|
|
15207
15247
|
/**
|
|
15208
15248
|
* Shared geometry vocabulary for on-frame shape caps — privacy-mask,
|
|
@@ -15379,6 +15419,9 @@ var NcSystemEventConditionSchema = object({
|
|
|
15379
15419
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
15380
15420
|
packageNames: array(string().min(1)).min(1).optional()
|
|
15381
15421
|
});
|
|
15422
|
+
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
15423
|
+
* outage the operator asked for once and forgot. */
|
|
15424
|
+
var NC_SNOOZE_MAX_MINUTES = 1440;
|
|
15382
15425
|
/** Weekly schedule — OR of windows; absence on the rule = always active. */
|
|
15383
15426
|
var NcScheduleSchema = object({
|
|
15384
15427
|
windows: array(object({
|
|
@@ -15755,15 +15798,15 @@ var NcConditionsSchema = object({
|
|
|
15755
15798
|
* (an `immediate` rule naming an `audio-*` class, one notification per
|
|
15756
15799
|
* classified sample) stays exactly as it was for rules that already use it.
|
|
15757
15800
|
*
|
|
15758
|
-
*
|
|
15759
|
-
* rather than an
|
|
15760
|
-
* (`camstack/src/data/notification-center.ts`, guarded by
|
|
15761
|
-
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor
|
|
15801
|
+
* In {@link NC_CONDITION_CATALOG} since P2, and the ORDER it got there is the
|
|
15802
|
+
* rule rather than an accident: the viewer mirrors the descriptor enums BY
|
|
15803
|
+
* HAND (`camstack/src/data/notification-center.ts`, guarded by
|
|
15804
|
+
* `scripts/check-viewer-condition-mirror.ts`) and its rule editor strips the
|
|
15762
15805
|
* condition fields it does not know when a rule is saved from the phone.
|
|
15763
15806
|
* Publishing an editor for a condition the app cannot round-trip is how an
|
|
15764
|
-
* operator loses a rule's conditions by opening it — so the
|
|
15765
|
-
*
|
|
15766
|
-
*
|
|
15807
|
+
* operator loses a rule's conditions by opening it — so the viewer mirror
|
|
15808
|
+
* (P3, shipped) went FIRST, and the descriptor an editor renders from
|
|
15809
|
+
* follows here.
|
|
15767
15810
|
*/
|
|
15768
15811
|
audio: NcAudioConditionSchema.optional()
|
|
15769
15812
|
});
|
|
@@ -15999,6 +16042,30 @@ var NcRuleInputSchema = object({
|
|
|
15999
16042
|
*/
|
|
16000
16043
|
snoozeAllowGlobal: boolean().optional(),
|
|
16001
16044
|
/**
|
|
16045
|
+
* The snooze durations THIS rule's notification offers as buttons, in
|
|
16046
|
+
* minutes.
|
|
16047
|
+
*
|
|
16048
|
+
* Three states, and all three are distinct — which is exactly why this is
|
|
16049
|
+
* `.optional()` and never `.default()`. A Zod default does not run on the
|
|
16050
|
+
* addon cap path (three production failures in one day), so a schema default
|
|
16051
|
+
* would collapse the first two:
|
|
16052
|
+
*
|
|
16053
|
+
* | value | meaning |
|
|
16054
|
+
* | --- | --- |
|
|
16055
|
+
* | absent | the operator never said ⇒ {@link NC_DEFAULT_SNOOZE_MINUTES} |
|
|
16056
|
+
* | `[]` | **no snooze buttons on this rule** — the explicit override |
|
|
16057
|
+
* | a list | these choices, de-duplicated and sorted, at most four |
|
|
16058
|
+
*
|
|
16059
|
+
* `.max(4)` because the notifier's own action budget is small (ntfy allows
|
|
16060
|
+
* three buttons in total) and a rule that spent it all on snooze choices
|
|
16061
|
+
* would push its own tap-through actions off the notification.
|
|
16062
|
+
*
|
|
16063
|
+
* An empty list is NOT an alarm exemption: a rule the alarm is about, or
|
|
16064
|
+
* that arms the panel, is exempt automatically and cannot be silenced by a
|
|
16065
|
+
* window from anywhere (D133).
|
|
16066
|
+
*/
|
|
16067
|
+
snoozeOptions: array(number().int().min(1).max(NC_SNOOZE_MAX_MINUTES)).max(4).optional(),
|
|
16068
|
+
/**
|
|
16002
16069
|
* Devices this rule ACTUATES — arm the alarm, open a gate, turn on a light.
|
|
16003
16070
|
*
|
|
16004
16071
|
* This is what makes the rule set the alarm's trigger set without the alarm
|
|
@@ -16098,6 +16165,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
16098
16165
|
"device",
|
|
16099
16166
|
"package",
|
|
16100
16167
|
"occupancy",
|
|
16168
|
+
"audio",
|
|
16101
16169
|
"system"
|
|
16102
16170
|
]),
|
|
16103
16171
|
label: string(),
|
|
@@ -16116,6 +16184,7 @@ var NcConditionDescriptorSchema = object({
|
|
|
16116
16184
|
"crossingSelect",
|
|
16117
16185
|
"polygonDraw",
|
|
16118
16186
|
"occupancy",
|
|
16187
|
+
"audio",
|
|
16119
16188
|
"deviceState",
|
|
16120
16189
|
"systemEvent"
|
|
16121
16190
|
]),
|
|
@@ -16267,7 +16336,20 @@ var NcSnoozeInputSchema = object({
|
|
|
16267
16336
|
ruleId: string().optional(),
|
|
16268
16337
|
/** Required when `scope: 'device'`. */
|
|
16269
16338
|
deviceId: number().int().optional(),
|
|
16270
|
-
|
|
16339
|
+
/**
|
|
16340
|
+
* Narrow the window to these subject classes — "the cat, not the person".
|
|
16341
|
+
*
|
|
16342
|
+
* ORTHOGONAL to `scope`, deliberately, and absent means EVERY class: that is
|
|
16343
|
+
* what every window authored before this field meant, so no persisted row
|
|
16344
|
+
* changes meaning and no client has to learn anything to keep working.
|
|
16345
|
+
*
|
|
16346
|
+
* It is what makes the window's real key `(deviceId, classes[])` and lets it
|
|
16347
|
+
* cross rules (D133): the operator points at a camera and a kind of thing,
|
|
16348
|
+
* not at whichever of their four rules happened to produce the notification
|
|
16349
|
+
* they are dismissing.
|
|
16350
|
+
*/
|
|
16351
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
16352
|
+
durationMinutes: number().int().min(1).max(NC_SNOOZE_MAX_MINUTES),
|
|
16271
16353
|
/**
|
|
16272
16354
|
* Silence this for EVERY recipient, not just the caller. Permission is
|
|
16273
16355
|
* checked server-side (the rule's `snoozeAllowGlobal`, or admin for the
|
|
@@ -16292,6 +16374,10 @@ var NcSnoozeSchema = object({
|
|
|
16292
16374
|
scope: NcSnoozeScopeSchema,
|
|
16293
16375
|
ruleId: string().optional(),
|
|
16294
16376
|
deviceId: number().int().optional(),
|
|
16377
|
+
/** Subject classes this window covers. ABSENT = every class — see
|
|
16378
|
+
* {@link NcSnoozeInputSchema.shape.classes}. Lives in the JSON blob and has
|
|
16379
|
+
* no SQLite column: nothing queries a window by class. */
|
|
16380
|
+
classes: array(string().min(1)).min(1).optional(),
|
|
16295
16381
|
startedAt: number(),
|
|
16296
16382
|
/** Exclusive: at exactly this instant the snooze is over. Expiry is a
|
|
16297
16383
|
* COMPARISON, not a job — no sweeper can leave the operator silenced. */
|
|
@@ -18392,7 +18478,14 @@ var zonesCapability = {
|
|
|
18392
18478
|
* handle. Slice shape is `{ zones: Zone[] }` so future extensions
|
|
18393
18479
|
* (e.g. zone groupings) can sit alongside the polygon list.
|
|
18394
18480
|
*/
|
|
18395
|
-
runtimeState: object({ zones: array(ZoneSchema).readonly() })
|
|
18481
|
+
runtimeState: object({ zones: array(ZoneSchema).readonly() }),
|
|
18482
|
+
/**
|
|
18483
|
+
* 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.
|
|
18484
|
+
*
|
|
18485
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
18486
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
18487
|
+
*/
|
|
18488
|
+
durability: "restored"
|
|
18396
18489
|
};
|
|
18397
18490
|
/**
|
|
18398
18491
|
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
@@ -21191,7 +21284,17 @@ var airQualitySensorCapability = {
|
|
|
21191
21284
|
schema: AirQualitySensorStatusSchema,
|
|
21192
21285
|
kind: "push"
|
|
21193
21286
|
},
|
|
21194
|
-
runtimeState: AirQualitySensorStatusSchema
|
|
21287
|
+
runtimeState: AirQualitySensorStatusSchema,
|
|
21288
|
+
/**
|
|
21289
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
21290
|
+
*
|
|
21291
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21292
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21293
|
+
*/
|
|
21294
|
+
durability: "restored",
|
|
21295
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21296
|
+
* whether persisting is worth a SQLite commit. */
|
|
21297
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21195
21298
|
};
|
|
21196
21299
|
/**
|
|
21197
21300
|
* Ambient illuminance reading in lux. Drives Home Assistant `sensor`
|
|
@@ -21223,7 +21326,17 @@ var ambientLightSensorCapability = {
|
|
|
21223
21326
|
schema: AmbientLightSensorStatusSchema,
|
|
21224
21327
|
kind: "push"
|
|
21225
21328
|
},
|
|
21226
|
-
runtimeState: AmbientLightSensorStatusSchema
|
|
21329
|
+
runtimeState: AmbientLightSensorStatusSchema,
|
|
21330
|
+
/**
|
|
21331
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
21332
|
+
*
|
|
21333
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21334
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21335
|
+
*/
|
|
21336
|
+
durability: "restored",
|
|
21337
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21338
|
+
* whether persisting is worth a SQLite commit. */
|
|
21339
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
21227
21340
|
};
|
|
21228
21341
|
/**
|
|
21229
21342
|
* Per-class audio metrics aggregated over a sliding window.
|
|
@@ -21341,7 +21454,14 @@ var audioMetricsCapability = {
|
|
|
21341
21454
|
}), AudioMetricsHistorySchema)
|
|
21342
21455
|
},
|
|
21343
21456
|
/** Reactive runtime-state mirror — live `device.state.audioMetrics.value`. */
|
|
21344
|
-
runtimeState: AudioMetricsSnapshotSchema
|
|
21457
|
+
runtimeState: AudioMetricsSnapshotSchema,
|
|
21458
|
+
/**
|
|
21459
|
+
* 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.
|
|
21460
|
+
*
|
|
21461
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21462
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21463
|
+
*/
|
|
21464
|
+
durability: "session"
|
|
21345
21465
|
};
|
|
21346
21466
|
/**
|
|
21347
21467
|
* Automation-control cap. Models HA `automation.*` entities on
|
|
@@ -21403,7 +21523,14 @@ var automationControlCapability = {
|
|
|
21403
21523
|
* reads `enabled` (toggle) + `isRunning` (spinner) + `lastError`
|
|
21404
21524
|
* (badge) directly.
|
|
21405
21525
|
*/
|
|
21406
|
-
runtimeState: AutomationControlStatusSchema
|
|
21526
|
+
runtimeState: AutomationControlStatusSchema,
|
|
21527
|
+
/**
|
|
21528
|
+
* 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.
|
|
21529
|
+
*
|
|
21530
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21531
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21532
|
+
*/
|
|
21533
|
+
durability: "session"
|
|
21407
21534
|
};
|
|
21408
21535
|
/**
|
|
21409
21536
|
* Battery status snapshot. Emitted by providers whose device is
|
|
@@ -21509,7 +21636,17 @@ onStatusChanged: { data: object({
|
|
|
21509
21636
|
* via `device.runtimeState.getCapState('battery')` regardless of
|
|
21510
21637
|
* the underlying driver.
|
|
21511
21638
|
*/
|
|
21512
|
-
runtimeState: BatteryStatusSchema
|
|
21639
|
+
runtimeState: BatteryStatusSchema,
|
|
21640
|
+
/**
|
|
21641
|
+
* 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.
|
|
21642
|
+
*
|
|
21643
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21644
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21645
|
+
*/
|
|
21646
|
+
durability: "restored",
|
|
21647
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21648
|
+
* whether persisting is worth a SQLite commit. */
|
|
21649
|
+
volatileStateFields: ["lastUpdated"]
|
|
21513
21650
|
};
|
|
21514
21651
|
/**
|
|
21515
21652
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
@@ -21538,7 +21675,17 @@ var binaryCapability = {
|
|
|
21538
21675
|
schema: BinaryStatusSchema,
|
|
21539
21676
|
kind: "push"
|
|
21540
21677
|
},
|
|
21541
|
-
runtimeState: BinaryStatusSchema
|
|
21678
|
+
runtimeState: BinaryStatusSchema,
|
|
21679
|
+
/**
|
|
21680
|
+
* Runtime-state durability: **restored** — transition-driven sensor state; the restored value gives the boot comparison.
|
|
21681
|
+
*
|
|
21682
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21683
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21684
|
+
*/
|
|
21685
|
+
durability: "restored",
|
|
21686
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21687
|
+
* whether persisting is worth a SQLite commit. */
|
|
21688
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21542
21689
|
};
|
|
21543
21690
|
/**
|
|
21544
21691
|
* Dimmable-light brightness control. Co-exists with `switch` on the
|
|
@@ -21591,7 +21738,14 @@ onBrightnessChanged: { data: object({
|
|
|
21591
21738
|
* by the kernel. Read via `device.state.brightness.value` so UI
|
|
21592
21739
|
* sliders surface the current level without polling the provider.
|
|
21593
21740
|
*/
|
|
21594
|
-
runtimeState: BrightnessStatusSchema
|
|
21741
|
+
runtimeState: BrightnessStatusSchema,
|
|
21742
|
+
/**
|
|
21743
|
+
* Runtime-state durability: **session** — live lamp state, re-published by the provider on connect.
|
|
21744
|
+
*
|
|
21745
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21746
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21747
|
+
*/
|
|
21748
|
+
durability: "session"
|
|
21595
21749
|
};
|
|
21596
21750
|
DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _void(), {
|
|
21597
21751
|
kind: "mutation",
|
|
@@ -21679,7 +21833,17 @@ var carbonMonoxideCapability = {
|
|
|
21679
21833
|
schema: CarbonMonoxideStatusSchema,
|
|
21680
21834
|
kind: "push"
|
|
21681
21835
|
},
|
|
21682
|
-
runtimeState: CarbonMonoxideStatusSchema
|
|
21836
|
+
runtimeState: CarbonMonoxideStatusSchema,
|
|
21837
|
+
/**
|
|
21838
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
21839
|
+
*
|
|
21840
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
21841
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
21842
|
+
*/
|
|
21843
|
+
durability: "restored",
|
|
21844
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
21845
|
+
* whether persisting is worth a SQLite commit. */
|
|
21846
|
+
volatileStateFields: ["lastChangedAt"]
|
|
21683
21847
|
};
|
|
21684
21848
|
/**
|
|
21685
21849
|
* HVAC / climate control cap. Models the full surface of a HA
|
|
@@ -21839,7 +22003,14 @@ var climateControlCapability = {
|
|
|
21839
22003
|
* the full slice via `device.state.climate-control.value` and refresh
|
|
21840
22004
|
* on every push without re-querying the provider.
|
|
21841
22005
|
*/
|
|
21842
|
-
runtimeState: ClimateControlStatusSchema
|
|
22006
|
+
runtimeState: ClimateControlStatusSchema,
|
|
22007
|
+
/**
|
|
22008
|
+
* Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
|
|
22009
|
+
*
|
|
22010
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22011
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22012
|
+
*/
|
|
22013
|
+
durability: "session"
|
|
21843
22014
|
};
|
|
21844
22015
|
/**
|
|
21845
22016
|
* Color-light cap. Coexists with `switch` (on/off) and `brightness`
|
|
@@ -21949,7 +22120,14 @@ onColorChanged: { data: object({
|
|
|
21949
22120
|
* kernel. Read via `device.state.color.value` so UI pickers surface
|
|
21950
22121
|
* the current chromaticity without polling the provider.
|
|
21951
22122
|
*/
|
|
21952
|
-
runtimeState: ColorStatusSchema
|
|
22123
|
+
runtimeState: ColorStatusSchema,
|
|
22124
|
+
/**
|
|
22125
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
22126
|
+
*
|
|
22127
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22128
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22129
|
+
*/
|
|
22130
|
+
durability: "session"
|
|
21953
22131
|
};
|
|
21954
22132
|
var ConnectionTestOutcomeSchema = discriminatedUnion("outcome", [
|
|
21955
22133
|
object({
|
|
@@ -22015,7 +22193,17 @@ var connectivityCapability = {
|
|
|
22015
22193
|
schema: ConnectivityStatusSchema,
|
|
22016
22194
|
kind: "push"
|
|
22017
22195
|
},
|
|
22018
|
-
runtimeState: ConnectivityStatusSchema
|
|
22196
|
+
runtimeState: ConnectivityStatusSchema,
|
|
22197
|
+
/**
|
|
22198
|
+
* Runtime-state durability: **restored** — same shape and same argument as `device-status`, for links rather than devices.
|
|
22199
|
+
*
|
|
22200
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22201
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22202
|
+
*/
|
|
22203
|
+
durability: "restored",
|
|
22204
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22205
|
+
* whether persisting is worth a SQLite commit. */
|
|
22206
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22019
22207
|
};
|
|
22020
22208
|
/**
|
|
22021
22209
|
* Generic device-consumables capability — surfaces a device's
|
|
@@ -22097,7 +22285,14 @@ reset: method(object({
|
|
|
22097
22285
|
}
|
|
22098
22286
|
}
|
|
22099
22287
|
},
|
|
22100
|
-
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() })
|
|
22288
|
+
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: number() }),
|
|
22289
|
+
/**
|
|
22290
|
+
* Runtime-state durability: **session** — the authority is the appliance; the provider re-reads the whole item array on connect.
|
|
22291
|
+
*
|
|
22292
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22293
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22294
|
+
*/
|
|
22295
|
+
durability: "session"
|
|
22101
22296
|
};
|
|
22102
22297
|
/**
|
|
22103
22298
|
* Door / window / opening / garage / valve contact sensor. Boolean
|
|
@@ -22128,7 +22323,17 @@ var contactCapability = {
|
|
|
22128
22323
|
schema: ContactStatusSchema,
|
|
22129
22324
|
kind: "push"
|
|
22130
22325
|
},
|
|
22131
|
-
runtimeState: ContactStatusSchema
|
|
22326
|
+
runtimeState: ContactStatusSchema,
|
|
22327
|
+
/**
|
|
22328
|
+
* Runtime-state durability: **restored** — a door left open across a restart must still read open.
|
|
22329
|
+
*
|
|
22330
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22331
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22332
|
+
*/
|
|
22333
|
+
durability: "restored",
|
|
22334
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22335
|
+
* whether persisting is worth a SQLite commit. */
|
|
22336
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22132
22337
|
};
|
|
22133
22338
|
/**
|
|
22134
22339
|
* Status slice — flat object (the framework's `runtimeState` contract
|
|
@@ -22234,7 +22439,14 @@ var controlCapability = {
|
|
|
22234
22439
|
* dropdown / text field / date picker) read the slice's discriminant
|
|
22235
22440
|
* and value directly without polling the provider.
|
|
22236
22441
|
*/
|
|
22237
|
-
runtimeState: ControlStatusSchema
|
|
22442
|
+
runtimeState: ControlStatusSchema,
|
|
22443
|
+
/**
|
|
22444
|
+
* Runtime-state durability: **session** — a generic control mirrors an external entity that re-publishes on connect; the options array is re-derived with it.
|
|
22445
|
+
*
|
|
22446
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22447
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22448
|
+
*/
|
|
22449
|
+
durability: "session"
|
|
22238
22450
|
};
|
|
22239
22451
|
var CoverStatusSchema = object({
|
|
22240
22452
|
/** Lifecycle state of the cover. */
|
|
@@ -22295,7 +22507,17 @@ var coverCapability = {
|
|
|
22295
22507
|
* Runtime-state slice — mirrored by the kernel. UI controls watch
|
|
22296
22508
|
* the slice for live position changes during a move.
|
|
22297
22509
|
*/
|
|
22298
|
-
runtimeState: CoverStatusSchema
|
|
22510
|
+
runtimeState: CoverStatusSchema,
|
|
22511
|
+
/**
|
|
22512
|
+
* Runtime-state durability: **restored** — position survives a restart on the device; the mirror should agree at boot rather than read blank.
|
|
22513
|
+
*
|
|
22514
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22515
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22516
|
+
*/
|
|
22517
|
+
durability: "restored",
|
|
22518
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22519
|
+
* whether persisting is worth a SQLite commit. */
|
|
22520
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22299
22521
|
};
|
|
22300
22522
|
/**
|
|
22301
22523
|
* Vendor-neutral day/night (IR-cut) control — the per-camera config cap
|
|
@@ -22389,7 +22611,17 @@ var dayNightCapability = {
|
|
|
22389
22611
|
schema: DayNightStatusSchema,
|
|
22390
22612
|
kind: "poll"
|
|
22391
22613
|
},
|
|
22392
|
-
runtimeState: DayNightStatusSchema
|
|
22614
|
+
runtimeState: DayNightStatusSchema,
|
|
22615
|
+
/**
|
|
22616
|
+
* Runtime-state durability: **restored** — operator-set IR-cut behaviour; mutation-driven.
|
|
22617
|
+
*
|
|
22618
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22619
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22620
|
+
*/
|
|
22621
|
+
durability: "restored",
|
|
22622
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22623
|
+
* whether persisting is worth a SQLite commit. */
|
|
22624
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22393
22625
|
};
|
|
22394
22626
|
/**
|
|
22395
22627
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
@@ -22436,7 +22668,17 @@ onStatusChanged: { data: object({
|
|
|
22436
22668
|
schema: DeviceStatusSchema,
|
|
22437
22669
|
kind: "push"
|
|
22438
22670
|
},
|
|
22439
|
-
runtimeState: DeviceStatusSchema
|
|
22671
|
+
runtimeState: DeviceStatusSchema,
|
|
22672
|
+
/**
|
|
22673
|
+
* 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.
|
|
22674
|
+
*
|
|
22675
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22676
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22677
|
+
*/
|
|
22678
|
+
durability: "restored",
|
|
22679
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22680
|
+
* whether persisting is worth a SQLite commit. */
|
|
22681
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22440
22682
|
};
|
|
22441
22683
|
/**
|
|
22442
22684
|
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
@@ -22498,7 +22740,14 @@ onPressed: { data: DoorbellPressEventSchema } },
|
|
|
22498
22740
|
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
22499
22741
|
* without subscribing.
|
|
22500
22742
|
*/
|
|
22501
|
-
runtimeState: DoorbellStatusSchema
|
|
22743
|
+
runtimeState: DoorbellStatusSchema,
|
|
22744
|
+
/**
|
|
22745
|
+
* 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.
|
|
22746
|
+
*
|
|
22747
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22748
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22749
|
+
*/
|
|
22750
|
+
durability: "restored"
|
|
22502
22751
|
};
|
|
22503
22752
|
/**
|
|
22504
22753
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -22538,7 +22787,17 @@ var enumSensorCapability = {
|
|
|
22538
22787
|
schema: EnumSensorStatusSchema,
|
|
22539
22788
|
kind: "push"
|
|
22540
22789
|
},
|
|
22541
|
-
runtimeState: EnumSensorStatusSchema
|
|
22790
|
+
runtimeState: EnumSensorStatusSchema,
|
|
22791
|
+
/**
|
|
22792
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; 80 devices.
|
|
22793
|
+
*
|
|
22794
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22795
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22796
|
+
*/
|
|
22797
|
+
durability: "restored",
|
|
22798
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
22799
|
+
* whether persisting is worth a SQLite commit. */
|
|
22800
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
22542
22801
|
};
|
|
22543
22802
|
/**
|
|
22544
22803
|
* Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
|
|
@@ -22574,7 +22833,14 @@ var eventEmitterCapability = {
|
|
|
22574
22833
|
schema: EventEmitterStatusSchema,
|
|
22575
22834
|
kind: "push"
|
|
22576
22835
|
},
|
|
22577
|
-
runtimeState: EventEmitterStatusSchema
|
|
22836
|
+
runtimeState: EventEmitterStatusSchema,
|
|
22837
|
+
/**
|
|
22838
|
+
* Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
|
|
22839
|
+
*
|
|
22840
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
22841
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
22842
|
+
*/
|
|
22843
|
+
durability: "session"
|
|
22578
22844
|
};
|
|
22579
22845
|
var EventItemSchema = object({
|
|
22580
22846
|
id: string(),
|
|
@@ -22855,7 +23121,14 @@ var fanControlCapability = {
|
|
|
22855
23121
|
* Runtime-state slice — mirrored by the kernel. UI fan speed
|
|
22856
23122
|
* sliders read `percentage` for live updates.
|
|
22857
23123
|
*/
|
|
22858
|
-
runtimeState: FanControlStatusSchema
|
|
23124
|
+
runtimeState: FanControlStatusSchema,
|
|
23125
|
+
/**
|
|
23126
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
23127
|
+
*
|
|
23128
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23129
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23130
|
+
*/
|
|
23131
|
+
durability: "session"
|
|
22859
23132
|
};
|
|
22860
23133
|
/**
|
|
22861
23134
|
* Per-device feature/identity probe slice. Holds the runtime-resolved
|
|
@@ -22931,7 +23204,14 @@ onProbeChanged: { data: object({
|
|
|
22931
23204
|
schema: FeatureProbeStatusSchema,
|
|
22932
23205
|
kind: "push"
|
|
22933
23206
|
},
|
|
22934
|
-
runtimeState: FeatureProbeStatusSchema
|
|
23207
|
+
runtimeState: FeatureProbeStatusSchema,
|
|
23208
|
+
/**
|
|
23209
|
+
* 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.
|
|
23210
|
+
*
|
|
23211
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23212
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23213
|
+
*/
|
|
23214
|
+
durability: "session"
|
|
22935
23215
|
};
|
|
22936
23216
|
/**
|
|
22937
23217
|
* Water leak / moisture sensor. Boolean "is liquid currently
|
|
@@ -22958,7 +23238,17 @@ var floodCapability = {
|
|
|
22958
23238
|
schema: FloodStatusSchema,
|
|
22959
23239
|
kind: "push"
|
|
22960
23240
|
},
|
|
22961
|
-
runtimeState: FloodStatusSchema
|
|
23241
|
+
runtimeState: FloodStatusSchema,
|
|
23242
|
+
/**
|
|
23243
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
23244
|
+
*
|
|
23245
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23246
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23247
|
+
*/
|
|
23248
|
+
durability: "restored",
|
|
23249
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23250
|
+
* whether persisting is worth a SQLite commit. */
|
|
23251
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22962
23252
|
};
|
|
22963
23253
|
/**
|
|
22964
23254
|
* Combustible-gas (LPG / methane / hydrogen) alarm sensor. Drives
|
|
@@ -22981,7 +23271,17 @@ var gasCapability = {
|
|
|
22981
23271
|
schema: GasStatusSchema,
|
|
22982
23272
|
kind: "push"
|
|
22983
23273
|
},
|
|
22984
|
-
runtimeState: GasStatusSchema
|
|
23274
|
+
runtimeState: GasStatusSchema,
|
|
23275
|
+
/**
|
|
23276
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
23277
|
+
*
|
|
23278
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23279
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23280
|
+
*/
|
|
23281
|
+
durability: "restored",
|
|
23282
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23283
|
+
* whether persisting is worth a SQLite commit. */
|
|
23284
|
+
volatileStateFields: ["lastChangedAt"]
|
|
22985
23285
|
};
|
|
22986
23286
|
/**
|
|
22987
23287
|
* Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
|
|
@@ -23057,7 +23357,14 @@ var humidifierCapability = {
|
|
|
23057
23357
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
23058
23358
|
* slice for live humidity / mode changes.
|
|
23059
23359
|
*/
|
|
23060
|
-
runtimeState: HumidifierStatusSchema
|
|
23360
|
+
runtimeState: HumidifierStatusSchema,
|
|
23361
|
+
/**
|
|
23362
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
23363
|
+
*
|
|
23364
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23365
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23366
|
+
*/
|
|
23367
|
+
durability: "session"
|
|
23061
23368
|
};
|
|
23062
23369
|
/**
|
|
23063
23370
|
* Single-metric humidity reading. Drives Home Assistant `sensor`
|
|
@@ -23093,7 +23400,17 @@ var humiditySensorCapability = {
|
|
|
23093
23400
|
schema: HumiditySensorStatusSchema,
|
|
23094
23401
|
kind: "push"
|
|
23095
23402
|
},
|
|
23096
|
-
runtimeState: HumiditySensorStatusSchema
|
|
23403
|
+
runtimeState: HumiditySensorStatusSchema,
|
|
23404
|
+
/**
|
|
23405
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (67 of 75 writes were the clock alone).
|
|
23406
|
+
*
|
|
23407
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23408
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23409
|
+
*/
|
|
23410
|
+
durability: "restored",
|
|
23411
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23412
|
+
* whether persisting is worth a SQLite commit. */
|
|
23413
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23097
23414
|
};
|
|
23098
23415
|
/**
|
|
23099
23416
|
* Image display cap. Models a single still image exposed by an integration —
|
|
@@ -23131,7 +23448,14 @@ var imageCapability = {
|
|
|
23131
23448
|
* Runtime-state slice — mirrored by the kernel. The UI reads `url`
|
|
23132
23449
|
* directly and renders the still image.
|
|
23133
23450
|
*/
|
|
23134
|
-
runtimeState: ImageStatusSchema
|
|
23451
|
+
runtimeState: ImageStatusSchema,
|
|
23452
|
+
/**
|
|
23453
|
+
* Runtime-state durability: **session** — a snapshot URL is a session-scoped handle; a restored one points at nothing.
|
|
23454
|
+
*
|
|
23455
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23456
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23457
|
+
*/
|
|
23458
|
+
durability: "session"
|
|
23135
23459
|
};
|
|
23136
23460
|
/**
|
|
23137
23461
|
* Vendor-neutral image / picture-adjustment cap — the per-camera config
|
|
@@ -23280,7 +23604,17 @@ var imageSettingsCapability = {
|
|
|
23280
23604
|
schema: ImageSettingsStatusSchema,
|
|
23281
23605
|
kind: "poll"
|
|
23282
23606
|
},
|
|
23283
|
-
runtimeState: ImageSettingsStatusSchema
|
|
23607
|
+
runtimeState: ImageSettingsStatusSchema,
|
|
23608
|
+
/**
|
|
23609
|
+
* Runtime-state durability: **restored** — operator-set camera imaging; mutation-driven.
|
|
23610
|
+
*
|
|
23611
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23612
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23613
|
+
*/
|
|
23614
|
+
durability: "restored",
|
|
23615
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
23616
|
+
* whether persisting is worth a SQLite commit. */
|
|
23617
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
23284
23618
|
};
|
|
23285
23619
|
/**
|
|
23286
23620
|
* integrations — system-scoped singleton capability for integration
|
|
@@ -23620,7 +23954,14 @@ var lawnMowerControlCapability = {
|
|
|
23620
23954
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
23621
23955
|
* slice for live activity + battery changes.
|
|
23622
23956
|
*/
|
|
23623
|
-
runtimeState: LawnMowerControlStatusSchema
|
|
23957
|
+
runtimeState: LawnMowerControlStatusSchema,
|
|
23958
|
+
/**
|
|
23959
|
+
* Runtime-state durability: **session** — as `vacuum-control`.
|
|
23960
|
+
*
|
|
23961
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
23962
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
23963
|
+
*/
|
|
23964
|
+
durability: "session"
|
|
23624
23965
|
};
|
|
23625
23966
|
/**
|
|
23626
23967
|
* local-network — hub-only singleton.
|
|
@@ -23826,7 +24167,17 @@ var lockControlCapability = {
|
|
|
23826
24167
|
* read `state` and disable themselves during `locking`/`unlocking`
|
|
23827
24168
|
* transitions.
|
|
23828
24169
|
*/
|
|
23829
|
-
runtimeState: LockControlStatusSchema
|
|
24170
|
+
runtimeState: LockControlStatusSchema,
|
|
24171
|
+
/**
|
|
24172
|
+
* Runtime-state durability: **restored** — a lock left locked must still read locked.
|
|
24173
|
+
*
|
|
24174
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24175
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24176
|
+
*/
|
|
24177
|
+
durability: "restored",
|
|
24178
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24179
|
+
* whether persisting is worth a SQLite commit. */
|
|
24180
|
+
volatileStateFields: ["lastChangedAt"]
|
|
23830
24181
|
};
|
|
23831
24182
|
/**
|
|
23832
24183
|
* Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
|
|
@@ -23988,7 +24339,14 @@ var mediaPlayerCapability = {
|
|
|
23988
24339
|
* full slice for live now-playing, volume, and progress updates
|
|
23989
24340
|
* without polling.
|
|
23990
24341
|
*/
|
|
23991
|
-
runtimeState: MediaPlayerStatusSchema
|
|
24342
|
+
runtimeState: MediaPlayerStatusSchema,
|
|
24343
|
+
/**
|
|
24344
|
+
* Runtime-state durability: **session** — a restored transport position describes a playback that stopped when the hub did.
|
|
24345
|
+
*
|
|
24346
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24347
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24348
|
+
*/
|
|
24349
|
+
durability: "session"
|
|
23992
24350
|
};
|
|
23993
24351
|
/**
|
|
23994
24352
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -24252,7 +24610,14 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
24252
24610
|
* `device.state.motion.value`. Reads never invoke the provider, so
|
|
24253
24611
|
* UIs and other addons can poll the cached state safely.
|
|
24254
24612
|
*/
|
|
24255
|
-
runtimeState: MotionStatusSchema
|
|
24613
|
+
runtimeState: MotionStatusSchema,
|
|
24614
|
+
/**
|
|
24615
|
+
* 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.
|
|
24616
|
+
*
|
|
24617
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24618
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24619
|
+
*/
|
|
24620
|
+
durability: "session"
|
|
24256
24621
|
};
|
|
24257
24622
|
/**
|
|
24258
24623
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -24317,7 +24682,14 @@ var motionTriggerCapability = {
|
|
|
24317
24682
|
schema: MotionTriggerStatusSchema,
|
|
24318
24683
|
kind: "command-driven"
|
|
24319
24684
|
},
|
|
24320
|
-
runtimeState: MotionTriggerRuntimeStateSchema
|
|
24685
|
+
runtimeState: MotionTriggerRuntimeStateSchema,
|
|
24686
|
+
/**
|
|
24687
|
+
* 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.
|
|
24688
|
+
*
|
|
24689
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24690
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24691
|
+
*/
|
|
24692
|
+
durability: "session"
|
|
24321
24693
|
};
|
|
24322
24694
|
/**
|
|
24323
24695
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
@@ -24384,7 +24756,17 @@ var motionZonesCapability = {
|
|
|
24384
24756
|
schema: MotionZoneStatusSchema,
|
|
24385
24757
|
kind: "poll"
|
|
24386
24758
|
},
|
|
24387
|
-
runtimeState: MotionZoneStatusSchema
|
|
24759
|
+
runtimeState: MotionZoneStatusSchema,
|
|
24760
|
+
/**
|
|
24761
|
+
* 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.
|
|
24762
|
+
*
|
|
24763
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24764
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24765
|
+
*/
|
|
24766
|
+
durability: "restored",
|
|
24767
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24768
|
+
* whether persisting is worth a SQLite commit. */
|
|
24769
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24388
24770
|
};
|
|
24389
24771
|
/**
|
|
24390
24772
|
* On-camera AI object detection cap. Surfaces per-device the classes
|
|
@@ -24458,7 +24840,17 @@ var nativeObjectDetectionCapability = {
|
|
|
24458
24840
|
schema: NativeObjectDetectionStatusSchema,
|
|
24459
24841
|
kind: "push"
|
|
24460
24842
|
},
|
|
24461
|
-
runtimeState: NativeObjectDetectionRuntimeStateSchema
|
|
24843
|
+
runtimeState: NativeObjectDetectionRuntimeStateSchema,
|
|
24844
|
+
/**
|
|
24845
|
+
* 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.
|
|
24846
|
+
*
|
|
24847
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
24848
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
24849
|
+
*/
|
|
24850
|
+
durability: "restored",
|
|
24851
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
24852
|
+
* whether persisting is worth a SQLite commit. */
|
|
24853
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24462
24854
|
};
|
|
24463
24855
|
/**
|
|
24464
24856
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
@@ -24792,7 +25184,14 @@ onSent: { data: object({
|
|
|
24792
25184
|
* form reads `supports` to gate optional fields; history pane reads
|
|
24793
25185
|
* `lastSentAt` / `lastError` / `queueDepth`.
|
|
24794
25186
|
*/
|
|
24795
|
-
runtimeState: NotifierStatusSchema
|
|
25187
|
+
runtimeState: NotifierStatusSchema,
|
|
25188
|
+
/**
|
|
25189
|
+
* Runtime-state durability: **session** — live queue depth and last-send state; a restored queue depth describes a queue that no longer exists.
|
|
25190
|
+
*
|
|
25191
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25192
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25193
|
+
*/
|
|
25194
|
+
durability: "session"
|
|
24796
25195
|
};
|
|
24797
25196
|
/**
|
|
24798
25197
|
* Generic numeric sensor — last-resort fallback when no typed numeric
|
|
@@ -24835,7 +25234,17 @@ var numericSensorCapability = {
|
|
|
24835
25234
|
schema: NumericSensorStatusSchema,
|
|
24836
25235
|
kind: "push"
|
|
24837
25236
|
},
|
|
24838
|
-
runtimeState: NumericSensorStatusSchema
|
|
25237
|
+
runtimeState: NumericSensorStatusSchema,
|
|
25238
|
+
/**
|
|
25239
|
+
* 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.
|
|
25240
|
+
*
|
|
25241
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25242
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25243
|
+
*/
|
|
25244
|
+
durability: "restored",
|
|
25245
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25246
|
+
* whether persisting is worth a SQLite commit. */
|
|
25247
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
24839
25248
|
};
|
|
24840
25249
|
/**
|
|
24841
25250
|
* Generic on-screen-display (video overlay) cap. Each camera exposes
|
|
@@ -25220,7 +25629,14 @@ var petFeederCapability = {
|
|
|
25220
25629
|
* the full slice via `device.state.petFeeder.value` and refresh on
|
|
25221
25630
|
* every poll without re-querying the provider.
|
|
25222
25631
|
*/
|
|
25223
|
-
runtimeState: PetFeederStatusSchema
|
|
25632
|
+
runtimeState: PetFeederStatusSchema,
|
|
25633
|
+
/**
|
|
25634
|
+
* Runtime-state durability: **session** — live appliance state re-published on connect.
|
|
25635
|
+
*
|
|
25636
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25637
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25638
|
+
*/
|
|
25639
|
+
durability: "session"
|
|
25224
25640
|
};
|
|
25225
25641
|
var VehicleSchema = object({
|
|
25226
25642
|
id: string(),
|
|
@@ -25532,7 +25948,17 @@ var powerMeterCapability = {
|
|
|
25532
25948
|
schema: PowerMeterStatusSchema,
|
|
25533
25949
|
kind: "push"
|
|
25534
25950
|
},
|
|
25535
|
-
runtimeState: PowerMeterStatusSchema
|
|
25951
|
+
runtimeState: PowerMeterStatusSchema,
|
|
25952
|
+
/**
|
|
25953
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
|
|
25954
|
+
*
|
|
25955
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
25956
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
25957
|
+
*/
|
|
25958
|
+
durability: "restored",
|
|
25959
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
25960
|
+
* whether persisting is worth a SQLite commit. */
|
|
25961
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25536
25962
|
};
|
|
25537
25963
|
/**
|
|
25538
25964
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
@@ -25589,7 +26015,17 @@ var presenceCapability = {
|
|
|
25589
26015
|
* the map pin is rendered (use `DeviceFeature.PresenceGps` for the
|
|
25590
26016
|
* pre-fetch fast-path check).
|
|
25591
26017
|
*/
|
|
25592
|
-
runtimeState: PresenceStatusSchema
|
|
26018
|
+
runtimeState: PresenceStatusSchema,
|
|
26019
|
+
/**
|
|
26020
|
+
* Runtime-state durability: **restored** — occupancy-relevant: the restored state is what an occupancy rule compares the first post-restart observation against.
|
|
26021
|
+
*
|
|
26022
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26023
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26024
|
+
*/
|
|
26025
|
+
durability: "restored",
|
|
26026
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26027
|
+
* whether persisting is worth a SQLite commit. */
|
|
26028
|
+
volatileStateFields: ["lastChangedAt"]
|
|
25593
26029
|
};
|
|
25594
26030
|
/**
|
|
25595
26031
|
* Atmospheric pressure reading in hectopascals. Drives Home Assistant
|
|
@@ -25625,7 +26061,17 @@ var pressureSensorCapability = {
|
|
|
25625
26061
|
schema: PressureSensorStatusSchema,
|
|
25626
26062
|
kind: "push"
|
|
25627
26063
|
},
|
|
25628
|
-
runtimeState: PressureSensorStatusSchema
|
|
26064
|
+
runtimeState: PressureSensorStatusSchema,
|
|
26065
|
+
/**
|
|
26066
|
+
* Runtime-state durability: **restored** — as `numeric-sensor`.
|
|
26067
|
+
*
|
|
26068
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26069
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26070
|
+
*/
|
|
26071
|
+
durability: "restored",
|
|
26072
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26073
|
+
* whether persisting is worth a SQLite commit. */
|
|
26074
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25629
26075
|
};
|
|
25630
26076
|
/**
|
|
25631
26077
|
* PRIVACY — what the camera deliberately does not capture. Two planes:
|
|
@@ -25755,7 +26201,17 @@ var privacyMaskCapability = {
|
|
|
25755
26201
|
schema: PrivacyMaskStatusSchema,
|
|
25756
26202
|
kind: "poll"
|
|
25757
26203
|
},
|
|
25758
|
-
runtimeState: PrivacyMaskStatusSchema
|
|
26204
|
+
runtimeState: PrivacyMaskStatusSchema,
|
|
26205
|
+
/**
|
|
26206
|
+
* Runtime-state durability: **restored** — operator-drawn regions, zero real churn — 22 writes in 25 minutes, every one of them the clock.
|
|
26207
|
+
*
|
|
26208
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26209
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26210
|
+
*/
|
|
26211
|
+
durability: "restored",
|
|
26212
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
26213
|
+
* whether persisting is worth a SQLite commit. */
|
|
26214
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
25759
26215
|
};
|
|
25760
26216
|
var PtzPresetSchema = object({
|
|
25761
26217
|
id: string(),
|
|
@@ -25921,7 +26377,14 @@ var ptzAutotrackCapability = {
|
|
|
25921
26377
|
* fetch / cache / fallback logic out of the four cap methods —
|
|
25922
26378
|
* they become trampolines over `runtimeState`.
|
|
25923
26379
|
*/
|
|
25924
|
-
runtimeState: PtzAutotrackRuntimeStateSchema
|
|
26380
|
+
runtimeState: PtzAutotrackRuntimeStateSchema,
|
|
26381
|
+
/**
|
|
26382
|
+
* Runtime-state durability: **session** — mirrors the camera's own autotrack config, re-read on connect.
|
|
26383
|
+
*
|
|
26384
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
26385
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
26386
|
+
*/
|
|
26387
|
+
durability: "session"
|
|
25925
26388
|
};
|
|
25926
26389
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
25927
26390
|
kind: "mutation",
|
|
@@ -26268,13 +26731,24 @@ method(object({
|
|
|
26268
26731
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
26269
26732
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
26270
26733
|
/**
|
|
26271
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
26734
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
26735
|
+
*
|
|
26736
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
26737
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
26738
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
26739
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
26740
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
26741
|
+
* the render side knows the segments, so the translation lives there
|
|
26742
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
26743
|
+
*
|
|
26744
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
26745
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
26746
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
26747
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
26748
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
26272
26749
|
*
|
|
26273
|
-
* Relative and not absolute epoch
|
|
26274
|
-
*
|
|
26275
|
-
* playlist. Handing it absolute epochs would make every call site responsible
|
|
26276
|
-
* for the same subtraction, and the one that forgot would emit a filter that
|
|
26277
|
-
* selects nothing — silently, as a uniform timelapse.
|
|
26750
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
26751
|
+
* call site responsible for the same subtraction.
|
|
26278
26752
|
*/
|
|
26279
26753
|
var ExportDenseRangeSchema = object({
|
|
26280
26754
|
fromSec: number().nonnegative(),
|
|
@@ -26560,7 +27034,14 @@ var sceneMonitorCapability = {
|
|
|
26560
27034
|
schema: SceneMonitorStatusSchema,
|
|
26561
27035
|
kind: "push"
|
|
26562
27036
|
},
|
|
26563
|
-
runtimeState: SceneMonitorStatusSchema
|
|
27037
|
+
runtimeState: SceneMonitorStatusSchema,
|
|
27038
|
+
/**
|
|
27039
|
+
* Runtime-state durability: **session** — re-derived from the current scene on the next evaluation.
|
|
27040
|
+
*
|
|
27041
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27042
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27043
|
+
*/
|
|
27044
|
+
durability: "session"
|
|
26564
27045
|
};
|
|
26565
27046
|
/**
|
|
26566
27047
|
* Per-stage gating mode applied to the zones a rule references.
|
|
@@ -26704,7 +27185,14 @@ var scriptRunnerCapability = {
|
|
|
26704
27185
|
* `isRunning` to render a spinner during execution and surfaces
|
|
26705
27186
|
* `lastError` / `lastRunSuccess` in the recent-runs panel.
|
|
26706
27187
|
*/
|
|
26707
|
-
runtimeState: ScriptRunnerStatusSchema
|
|
27188
|
+
runtimeState: ScriptRunnerStatusSchema,
|
|
27189
|
+
/**
|
|
27190
|
+
* Runtime-state durability: **session** — a restored `isRunning: true` describes a process that died with the previous hub.
|
|
27191
|
+
*
|
|
27192
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27193
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27194
|
+
*/
|
|
27195
|
+
durability: "session"
|
|
26708
27196
|
};
|
|
26709
27197
|
/**
|
|
26710
27198
|
* Smoke alarm sensor — boolean "is smoke currently detected" with
|
|
@@ -26731,7 +27219,17 @@ var smokeCapability = {
|
|
|
26731
27219
|
schema: SmokeStatusSchema,
|
|
26732
27220
|
kind: "push"
|
|
26733
27221
|
},
|
|
26734
|
-
runtimeState: SmokeStatusSchema
|
|
27222
|
+
runtimeState: SmokeStatusSchema,
|
|
27223
|
+
/**
|
|
27224
|
+
* Runtime-state durability: **restored** — a safety sensor must not read "clear" merely because the hub restarted.
|
|
27225
|
+
*
|
|
27226
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27227
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27228
|
+
*/
|
|
27229
|
+
durability: "restored",
|
|
27230
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27231
|
+
* whether persisting is worth a SQLite commit. */
|
|
27232
|
+
volatileStateFields: ["lastChangedAt"]
|
|
26735
27233
|
};
|
|
26736
27234
|
/**
|
|
26737
27235
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
@@ -26904,7 +27402,17 @@ var streamParamsCapability = {
|
|
|
26904
27402
|
schema: StreamParamsStatusSchema,
|
|
26905
27403
|
kind: "poll"
|
|
26906
27404
|
},
|
|
26907
|
-
runtimeState: StreamParamsStatusSchema
|
|
27405
|
+
runtimeState: StreamParamsStatusSchema,
|
|
27406
|
+
/**
|
|
27407
|
+
* Runtime-state durability: **restored** — operator-set encoder profile; mutation-driven.
|
|
27408
|
+
*
|
|
27409
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27410
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27411
|
+
*/
|
|
27412
|
+
durability: "restored",
|
|
27413
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27414
|
+
* whether persisting is worth a SQLite commit. */
|
|
27415
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
26908
27416
|
};
|
|
26909
27417
|
/**
|
|
26910
27418
|
* Generic on/off switch cap for accessory children (siren, floodlight,
|
|
@@ -26950,6 +27458,16 @@ var switchCapability = {
|
|
|
26950
27458
|
* not need to re-query the provider after a setState mutation.
|
|
26951
27459
|
*/
|
|
26952
27460
|
runtimeState: SwitchStatusSchema,
|
|
27461
|
+
/**
|
|
27462
|
+
* Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
|
|
27463
|
+
*
|
|
27464
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27465
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27466
|
+
*/
|
|
27467
|
+
durability: "restored",
|
|
27468
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27469
|
+
* whether persisting is worth a SQLite commit. */
|
|
27470
|
+
volatileStateFields: ["lastChangedAt"],
|
|
26953
27471
|
settings: { bindings: [{
|
|
26954
27472
|
kind: "scalar",
|
|
26955
27473
|
statusPath: "on",
|
|
@@ -27029,7 +27547,17 @@ var tamperCapability = {
|
|
|
27029
27547
|
schema: TamperStatusSchema,
|
|
27030
27548
|
kind: "push"
|
|
27031
27549
|
},
|
|
27032
|
-
runtimeState: TamperStatusSchema
|
|
27550
|
+
runtimeState: TamperStatusSchema,
|
|
27551
|
+
/**
|
|
27552
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
27553
|
+
*
|
|
27554
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27555
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27556
|
+
*/
|
|
27557
|
+
durability: "restored",
|
|
27558
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27559
|
+
* whether persisting is worth a SQLite commit. */
|
|
27560
|
+
volatileStateFields: ["lastChangedAt"]
|
|
27033
27561
|
};
|
|
27034
27562
|
/**
|
|
27035
27563
|
* Single-metric temperature reading. Drives Home Assistant `sensor`
|
|
@@ -27074,7 +27602,17 @@ var temperatureSensorCapability = {
|
|
|
27074
27602
|
schema: TemperatureSensorStatusSchema,
|
|
27075
27603
|
kind: "push"
|
|
27076
27604
|
},
|
|
27077
|
-
runtimeState: TemperatureSensorStatusSchema
|
|
27605
|
+
runtimeState: TemperatureSensorStatusSchema,
|
|
27606
|
+
/**
|
|
27607
|
+
* Runtime-state durability: **restored** — as `numeric-sensor` (69 of 125 writes were the clock alone).
|
|
27608
|
+
*
|
|
27609
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27610
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27611
|
+
*/
|
|
27612
|
+
durability: "restored",
|
|
27613
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
27614
|
+
* whether persisting is worth a SQLite commit. */
|
|
27615
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
27078
27616
|
};
|
|
27079
27617
|
/**
|
|
27080
27618
|
* toast — system-scoped singleton capability that streams toast
|
|
@@ -27143,7 +27681,14 @@ var updateCapability = {
|
|
|
27143
27681
|
schema: UpdateStatusSchema,
|
|
27144
27682
|
kind: "poll"
|
|
27145
27683
|
},
|
|
27146
|
-
runtimeState: UpdateStatusSchema
|
|
27684
|
+
runtimeState: UpdateStatusSchema,
|
|
27685
|
+
/**
|
|
27686
|
+
* Runtime-state durability: **session** — a restored `inProgress: true` describes an update that is no longer running; versions are re-probed at boot.
|
|
27687
|
+
*
|
|
27688
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
27689
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
27690
|
+
*/
|
|
27691
|
+
durability: "session"
|
|
27147
27692
|
};
|
|
27148
27693
|
var UserSummarySchema = object({
|
|
27149
27694
|
id: string(),
|
|
@@ -27477,7 +28022,14 @@ var vacuumControlCapability = {
|
|
|
27477
28022
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
27478
28023
|
* slice for live state + battery + fan-speed changes.
|
|
27479
28024
|
*/
|
|
27480
|
-
runtimeState: VacuumControlStatusSchema
|
|
28025
|
+
runtimeState: VacuumControlStatusSchema,
|
|
28026
|
+
/**
|
|
28027
|
+
* Runtime-state durability: **session** — as `media-player` — a restored `state: cleaning` is a robot that is not cleaning.
|
|
28028
|
+
*
|
|
28029
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28030
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28031
|
+
*/
|
|
28032
|
+
durability: "session"
|
|
27481
28033
|
};
|
|
27482
28034
|
var ValveStatusSchema = object({
|
|
27483
28035
|
/** Lifecycle state of the valve. */
|
|
@@ -27529,7 +28081,14 @@ var valveCapability = {
|
|
|
27529
28081
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
27530
28082
|
* slice for live position changes during a move.
|
|
27531
28083
|
*/
|
|
27532
|
-
runtimeState: ValveStatusSchema
|
|
28084
|
+
runtimeState: ValveStatusSchema,
|
|
28085
|
+
/**
|
|
28086
|
+
* Runtime-state durability: **session** — as `brightness`.
|
|
28087
|
+
*
|
|
28088
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28089
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28090
|
+
*/
|
|
28091
|
+
durability: "session"
|
|
27533
28092
|
};
|
|
27534
28093
|
/**
|
|
27535
28094
|
* Vibration / shake / impact sensor. Drives Home Assistant
|
|
@@ -27551,7 +28110,17 @@ var vibrationCapability = {
|
|
|
27551
28110
|
schema: VibrationStatusSchema,
|
|
27552
28111
|
kind: "push"
|
|
27553
28112
|
},
|
|
27554
|
-
runtimeState: VibrationStatusSchema
|
|
28113
|
+
runtimeState: VibrationStatusSchema,
|
|
28114
|
+
/**
|
|
28115
|
+
* Runtime-state durability: **restored** — as `smoke`.
|
|
28116
|
+
*
|
|
28117
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28118
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28119
|
+
*/
|
|
28120
|
+
durability: "restored",
|
|
28121
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
28122
|
+
* whether persisting is worth a SQLite commit. */
|
|
28123
|
+
volatileStateFields: ["lastChangedAt"]
|
|
27555
28124
|
};
|
|
27556
28125
|
/**
|
|
27557
28126
|
* Water heater / boiler cap. Models HA `water_heater.*` entities — a
|
|
@@ -27625,7 +28194,14 @@ var waterHeaterCapability = {
|
|
|
27625
28194
|
* Runtime-state slice — mirrored by the kernel. UI controls watch the
|
|
27626
28195
|
* slice for live temperature / mode / away changes.
|
|
27627
28196
|
*/
|
|
27628
|
-
runtimeState: WaterHeaterStatusSchema
|
|
28197
|
+
runtimeState: WaterHeaterStatusSchema,
|
|
28198
|
+
/**
|
|
28199
|
+
* Runtime-state durability: **session** — as `climate-control`.
|
|
28200
|
+
*
|
|
28201
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28202
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28203
|
+
*/
|
|
28204
|
+
durability: "session"
|
|
27629
28205
|
};
|
|
27630
28206
|
/**
|
|
27631
28207
|
* Weather provider cap. Models HA `weather.*` entities — a read-only
|
|
@@ -27684,7 +28260,14 @@ var weatherCapability = {
|
|
|
27684
28260
|
* Runtime-state slice — mirrored by the kernel. The UI reads the
|
|
27685
28261
|
* current conditions directly from the slice on each weather push.
|
|
27686
28262
|
*/
|
|
27687
|
-
runtimeState: WeatherStatusSchema
|
|
28263
|
+
runtimeState: WeatherStatusSchema,
|
|
28264
|
+
/**
|
|
28265
|
+
* Runtime-state durability: **session** — a forecast is stale the moment the hub is down; the provider re-fetches on connect.
|
|
28266
|
+
*
|
|
28267
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28268
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28269
|
+
*/
|
|
28270
|
+
durability: "session"
|
|
27688
28271
|
};
|
|
27689
28272
|
/**
|
|
27690
28273
|
* Per-zone occupancy aggregation produced by the analytics frame
|
|
@@ -27846,7 +28429,14 @@ var zoneAnalyticsCapability = {
|
|
|
27846
28429
|
* automatically; the explicit `getCurrentSnapshot` cap method is
|
|
27847
28430
|
* still useful for one-off polls without a subscription.
|
|
27848
28431
|
*/
|
|
27849
|
-
runtimeState: CameraOccupancySnapshotSchema
|
|
28432
|
+
runtimeState: CameraOccupancySnapshotSchema,
|
|
28433
|
+
/**
|
|
28434
|
+
* Runtime-state durability: **session** — per-frame analytics; with `audio-metrics` it is ~90 % of the offered write rate. Re-derived on the next frame.
|
|
28435
|
+
*
|
|
28436
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28437
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28438
|
+
*/
|
|
28439
|
+
durability: "session"
|
|
27850
28440
|
};
|
|
27851
28441
|
/**
|
|
27852
28442
|
* Stages a {@link ZoneRule} can apply to. Discriminator on the rules
|
|
@@ -27924,7 +28514,14 @@ var zoneRulesCapability = {
|
|
|
27924
28514
|
motion: array(ZoneRuleSchema).readonly(),
|
|
27925
28515
|
detection: array(ZoneRuleSchema).readonly(),
|
|
27926
28516
|
package: array(ZoneRuleSchema).readonly()
|
|
27927
|
-
})
|
|
28517
|
+
}),
|
|
28518
|
+
/**
|
|
28519
|
+
* Runtime-state durability: **restored** — operator intent, mutation-only, same argument as `zones`.
|
|
28520
|
+
*
|
|
28521
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28522
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28523
|
+
*/
|
|
28524
|
+
durability: "restored"
|
|
27928
28525
|
};
|
|
27929
28526
|
/**
|
|
27930
28527
|
* Accessory device helpers — shared across drivers.
|
|
@@ -34611,6 +35208,7 @@ Object.freeze({
|
|
|
34611
35208
|
"network-access": "ingress",
|
|
34612
35209
|
"smtp-provider": "email"
|
|
34613
35210
|
});
|
|
35211
|
+
new Map(AUDIO_MACRO_LABELS.flatMap((macro) => macro.icon === void 0 ? [] : [[macro.id, macro.icon]]));
|
|
34614
35212
|
new Set(["devices", "classes"]);
|
|
34615
35213
|
/**
|
|
34616
35214
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
@@ -34888,25 +35486,32 @@ object({
|
|
|
34888
35486
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
34889
35487
|
object({
|
|
34890
35488
|
/**
|
|
34891
|
-
* How
|
|
35489
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
35490
|
+
* detection result.
|
|
34892
35491
|
*
|
|
34893
|
-
*
|
|
34894
|
-
*
|
|
34895
|
-
*
|
|
34896
|
-
*
|
|
34897
|
-
*
|
|
35492
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
35493
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
35494
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
35495
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
35496
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
35497
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
35498
|
+
*
|
|
35499
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
35500
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
35501
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
35502
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
35503
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
34898
35504
|
*/
|
|
34899
|
-
|
|
35505
|
+
holdFrames: number().int().min(1).max(64),
|
|
34900
35506
|
/**
|
|
34901
35507
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
34902
35508
|
*
|
|
34903
|
-
*
|
|
34904
|
-
*
|
|
34905
|
-
*
|
|
34906
|
-
*
|
|
34907
|
-
*
|
|
34908
|
-
*
|
|
34909
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
35509
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
35510
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
35511
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
35512
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
35513
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
35514
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
34910
35515
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
34911
35516
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
34912
35517
|
* to replace).
|
|
@@ -34932,22 +35537,45 @@ object({
|
|
|
34932
35537
|
* there is the signal that some caller names frames outside the inference set
|
|
34933
35538
|
* and that this must go back to `all`.
|
|
34934
35539
|
*/
|
|
34935
|
-
admission: NativeLeaseAdmissionSchema
|
|
35540
|
+
admission: NativeLeaseAdmissionSchema,
|
|
35541
|
+
/**
|
|
35542
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
35543
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
35544
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
35545
|
+
*
|
|
35546
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
35547
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
35548
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
35549
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
35550
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
35551
|
+
* was interrogated per SUBJECT.
|
|
35552
|
+
*
|
|
35553
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
35554
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
35555
|
+
* reproduce that.
|
|
35556
|
+
*/
|
|
35557
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
34936
35558
|
});
|
|
34937
35559
|
/**
|
|
34938
|
-
* The values in force when the operator has set nothing
|
|
34939
|
-
*
|
|
34940
|
-
*
|
|
35560
|
+
* The values in force when the operator has set nothing.
|
|
35561
|
+
*
|
|
35562
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
35563
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
35564
|
+
* in the same change that redefines it would make a regression and a retune
|
|
35565
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
35566
|
+
* live traffic.
|
|
34941
35567
|
*/
|
|
34942
35568
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
34943
|
-
|
|
35569
|
+
holdFrames: 8,
|
|
34944
35570
|
budgetMb: 1024,
|
|
34945
35571
|
activityMs: 15e3,
|
|
35572
|
+
tileBudgetMb: 64,
|
|
34946
35573
|
admission: "inferred"
|
|
34947
35574
|
};
|
|
34948
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
35575
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
34949
35576
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
34950
35577
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
35578
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
34951
35579
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
34952
35580
|
//#endregion
|
|
34953
35581
|
//#region src/config.ts
|