@camstack/server 1.2.941 → 1.2.942
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 +14 -0
- package/dist/api/trpc/generated-cap-mounts.js +19 -1
- package/dist/api/trpc/generated-cap-routers.js +676 -596
- package/package.json +27 -11
- package/system/dist/action-index-B1fgpQBt.mjs +9925 -0
- package/system/dist/action-index-B_cLRwXJ.js +9972 -0
- package/system/dist/alert-episode-Be--PngO.mjs +64 -0
- package/system/dist/alert-episode-Bqktmt-i.js +93 -0
- package/system/dist/{base-addon-Md14i7pe.mjs → base-addon-BcS6r1cT.mjs} +20 -7
- package/system/dist/{base-addon-DD5dIfcZ.js → base-addon-CRsXtYFG.js} +20 -7
- package/system/dist/{base-device-CH8rfD9j.js → base-device-DAdWzDOl.js} +138 -34
- package/system/dist/{base-device-BcGO6LTT.mjs → base-device-DJXF5eDN.mjs} +138 -34
- 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/alert-episode-policy.d.ts +9 -5
- package/system/dist/builtins/alerts/alerts.addon.js +30 -80
- package/system/dist/builtins/alerts/alerts.addon.mjs +18 -68
- package/system/dist/builtins/autotrack/index.js +2 -2
- package/system/dist/builtins/autotrack/index.mjs +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- 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 +9 -9
- package/system/dist/builtins/camera-grid/index.mjs +6 -6
- package/system/dist/builtins/composer/composer.addon.js +99 -99
- package/system/dist/builtins/composer/composer.addon.mjs +11 -11
- 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/automation-template-instances.d.ts +14 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +6 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +296 -193
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +237 -134
- package/system/dist/builtins/core-blocks/link-contributions.d.ts +2 -0
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +91 -18
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +91 -18
- package/system/dist/builtins/core-notifier/group-notification-output.d.ts +8 -16
- package/system/dist/builtins/device-history/device-history.addon.d.ts +8 -0
- package/system/dist/builtins/device-history/device-history.addon.js +580 -60
- package/system/dist/builtins/device-history/device-history.addon.mjs +569 -49
- package/system/dist/builtins/device-history/retention/device-raw-overrides.d.ts +16 -0
- package/system/dist/builtins/device-history/retention/retention-knobs.d.ts +14 -0
- package/system/dist/builtins/device-history/retention/retention.d.ts +21 -1
- package/system/dist/builtins/device-history/transitions/change-coalescing.d.ts +48 -0
- package/system/dist/builtins/device-history/transitions/derived-changes.d.ts +49 -0
- package/system/dist/builtins/device-history/transitions/history-change-port.d.ts +20 -0
- package/system/dist/builtins/device-history/transitions/transitions-service.d.ts +18 -3
- package/system/dist/builtins/device-manager/device-identity-index.d.ts +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +177 -479
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +169 -471
- package/system/dist/builtins/device-manager/device-state-mirror.d.ts +0 -5
- package/system/dist/builtins/device-manager/identity-link-reconciler.d.ts +5 -0
- package/system/dist/builtins/device-manager/transitions/command-recorder.d.ts +38 -0
- package/system/dist/builtins/device-manager/transitions/transitions-wiring.d.ts +8 -9
- 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 +2 -2
- package/system/dist/builtins/keychain/index.mjs +2 -2
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +2 -2
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +2 -2
- 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/address-book.d.ts +3 -1
- package/system/dist/builtins/local-network/local-network.addon.d.ts +26 -1
- package/system/dist/builtins/local-network/local-network.addon.js +66 -11
- package/system/dist/builtins/local-network/local-network.addon.mjs +66 -11
- 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 +4 -4
- package/system/dist/builtins/snapshot/index.mjs +4 -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 +1 -1
- package/system/dist/builtins/system-config/system-config.addon.mjs +1 -1
- 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-CUZ3W0oZ.mjs → capture-engine-B2MmoNND.mjs} +1 -1
- package/system/dist/{capture-engine-mtDXEBAq.js → capture-engine-D_1IJmMs.js} +1 -1
- package/system/dist/command-catalog-C29hVOOg.js +210 -0
- package/system/dist/command-catalog-xAeqxbZk.mjs +169 -0
- package/system/dist/{error.cap-DCwbIGEF.mjs → compile-OBMHlqD-.mjs} +97 -100
- package/system/dist/{error.cap-BxLEHP6z.js → compile-SpeAhaZ6.js} +107 -116
- package/system/dist/{composition-sources-B56CU8hi.mjs → composition-sources-C327LGFn.mjs} +2 -2
- package/system/dist/{composition-sources-D_Bfwji0.js → composition-sources-Do5qM6EB.js} +17 -17
- package/system/dist/{core-blocks.cap-xt5_fK5Z.js → core-blocks.cap-CdTGUKtr.js} +194 -10110
- package/system/dist/{core-blocks.cap-DDECcMeI.mjs → core-blocks.cap-DLkEfV5b.mjs} +54 -9910
- package/system/dist/{device-kind-BJ2pfsjw.mjs → device-kind-C37Ra2wd.mjs} +4 -2
- package/system/dist/{device-kind-CsSiv_YF.js → device-kind-FMhJg8uC.js} +4 -2
- package/system/dist/{device-manager.cap-DyHOIh5T.js → device-manager.cap-DJs8izI6.js} +13 -4
- package/system/dist/{device-manager.cap-DIBK62-r.mjs → device-manager.cap-eYrj1Ezp.mjs} +13 -4
- package/system/dist/{device-provider.cap-BKUGJSo0.js → device-provider.cap-CNlYBQ5D.js} +1 -1
- package/system/dist/{device-provider.cap-DU6HMUXH.mjs → device-provider.cap-D8mJllVM.mjs} +1 -1
- package/system/dist/{device-row-store-O4mNbp5q.js → device-row-store-C0P2H18h.js} +2 -2
- package/system/dist/{device-row-store-C-_R-h1Z.mjs → device-row-store-CTocYKqC.mjs} +2 -2
- package/system/dist/{device-type-CbQsnFdC.js → device-type-Cnc0NiSX.js} +13 -0
- package/system/dist/{device-type-DgEvK3ch.mjs → device-type-TUGqGmaI.mjs} +13 -0
- package/system/dist/error.cap-BuKbL3Ac.js +125 -0
- package/system/dist/error.cap-CU1FB6uE.mjs +102 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{history-catalog-BwTeQ4Mr.mjs → history-catalog-A_dzXNpv.mjs} +98 -3
- package/system/dist/{history-catalog-BKRarIL_.js → history-catalog-CiTMP3-E.js} +98 -3
- package/system/dist/index.js +28 -6
- package/system/dist/index.mjs +28 -6
- package/system/dist/kernel/addon-version-policy.d.ts +10 -0
- package/system/dist/{legacy-integration-rows-door-B1nzxxr5.js → legacy-integration-rows-door-CdqYAj-o.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-nTvo_6jQ.mjs → legacy-integration-rows-door-LSgpClpX.mjs} +1 -1
- package/system/dist/{low-power-sleep.cap-B6mz6ojP.js → low-power-sleep.cap-BJWyAuUQ.js} +1 -1
- package/system/dist/{low-power-sleep.cap-C3Vi8Vxj.mjs → low-power-sleep.cap-D9Orx3LS.mjs} +1 -1
- package/system/dist/migrations/hub/2026-11-22-device-transitions-commands-only.d.ts +10 -0
- package/system/dist/{network-access.cap-BEN_uRVb.js → network-access.cap-CTQ2WQoi.js} +38 -12
- package/system/dist/{network-access.cap-Dy8FNNVs.mjs → network-access.cap-Dx5K0I5i.mjs} +33 -13
- package/system/dist/{notification-rules.cap-Drwz-A4n.js → notification-rules.cap-BJKUjizS.js} +45 -9
- package/system/dist/{notification-rules.cap-0vVvsxQ1.mjs → notification-rules.cap-BUIuYPlQ.mjs} +45 -9
- package/system/dist/{notification-targets-DR-D-vIt.mjs → notification-targets-4bGYH5J7.mjs} +2 -2
- package/system/dist/{notification-targets-Cc_3OBH9.js → notification-targets-DMW7xgR2.js} +2 -2
- package/system/dist/{prefix-walk-CCO_VZVo.js → prefix-walk-BFnw8NBu.js} +5 -5
- package/system/dist/{prefix-walk-BhT0ZoKl.mjs → prefix-walk-Mtij0NNT.mjs} +2 -2
- package/system/dist/{ptz-autotrack.cap-DOz0xL0O.js → ptz-autotrack.cap-B9eyZU8w.js} +1 -1
- package/system/dist/{ptz-autotrack.cap-CDF6FeTK.mjs → ptz-autotrack.cap-Dw2k-po9.mjs} +1 -1
- package/system/dist/{recording-archive.cap-RHAN45fa.mjs → recording-archive.cap-CTlm86R8.mjs} +1 -1
- package/system/dist/{recording-archive.cap-BPJ7kvnd.js → recording-archive.cap-Wo-hEZhz.js} +1 -1
- package/system/dist/{rename-composition-block-DWUkrazx.mjs → rename-composition-block-Cdh-dRmY.mjs} +395 -20
- package/system/dist/{rename-composition-block-CH2vRIW7.js → rename-composition-block-D9Uc1AF7.js} +406 -31
- package/system/dist/{retention-CUOVI1p7.mjs → retention-CQs8QR1B.mjs} +33 -3
- package/system/dist/{device-transitions.cap-DCXP3zwY.mjs → retention-source.cap-550kkyp5.mjs} +98 -21
- package/system/dist/{device-transitions.cap-zOGvAIHz.js → retention-source.cap-C6Hy0hlM.js} +103 -20
- package/system/dist/{retention-BcOSL6b9.js → retention-xcjk_k1w.js} +33 -3
- package/system/dist/{snapshot.cap-Cis6JRwn.js → snapshot.cap-CHm29hBs.js} +1 -1
- package/system/dist/{snapshot.cap-BkfHpJVO.mjs → snapshot.cap-CO68YvJU.mjs} +1 -1
- package/system/dist/{stream-catalog.cap-D8Y-uXcy.js → stream-catalog.cap-CjEQFknc.js} +2 -2
- package/system/dist/{stream-catalog.cap-D1Hy19Yc.mjs → stream-catalog.cap-DVniDdRD.mjs} +2 -2
- package/system/dist/{user-management.cap-Ctd4c_im.mjs → user-management.cap-4IEUCSdL.mjs} +2 -2
- package/system/dist/{user-management.cap-DyVb68rY.js → user-management.cap-DV9Jfsj3.js} +2 -2
- package/system/dist/{wal-maintenance-CjpslZUL.mjs → wal-maintenance-Bey5ChBb.mjs} +0 -0
- package/system/dist/{wal-maintenance-DKTXQ7UF.js → wal-maintenance-BgYiAy5b.js} +0 -0
- package/system/package.json +4 -1
- package/system/dist/builtins/device-manager/transitions/transition-correlator.d.ts +0 -81
package/system/dist/{rename-composition-block-CH2vRIW7.js → rename-composition-block-D9Uc1AF7.js}
RENAMED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
const require_streaming_shared = require("./streaming-shared-DQwFZOSi.js");
|
|
2
|
-
const require_stream_catalog_cap = require("./stream-catalog.cap-
|
|
3
|
-
const require_base_addon = require("./base-addon-
|
|
2
|
+
const require_stream_catalog_cap = require("./stream-catalog.cap-CjEQFknc.js");
|
|
3
|
+
const require_base_addon = require("./base-addon-CRsXtYFG.js");
|
|
4
4
|
const require_scoped_settings = require("./scoped-settings-CylSSq_8.js");
|
|
5
5
|
const require_capability_definition = require("./capability-definition-BEVd01Xj.js");
|
|
6
|
-
const require_notification_rules_cap = require("./notification-rules.cap-
|
|
7
|
-
const require_device_manager_cap = require("./device-manager.cap-
|
|
6
|
+
const require_notification_rules_cap = require("./notification-rules.cap-BJKUjizS.js");
|
|
7
|
+
const require_device_manager_cap = require("./device-manager.cap-DJs8izI6.js");
|
|
8
8
|
const require_device_identifiers = require("./device-identifiers-BQg9EQi1.js");
|
|
9
|
-
const
|
|
9
|
+
const require_retention_source_cap = require("./retention-source.cap-C6Hy0hlM.js");
|
|
10
10
|
const require_system_reasons = require("./system-reasons-Be_k1W8g.js");
|
|
11
11
|
const require_settings_store_cap = require("./settings-store.cap-BhOIBtO4.js");
|
|
12
12
|
const require_quantity = require("./quantity-lY1KiTSZ.js");
|
|
13
13
|
const require_labels = require("./labels-DX5S8deC.js");
|
|
14
|
-
const require_recording_archive_cap = require("./recording-archive.cap-
|
|
14
|
+
const require_recording_archive_cap = require("./recording-archive.cap-Wo-hEZhz.js");
|
|
15
15
|
const require_relocate = require("./relocate-CdVQAk-w.js");
|
|
16
16
|
const require_storage_migration_cap = require("./storage-migration.cap-CDOhpCQw.js");
|
|
17
17
|
const require_tag = require("./tag-BxLazvVb.js");
|
|
18
18
|
const require_platform_probe_cap = require("./platform-probe.cap-C0N9CugQ.js");
|
|
19
|
-
const require_user_management_cap = require("./user-management.cap-
|
|
20
|
-
const require_device_type = require("./device-type-
|
|
19
|
+
const require_user_management_cap = require("./user-management.cap-DV9Jfsj3.js");
|
|
20
|
+
const require_device_type = require("./device-type-Cnc0NiSX.js");
|
|
21
21
|
const require_device_certificate = require("./device-certificate-CguVACQO.js");
|
|
22
|
-
const
|
|
22
|
+
const require_action_index = require("./action-index-B_cLRwXJ.js");
|
|
23
23
|
const require_addon_settings_cap = require("./addon-settings.cap-DrLdMFIe.js");
|
|
24
|
-
const
|
|
24
|
+
const require_core_blocks_cap = require("./core-blocks.cap-CdTGUKtr.js");
|
|
25
|
+
const require_compile = require("./compile-SpeAhaZ6.js");
|
|
25
26
|
const require_source_info = require("./source-info-DtWf4k2j.js");
|
|
26
27
|
const require_l10n = require("./l10n-CGMvp7NF.js");
|
|
27
28
|
const require_addon_pages_cap = require("./addon-pages.cap-B3gHFDYW.js");
|
|
@@ -29,21 +30,22 @@ const require_addon_widgets_cap = require("./addon-widgets.cap-DuCe2VRj.js");
|
|
|
29
30
|
const require_database_snapshot_cap = require("./database-snapshot.cap-BNS5c60M.js");
|
|
30
31
|
const require_storage_occupancy_cap = require("./storage-occupancy.cap-B-Z8f8TZ.js");
|
|
31
32
|
const require_calendars_cap = require("./calendars.cap-CGeOtL7Q.js");
|
|
32
|
-
const require_history_catalog = require("./history-catalog-
|
|
33
|
+
const require_history_catalog = require("./history-catalog-CiTMP3-E.js");
|
|
33
34
|
const require_storage_admin_cap = require("./storage-admin.cap-DqW1ol4j.js");
|
|
34
|
-
const require_device_provider_cap = require("./device-provider.cap-
|
|
35
|
+
const require_device_provider_cap = require("./device-provider.cap-CNlYBQ5D.js");
|
|
36
|
+
const require_error_cap = require("./error.cap-BuKbL3Ac.js");
|
|
35
37
|
const require_storage_provider_cap = require("./storage-provider.cap-B3Hm_BGM.js");
|
|
36
38
|
const require_integration_instances_cap = require("./integration-instances.cap-DSieF1w3.js");
|
|
37
39
|
const require_keychain_admin_cap = require("./keychain-admin.cap-DcRCRWtu.js");
|
|
38
|
-
const require_network_access_cap = require("./network-access.cap-
|
|
40
|
+
const require_network_access_cap = require("./network-access.cap-CTQ2WQoi.js");
|
|
39
41
|
const require_log_destination_cap = require("./log-destination.cap-BzTWMj-T.js");
|
|
40
|
-
const require_low_power_sleep_cap = require("./low-power-sleep.cap-
|
|
42
|
+
const require_low_power_sleep_cap = require("./low-power-sleep.cap-BJWyAuUQ.js");
|
|
41
43
|
const require_metrics_provider_cap = require("./metrics-provider.cap-BMKD5FH3.js");
|
|
42
44
|
const require_records_cap = require("./records.cap-wLi7r4Hj.js");
|
|
43
45
|
const require_mask_shape = require("./mask-shape-CmPA2fst.js");
|
|
44
|
-
const require_ptz_autotrack_cap = require("./ptz-autotrack.cap-
|
|
46
|
+
const require_ptz_autotrack_cap = require("./ptz-autotrack.cap-B9eyZU8w.js");
|
|
45
47
|
const require_record_entries_cap = require("./record-entries.cap-NYExLM0O.js");
|
|
46
|
-
const require_snapshot_cap = require("./snapshot.cap-
|
|
48
|
+
const require_snapshot_cap = require("./snapshot.cap-CHm29hBs.js");
|
|
47
49
|
const require_server_name = require("./server-name-OALNvpqC.js");
|
|
48
50
|
const require_vector_store_cap = require("./vector-store.cap-DEVI-XJC.js");
|
|
49
51
|
let zod = require("zod");
|
|
@@ -1478,12 +1480,12 @@ function normalizeConditionUnits(condition, resolver, path = "when") {
|
|
|
1478
1480
|
}
|
|
1479
1481
|
}
|
|
1480
1482
|
function normalizeCommandStepUnits(step, resolver, path) {
|
|
1481
|
-
if (
|
|
1483
|
+
if (require_action_index.findVocabAction(step.actionId) === void 0) return {
|
|
1482
1484
|
value: step,
|
|
1483
1485
|
warnings: []
|
|
1484
1486
|
};
|
|
1485
1487
|
const deviceId = step.target.kind === "devices" && step.target.ids.length === 1 ? step.target.ids[0] : void 0;
|
|
1486
|
-
const { cap, method } =
|
|
1488
|
+
const { cap, method } = require_action_index.vocabCall(step.actionId, void 0);
|
|
1487
1489
|
const args = { ...step.args };
|
|
1488
1490
|
const argUnits = { ...step.argUnits };
|
|
1489
1491
|
const warnings = [];
|
|
@@ -1901,7 +1903,8 @@ var accessoriesCapability = {
|
|
|
1901
1903
|
require_device_type.DeviceType.Fan,
|
|
1902
1904
|
require_device_type.DeviceType.MediaPlayer,
|
|
1903
1905
|
require_device_type.DeviceType.AlarmPanel,
|
|
1904
|
-
require_device_type.DeviceType.Generic
|
|
1906
|
+
require_device_type.DeviceType.Generic,
|
|
1907
|
+
require_device_type.DeviceType.Vehicle
|
|
1905
1908
|
],
|
|
1906
1909
|
methods: {
|
|
1907
1910
|
/**
|
|
@@ -7000,13 +7003,13 @@ onColorChanged: {
|
|
|
7000
7003
|
* and reads their state for the API. Nothing else talks to it.
|
|
7001
7004
|
*/
|
|
7002
7005
|
/** The composer's runner id, `resolveRunnerId(decl, 'composer')`; pinned by `composer-manifest.spec.ts`. */
|
|
7003
|
-
var COMPOSER_RUNNER_ID =
|
|
7006
|
+
var COMPOSER_RUNNER_ID = require_compile.COMPOSER_ADDON_ID;
|
|
7004
7007
|
var ComposerBlockSchema = /* @__PURE__ */ zod.z.object({
|
|
7005
7008
|
id: /* @__PURE__ */ zod.z.string().min(1),
|
|
7006
7009
|
name: /* @__PURE__ */ zod.z.string().min(1).max(120),
|
|
7007
7010
|
enabled: /* @__PURE__ */ zod.z.boolean(),
|
|
7008
7011
|
updatedAt: /* @__PURE__ */ zod.z.number(),
|
|
7009
|
-
composition:
|
|
7012
|
+
composition: require_compile.CompositionSchema
|
|
7010
7013
|
});
|
|
7011
7014
|
/**
|
|
7012
7015
|
* A stored composition row that no longer PARSES — a schema a release
|
|
@@ -7202,9 +7205,14 @@ var ConsumableStatusSchema = /* @__PURE__ */ zod.z.enum([
|
|
|
7202
7205
|
"full",
|
|
7203
7206
|
"replace"
|
|
7204
7207
|
]);
|
|
7205
|
-
/** Whether `remaining.value` is a duration in seconds
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
+
/** Whether `remaining.value` is a duration in seconds, a dimensionless count, or a
|
|
7209
|
+
* distance in metres (the length base, D944). */
|
|
7210
|
+
var ConsumableRemainingKindSchema = /* @__PURE__ */ zod.z.enum([
|
|
7211
|
+
"duration",
|
|
7212
|
+
"count",
|
|
7213
|
+
"distance"
|
|
7214
|
+
]);
|
|
7215
|
+
/** Remaining life. `value` null = unknown (D393). Duration is seconds, distance is metres. */
|
|
7208
7216
|
var ConsumableRemainingSchema = /* @__PURE__ */ zod.z.object({
|
|
7209
7217
|
value: /* @__PURE__ */ zod.z.number().min(0).nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("device")),
|
|
7210
7218
|
kind: ConsumableRemainingKindSchema
|
|
@@ -13035,6 +13043,7 @@ var HERO_SCENE_BY_TYPE = {
|
|
|
13035
13043
|
[require_device_type.DeviceType.WaterHeater]: "heater",
|
|
13036
13044
|
[require_device_type.DeviceType.HeatPump]: "heat-pump",
|
|
13037
13045
|
[require_device_type.DeviceType.EnergySystem]: "generic",
|
|
13046
|
+
[require_device_type.DeviceType.Vehicle]: "generic",
|
|
13038
13047
|
[require_device_type.DeviceType.Workload]: "generic",
|
|
13039
13048
|
[require_device_type.DeviceType.Fan]: "fan",
|
|
13040
13049
|
[require_device_type.DeviceType.MediaPlayer]: "tv",
|
|
@@ -13085,6 +13094,9 @@ var HERO_SCENE_BY_ROLE = {
|
|
|
13085
13094
|
[require_device_type.DeviceRole.ClimateRadiator]: "inherit",
|
|
13086
13095
|
[require_device_type.DeviceRole.ClimateHeater]: "inherit",
|
|
13087
13096
|
[require_device_type.DeviceRole.ClimateHeatPumpCircuit]: "inherit",
|
|
13097
|
+
[require_device_type.DeviceRole.ClimateVehicle]: "inherit",
|
|
13098
|
+
[require_device_type.DeviceRole.LockVehicle]: "inherit",
|
|
13099
|
+
[require_device_type.DeviceRole.MediaPlayerTv]: "inherit",
|
|
13088
13100
|
[require_device_type.DeviceRole.MotionSensor]: "presence",
|
|
13089
13101
|
[require_device_type.DeviceRole.ContactSensor]: "contact",
|
|
13090
13102
|
[require_device_type.DeviceRole.LeakSensor]: "inherit",
|
|
@@ -15582,6 +15594,109 @@ list: /* @__PURE__ */ require_capability_definition.method(/* @__PURE__ */ zod.z
|
|
|
15582
15594
|
vocabulary: { notOperatorFacing: require_system_reasons.NOT_A_DEVICE.INTERNAL }
|
|
15583
15595
|
};
|
|
15584
15596
|
//#endregion
|
|
15597
|
+
//#region ../types/dist/esm/capabilities/location.cap.mjs
|
|
15598
|
+
/**
|
|
15599
|
+
* Where a device is — the raw WGS84 fix a source reports, for any device that
|
|
15600
|
+
* can know it (a vehicle now, a phone tracker or a GPS collar later). The cap
|
|
15601
|
+
* is generic on purpose, like `consumables`: it binds on every DeviceType.
|
|
15602
|
+
*
|
|
15603
|
+
* It is NOT `presence`. `presence.state` is a zone VERDICT (`home`, `not_home`,
|
|
15604
|
+
* a zone name) the source derived, typed to `DeviceType.Presence`; a car has
|
|
15605
|
+
* coordinates and no zone. `location` is the fix, `presence` the verdict.
|
|
15606
|
+
*
|
|
15607
|
+
* Unknown is `null`, never `0` (D393): both coordinates null means no fix is
|
|
15608
|
+
* known, and a provider builds its status through `locationFix` so one
|
|
15609
|
+
* coordinate is never written without the other.
|
|
15610
|
+
*/
|
|
15611
|
+
var LocationStatusSchema = /* @__PURE__ */ zod.z.object({
|
|
15612
|
+
/** WGS84 decimal degrees. Null = no fix known; never 0. */
|
|
15613
|
+
latitude: /* @__PURE__ */ zod.z.number().min(-90).max(90).nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("angle", { label: "Latitude" })),
|
|
15614
|
+
/** WGS84 decimal degrees. Null = no fix known; never 0. */
|
|
15615
|
+
longitude: /* @__PURE__ */ zod.z.number().min(-180).max(180).nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("angle", { label: "Longitude" })),
|
|
15616
|
+
/** Radius of uncertainty, metres. Null = the source does not say. */
|
|
15617
|
+
accuracy: /* @__PURE__ */ zod.z.number().nonnegative().nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("length", { label: "Accuracy" })),
|
|
15618
|
+
/** Course over ground, degrees clockwise from north, 0..360. Null = unknown. */
|
|
15619
|
+
heading: /* @__PURE__ */ zod.z.number().min(0).max(360).nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("angle", { label: "Heading" })),
|
|
15620
|
+
/** Ground speed, m/s. Null = unknown. */
|
|
15621
|
+
speed: /* @__PURE__ */ zod.z.number().nonnegative().nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("speed", { label: "Speed" })),
|
|
15622
|
+
/** Ms epoch the FIX was taken, as the source reports it. Null = unknown. */
|
|
15623
|
+
fixAt: /* @__PURE__ */ zod.z.number().nullable(),
|
|
15624
|
+
/** Ms epoch the status last changed. */
|
|
15625
|
+
lastChangedAt: /* @__PURE__ */ zod.z.number()
|
|
15626
|
+
});
|
|
15627
|
+
/** Seed status: no fix known. */
|
|
15628
|
+
function emptyLocationStatus(now = 0) {
|
|
15629
|
+
return {
|
|
15630
|
+
latitude: null,
|
|
15631
|
+
longitude: null,
|
|
15632
|
+
accuracy: null,
|
|
15633
|
+
heading: null,
|
|
15634
|
+
speed: null,
|
|
15635
|
+
fixAt: null,
|
|
15636
|
+
lastChangedAt: now
|
|
15637
|
+
};
|
|
15638
|
+
}
|
|
15639
|
+
var locationCapability = {
|
|
15640
|
+
name: "location",
|
|
15641
|
+
scope: "device",
|
|
15642
|
+
deviceNative: true,
|
|
15643
|
+
mode: "singleton",
|
|
15644
|
+
deviceTypes: /* @__PURE__ */ Object.values(require_device_type.DeviceType),
|
|
15645
|
+
methods: {},
|
|
15646
|
+
status: {
|
|
15647
|
+
schema: LocationStatusSchema,
|
|
15648
|
+
kind: "push",
|
|
15649
|
+
empty: /* @__PURE__ */ emptyLocationStatus()
|
|
15650
|
+
},
|
|
15651
|
+
runtimeState: /* @__PURE__ */ LocationStatusSchema.extend({ lastFetchedAt: /* @__PURE__ */ zod.z.number() }),
|
|
15652
|
+
/**
|
|
15653
|
+
* Runtime-state durability: **restored** — the last fix is the only record of
|
|
15654
|
+
* where a parked vehicle is until its source next answers (D642). A restored
|
|
15655
|
+
* fix is the previous observation, not a claim about now; `fixAt` says when.
|
|
15656
|
+
*/
|
|
15657
|
+
durability: "restored",
|
|
15658
|
+
/**
|
|
15659
|
+
* History (D850): latitude, longitude and speed are change-only series; a reader
|
|
15660
|
+
* rebuilding a track step-holds each. 0.0002 degrees is about 22 m of latitude,
|
|
15661
|
+
* so a parked car's GPS jitter records nothing. `accuracy`, `heading` and
|
|
15662
|
+
* `fixAt` are not recorded, and there is no `primary` (a latitude trend on a
|
|
15663
|
+
* card means nothing). Recording follows the device-history default, with the
|
|
15664
|
+
* per-device opt-out.
|
|
15665
|
+
*/
|
|
15666
|
+
history: { fields: {
|
|
15667
|
+
latitude: {
|
|
15668
|
+
group: "position",
|
|
15669
|
+
kind: "gauge",
|
|
15670
|
+
unit: "°",
|
|
15671
|
+
deadband: 2e-4,
|
|
15672
|
+
displayName: "Latitude"
|
|
15673
|
+
},
|
|
15674
|
+
longitude: {
|
|
15675
|
+
group: "position",
|
|
15676
|
+
kind: "gauge",
|
|
15677
|
+
unit: "°",
|
|
15678
|
+
deadband: 2e-4,
|
|
15679
|
+
displayName: "Longitude"
|
|
15680
|
+
},
|
|
15681
|
+
speed: {
|
|
15682
|
+
kind: "gauge",
|
|
15683
|
+
unit: "m/s",
|
|
15684
|
+
deadband: .5,
|
|
15685
|
+
displayName: "Speed"
|
|
15686
|
+
}
|
|
15687
|
+
} },
|
|
15688
|
+
/** Clocks, not content: a re-read that moved nothing costs no commit. */
|
|
15689
|
+
volatileStateFields: [
|
|
15690
|
+
"fixAt",
|
|
15691
|
+
"lastChangedAt",
|
|
15692
|
+
"lastFetchedAt"
|
|
15693
|
+
],
|
|
15694
|
+
vocabulary: {
|
|
15695
|
+
noun: /* @__PURE__ */ require_l10n.t("Location", "Posizione"),
|
|
15696
|
+
order: 2180
|
|
15697
|
+
}
|
|
15698
|
+
};
|
|
15699
|
+
//#endregion
|
|
15585
15700
|
//#region ../types/dist/esm/capabilities/lock-control.cap.mjs
|
|
15586
15701
|
/**
|
|
15587
15702
|
* Smart-lock cap. Models HA `lock.*` entities — anything with a
|
|
@@ -29494,7 +29609,7 @@ function valueProblem(input, value) {
|
|
|
29494
29609
|
case "action": {
|
|
29495
29610
|
const parsed = require_core_blocks_cap.TemplateActionValueSchema.safeParse(value);
|
|
29496
29611
|
if (!parsed.success) return "pick an action";
|
|
29497
|
-
return
|
|
29612
|
+
return require_action_index.findVocabAction(parsed.data.actionId) === void 0 ? `"${parsed.data.actionId}" is not a vocabulary action` : null;
|
|
29498
29613
|
}
|
|
29499
29614
|
case "number":
|
|
29500
29615
|
case "duration":
|
|
@@ -31475,6 +31590,263 @@ var valveCapability = {
|
|
|
31475
31590
|
}
|
|
31476
31591
|
};
|
|
31477
31592
|
//#endregion
|
|
31593
|
+
//#region ../types/dist/esm/capabilities/vehicle.cap.mjs
|
|
31594
|
+
/**
|
|
31595
|
+
* A road vehicle reached through its maker's connected-car account: the
|
|
31596
|
+
* readings the car reports about itself, read-only. Where it is lives in
|
|
31597
|
+
* `location`, what it burns or wears in `consumables`, whether it is locked in
|
|
31598
|
+
* its `lock-control` child and its cabin climate in a `climate-control` child.
|
|
31599
|
+
*
|
|
31600
|
+
* Every reading is nullable: a car that does not report a value is UNKNOWN,
|
|
31601
|
+
* never 0 or false (D393). Lengths are metres and voltages volts (D944).
|
|
31602
|
+
*
|
|
31603
|
+
* Not in the cap, on purpose: `locked` (the lock child), fuel (consumables),
|
|
31604
|
+
* position (`location`), tyre PRESSURES (a vendor that reports them adds a
|
|
31605
|
+
* field), and any "anything open" aggregate: a stored derivation is a second
|
|
31606
|
+
* copy of the fields it derives from.
|
|
31607
|
+
*/
|
|
31608
|
+
/** `true` = open. Null = the car does not say. */
|
|
31609
|
+
var OpeningSchema = /* @__PURE__ */ zod.z.boolean().nullable();
|
|
31610
|
+
/** The four wheel positions, each an opening. */
|
|
31611
|
+
var VehicleWheelOpeningsSchema = /* @__PURE__ */ zod.z.object({
|
|
31612
|
+
frontLeft: OpeningSchema,
|
|
31613
|
+
frontRight: OpeningSchema,
|
|
31614
|
+
rearLeft: OpeningSchema,
|
|
31615
|
+
rearRight: OpeningSchema
|
|
31616
|
+
});
|
|
31617
|
+
/** Same four keys; `true` = the car raises a pressure warning for that wheel. */
|
|
31618
|
+
var VehicleTyreWarningsSchema = /* @__PURE__ */ zod.z.object({
|
|
31619
|
+
frontLeft: /* @__PURE__ */ zod.z.boolean().nullable(),
|
|
31620
|
+
frontRight: /* @__PURE__ */ zod.z.boolean().nullable(),
|
|
31621
|
+
rearLeft: /* @__PURE__ */ zod.z.boolean().nullable(),
|
|
31622
|
+
rearRight: /* @__PURE__ */ zod.z.boolean().nullable()
|
|
31623
|
+
});
|
|
31624
|
+
var VehicleStatusSchema = /* @__PURE__ */ zod.z.object({
|
|
31625
|
+
/** Total distance driven, metres. */
|
|
31626
|
+
odometer: /* @__PURE__ */ zod.z.number().nonnegative().nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("length", { label: "Distance driven" })),
|
|
31627
|
+
/** Distance the car says it can still drive on what it carries, metres. */
|
|
31628
|
+
range: /* @__PURE__ */ zod.z.number().nonnegative().nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("length", { label: "Range" })),
|
|
31629
|
+
engineOn: /* @__PURE__ */ zod.z.boolean().nullable(),
|
|
31630
|
+
doors: VehicleWheelOpeningsSchema,
|
|
31631
|
+
windows: VehicleWheelOpeningsSchema,
|
|
31632
|
+
trunkOpen: OpeningSchema,
|
|
31633
|
+
hoodOpen: OpeningSchema,
|
|
31634
|
+
sunroofOpen: OpeningSchema,
|
|
31635
|
+
tyreWarnings: VehicleTyreWarningsSchema,
|
|
31636
|
+
/** The 12 V auxiliary battery. Never the `battery` cap (that is the traction pack). */
|
|
31637
|
+
auxBatteryLevel: /* @__PURE__ */ zod.z.number().min(0).max(100).nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("percentage", { label: "12 V battery" })),
|
|
31638
|
+
auxBatteryVoltage: /* @__PURE__ */ zod.z.number().nonnegative().nullable().meta(/* @__PURE__ */ require_quantity.readingMeta("voltage", { label: "12 V voltage" })),
|
|
31639
|
+
/** Ms epoch the CAR last reported to its maker's cloud. Null = the cloud does not say. */
|
|
31640
|
+
reportedAt: /* @__PURE__ */ zod.z.number().nullable(),
|
|
31641
|
+
/** Ms epoch the status last changed. */
|
|
31642
|
+
lastChangedAt: /* @__PURE__ */ zod.z.number()
|
|
31643
|
+
});
|
|
31644
|
+
var UNKNOWN_OPENINGS = {
|
|
31645
|
+
frontLeft: null,
|
|
31646
|
+
frontRight: null,
|
|
31647
|
+
rearLeft: null,
|
|
31648
|
+
rearRight: null
|
|
31649
|
+
};
|
|
31650
|
+
/** Seed status: the car has told us nothing yet. */
|
|
31651
|
+
function emptyVehicleStatus(now = 0) {
|
|
31652
|
+
return {
|
|
31653
|
+
odometer: null,
|
|
31654
|
+
range: null,
|
|
31655
|
+
engineOn: null,
|
|
31656
|
+
doors: { ...UNKNOWN_OPENINGS },
|
|
31657
|
+
windows: { ...UNKNOWN_OPENINGS },
|
|
31658
|
+
trunkOpen: null,
|
|
31659
|
+
hoodOpen: null,
|
|
31660
|
+
sunroofOpen: null,
|
|
31661
|
+
tyreWarnings: { ...UNKNOWN_OPENINGS },
|
|
31662
|
+
auxBatteryLevel: null,
|
|
31663
|
+
auxBatteryVoltage: null,
|
|
31664
|
+
reportedAt: null,
|
|
31665
|
+
lastChangedAt: now
|
|
31666
|
+
};
|
|
31667
|
+
}
|
|
31668
|
+
var VehicleRefreshRefusalSchema = /* @__PURE__ */ zod.z.enum([
|
|
31669
|
+
"not-supported",
|
|
31670
|
+
"budget-exhausted",
|
|
31671
|
+
"in-progress",
|
|
31672
|
+
"too-soon",
|
|
31673
|
+
"vehicle-unreachable",
|
|
31674
|
+
"account-error"
|
|
31675
|
+
]);
|
|
31676
|
+
var VehicleRefreshResultSchema = /* @__PURE__ */ zod.z.discriminatedUnion("ok", [/* @__PURE__ */ zod.z.object({
|
|
31677
|
+
ok: /* @__PURE__ */ zod.z.literal(true),
|
|
31678
|
+
reportedAt: /* @__PURE__ */ zod.z.number().nullable()
|
|
31679
|
+
}), /* @__PURE__ */ zod.z.object({
|
|
31680
|
+
ok: /* @__PURE__ */ zod.z.literal(false),
|
|
31681
|
+
reason: VehicleRefreshRefusalSchema,
|
|
31682
|
+
/** Ms epoch a retry may succeed, when the provider knows (budget reset, gap end). */
|
|
31683
|
+
retryAt: /* @__PURE__ */ zod.z.number().nullable()
|
|
31684
|
+
})]);
|
|
31685
|
+
var vehicleCapability = {
|
|
31686
|
+
name: "vehicle",
|
|
31687
|
+
scope: "device",
|
|
31688
|
+
deviceNative: true,
|
|
31689
|
+
mode: "singleton",
|
|
31690
|
+
deviceTypes: [require_device_type.DeviceType.Vehicle],
|
|
31691
|
+
methods: {
|
|
31692
|
+
/**
|
|
31693
|
+
* Ask the car for fresh data. Admin-only: each call spends a scarce shared
|
|
31694
|
+
* quota. A provider that cannot wake the car does not implement it.
|
|
31695
|
+
*/
|
|
31696
|
+
requestRefresh: /* @__PURE__ */ require_capability_definition.optionalMethod(/* @__PURE__ */ zod.z.object({ deviceId: /* @__PURE__ */ zod.z.number().int().nonnegative() }), VehicleRefreshResultSchema, {
|
|
31697
|
+
kind: "mutation",
|
|
31698
|
+
auth: "admin",
|
|
31699
|
+
actions: [{
|
|
31700
|
+
id: "vehicle.requestRefresh",
|
|
31701
|
+
label: /* @__PURE__ */ require_l10n.t("Refresh from the car", "Aggiorna dall'auto"),
|
|
31702
|
+
phrase: /* @__PURE__ */ require_l10n.t("Ask {device} for fresh data", "Chiedi dati aggiornati a {device}"),
|
|
31703
|
+
icon: "refresh-cw"
|
|
31704
|
+
}]
|
|
31705
|
+
}) },
|
|
31706
|
+
status: {
|
|
31707
|
+
schema: VehicleStatusSchema,
|
|
31708
|
+
kind: "push",
|
|
31709
|
+
empty: /* @__PURE__ */ emptyVehicleStatus()
|
|
31710
|
+
},
|
|
31711
|
+
runtimeState: /* @__PURE__ */ VehicleStatusSchema.extend({ lastFetchedAt: /* @__PURE__ */ zod.z.number() }),
|
|
31712
|
+
/**
|
|
31713
|
+
* Runtime-state durability: **restored** — nothing else holds the last cloud
|
|
31714
|
+
* read, and the cloud is rate-limited, so a restart must not blank the car
|
|
31715
|
+
* (D642). A restored value is the previous report; `reportedAt` says when.
|
|
31716
|
+
*/
|
|
31717
|
+
durability: "restored",
|
|
31718
|
+
/**
|
|
31719
|
+
* History (D850): the odometer is a monotonic hardware meter, so it is a
|
|
31720
|
+
* `counter` (distance per day and month comes free). Windows and the sunroof
|
|
31721
|
+
* are not recorded: five more series of low value; `reportedAt` is a clock.
|
|
31722
|
+
*/
|
|
31723
|
+
history: {
|
|
31724
|
+
primary: "range",
|
|
31725
|
+
priority: 30,
|
|
31726
|
+
fields: {
|
|
31727
|
+
odometer: {
|
|
31728
|
+
kind: "counter",
|
|
31729
|
+
unit: "m",
|
|
31730
|
+
displayName: "Distance driven"
|
|
31731
|
+
},
|
|
31732
|
+
range: {
|
|
31733
|
+
kind: "gauge",
|
|
31734
|
+
unit: "m",
|
|
31735
|
+
deadband: 1e3,
|
|
31736
|
+
displayName: "Range"
|
|
31737
|
+
},
|
|
31738
|
+
engineOn: {
|
|
31739
|
+
kind: "boolean",
|
|
31740
|
+
displayName: "Engine"
|
|
31741
|
+
},
|
|
31742
|
+
auxBatteryLevel: {
|
|
31743
|
+
kind: "gauge",
|
|
31744
|
+
unit: "%",
|
|
31745
|
+
deadband: 1,
|
|
31746
|
+
displayName: "12 V battery"
|
|
31747
|
+
},
|
|
31748
|
+
auxBatteryVoltage: {
|
|
31749
|
+
kind: "gauge",
|
|
31750
|
+
unit: "V",
|
|
31751
|
+
deadband: .1,
|
|
31752
|
+
displayName: "12 V voltage"
|
|
31753
|
+
},
|
|
31754
|
+
"doors.frontLeft": {
|
|
31755
|
+
kind: "boolean",
|
|
31756
|
+
displayName: "Front left door"
|
|
31757
|
+
},
|
|
31758
|
+
"doors.frontRight": {
|
|
31759
|
+
kind: "boolean",
|
|
31760
|
+
displayName: "Front right door"
|
|
31761
|
+
},
|
|
31762
|
+
"doors.rearLeft": {
|
|
31763
|
+
kind: "boolean",
|
|
31764
|
+
displayName: "Rear left door"
|
|
31765
|
+
},
|
|
31766
|
+
"doors.rearRight": {
|
|
31767
|
+
kind: "boolean",
|
|
31768
|
+
displayName: "Rear right door"
|
|
31769
|
+
},
|
|
31770
|
+
"tyreWarnings.frontLeft": {
|
|
31771
|
+
kind: "boolean",
|
|
31772
|
+
displayName: "Front left tyre warning"
|
|
31773
|
+
},
|
|
31774
|
+
"tyreWarnings.frontRight": {
|
|
31775
|
+
kind: "boolean",
|
|
31776
|
+
displayName: "Front right tyre warning"
|
|
31777
|
+
},
|
|
31778
|
+
"tyreWarnings.rearLeft": {
|
|
31779
|
+
kind: "boolean",
|
|
31780
|
+
displayName: "Rear left tyre warning"
|
|
31781
|
+
},
|
|
31782
|
+
"tyreWarnings.rearRight": {
|
|
31783
|
+
kind: "boolean",
|
|
31784
|
+
displayName: "Rear right tyre warning"
|
|
31785
|
+
},
|
|
31786
|
+
trunkOpen: {
|
|
31787
|
+
kind: "boolean",
|
|
31788
|
+
displayName: "Trunk"
|
|
31789
|
+
},
|
|
31790
|
+
hoodOpen: {
|
|
31791
|
+
kind: "boolean",
|
|
31792
|
+
displayName: "Hood"
|
|
31793
|
+
}
|
|
31794
|
+
}
|
|
31795
|
+
},
|
|
31796
|
+
/** Clocks, not content: a re-read that changed no reading costs no commit. */
|
|
31797
|
+
volatileStateFields: [
|
|
31798
|
+
"reportedAt",
|
|
31799
|
+
"lastChangedAt",
|
|
31800
|
+
"lastFetchedAt"
|
|
31801
|
+
],
|
|
31802
|
+
vocabulary: {
|
|
31803
|
+
noun: /* @__PURE__ */ require_l10n.t("Vehicle", "Veicolo"),
|
|
31804
|
+
order: 2190,
|
|
31805
|
+
state: [
|
|
31806
|
+
{
|
|
31807
|
+
kind: "boolean",
|
|
31808
|
+
field: "engineOn",
|
|
31809
|
+
label: /* @__PURE__ */ require_l10n.t("Engine on", "Motore acceso"),
|
|
31810
|
+
whenTrue: /* @__PURE__ */ require_l10n.t("When {device}'s engine starts", "Quando il motore di {device} si avvia"),
|
|
31811
|
+
whenFalse: /* @__PURE__ */ require_l10n.t("When {device}'s engine stops", "Quando il motore di {device} si spegne"),
|
|
31812
|
+
icon: "car"
|
|
31813
|
+
},
|
|
31814
|
+
{
|
|
31815
|
+
kind: "boolean",
|
|
31816
|
+
field: "trunkOpen",
|
|
31817
|
+
label: /* @__PURE__ */ require_l10n.t("Trunk open", "Bagagliaio aperto"),
|
|
31818
|
+
whenTrue: /* @__PURE__ */ require_l10n.t("When {device}'s trunk opens", "Quando il bagagliaio di {device} si apre"),
|
|
31819
|
+
whenFalse: /* @__PURE__ */ require_l10n.t("When {device}'s trunk closes", "Quando il bagagliaio di {device} si chiude"),
|
|
31820
|
+
icon: "car"
|
|
31821
|
+
},
|
|
31822
|
+
{
|
|
31823
|
+
kind: "boolean",
|
|
31824
|
+
field: "hoodOpen",
|
|
31825
|
+
label: /* @__PURE__ */ require_l10n.t("Hood open", "Cofano aperto"),
|
|
31826
|
+
whenTrue: /* @__PURE__ */ require_l10n.t("When {device}'s hood opens", "Quando il cofano di {device} si apre"),
|
|
31827
|
+
whenFalse: /* @__PURE__ */ require_l10n.t("When {device}'s hood closes", "Quando il cofano di {device} si chiude"),
|
|
31828
|
+
icon: "car"
|
|
31829
|
+
},
|
|
31830
|
+
{
|
|
31831
|
+
kind: "numeric",
|
|
31832
|
+
field: "range",
|
|
31833
|
+
quantity: /* @__PURE__ */ require_l10n.t("the range", "l'autonomia"),
|
|
31834
|
+
label: /* @__PURE__ */ require_l10n.t("Range", "Autonomia"),
|
|
31835
|
+
unit: "m",
|
|
31836
|
+
icon: "gauge"
|
|
31837
|
+
},
|
|
31838
|
+
{
|
|
31839
|
+
kind: "numeric",
|
|
31840
|
+
field: "auxBatteryLevel",
|
|
31841
|
+
quantity: /* @__PURE__ */ require_l10n.t("the 12 V battery level", "il livello della batteria a 12 V"),
|
|
31842
|
+
label: /* @__PURE__ */ require_l10n.t("12 V battery", "Batteria a 12 V"),
|
|
31843
|
+
unit: "%",
|
|
31844
|
+
icon: "battery"
|
|
31845
|
+
}
|
|
31846
|
+
]
|
|
31847
|
+
}
|
|
31848
|
+
};
|
|
31849
|
+
//#endregion
|
|
31478
31850
|
//#region ../types/dist/esm/capabilities/vibration.cap.mjs
|
|
31479
31851
|
/**
|
|
31480
31852
|
* Vibration / shake / impact sensor. Drives Home Assistant
|
|
@@ -33690,7 +34062,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
33690
34062
|
adminUiCapability,
|
|
33691
34063
|
airQualitySensorCapability,
|
|
33692
34064
|
require_notification_rules_cap.alarmPanelCapability,
|
|
33693
|
-
|
|
34065
|
+
require_compile.alertsCapability,
|
|
33694
34066
|
ambientLightSensorCapability,
|
|
33695
34067
|
audioAnalysisCapability,
|
|
33696
34068
|
audioAnalyzerCapability,
|
|
@@ -33733,16 +34105,16 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
33733
34105
|
require_user_management_cap.deviceCredentialsCapability,
|
|
33734
34106
|
deviceExportCapability,
|
|
33735
34107
|
deviceExtensionCapability,
|
|
33736
|
-
|
|
34108
|
+
require_retention_source_cap.deviceHistoryCapability,
|
|
33737
34109
|
require_device_manager_cap.deviceManagerCapability,
|
|
33738
34110
|
deviceOpsCapability,
|
|
33739
34111
|
require_device_provider_cap.deviceProviderCapability,
|
|
33740
|
-
|
|
33741
|
-
|
|
34112
|
+
require_retention_source_cap.deviceRemovalHookCapability,
|
|
34113
|
+
require_retention_source_cap.deviceRunsCapability,
|
|
33742
34114
|
deviceStateCapability,
|
|
33743
34115
|
deviceStateRefreshCapability,
|
|
33744
34116
|
require_stream_catalog_cap.deviceStatusCapability,
|
|
33745
|
-
|
|
34117
|
+
require_retention_source_cap.deviceTransitionsCapability,
|
|
33746
34118
|
dishwasherCapability,
|
|
33747
34119
|
displayPaletteCapability,
|
|
33748
34120
|
doNotDisturbCapability,
|
|
@@ -33782,6 +34154,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
33782
34154
|
llmRuntimeCapability,
|
|
33783
34155
|
loadContributionCapability,
|
|
33784
34156
|
require_network_access_cap.localNetworkCapability,
|
|
34157
|
+
locationCapability,
|
|
33785
34158
|
lockControlCapability,
|
|
33786
34159
|
logChannelsCapability,
|
|
33787
34160
|
require_log_destination_cap.logDestinationCapability,
|
|
@@ -33841,6 +34214,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
33841
34214
|
remoteCapability,
|
|
33842
34215
|
remoteLayoutComponentsCapability,
|
|
33843
34216
|
resyncCapability,
|
|
34217
|
+
require_retention_source_cap.retentionSourceCapability,
|
|
33844
34218
|
runningStateCapability,
|
|
33845
34219
|
sceneMonitorCapability,
|
|
33846
34220
|
schedulersCapability,
|
|
@@ -33880,6 +34254,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
33880
34254
|
vacuumControlCapability,
|
|
33881
34255
|
valveCapability,
|
|
33882
34256
|
require_vector_store_cap.vectorStoreCapability,
|
|
34257
|
+
vehicleCapability,
|
|
33883
34258
|
vibrationCapability,
|
|
33884
34259
|
videoclipsCapability,
|
|
33885
34260
|
viewerUiCapability,
|
|
@@ -34096,7 +34471,7 @@ var BLOCK_NAME_MAX = 120;
|
|
|
34096
34471
|
function composedBlockIdOf(addonId, stableId) {
|
|
34097
34472
|
if (addonId !== "composer") return null;
|
|
34098
34473
|
if (!stableId.startsWith("composed-")) return null;
|
|
34099
|
-
const blockId = stableId.slice(
|
|
34474
|
+
const blockId = stableId.slice(require_compile.COMPOSED_DEVICE_STABLE_ID_PREFIX.length);
|
|
34100
34475
|
return blockId.length === 0 ? null : blockId;
|
|
34101
34476
|
}
|
|
34102
34477
|
function lookupBlockName(read, blockId) {
|
|
@@ -92,11 +92,20 @@ var DepartureTracker = class {
|
|
|
92
92
|
//#region src/builtins/device-history/retention/retention.ts
|
|
93
93
|
var DEFAULT_RETENTION = {
|
|
94
94
|
rawDays: 7,
|
|
95
|
+
rawDiscreteDays: 30,
|
|
95
96
|
fiveMinuteDays: 30,
|
|
96
97
|
hourDays: 365,
|
|
97
98
|
dayDays: null,
|
|
98
99
|
transitionDays: 365
|
|
99
100
|
};
|
|
101
|
+
function isDiscrete(kind) {
|
|
102
|
+
return kind === "boolean" || kind === "enum";
|
|
103
|
+
}
|
|
104
|
+
/** Days one series keeps its raw points: its device's override, else the cluster value for its kind. */
|
|
105
|
+
function rawDaysFor(kind, policy, override) {
|
|
106
|
+
if (isDiscrete(kind)) return override?.rawDiscreteDays ?? policy.rawDiscreteDays;
|
|
107
|
+
return override?.rawDays ?? policy.rawDays;
|
|
108
|
+
}
|
|
100
109
|
/** Rows of the transition ledger strictly older than this are deleted; the row AT it is kept. */
|
|
101
110
|
function transitionCutoff(policy, now) {
|
|
102
111
|
return now - policy.transitionDays * DAY_MS;
|
|
@@ -142,6 +151,7 @@ var RetentionJob = class {
|
|
|
142
151
|
appliedUpTo = /* @__PURE__ */ new Map();
|
|
143
152
|
running = null;
|
|
144
153
|
transitions = null;
|
|
154
|
+
deviceOverrides = null;
|
|
145
155
|
constructor(deps) {
|
|
146
156
|
this.deps = deps;
|
|
147
157
|
}
|
|
@@ -149,6 +159,10 @@ var RetentionJob = class {
|
|
|
149
159
|
attachTransitions(sweeper) {
|
|
150
160
|
this.transitions = sweeper;
|
|
151
161
|
}
|
|
162
|
+
/** Per-device raw windows (the addon's per-device store); read once per pass. */
|
|
163
|
+
attachDeviceOverrides(reader) {
|
|
164
|
+
this.deviceOverrides = reader;
|
|
165
|
+
}
|
|
152
166
|
run(policy, now) {
|
|
153
167
|
if (this.running !== null) return this.running;
|
|
154
168
|
const run = this.doRun(policy, now).finally(() => {
|
|
@@ -161,12 +175,15 @@ var RetentionJob = class {
|
|
|
161
175
|
const { registry, counters, logger } = this.deps;
|
|
162
176
|
const cutoffs = retentionCutoffs(policy, now);
|
|
163
177
|
try {
|
|
178
|
+
const overrides = await this.readOverrides();
|
|
164
179
|
for (const tier of TIERS) {
|
|
165
|
-
|
|
166
|
-
if (cutoff === null) continue;
|
|
180
|
+
if (tier === "raw" && overrides === null) continue;
|
|
167
181
|
for (const series of registry.all()) {
|
|
182
|
+
const metric = registry.metric(series.key);
|
|
183
|
+
const cutoff = tier === "raw" ? now - rawDaysFor(metric?.kind, policy, series.deviceId === null ? void 0 : overrides?.get(series.deviceId)) * DAY_MS : cutoffs[tier];
|
|
184
|
+
if (cutoff === null) continue;
|
|
168
185
|
if (series.firstTs - 864e5 >= cutoff) continue;
|
|
169
|
-
if (tier === "raw" &&
|
|
186
|
+
if (tier === "raw" && metric?.ingest === "buckets") continue;
|
|
170
187
|
const marker = `${tier}:${series.id}`;
|
|
171
188
|
const applied = this.appliedUpTo.get(marker);
|
|
172
189
|
if (applied !== void 0 && cutoff - applied < RETENTION_STEP_MS[tier]) continue;
|
|
@@ -182,6 +199,19 @@ var RetentionJob = class {
|
|
|
182
199
|
logger.warn("device-history: retention pass failed — retried at the next run", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
183
200
|
}
|
|
184
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* `null` when the read failed: a longer override must not be judged by the cluster
|
|
204
|
+
* window, so the raw tier waits for the next pass (D49) — it never deletes blind.
|
|
205
|
+
*/
|
|
206
|
+
async readOverrides() {
|
|
207
|
+
if (this.deviceOverrides === null) return /* @__PURE__ */ new Map();
|
|
208
|
+
try {
|
|
209
|
+
return await this.deviceOverrides();
|
|
210
|
+
} catch (err) {
|
|
211
|
+
this.deps.logger.warn("device-history: per-device raw windows unreadable — raw tier skipped this pass", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
185
215
|
/** The fifth step: the transition ledger, under its own failure so the tiers never wait on it. */
|
|
186
216
|
async sweepTransitions(policy, now) {
|
|
187
217
|
const sweeper = this.transitions;
|