@camstack/server 1.2.893 → 1.2.895
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/CHANGELOG.md +12 -0
- package/dist/api/core/api-catalog.js +93 -0
- package/dist/api/core/api-catalog.router.js +74 -0
- package/dist/api/trpc/generated-cap-mounts.js +3 -1
- package/dist/api/trpc/generated-cap-routers.js +1528 -1499
- package/dist/api/trpc/trpc.middleware.js +17 -0
- package/dist/api/trpc/trpc.router.js +10 -3
- package/package.json +27 -13
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +5 -5
- package/system/dist/builtins/composer/composer.addon.mjs +5 -5
- package/system/dist/builtins/composer/graft-host.d.ts +1 -1
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +79 -8
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +79 -8
- package/system/dist/builtins/device-manager/device-provider-context.d.ts +5 -0
- package/system/dist/builtins/device-manager/device-state-mirror.d.ts +10 -0
- package/system/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +20 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +14 -12
- package/system/dist/builtins/snapshot/index.mjs +14 -12
- package/system/dist/builtins/snapshot/snapshot.addon.d.ts +6 -4
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-mZ2J-GD6.js → capture-engine-BgIjQWh6.js} +1 -1
- package/system/dist/{capture-engine-CIVKm_jN.mjs → capture-engine-DPn6JaPc.mjs} +1 -1
- package/system/dist/{composition-sources-bJP8_Z2o.mjs → composition-sources-B0rdPm85.mjs} +1 -1
- package/system/dist/{composition-sources-CGP5ZUYo.js → composition-sources-Bec_hQMM.js} +1 -1
- package/system/dist/{constants-BD8oSQro.js → constants-CsYMak6g.js} +1 -1
- package/system/dist/{constants-w-6vvTPp.mjs → constants-DsQsO8PD.mjs} +1 -1
- package/system/dist/{device-ca-CXxnQaff.js → device-ca-BeK8EI_7.js} +1 -1
- package/system/dist/{device-ca-DE_oetBE.mjs → device-ca-BuDqRFZd.mjs} +1 -1
- package/system/dist/{dist-B2-Uflhy.js → dist-CHC8tlB1.js} +351 -110
- package/system/dist/{dist-Be8yFd71.mjs → dist-DiknL6UU.mjs} +334 -99
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-BjYvJU_v.js → hub-identity-BM26oLpK.js} +1 -1
- package/system/dist/{hub-identity-C3g7b58L.mjs → hub-identity-Dt-mbtkY.mjs} +1 -1
- package/system/dist/{hub-mdns-ciao-BRfv9GfW.js → hub-mdns-ciao-BDgSHCPM.js} +2 -2
- package/system/dist/{hub-mdns-ciao-v6X_SbWl.mjs → hub-mdns-ciao-CHq7b1FX.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/kernel/status-overlay.d.ts +1 -1
- package/system/dist/{legacy-integration-rows-door-DG35DG06.mjs → legacy-integration-rows-door-1WauJNCy.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-B0q34gh3.js → legacy-integration-rows-door-BYJa0xPI.js} +1 -1
- package/system/dist/{rename-composition-block-LEbZ4oZE.mjs → rename-composition-block-BOoAElGp.mjs} +1 -1
- package/system/dist/{rename-composition-block-DNte3Cs9.js → rename-composition-block-fMaUic9d.js} +1 -1
- package/system/dist/{restore-archive-DpFPheMK.js → restore-archive-CeZV08vh.js} +1 -1
- package/system/dist/{restore-archive--4ENkU5f.mjs → restore-archive-DZDV10KN.mjs} +82 -82
- package/system/dist/{wal-maintenance-DQVDhuVJ.mjs → wal-maintenance-CekT_qH6.mjs} +0 -0
- package/system/dist/{wal-maintenance-BWUJktqT.js → wal-maintenance-CmCCUKZO.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let zod = require("zod");
|
|
2
2
|
require("node:crypto");
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-CY27-fF0.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -500,7 +500,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
500
500
|
*/
|
|
501
501
|
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
502
502
|
/**
|
|
503
|
-
* Emitted by the battery cap provider WHEN `
|
|
503
|
+
* Emitted by the battery cap provider WHEN `wakeUp` enters the
|
|
504
504
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
505
505
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
506
506
|
* manager subscribes to flip the per-broker placeholder reason to
|
|
@@ -832,7 +832,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
832
832
|
return EventCategory;
|
|
833
833
|
}({});
|
|
834
834
|
//#endregion
|
|
835
|
-
//#region ../types/dist/composed-stable-id-
|
|
835
|
+
//#region ../types/dist/composed-stable-id-BNTaDZEh.mjs
|
|
836
836
|
/**
|
|
837
837
|
import { errMsg } from '@camstack/types'
|
|
838
838
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -971,12 +971,19 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
971
971
|
return DeviceType;
|
|
972
972
|
}({});
|
|
973
973
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
974
|
+
/** The device reports a battery reading (the `battery` cap). Says nothing about sleep. */
|
|
974
975
|
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
976
|
+
/**
|
|
977
|
+
* The device goes into low-power sleep and must be WOKEN before it streams
|
|
978
|
+
* (the `low-power-sleep` cap, `wakeUp`). A battery reading alone is
|
|
979
|
+
* not this: a battery sensor reports charge and never sleeps (#459, Q2).
|
|
980
|
+
*/
|
|
981
|
+
DeviceFeature["Sleeps"] = "sleeps";
|
|
975
982
|
DeviceFeature["Rebootable"] = "rebootable";
|
|
976
983
|
/**
|
|
977
984
|
* Device supports an on-demand re-sync of its derived spec with its
|
|
978
|
-
* upstream source — drives the generic Re-sync button.
|
|
979
|
-
*
|
|
985
|
+
* upstream source — drives the generic Re-sync button. Present when the
|
|
986
|
+
* device has the `resync` cap bound (#459, Q6).
|
|
980
987
|
*/
|
|
981
988
|
DeviceFeature["Resyncable"] = "resyncable";
|
|
982
989
|
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
@@ -1060,9 +1067,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1060
1067
|
DeviceFeature["FanDirection"] = "fan-direction";
|
|
1061
1068
|
/** Fan exposes an oscillation toggle. */
|
|
1062
1069
|
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
1063
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
1064
|
-
* field on the UI lock-controls panel. */
|
|
1065
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
1066
1070
|
/** Lock supports a latch-release ("open door") action distinct from
|
|
1067
1071
|
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
1068
1072
|
* `supported_features`. Gates the Open Door button in the UI. */
|
|
@@ -1093,8 +1097,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1093
1097
|
DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
|
|
1094
1098
|
/** Media player exposes power on / off. */
|
|
1095
1099
|
DeviceFeature["MediaPlayerPower"] = "media-player-power";
|
|
1096
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
1097
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
1098
1100
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
1099
1101
|
* addition to a textual location. */
|
|
1100
1102
|
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
@@ -1114,15 +1116,9 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
1114
1116
|
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
1115
1117
|
* automation's actions while bypassing its condition block. */
|
|
1116
1118
|
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
1117
|
-
/** Robot vacuum exposes a live cleaning map (image child). Gates the
|
|
1118
|
-
* map tile in the vacuum UI. */
|
|
1119
|
-
DeviceFeature["VacuumHasMap"] = "vacuum-has-map";
|
|
1120
1119
|
/** Robot vacuum exposes AI obstacle-detection toggles. Gates the AI
|
|
1121
1120
|
* switches group. */
|
|
1122
1121
|
DeviceFeature["VacuumHasAi"] = "vacuum-has-ai";
|
|
1123
|
-
/** Robot mower exposes a live mowing map (SVG image child). Gates the
|
|
1124
|
-
* mower map tile. */
|
|
1125
|
-
DeviceFeature["MowerHasMap"] = "mower-has-map";
|
|
1126
1122
|
/** Robot mower exposes targeted mowing (all-area / zones / edges /
|
|
1127
1123
|
* spots) — gates the Mow action + map selectors. */
|
|
1128
1124
|
DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
|
|
@@ -1302,7 +1298,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1302
1298
|
*/
|
|
1303
1299
|
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
1304
1300
|
//#endregion
|
|
1305
|
-
//#region ../types/dist/sleep-
|
|
1301
|
+
//#region ../types/dist/sleep-BT1bLgPq.mjs
|
|
1306
1302
|
/**
|
|
1307
1303
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1308
1304
|
* window to float samples (D455).
|
|
@@ -13492,6 +13488,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
13492
13488
|
icon: "refresh-cw"
|
|
13493
13489
|
}]
|
|
13494
13490
|
},
|
|
13491
|
+
"resync": {
|
|
13492
|
+
scope: "device",
|
|
13493
|
+
noun: {
|
|
13494
|
+
en: "Re-sync",
|
|
13495
|
+
it: "Risincronizzazione"
|
|
13496
|
+
},
|
|
13497
|
+
notOperatorFacing: { resync: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action" }
|
|
13498
|
+
},
|
|
13495
13499
|
"recording": {
|
|
13496
13500
|
scope: "device",
|
|
13497
13501
|
noun: {
|
|
@@ -15503,7 +15507,6 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
15503
15507
|
en: "Battery",
|
|
15504
15508
|
it: "Batteria"
|
|
15505
15509
|
},
|
|
15506
|
-
notOperatorFacing: { wakeForStream: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage" },
|
|
15507
15510
|
state: [
|
|
15508
15511
|
{
|
|
15509
15512
|
kind: "numeric",
|
|
@@ -15613,6 +15616,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
15613
15616
|
icon: "moon"
|
|
15614
15617
|
}]
|
|
15615
15618
|
},
|
|
15619
|
+
"low-power-sleep": {
|
|
15620
|
+
scope: "device",
|
|
15621
|
+
noun: {
|
|
15622
|
+
en: "Low-power sleep",
|
|
15623
|
+
it: "Sospensione a basso consumo"
|
|
15624
|
+
},
|
|
15625
|
+
notOperatorFacing: { wakeUp: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage" }
|
|
15626
|
+
},
|
|
15616
15627
|
"network-link": {
|
|
15617
15628
|
scope: "device",
|
|
15618
15629
|
noun: {
|
|
@@ -16828,6 +16839,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
16828
16839
|
"log-channels",
|
|
16829
16840
|
"log-destination",
|
|
16830
16841
|
"login-method",
|
|
16842
|
+
"low-power-sleep",
|
|
16831
16843
|
"media-player",
|
|
16832
16844
|
"mesh-network",
|
|
16833
16845
|
"meter",
|
|
@@ -16881,6 +16893,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
16881
16893
|
"records",
|
|
16882
16894
|
"remote",
|
|
16883
16895
|
"remote-layout-components",
|
|
16896
|
+
"resync",
|
|
16884
16897
|
"running-state",
|
|
16885
16898
|
"scene-monitor",
|
|
16886
16899
|
"schedulers",
|
|
@@ -16984,7 +16997,7 @@ Object.freeze({
|
|
|
16984
16997
|
]
|
|
16985
16998
|
},
|
|
16986
16999
|
{
|
|
16987
|
-
"path": "
|
|
17000
|
+
"path": "codeRequired",
|
|
16988
17001
|
"valueType": "boolean"
|
|
16989
17002
|
}
|
|
16990
17003
|
],
|
|
@@ -18052,7 +18065,24 @@ Object.freeze({
|
|
|
18052
18065
|
"jammed",
|
|
18053
18066
|
"door-open"
|
|
18054
18067
|
]
|
|
18068
|
+
}, {
|
|
18069
|
+
"path": "codeRequired",
|
|
18070
|
+
"valueType": "boolean"
|
|
18055
18071
|
}],
|
|
18072
|
+
"low-power-sleep": [
|
|
18073
|
+
{
|
|
18074
|
+
"path": "sleeping",
|
|
18075
|
+
"valueType": "boolean"
|
|
18076
|
+
},
|
|
18077
|
+
{
|
|
18078
|
+
"path": "lastContactAt",
|
|
18079
|
+
"valueType": "number"
|
|
18080
|
+
},
|
|
18081
|
+
{
|
|
18082
|
+
"path": "lastUpdated",
|
|
18083
|
+
"valueType": "number"
|
|
18084
|
+
}
|
|
18085
|
+
],
|
|
18056
18086
|
"media-player": [
|
|
18057
18087
|
{
|
|
18058
18088
|
"path": "state",
|
|
@@ -19361,7 +19391,7 @@ function sleep(ms) {
|
|
|
19361
19391
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
19362
19392
|
}
|
|
19363
19393
|
//#endregion
|
|
19364
|
-
//#region ../types/dist/implemented-methods-
|
|
19394
|
+
//#region ../types/dist/implemented-methods-k3KProJd.mjs
|
|
19365
19395
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
19366
19396
|
opus: "libopus",
|
|
19367
19397
|
aac: "aac",
|
|
@@ -48256,6 +48286,68 @@ zod.z.object({
|
|
|
48256
48286
|
/** Namespaces the client listed that no longer exist. */
|
|
48257
48287
|
deleted: zod.z.array(PreferenceNamespaceSchema)
|
|
48258
48288
|
});
|
|
48289
|
+
/**
|
|
48290
|
+
* The wire shapes of `apiCatalog.*` — the API explorer's data (planning#595).
|
|
48291
|
+
*
|
|
48292
|
+
* One entry per tRPC method the hub serves, capability and core routes alike,
|
|
48293
|
+
* read off the live router by the hub (never a hand-written list).
|
|
48294
|
+
*/
|
|
48295
|
+
var ApiProcedureKindSchema = zod.z.enum([
|
|
48296
|
+
"query",
|
|
48297
|
+
"mutation",
|
|
48298
|
+
"subscription"
|
|
48299
|
+
]);
|
|
48300
|
+
/** The gate a method runs behind. */
|
|
48301
|
+
var ApiProcedureTierSchema = zod.z.enum([
|
|
48302
|
+
"public",
|
|
48303
|
+
"protected",
|
|
48304
|
+
"admin"
|
|
48305
|
+
]);
|
|
48306
|
+
/** The token scope a capability route is matched against (its `METHOD_ACCESS_MAP` row). */
|
|
48307
|
+
var ApiCatalogScopeSchema = zod.z.object({
|
|
48308
|
+
capName: zod.z.string(),
|
|
48309
|
+
capScope: zod.z.enum(["device", "system"]),
|
|
48310
|
+
access: zod.z.enum([
|
|
48311
|
+
"view",
|
|
48312
|
+
"create",
|
|
48313
|
+
"delete"
|
|
48314
|
+
]),
|
|
48315
|
+
role: zod.z.string()
|
|
48316
|
+
});
|
|
48317
|
+
var ApiCatalogEntrySchema = zod.z.object({
|
|
48318
|
+
/** `<router>.<method>` — the tRPC path. */
|
|
48319
|
+
path: zod.z.string(),
|
|
48320
|
+
router: zod.z.string(),
|
|
48321
|
+
method: zod.z.string(),
|
|
48322
|
+
kind: ApiProcedureKindSchema,
|
|
48323
|
+
tier: ApiProcedureTierSchema,
|
|
48324
|
+
source: zod.z.enum(["capability", "core"]),
|
|
48325
|
+
/** `null` on a core route: it needs authentication only (plus admin where its tier says so). */
|
|
48326
|
+
scope: ApiCatalogScopeSchema.nullable(),
|
|
48327
|
+
hasInput: zod.z.boolean()
|
|
48328
|
+
});
|
|
48329
|
+
/**
|
|
48330
|
+
* May the CALLER call a method. The list has no input, so a method reached
|
|
48331
|
+
* only through a device grant is `per-device`: the real call is allowed or
|
|
48332
|
+
* refused on the device its input names.
|
|
48333
|
+
*/
|
|
48334
|
+
var ApiCallableSchema = zod.z.enum([
|
|
48335
|
+
"yes",
|
|
48336
|
+
"no",
|
|
48337
|
+
"per-device"
|
|
48338
|
+
]);
|
|
48339
|
+
var ApiCatalogMethodSchema = ApiCatalogEntrySchema.extend({ callable: ApiCallableSchema });
|
|
48340
|
+
zod.z.object({ methods: zod.z.array(ApiCatalogMethodSchema) });
|
|
48341
|
+
/** A JSON Schema document, as the explorer receives it. */
|
|
48342
|
+
var JsonSchemaDocumentSchema = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
48343
|
+
zod.z.object({
|
|
48344
|
+
path: zod.z.string(),
|
|
48345
|
+
hasInput: zod.z.boolean(),
|
|
48346
|
+
/** The INPUT JSON schema (what the caller sends); `null` without input or when it could not be produced. */
|
|
48347
|
+
schema: JsonSchemaDocumentSchema.nullable(),
|
|
48348
|
+
/** Why no schema could be produced (a non-Zod parser, an unrepresentable type). */
|
|
48349
|
+
error: zod.z.string().nullable()
|
|
48350
|
+
});
|
|
48259
48351
|
zod.z.enum(["new-session", "step-up"]);
|
|
48260
48352
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
48261
48353
|
var AppPageLangSchema = zod.z.enum(["en", "it"]);
|
|
@@ -56739,9 +56831,8 @@ var airQualitySensorCapability = {
|
|
|
56739
56831
|
* Many panels require a PIN code on arm / disarm — the optional
|
|
56740
56832
|
* `code` field on the methods passes it through to the upstream
|
|
56741
56833
|
* service; it's NEVER persisted in the runtime slice or any event
|
|
56742
|
-
* payload.
|
|
56743
|
-
* `
|
|
56744
|
-
* field without a slice fetch.
|
|
56834
|
+
* payload. Whether a code is required is the slice's `codeRequired`
|
|
56835
|
+
* (#459): `null` when the provider cannot tell (D393).
|
|
56745
56836
|
*
|
|
56746
56837
|
* `availableModes` mirrors HA's `supported_features`-derived arm
|
|
56747
56838
|
* mode list — the UI renders only the buttons the panel accepts.
|
|
@@ -56780,9 +56871,13 @@ var AlarmPanelStatusSchema = zod.z.object({
|
|
|
56780
56871
|
/** Subset of arm modes the panel accepts. UI renders one button per
|
|
56781
56872
|
* mode in this list. */
|
|
56782
56873
|
availableModes: zod.z.array(AlarmArmModeSchema),
|
|
56783
|
-
/**
|
|
56784
|
-
*
|
|
56785
|
-
requiresCode
|
|
56874
|
+
/**
|
|
56875
|
+
* Whether the panel requires a PIN on arm / disarm (#459; the field was
|
|
56876
|
+
* `requiresCode`, and the `alarm-pin-required` device feature is gone).
|
|
56877
|
+
* `null` = the provider cannot tell (D393), never `false`. A slice restored
|
|
56878
|
+
* from before the rename is upgraded at boot by `restoredFieldRenames`.
|
|
56879
|
+
*/
|
|
56880
|
+
codeRequired: zod.z.boolean().nullable(),
|
|
56786
56881
|
/** Ms epoch when the slice was last updated. */
|
|
56787
56882
|
lastChangedAt: zod.z.number()
|
|
56788
56883
|
});
|
|
@@ -56839,7 +56934,7 @@ var alarmPanelCapability = {
|
|
|
56839
56934
|
arm: method(zod.z.object({
|
|
56840
56935
|
deviceId: zod.z.number().int().nonnegative(),
|
|
56841
56936
|
mode: AlarmArmModeSchema,
|
|
56842
|
-
/** Optional PIN code. Required when `
|
|
56937
|
+
/** Optional PIN code. Required when `codeRequired === true`.
|
|
56843
56938
|
* Passed through to the upstream service; never persisted. */
|
|
56844
56939
|
code: zod.z.string().min(1).optional()
|
|
56845
56940
|
}), zod.z.void(), {
|
|
@@ -56956,7 +57051,7 @@ var alarmPanelCapability = {
|
|
|
56956
57051
|
/**
|
|
56957
57052
|
* Runtime-state slice — mirrored by the kernel. UI panel reads the
|
|
56958
57053
|
* full slice; renders an arm button per `availableModes` entry and
|
|
56959
|
-
* a PIN field iff `
|
|
57054
|
+
* a PIN field iff `codeRequired === true`.
|
|
56960
57055
|
*/
|
|
56961
57056
|
runtimeState: AlarmPanelStatusSchema,
|
|
56962
57057
|
/**
|
|
@@ -56967,6 +57062,13 @@ var alarmPanelCapability = {
|
|
|
56967
57062
|
*/
|
|
56968
57063
|
durability: "restored",
|
|
56969
57064
|
/**
|
|
57065
|
+
* A slice persisted before #459 carries `requiresCode`; the boot seed reads it
|
|
57066
|
+
* once into `codeRequired` (`restoredPart`), so no reader meets the old key,
|
|
57067
|
+
* and rewrites the row once without it (`seedMirrorFromRow`) — so this entry
|
|
57068
|
+
* can be dropped after every node has booted once on a release that has it.
|
|
57069
|
+
*/
|
|
57070
|
+
restoredFieldRenames: { requiresCode: "codeRequired" },
|
|
57071
|
+
/**
|
|
56970
57072
|
* History (D850): the panel's lifecycle state as an `enum` series —
|
|
56971
57073
|
* change-only, no floor, so an `arming -> pending -> triggered` sequence of a
|
|
56972
57074
|
* few seconds keeps every step. Who armed it stays in the events ledger.
|
|
@@ -58492,9 +58594,9 @@ var backupCapability = {
|
|
|
58492
58594
|
vocabulary: { notOperatorFacing: "system backups — run and restored from the Backups page" }
|
|
58493
58595
|
};
|
|
58494
58596
|
/**
|
|
58495
|
-
* Battery status snapshot. Emitted by providers whose device
|
|
58496
|
-
* battery
|
|
58497
|
-
*
|
|
58597
|
+
* Battery status snapshot. Emitted by providers whose device reports a
|
|
58598
|
+
* battery (`DeviceFeature.BatteryOperated`): battery cameras, sensors,
|
|
58599
|
+
* buttons. Whether the device SLEEPS is `low-power-sleep`, not this cap. Consumers build their own "low
|
|
58498
58600
|
* battery" alerting on top — the cap deliberately does NOT enforce a
|
|
58499
58601
|
* threshold.
|
|
58500
58602
|
*/
|
|
@@ -58651,47 +58753,12 @@ var batteryCapability = {
|
|
|
58651
58753
|
deviceNative: true,
|
|
58652
58754
|
mode: "singleton",
|
|
58653
58755
|
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
58654
|
-
methods: {
|
|
58655
58756
|
/**
|
|
58656
|
-
*
|
|
58657
|
-
*
|
|
58658
|
-
*
|
|
58659
|
-
* RTCSession, snapshot wrappers) call this with a short timeout
|
|
58660
|
-
* before establishing the media pipeline — the broker's own
|
|
58661
|
-
* passive wake-on-dial works but adds 5–7 seconds to first-frame,
|
|
58662
|
-
* during which the consumer renders a black screen. Pre-waking
|
|
58663
|
-
* compresses that gap.
|
|
58664
|
-
*
|
|
58665
|
-
* Returns `awoke: true` when the firmware acknowledged the wake
|
|
58666
|
-
* before `timeoutMs`. Returns `awoke: false` when it timed out OR
|
|
58667
|
-
* the cap surface is unavailable (no Baichuan / firmware
|
|
58668
|
-
* channel); the caller should still attempt the stream — the
|
|
58669
|
-
* passive broker wake remains as fallback.
|
|
58670
|
-
*/
|
|
58671
|
-
wakeForStream: method(zod.z.object({
|
|
58672
|
-
deviceId: zod.z.number(),
|
|
58673
|
-
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
58674
|
-
timeoutMs: zod.z.number().int().min(500).max(3e4).default(8e3)
|
|
58675
|
-
}), zod.z.object({
|
|
58676
|
-
awoke: zod.z.boolean(),
|
|
58677
|
-
durationMs: zod.z.number()
|
|
58678
|
-
}), {
|
|
58679
|
-
kind: "mutation",
|
|
58680
|
-
notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
|
|
58681
|
-
}) },
|
|
58682
|
-
/**
|
|
58683
|
-
* A composed provider (battery ADDED to a pet feeder or container that has
|
|
58684
|
-
* no wake surface) answers `wakeForStream` with the same "unavailable"
|
|
58685
|
-
* result the contract already defines above: "Returns `awoke: false` when
|
|
58686
|
-
* … the cap surface is unavailable." (D663).
|
|
58757
|
+
* No methods: waking a sleeping camera is `low-power-sleep.wakeUp`
|
|
58758
|
+
* (#459, Q2). A battery reading says nothing about sleep — a battery sensor
|
|
58759
|
+
* reports charge and never needs waking.
|
|
58687
58760
|
*/
|
|
58688
|
-
|
|
58689
|
-
kind: "answer",
|
|
58690
|
-
value: {
|
|
58691
|
-
awoke: false,
|
|
58692
|
-
durationMs: 0
|
|
58693
|
-
}
|
|
58694
|
-
} },
|
|
58761
|
+
methods: {},
|
|
58695
58762
|
events: {
|
|
58696
58763
|
/**
|
|
58697
58764
|
* Emitted whenever the cached status changes (firmware push OR
|
|
@@ -66418,7 +66485,7 @@ function groupTemplate(id) {
|
|
|
66418
66485
|
}
|
|
66419
66486
|
/**
|
|
66420
66487
|
* Cap history catalog, projected from every `*.cap.ts` `history` block.
|
|
66421
|
-
* 47 caps with series (130 series),
|
|
66488
|
+
* 47 caps with series (130 series), 40 caps answered `'none'`.
|
|
66422
66489
|
* Field keys are `runtimeState` paths (`a.b` into fixed objects only).
|
|
66423
66490
|
*/
|
|
66424
66491
|
var HISTORY_CATALOG = {
|
|
@@ -83402,8 +83469,8 @@ var localNetworkCapability = {
|
|
|
83402
83469
|
* (workplace keypad locks, hospitality). The optional `code` field
|
|
83403
83470
|
* on the methods passes it through to the upstream service — the
|
|
83404
83471
|
* code is NEVER persisted in the runtime slice or any event payload.
|
|
83405
|
-
*
|
|
83406
|
-
* the
|
|
83472
|
+
* Whether a lock REQUIRES a code is the slice's `codeRequired` (#459):
|
|
83473
|
+
* `true` / `false` when the provider knows, `null` when it does not (D393).
|
|
83407
83474
|
*
|
|
83408
83475
|
* Locks that support a latch-release ("open door") action advertise
|
|
83409
83476
|
* `DeviceFeature.LockOpen`. The `open` method triggers the latch
|
|
@@ -83432,6 +83499,13 @@ var LockControlStatusSchema = zod.z.object({
|
|
|
83432
83499
|
/** Lifecycle state of the lock. `jammed` means the motor reported
|
|
83433
83500
|
* failure to reach the target — operator intervention required. */
|
|
83434
83501
|
state: LockStateSchema,
|
|
83502
|
+
/**
|
|
83503
|
+
* Whether lock / unlock need a PIN `code` (#459, replaces the
|
|
83504
|
+
* `lock-pin-required` device feature). `null` = the provider cannot tell
|
|
83505
|
+
* (D393) — never `false`. `.optional()` so a restored slice written before
|
|
83506
|
+
* the field still parses; readers treat absent exactly like `null`.
|
|
83507
|
+
*/
|
|
83508
|
+
codeRequired: zod.z.boolean().nullable().optional(),
|
|
83435
83509
|
/** Ms epoch when the slice was last updated. */
|
|
83436
83510
|
lastChangedAt: zod.z.number()
|
|
83437
83511
|
});
|
|
@@ -83956,6 +84030,90 @@ var loginMethodCapability = {
|
|
|
83956
84030
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.IDENTITY }
|
|
83957
84031
|
};
|
|
83958
84032
|
/**
|
|
84033
|
+
* low-power-sleep — a device that goes into low-power sleep and must be WOKEN
|
|
84034
|
+
* before it streams (#459, Q2). A battery camera (Reolink Argus, a robot's
|
|
84035
|
+
* on-board camera) is one; a battery SENSOR is not: it reports charge on the
|
|
84036
|
+
* `battery` cap and never sleeps. The two meanings used to share
|
|
84037
|
+
* `DeviceFeature.BatteryOperated`; this cap is the one that answers "sleeps",
|
|
84038
|
+
* and `DeviceFeature.Sleeps` is derived from it being bound with
|
|
84039
|
+
* `wakeUp` implemented.
|
|
84040
|
+
*
|
|
84041
|
+
* The state is the sleep inputs (`deriveBatteryPresence`): whether the device
|
|
84042
|
+
* is asleep, and the last time it PROVED it was reachable. Read from this slice
|
|
84043
|
+
* by the stream broker (`readBatterySleepFacts`), the recorder
|
|
84044
|
+
* (`recordingWakeDeps`) and the snapshot builtin. The broker's per-device
|
|
84045
|
+
* mirror is still also fed by `BatteryOnStatusChanged` events.
|
|
84046
|
+
*/
|
|
84047
|
+
var LowPowerSleepStatusSchema = zod.z.object({
|
|
84048
|
+
/**
|
|
84049
|
+
* True while the firmware is in low-power mode. A provider MUST avoid polling
|
|
84050
|
+
* during sleep — a read wakes the device and drains charge.
|
|
84051
|
+
*/
|
|
84052
|
+
sleeping: zod.z.boolean().meta({ label: "Sleeping" }),
|
|
84053
|
+
/**
|
|
84054
|
+
* Ms epoch of the last time the device proved it was reachable, from
|
|
84055
|
+
* PASSIVE signals only (a completed round-trip, an observed wake, a push).
|
|
84056
|
+
* Absent = never since this slice was born. The only input that separates
|
|
84057
|
+
* "asleep" from "gone".
|
|
84058
|
+
*/
|
|
84059
|
+
lastContactAt: zod.z.number().optional(),
|
|
84060
|
+
/** Ms epoch of the last observation. */
|
|
84061
|
+
lastUpdated: zod.z.number().meta(readingMeta("none"))
|
|
84062
|
+
});
|
|
84063
|
+
var lowPowerSleepCapability = {
|
|
84064
|
+
name: "low-power-sleep",
|
|
84065
|
+
scope: "device",
|
|
84066
|
+
deviceNative: true,
|
|
84067
|
+
mode: "singleton",
|
|
84068
|
+
deviceTypes: [DeviceType.Camera],
|
|
84069
|
+
methods: {
|
|
84070
|
+
/**
|
|
84071
|
+
* Explicitly wake the device from low-power sleep ahead of a streaming
|
|
84072
|
+
* session start. Consumers that initiate a stream against a sleeping
|
|
84073
|
+
* camera (wake-on-play, the recorder, HomeKit, Alexa, snapshot wrappers)
|
|
84074
|
+
* call this with a short timeout before establishing the media pipeline —
|
|
84075
|
+
* the broker's own passive wake-on-dial works but adds 5–7 seconds to
|
|
84076
|
+
* first-frame. Pre-waking compresses that gap.
|
|
84077
|
+
*
|
|
84078
|
+
* Returns `awoke: true` when the firmware acknowledged the wake before
|
|
84079
|
+
* `timeoutMs`, `awoke: false` when it timed out; the caller should still
|
|
84080
|
+
* attempt the stream — the passive broker wake remains as fallback.
|
|
84081
|
+
*/
|
|
84082
|
+
wakeUp: method(zod.z.object({
|
|
84083
|
+
deviceId: zod.z.number(),
|
|
84084
|
+
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
84085
|
+
timeoutMs: zod.z.number().int().min(500).max(3e4).default(8e3)
|
|
84086
|
+
}), zod.z.object({
|
|
84087
|
+
awoke: zod.z.boolean(),
|
|
84088
|
+
durationMs: zod.z.number()
|
|
84089
|
+
}), {
|
|
84090
|
+
kind: "mutation",
|
|
84091
|
+
notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
|
|
84092
|
+
}) },
|
|
84093
|
+
status: {
|
|
84094
|
+
schema: LowPowerSleepStatusSchema,
|
|
84095
|
+
kind: "push",
|
|
84096
|
+
empty: {
|
|
84097
|
+
sleeping: false,
|
|
84098
|
+
lastUpdated: 0
|
|
84099
|
+
}
|
|
84100
|
+
},
|
|
84101
|
+
runtimeState: LowPowerSleepStatusSchema,
|
|
84102
|
+
/**
|
|
84103
|
+
* Runtime-state durability: **restored** — a sleeping camera may not report
|
|
84104
|
+
* for hours; the restored sleep inputs are the only thing the sleep gate and
|
|
84105
|
+
* the presence derivation have (the same argument as `battery`).
|
|
84106
|
+
*/
|
|
84107
|
+
durability: "restored",
|
|
84108
|
+
/** History (D850): none — battery never recorded a sleep series either. */
|
|
84109
|
+
history: "none",
|
|
84110
|
+
volatileStateFields: ["lastUpdated"],
|
|
84111
|
+
vocabulary: {
|
|
84112
|
+
noun: t("Low-power sleep", "Sospensione a basso consumo"),
|
|
84113
|
+
order: 5245
|
|
84114
|
+
}
|
|
84115
|
+
};
|
|
84116
|
+
/**
|
|
83959
84117
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
83960
84118
|
*
|
|
83961
84119
|
* Different shape from `network-access` (public tunnels):
|
|
@@ -104763,6 +104921,42 @@ var remoteLayoutComponentsCapability = {
|
|
|
104763
104921
|
methods: { listComponents: method(zod.z.object({}), zod.z.array(RemoteLayoutComponentSchema), { auth: "protected" }) },
|
|
104764
104922
|
vocabulary: { notOperatorFacing: "the palette of the remote template editor — read-only data, never actuated" }
|
|
104765
104923
|
};
|
|
104924
|
+
/**
|
|
104925
|
+
* resync — a device whose derived spec can be re-aligned on demand with its
|
|
104926
|
+
* upstream source (#459, Q6). Registered by the containers an integration
|
|
104927
|
+
* adopted; `DeviceFeature.Resyncable` (the generic Re-sync button) is derived
|
|
104928
|
+
* from it being bound with `resync` implemented.
|
|
104929
|
+
*
|
|
104930
|
+
* The work itself stays where it is: the owning addon's `device-adoption`
|
|
104931
|
+
* provider, reached through `deviceManager.adoptionResync` (which also owns
|
|
104932
|
+
* the "resync from zero" child purge). A provider answers this method by
|
|
104933
|
+
* asking for exactly that — see `resyncThroughAdoption`.
|
|
104934
|
+
*/
|
|
104935
|
+
var ResyncDeviceInputSchema = zod.z.object({
|
|
104936
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
104937
|
+
/** "Resync from zero": purge the accessory children before re-deriving. */
|
|
104938
|
+
resetToSource: zod.z.boolean().optional()
|
|
104939
|
+
});
|
|
104940
|
+
var resyncCapability = {
|
|
104941
|
+
name: "resync",
|
|
104942
|
+
scope: "device",
|
|
104943
|
+
deviceNative: true,
|
|
104944
|
+
mode: "singleton",
|
|
104945
|
+
deviceTypes: [
|
|
104946
|
+
DeviceType.Container,
|
|
104947
|
+
DeviceType.Workload,
|
|
104948
|
+
DeviceType.WeatherStation
|
|
104949
|
+
],
|
|
104950
|
+
methods: { resync: method(ResyncDeviceInputSchema, ResyncResultSchema, {
|
|
104951
|
+
kind: "mutation",
|
|
104952
|
+
auth: "admin",
|
|
104953
|
+
notOperatorFacing: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action"
|
|
104954
|
+
}) },
|
|
104955
|
+
vocabulary: {
|
|
104956
|
+
noun: t("Re-sync", "Risincronizzazione"),
|
|
104957
|
+
order: 3245
|
|
104958
|
+
}
|
|
104959
|
+
};
|
|
104766
104960
|
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
104767
104961
|
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
104768
104962
|
/** What every type without its own row starts from. */
|
|
@@ -114110,6 +114304,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
114110
114304
|
logChannelsCapability,
|
|
114111
114305
|
logDestinationCapability,
|
|
114112
114306
|
loginMethodCapability,
|
|
114307
|
+
lowPowerSleepCapability,
|
|
114113
114308
|
mediaPlayerCapability,
|
|
114114
114309
|
meshNetworkCapability,
|
|
114115
114310
|
meterCapability,
|
|
@@ -114163,6 +114358,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
114163
114358
|
recordsCapability,
|
|
114164
114359
|
remoteCapability,
|
|
114165
114360
|
remoteLayoutComponentsCapability,
|
|
114361
|
+
resyncCapability,
|
|
114166
114362
|
runningStateCapability,
|
|
114167
114363
|
sceneMonitorCapability,
|
|
114168
114364
|
schedulersCapability,
|
|
@@ -117264,6 +117460,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
117264
117460
|
irTransmitter: irTransmitterCapability,
|
|
117265
117461
|
lawnMowerControl: lawnMowerControlCapability,
|
|
117266
117462
|
lockControl: lockControlCapability,
|
|
117463
|
+
lowPowerSleep: lowPowerSleepCapability,
|
|
117267
117464
|
mediaPlayer: mediaPlayerCapability,
|
|
117268
117465
|
meter: meterCapability,
|
|
117269
117466
|
motion: motionCapability,
|
|
@@ -118019,6 +118216,18 @@ function deriveBatteryPresence(input) {
|
|
|
118019
118216
|
return input.nowMs - lastContactAt > budget ? "unreachable" : "sleeping";
|
|
118020
118217
|
}
|
|
118021
118218
|
/**
|
|
118219
|
+
* Does this device SLEEP and need waking before it streams (#459, Q2)?
|
|
118220
|
+
*
|
|
118221
|
+
* The one predicate every data-plane consumer asks (prebuffer, wake-on-play,
|
|
118222
|
+
* the recorder, sentry, the snapshot wrapper, the detection profile). It reads
|
|
118223
|
+
* `DeviceFeature.Sleeps`, derived from the `low-power-sleep` cap — never
|
|
118224
|
+
* `DeviceFeature.BatteryOperated`, which only says the device reports a
|
|
118225
|
+
* battery: a battery sensor reports charge and never sleeps.
|
|
118226
|
+
*/
|
|
118227
|
+
function deviceSleeps(features) {
|
|
118228
|
+
return features.includes(DeviceFeature.Sleeps);
|
|
118229
|
+
}
|
|
118230
|
+
/**
|
|
118022
118231
|
* WHICH child a container stands for — one definition, for every consumer.
|
|
118023
118232
|
*
|
|
118024
118233
|
* A CONTAINER device has no controllable surface of its own: it groups entity
|
|
@@ -118546,8 +118755,8 @@ var ALARM_MODES = [
|
|
|
118546
118755
|
"vacation",
|
|
118547
118756
|
"custom_bypass"
|
|
118548
118757
|
];
|
|
118549
|
-
function alarmControls(state, modes,
|
|
118550
|
-
if (
|
|
118758
|
+
function alarmControls(state, modes, codeRequired) {
|
|
118759
|
+
if (codeRequired) return [];
|
|
118551
118760
|
const disarm = asAction(action("alarm.disarm", t("Disarm", "Disinserisci"), "shield-off", "alarm-panel", "disarm", {}, "primary"));
|
|
118552
118761
|
const arm = (primaryFirst) => modes.map((mode, i) => asAction(action(`alarm.arm.${mode}`, ARM_LABELS[mode], "shield-check", "alarm-panel", "arm", { mode }, primaryFirst && i === 0 ? "primary" : "normal")));
|
|
118553
118762
|
switch (state) {
|
|
@@ -118567,7 +118776,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
118567
118776
|
const modes = slice === void 0 ? ALARM_MODES : slice.availableModes;
|
|
118568
118777
|
return {
|
|
118569
118778
|
reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
|
|
118570
|
-
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? NOT_REPORTED, since]), alarmControls(state, modes, slice?.
|
|
118779
|
+
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? NOT_REPORTED, since]), alarmControls(state, modes, slice?.codeRequired !== false))],
|
|
118571
118780
|
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
|
|
118572
118781
|
...words === null ? {} : { tiles: {
|
|
118573
118782
|
left: [{
|
|
@@ -123243,13 +123452,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
123243
123452
|
access: "view",
|
|
123244
123453
|
role: "viewer"
|
|
123245
123454
|
},
|
|
123246
|
-
"battery.wakeForStream": {
|
|
123247
|
-
capName: "battery",
|
|
123248
|
-
capScope: "device",
|
|
123249
|
-
addonId: null,
|
|
123250
|
-
access: "create",
|
|
123251
|
-
role: "viewer"
|
|
123252
|
-
},
|
|
123253
123455
|
"binary.getStatus": {
|
|
123254
123456
|
capName: "binary",
|
|
123255
123457
|
capScope: "device",
|
|
@@ -126904,6 +127106,20 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
126904
127106
|
access: "view",
|
|
126905
127107
|
role: "admin"
|
|
126906
127108
|
},
|
|
127109
|
+
"lowPowerSleep.getStatus": {
|
|
127110
|
+
capName: "low-power-sleep",
|
|
127111
|
+
capScope: "device",
|
|
127112
|
+
addonId: null,
|
|
127113
|
+
access: "view",
|
|
127114
|
+
role: "viewer"
|
|
127115
|
+
},
|
|
127116
|
+
"lowPowerSleep.wakeUp": {
|
|
127117
|
+
capName: "low-power-sleep",
|
|
127118
|
+
capScope: "device",
|
|
127119
|
+
addonId: null,
|
|
127120
|
+
access: "create",
|
|
127121
|
+
role: "viewer"
|
|
127122
|
+
},
|
|
126907
127123
|
"mediaPlayer.channelDown": {
|
|
126908
127124
|
capName: "media-player",
|
|
126909
127125
|
capScope: "device",
|
|
@@ -130579,6 +130795,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
130579
130795
|
access: "view",
|
|
130580
130796
|
role: "admin"
|
|
130581
130797
|
},
|
|
130798
|
+
"resync.resync": {
|
|
130799
|
+
capName: "resync",
|
|
130800
|
+
capScope: "device",
|
|
130801
|
+
addonId: null,
|
|
130802
|
+
access: "create",
|
|
130803
|
+
role: "admin"
|
|
130804
|
+
},
|
|
130582
130805
|
"runningState.getStatus": {
|
|
130583
130806
|
capName: "running-state",
|
|
130584
130807
|
capScope: "device",
|
|
@@ -133052,7 +133275,7 @@ function deviceOffersActions(bindings, actionIds, mode = "any", deviceType) {
|
|
|
133052
133275
|
const offered = new Set(actionsForDevice(bindings, deviceType).map((action) => action.id));
|
|
133053
133276
|
return mode === "all" ? actionIds.every((id) => offered.has(id)) : actionIds.some((id) => offered.has(id));
|
|
133054
133277
|
}
|
|
133055
|
-
DeviceFeature.
|
|
133278
|
+
DeviceFeature.Sleeps;
|
|
133056
133279
|
function bound(cap, methods = [], authority = "reported") {
|
|
133057
133280
|
return {
|
|
133058
133281
|
kind: "cap",
|
|
@@ -133070,13 +133293,13 @@ function reported(reason) {
|
|
|
133070
133293
|
reason
|
|
133071
133294
|
};
|
|
133072
133295
|
}
|
|
133073
|
-
var SLEEP_PENDING = "splits into a sleeping cap in a later phase of #459";
|
|
133074
133296
|
var CAP_PENDING = "becomes a cap or is dropped in a later phase of #459";
|
|
133075
133297
|
/** Exhaustive: a new `DeviceFeature` without a row does not compile. */
|
|
133076
133298
|
var DEVICE_FEATURE_REQUIREMENTS = {
|
|
133077
|
-
[DeviceFeature.BatteryOperated]:
|
|
133299
|
+
[DeviceFeature.BatteryOperated]: bound("battery"),
|
|
133300
|
+
[DeviceFeature.Sleeps]: derived("low-power-sleep", ["wakeUp"]),
|
|
133078
133301
|
[DeviceFeature.Rebootable]: derived("reboot", ["reboot"]),
|
|
133079
|
-
[DeviceFeature.Resyncable]:
|
|
133302
|
+
[DeviceFeature.Resyncable]: derived("resync", ["resync"]),
|
|
133080
133303
|
[DeviceFeature.NativeSnapshot]: reported(CAP_PENDING),
|
|
133081
133304
|
[DeviceFeature.DoorbellButton]: derived("doorbell"),
|
|
133082
133305
|
[DeviceFeature.TwoWayAudio]: derived("intercom", [
|
|
@@ -133106,7 +133329,6 @@ var DEVICE_FEATURE_REQUIREMENTS = {
|
|
|
133106
133329
|
[DeviceFeature.FanPreset]: bound("fan-control", ["setPreset"]),
|
|
133107
133330
|
[DeviceFeature.FanDirection]: bound("fan-control", ["setDirection"]),
|
|
133108
133331
|
[DeviceFeature.FanOscillating]: bound("fan-control", ["setOscillating"]),
|
|
133109
|
-
[DeviceFeature.LockPinRequired]: reported(CAP_PENDING),
|
|
133110
133332
|
[DeviceFeature.LockOpen]: bound("lock-control", ["open"]),
|
|
133111
133333
|
[DeviceFeature.MediaPlayerSeek]: bound("media-player", ["seek"]),
|
|
133112
133334
|
[DeviceFeature.MediaPlayerVolume]: bound("media-player", ["setVolume"]),
|
|
@@ -133121,7 +133343,6 @@ var DEVICE_FEATURE_REQUIREMENTS = {
|
|
|
133121
133343
|
[DeviceFeature.MediaPlayerVolumeStep]: bound("media-player", ["volumeUp", "volumeDown"]),
|
|
133122
133344
|
[DeviceFeature.MediaPlayerChannelStep]: bound("media-player", ["channelUp", "channelDown"]),
|
|
133123
133345
|
[DeviceFeature.MediaPlayerPower]: bound("media-player", ["turnOn", "turnOff"]),
|
|
133124
|
-
[DeviceFeature.AlarmPinRequired]: reported(CAP_PENDING),
|
|
133125
133346
|
[DeviceFeature.PresenceGps]: reported(CAP_PENDING),
|
|
133126
133347
|
[DeviceFeature.NotifierImage]: reported(CAP_PENDING),
|
|
133127
133348
|
[DeviceFeature.NotifierPriority]: reported(CAP_PENDING),
|
|
@@ -133130,9 +133351,7 @@ var DEVICE_FEATURE_REQUIREMENTS = {
|
|
|
133130
133351
|
[DeviceFeature.NotifierRecipients]: reported(CAP_PENDING),
|
|
133131
133352
|
[DeviceFeature.ScriptVariables]: reported(CAP_PENDING),
|
|
133132
133353
|
[DeviceFeature.AutomationSkipCondition]: reported(CAP_PENDING),
|
|
133133
|
-
[DeviceFeature.VacuumHasMap]: reported(CAP_PENDING),
|
|
133134
133354
|
[DeviceFeature.VacuumHasAi]: reported(CAP_PENDING),
|
|
133135
|
-
[DeviceFeature.MowerHasMap]: reported(CAP_PENDING),
|
|
133136
133355
|
[DeviceFeature.MowerHasTargetedMowing]: reported(CAP_PENDING),
|
|
133137
133356
|
[DeviceFeature.Navigation]: derived("navigation"),
|
|
133138
133357
|
[DeviceFeature.NetworkLink]: derived("network-link")
|
|
@@ -133321,6 +133540,7 @@ var CAP_NAMES_WITH_STATUS = [
|
|
|
133321
133540
|
"intercom",
|
|
133322
133541
|
"lawn-mower-control",
|
|
133323
133542
|
"lock-control",
|
|
133543
|
+
"low-power-sleep",
|
|
133324
133544
|
"media-player",
|
|
133325
133545
|
"meter",
|
|
133326
133546
|
"motion",
|
|
@@ -133515,11 +133735,6 @@ Object.freeze({
|
|
|
133515
133735
|
form: "single",
|
|
133516
133736
|
optional: false
|
|
133517
133737
|
}],
|
|
133518
|
-
"battery.wakeForStream": [{
|
|
133519
|
-
name: "deviceId",
|
|
133520
|
-
form: "single",
|
|
133521
|
-
optional: false
|
|
133522
|
-
}],
|
|
133523
133738
|
"binary.getStatus": [{
|
|
133524
133739
|
name: "deviceId",
|
|
133525
133740
|
form: "single",
|
|
@@ -134703,6 +134918,16 @@ Object.freeze({
|
|
|
134703
134918
|
form: "single",
|
|
134704
134919
|
optional: true
|
|
134705
134920
|
}],
|
|
134921
|
+
"lowPowerSleep.getStatus": [{
|
|
134922
|
+
name: "deviceId",
|
|
134923
|
+
form: "single",
|
|
134924
|
+
optional: false
|
|
134925
|
+
}],
|
|
134926
|
+
"lowPowerSleep.wakeUp": [{
|
|
134927
|
+
name: "deviceId",
|
|
134928
|
+
form: "single",
|
|
134929
|
+
optional: false
|
|
134930
|
+
}],
|
|
134706
134931
|
"mediaPlayer.channelDown": [{
|
|
134707
134932
|
name: "deviceId",
|
|
134708
134933
|
form: "single",
|
|
@@ -135988,6 +136213,11 @@ Object.freeze({
|
|
|
135988
136213
|
form: "single",
|
|
135989
136214
|
optional: false
|
|
135990
136215
|
}],
|
|
136216
|
+
"resync.resync": [{
|
|
136217
|
+
name: "deviceId",
|
|
136218
|
+
form: "single",
|
|
136219
|
+
optional: false
|
|
136220
|
+
}],
|
|
135991
136221
|
"runningState.getStatus": [{
|
|
135992
136222
|
name: "deviceId",
|
|
135993
136223
|
form: "single",
|
|
@@ -136613,7 +136843,7 @@ Object.freeze({
|
|
|
136613
136843
|
});
|
|
136614
136844
|
/**
|
|
136615
136845
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
136616
|
-
* `runtimeState`.
|
|
136846
|
+
* `runtimeState`. 88 caps: 44 `restored`, 44 `session`.
|
|
136617
136847
|
*
|
|
136618
136848
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
136619
136849
|
* with `durability: 'session'` has one and has decided not to keep it.
|
|
@@ -136625,7 +136855,8 @@ var RUNTIME_STATE_POLICY = {
|
|
|
136625
136855
|
},
|
|
136626
136856
|
"alarm-panel": {
|
|
136627
136857
|
durability: "restored",
|
|
136628
|
-
volatileFields: ["lastChangedAt"]
|
|
136858
|
+
volatileFields: ["lastChangedAt"],
|
|
136859
|
+
renamedFields: { requiresCode: "codeRequired" }
|
|
136629
136860
|
},
|
|
136630
136861
|
"ambient-light-sensor": {
|
|
136631
136862
|
durability: "restored",
|
|
@@ -136792,6 +137023,10 @@ var RUNTIME_STATE_POLICY = {
|
|
|
136792
137023
|
durability: "restored",
|
|
136793
137024
|
volatileFields: ["lastChangedAt"]
|
|
136794
137025
|
},
|
|
137026
|
+
"low-power-sleep": {
|
|
137027
|
+
durability: "restored",
|
|
137028
|
+
volatileFields: ["lastUpdated"]
|
|
137029
|
+
},
|
|
136795
137030
|
"media-player": {
|
|
136796
137031
|
durability: "session",
|
|
136797
137032
|
volatileFields: []
|
|
@@ -139136,12 +139371,6 @@ Object.defineProperty(exports, "BatchTooLargeError", {
|
|
|
139136
139371
|
return BatchTooLargeError;
|
|
139137
139372
|
}
|
|
139138
139373
|
});
|
|
139139
|
-
Object.defineProperty(exports, "BatteryStatusSchema", {
|
|
139140
|
-
enumerable: true,
|
|
139141
|
-
get: function() {
|
|
139142
|
-
return BatteryStatusSchema;
|
|
139143
|
-
}
|
|
139144
|
-
});
|
|
139145
139374
|
Object.defineProperty(exports, "CALLER_STAMPED_CAPABILITIES", {
|
|
139146
139375
|
enumerable: true,
|
|
139147
139376
|
get: function() {
|
|
@@ -139688,6 +139917,12 @@ Object.defineProperty(exports, "LOG_LEVEL_RANK", {
|
|
|
139688
139917
|
return LOG_LEVEL_RANK;
|
|
139689
139918
|
}
|
|
139690
139919
|
});
|
|
139920
|
+
Object.defineProperty(exports, "LowPowerSleepStatusSchema", {
|
|
139921
|
+
enumerable: true,
|
|
139922
|
+
get: function() {
|
|
139923
|
+
return LowPowerSleepStatusSchema;
|
|
139924
|
+
}
|
|
139925
|
+
});
|
|
139691
139926
|
Object.defineProperty(exports, "METHOD_ACCESS_MAP", {
|
|
139692
139927
|
enumerable: true,
|
|
139693
139928
|
get: function() {
|
|
@@ -140276,12 +140511,6 @@ Object.defineProperty(exports, "bareAddonId", {
|
|
|
140276
140511
|
return bareAddonId;
|
|
140277
140512
|
}
|
|
140278
140513
|
});
|
|
140279
|
-
Object.defineProperty(exports, "batteryCapability", {
|
|
140280
|
-
enumerable: true,
|
|
140281
|
-
get: function() {
|
|
140282
|
-
return batteryCapability;
|
|
140283
|
-
}
|
|
140284
|
-
});
|
|
140285
140514
|
Object.defineProperty(exports, "brightnessCapability", {
|
|
140286
140515
|
enumerable: true,
|
|
140287
140516
|
get: function() {
|
|
@@ -140756,6 +140985,12 @@ Object.defineProperty(exports, "deviceRunsCapability", {
|
|
|
140756
140985
|
return deviceRunsCapability;
|
|
140757
140986
|
}
|
|
140758
140987
|
});
|
|
140988
|
+
Object.defineProperty(exports, "deviceSleeps", {
|
|
140989
|
+
enumerable: true,
|
|
140990
|
+
get: function() {
|
|
140991
|
+
return deviceSleeps;
|
|
140992
|
+
}
|
|
140993
|
+
});
|
|
140759
140994
|
Object.defineProperty(exports, "deviceStateCapability", {
|
|
140760
140995
|
enumerable: true,
|
|
140761
140996
|
get: function() {
|
|
@@ -141368,6 +141603,12 @@ Object.defineProperty(exports, "looseSchema", {
|
|
|
141368
141603
|
return looseSchema;
|
|
141369
141604
|
}
|
|
141370
141605
|
});
|
|
141606
|
+
Object.defineProperty(exports, "lowPowerSleepCapability", {
|
|
141607
|
+
enumerable: true,
|
|
141608
|
+
get: function() {
|
|
141609
|
+
return lowPowerSleepCapability;
|
|
141610
|
+
}
|
|
141611
|
+
});
|
|
141371
141612
|
Object.defineProperty(exports, "makeSecretMarker", {
|
|
141372
141613
|
enumerable: true,
|
|
141373
141614
|
get: function() {
|