@camstack/server 1.2.789 → 1.2.791
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 +15 -0
- package/dist/agent/agent-child-manifest.js +39 -0
- package/dist/agent/agent-hub-registration.js +11 -1
- package/dist/agent/forward-to-hub.js +43 -0
- package/dist/agent/main.js +31 -81
- package/dist/agent/stale-addon-gate.js +70 -34
- package/dist/api/trpc/device-config-secret-redaction.js +14 -1
- package/dist/api/trpc/generated-cap-mounts.js +1 -6
- package/dist/api/trpc/generated-cap-routers.js +1245 -1417
- package/dist/api/trpc/localized-schema-paths.js +1 -0
- package/dist/core/addon/addon-registry.service.js +25 -33
- package/dist/core/addon/addon-settings-provider.js +57 -0
- package/dist/core/addon/boot-health-snapshot.js +0 -28
- package/dist/core/addon/{hub-spawn-gate.js → hub-addon-support.js} +12 -35
- package/dist/core/moleculer/moleculer.service.js +2 -13
- package/dist/core/moleculer/runner-hosted-on-node.js +23 -0
- package/dist/core/updates/required-addon-update.js +1 -1
- package/package.json +20 -11
- package/system/dist/addon-runner.js +22 -0
- package/system/dist/addon-runner.mjs +22 -0
- package/system/dist/{agent-https-szf2FU49.mjs → agent-https-BmVaVskH.mjs} +1 -1
- package/system/dist/{agent-https-jJDe-XNl.js → agent-https-DOs15BCJ.js} +1 -1
- 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.d.ts +8 -0
- package/system/dist/builtins/alerts/alerts.addon.js +72 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +72 -1
- package/system/dist/builtins/autotrack/autotrack.addon.d.ts +7 -7
- package/system/dist/builtins/autotrack/index.js +15 -8
- package/system/dist/builtins/autotrack/index.mjs +15 -8
- 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 +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- 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 +11 -5
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +11 -5
- 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 +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -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 +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- 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.d.ts +4 -10
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +16 -9
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +16 -9
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- 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/access-guards.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/custom-actions.d.ts +11 -0
- package/system/dist/builtins/storage-orchestrator/index.d.ts +1 -0
- package/system/dist/builtins/storage-orchestrator/index.js +2 -0
- package/system/dist/builtins/storage-orchestrator/index.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/location-instances.d.ts +72 -0
- package/system/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/location-secret-refs.d.ts +26 -0
- package/system/dist/builtins/storage-orchestrator/location-store.d.ts +28 -2
- package/system/dist/builtins/storage-orchestrator/migrations/index.d.ts +9 -2
- package/system/dist/builtins/storage-orchestrator/migrations/legacy-location-secret-refs.d.ts +13 -0
- package/system/dist/builtins/storage-orchestrator/migrations/location-secret-ports.d.ts +15 -0
- package/system/dist/builtins/storage-orchestrator/migrations/location-secrets-to-record.d.ts +57 -0
- package/system/dist/builtins/storage-orchestrator/provider-discovery.d.ts +10 -13
- package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +6 -0
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +39 -8
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +954 -131
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +954 -132
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +8 -0
- 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 +112 -3
- package/system/dist/builtins/winston-logging/index.mjs +112 -3
- package/system/dist/builtins/winston-logging/migrations/index.d.ts +8 -0
- package/system/dist/builtins/winston-logging/migrations/node-fields.d.ts +43 -0
- package/system/dist/builtins/winston-logging/winston-logging.addon.d.ts +10 -2
- package/system/dist/{capture-engine-DNHgjQot.js → capture-engine-BVpkq9Mv.js} +1 -1
- package/system/dist/{capture-engine-BsKY_3xa.mjs → capture-engine-D-oUDtX5.mjs} +1 -1
- package/system/dist/{composition-sources-BRdGsbVT.mjs → composition-sources-Br7JhpbD.mjs} +1 -1
- package/system/dist/{composition-sources-BgO0GQYW.js → composition-sources-DKCbVA67.js} +1 -1
- package/system/dist/{constants-CQeMrR4f.mjs → constants-Bl0Qxbek.mjs} +1 -1
- package/system/dist/{constants-C3jGKQSQ.js → constants-CJVY-mUq.js} +1 -1
- package/system/dist/{device-ca-ByVi5eUC.mjs → device-ca-BeDGy8NK.mjs} +1 -1
- package/system/dist/{device-ca-D3y6wGmn.js → device-ca-i8EbKp3q.js} +1 -1
- package/system/dist/{dist-BsQA6-0i.mjs → dist-CPUbgRkb.mjs} +395 -425
- package/system/dist/{dist-BRI-Mwx0.js → dist-Ddkk4Dqq.js} +412 -424
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-8dJTW2LI.mjs → hub-mdns-ciao-DgF4SifE.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Ry_Jpljx.js → hub-mdns-ciao-lHRHbXqV.js} +2 -2
- package/system/dist/index.js +151 -53
- package/system/dist/index.mjs +151 -55
- package/system/dist/kernel/addon-health-monitor.d.ts +0 -21
- package/system/dist/kernel/index.d.ts +2 -0
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/kernel/transport/runner-of-addon.d.ts +2 -0
- package/system/dist/kernel/unsupported-addon-tracker.d.ts +74 -0
- package/system/dist/{legacy-integration-rows-door-CjXTbmvH.mjs → legacy-integration-rows-door-9JSt493H.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-D5BdSNla.js → legacy-integration-rows-door-n9GIUxgq.js} +1 -1
- package/system/dist/{restore-archive-GoWJMdHy.js → restore-archive-BDvLSZtj.js} +1 -1
- package/system/dist/{restore-archive-vn4co_kf.mjs → restore-archive-Dh3XnCR1.mjs} +82 -82
- package/system/dist/{wal-maintenance-CadfiGWy.mjs → wal-maintenance-BQJAmAwS.mjs} +0 -0
- package/system/dist/{wal-maintenance-sSlXJm4k.js → wal-maintenance-CWlz_qRq.js} +0 -0
- package/system/package.json +4 -1
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -772,6 +772,10 @@ var CATEGORY_MAPPINGS = {
|
|
|
772
772
|
severity: "error",
|
|
773
773
|
titleTemplate: "Addon failed to load"
|
|
774
774
|
},
|
|
775
|
+
"addon.unsupported-version": {
|
|
776
|
+
severity: "warning",
|
|
777
|
+
titleTemplate: "Addon version unsupported"
|
|
778
|
+
},
|
|
775
779
|
"system.liveness-failed": {
|
|
776
780
|
severity: "error",
|
|
777
781
|
titleTemplate: "Node liveness"
|
|
@@ -801,6 +805,7 @@ var CATEGORY_MAPPINGS = {
|
|
|
801
805
|
var SILENT_TRACKED_CATEGORIES = [
|
|
802
806
|
"process.state-changed",
|
|
803
807
|
"addon.load-recovered",
|
|
808
|
+
"addon.unsupported-resolved",
|
|
804
809
|
"system.liveness-recovered",
|
|
805
810
|
"stream.online",
|
|
806
811
|
"notification.rule-repaired",
|
|
@@ -823,6 +828,8 @@ function streamIdsOf(listed, fallback) {
|
|
|
823
828
|
}
|
|
824
829
|
return fallback !== void 0 ? [fallback] : [];
|
|
825
830
|
}
|
|
831
|
+
/** Stable-id prefix of the unsupported-addon-version card (D1017). */
|
|
832
|
+
var ADDON_UNSUPPORTED_ALERT_PREFIX = "addon-unsupported:";
|
|
826
833
|
var TRACKED_CATEGORIES = [...Object.keys(CATEGORY_MAPPINGS), ...SILENT_TRACKED_CATEGORIES];
|
|
827
834
|
/**
|
|
828
835
|
* `[ALERT-CENTER-EVENTS]` — rate limiting. Events that fire thousands of
|
|
@@ -1083,6 +1090,14 @@ var AlertCenterAddon = class extends require_dist.BaseAddon {
|
|
|
1083
1090
|
await this.handleAddonLoadRecovered(event);
|
|
1084
1091
|
return;
|
|
1085
1092
|
}
|
|
1093
|
+
if (category === require_dist.EventCategory.AddonUnsupportedVersion) {
|
|
1094
|
+
await this.handleAddonUnsupportedVersion(event);
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
if (category === require_dist.EventCategory.AddonUnsupportedResolved) {
|
|
1098
|
+
await this.handleAddonUnsupportedResolved(event);
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1086
1101
|
if (category === require_dist.EventCategory.SystemLivenessFailed) {
|
|
1087
1102
|
await this.handleLivenessFailed(event);
|
|
1088
1103
|
return;
|
|
@@ -1500,6 +1515,62 @@ var AlertCenterAddon = class extends require_dist.BaseAddon {
|
|
|
1500
1515
|
}
|
|
1501
1516
|
}
|
|
1502
1517
|
/**
|
|
1518
|
+
* AddonUnsupportedVersion — an addon RUNS although its installed package is
|
|
1519
|
+
* below what the server requires (D1017). One card per node and package, keyed
|
|
1520
|
+
* `addon-unsupported:<nodeId>:<packageName>` so the resolve edge dismisses it.
|
|
1521
|
+
*/
|
|
1522
|
+
async handleAddonUnsupportedVersion(event) {
|
|
1523
|
+
const data = event.data;
|
|
1524
|
+
const packageName = typeof data["packageName"] === "string" ? data["packageName"] : "";
|
|
1525
|
+
if (packageName.length === 0) return;
|
|
1526
|
+
const addonId = typeof data["addonId"] === "string" ? data["addonId"] : packageName;
|
|
1527
|
+
const nodeId = typeof data["nodeId"] === "string" ? data["nodeId"] : "hub";
|
|
1528
|
+
const installed = typeof data["installedVersion"] === "string" ? data["installedVersion"] : "unknown";
|
|
1529
|
+
const minimum = typeof data["requiredMinimum"] === "string" ? data["requiredMinimum"] : null;
|
|
1530
|
+
const server = typeof data["serverVersion"] === "string" ? data["serverVersion"] : "unknown";
|
|
1531
|
+
const unmet = Array.isArray(data["unmet"]) ? data["unmet"].filter((line) => typeof line === "string") : [];
|
|
1532
|
+
const required = minimum === null ? unmet.join("; ") : `requires >= ${minimum}`;
|
|
1533
|
+
const alert = {
|
|
1534
|
+
id: `${ADDON_UNSUPPORTED_ALERT_PREFIX}${nodeId}:${packageName}`,
|
|
1535
|
+
category: require_dist.EventCategory.AddonUnsupportedVersion,
|
|
1536
|
+
severity: "warning",
|
|
1537
|
+
title: `Addon version unsupported: ${addonId}`,
|
|
1538
|
+
message: `${addonId} on ${nodeId} runs ${installed}, but server ${server} ${required}. It keeps running; update the package.`,
|
|
1539
|
+
status: "active",
|
|
1540
|
+
read: false,
|
|
1541
|
+
createdAt: Date.now(),
|
|
1542
|
+
updatedAt: Date.now(),
|
|
1543
|
+
source: {
|
|
1544
|
+
type: "addon",
|
|
1545
|
+
id: packageName
|
|
1546
|
+
},
|
|
1547
|
+
metadata: {
|
|
1548
|
+
packageName,
|
|
1549
|
+
addonId,
|
|
1550
|
+
nodeId,
|
|
1551
|
+
installedVersion: installed,
|
|
1552
|
+
requiredMinimum: minimum,
|
|
1553
|
+
serverVersion: server,
|
|
1554
|
+
unmet
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1557
|
+
await this.emitAlert(alert);
|
|
1558
|
+
}
|
|
1559
|
+
/** The package reached a supported version — drop its unsupported-version card. */
|
|
1560
|
+
async handleAddonUnsupportedResolved(event) {
|
|
1561
|
+
const packageName = event.data["packageName"];
|
|
1562
|
+
if (typeof packageName !== "string" || packageName.length === 0) return;
|
|
1563
|
+
const stableId = `${ADDON_UNSUPPORTED_ALERT_PREFIX}${typeof event.data["nodeId"] === "string" ? event.data["nodeId"] : "hub"}:${packageName}`;
|
|
1564
|
+
try {
|
|
1565
|
+
await this.dismiss(stableId);
|
|
1566
|
+
} catch (err) {
|
|
1567
|
+
this.ctx.logger?.debug("AddonUnsupportedResolved: dismiss failed (likely already dismissed)", { meta: {
|
|
1568
|
+
stableId,
|
|
1569
|
+
error: require_dist.errMsg(err)
|
|
1570
|
+
} });
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1503
1574
|
* SystemLivenessFailed — a liveness invariant of this node is false.
|
|
1504
1575
|
*
|
|
1505
1576
|
* `findingId` is already stable across ticks (`liveness:no-devices`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Gr as isAlertEpisodeSeverity, Is as defineRecordKinds, Oc as errMsg$1, Wr as isAlertEpisodeOpen, bn as alertsCapability, f as AlertSchema, js as createEvent$1, kc as EventCategory$1, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -764,6 +764,10 @@ var CATEGORY_MAPPINGS = {
|
|
|
764
764
|
severity: "error",
|
|
765
765
|
titleTemplate: "Addon failed to load"
|
|
766
766
|
},
|
|
767
|
+
"addon.unsupported-version": {
|
|
768
|
+
severity: "warning",
|
|
769
|
+
titleTemplate: "Addon version unsupported"
|
|
770
|
+
},
|
|
767
771
|
"system.liveness-failed": {
|
|
768
772
|
severity: "error",
|
|
769
773
|
titleTemplate: "Node liveness"
|
|
@@ -793,6 +797,7 @@ var CATEGORY_MAPPINGS = {
|
|
|
793
797
|
var SILENT_TRACKED_CATEGORIES = [
|
|
794
798
|
"process.state-changed",
|
|
795
799
|
"addon.load-recovered",
|
|
800
|
+
"addon.unsupported-resolved",
|
|
796
801
|
"system.liveness-recovered",
|
|
797
802
|
"stream.online",
|
|
798
803
|
"notification.rule-repaired",
|
|
@@ -815,6 +820,8 @@ function streamIdsOf(listed, fallback) {
|
|
|
815
820
|
}
|
|
816
821
|
return fallback !== void 0 ? [fallback] : [];
|
|
817
822
|
}
|
|
823
|
+
/** Stable-id prefix of the unsupported-addon-version card (D1017). */
|
|
824
|
+
var ADDON_UNSUPPORTED_ALERT_PREFIX = "addon-unsupported:";
|
|
818
825
|
var TRACKED_CATEGORIES = [...Object.keys(CATEGORY_MAPPINGS), ...SILENT_TRACKED_CATEGORIES];
|
|
819
826
|
/**
|
|
820
827
|
* `[ALERT-CENTER-EVENTS]` — rate limiting. Events that fire thousands of
|
|
@@ -1075,6 +1082,14 @@ var AlertCenterAddon = class extends BaseAddon {
|
|
|
1075
1082
|
await this.handleAddonLoadRecovered(event);
|
|
1076
1083
|
return;
|
|
1077
1084
|
}
|
|
1085
|
+
if (category === EventCategory$1.AddonUnsupportedVersion) {
|
|
1086
|
+
await this.handleAddonUnsupportedVersion(event);
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
if (category === EventCategory$1.AddonUnsupportedResolved) {
|
|
1090
|
+
await this.handleAddonUnsupportedResolved(event);
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1078
1093
|
if (category === EventCategory$1.SystemLivenessFailed) {
|
|
1079
1094
|
await this.handleLivenessFailed(event);
|
|
1080
1095
|
return;
|
|
@@ -1492,6 +1507,62 @@ var AlertCenterAddon = class extends BaseAddon {
|
|
|
1492
1507
|
}
|
|
1493
1508
|
}
|
|
1494
1509
|
/**
|
|
1510
|
+
* AddonUnsupportedVersion — an addon RUNS although its installed package is
|
|
1511
|
+
* below what the server requires (D1017). One card per node and package, keyed
|
|
1512
|
+
* `addon-unsupported:<nodeId>:<packageName>` so the resolve edge dismisses it.
|
|
1513
|
+
*/
|
|
1514
|
+
async handleAddonUnsupportedVersion(event) {
|
|
1515
|
+
const data = event.data;
|
|
1516
|
+
const packageName = typeof data["packageName"] === "string" ? data["packageName"] : "";
|
|
1517
|
+
if (packageName.length === 0) return;
|
|
1518
|
+
const addonId = typeof data["addonId"] === "string" ? data["addonId"] : packageName;
|
|
1519
|
+
const nodeId = typeof data["nodeId"] === "string" ? data["nodeId"] : "hub";
|
|
1520
|
+
const installed = typeof data["installedVersion"] === "string" ? data["installedVersion"] : "unknown";
|
|
1521
|
+
const minimum = typeof data["requiredMinimum"] === "string" ? data["requiredMinimum"] : null;
|
|
1522
|
+
const server = typeof data["serverVersion"] === "string" ? data["serverVersion"] : "unknown";
|
|
1523
|
+
const unmet = Array.isArray(data["unmet"]) ? data["unmet"].filter((line) => typeof line === "string") : [];
|
|
1524
|
+
const required = minimum === null ? unmet.join("; ") : `requires >= ${minimum}`;
|
|
1525
|
+
const alert = {
|
|
1526
|
+
id: `${ADDON_UNSUPPORTED_ALERT_PREFIX}${nodeId}:${packageName}`,
|
|
1527
|
+
category: EventCategory$1.AddonUnsupportedVersion,
|
|
1528
|
+
severity: "warning",
|
|
1529
|
+
title: `Addon version unsupported: ${addonId}`,
|
|
1530
|
+
message: `${addonId} on ${nodeId} runs ${installed}, but server ${server} ${required}. It keeps running; update the package.`,
|
|
1531
|
+
status: "active",
|
|
1532
|
+
read: false,
|
|
1533
|
+
createdAt: Date.now(),
|
|
1534
|
+
updatedAt: Date.now(),
|
|
1535
|
+
source: {
|
|
1536
|
+
type: "addon",
|
|
1537
|
+
id: packageName
|
|
1538
|
+
},
|
|
1539
|
+
metadata: {
|
|
1540
|
+
packageName,
|
|
1541
|
+
addonId,
|
|
1542
|
+
nodeId,
|
|
1543
|
+
installedVersion: installed,
|
|
1544
|
+
requiredMinimum: minimum,
|
|
1545
|
+
serverVersion: server,
|
|
1546
|
+
unmet
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
await this.emitAlert(alert);
|
|
1550
|
+
}
|
|
1551
|
+
/** The package reached a supported version — drop its unsupported-version card. */
|
|
1552
|
+
async handleAddonUnsupportedResolved(event) {
|
|
1553
|
+
const packageName = event.data["packageName"];
|
|
1554
|
+
if (typeof packageName !== "string" || packageName.length === 0) return;
|
|
1555
|
+
const stableId = `${ADDON_UNSUPPORTED_ALERT_PREFIX}${typeof event.data["nodeId"] === "string" ? event.data["nodeId"] : "hub"}:${packageName}`;
|
|
1556
|
+
try {
|
|
1557
|
+
await this.dismiss(stableId);
|
|
1558
|
+
} catch (err) {
|
|
1559
|
+
this.ctx.logger?.debug("AddonUnsupportedResolved: dismiss failed (likely already dismissed)", { meta: {
|
|
1560
|
+
stableId,
|
|
1561
|
+
error: errMsg$1(err)
|
|
1562
|
+
} });
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
/**
|
|
1495
1566
|
* SystemLivenessFailed — a liveness invariant of this node is false.
|
|
1496
1567
|
*
|
|
1497
1568
|
* `findingId` is already stable across ticks (`liveness:no-devices`,
|
|
@@ -36,11 +36,9 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import type { AddonInitResult } from "@camstack/types";
|
|
38
38
|
import { BaseAddon } from "@camstack/types";
|
|
39
|
-
|
|
40
|
-
export
|
|
41
|
-
readonly
|
|
42
|
-
}
|
|
43
|
-
export declare class AutotrackAddon extends BaseAddon<AutotrackConfig> {
|
|
39
|
+
import { type AutotrackCameraRecord } from "./autotrack-cameras.js";
|
|
40
|
+
export declare class AutotrackAddon extends BaseAddon<Record<string, never>> {
|
|
41
|
+
private readonly camerasState;
|
|
44
42
|
private records;
|
|
45
43
|
private readonly sessions;
|
|
46
44
|
/** Cameras whose `ptz-autotrack` binding names THIS addon, last time we read. */
|
|
@@ -62,10 +60,12 @@ export declare class AutotrackAddon extends BaseAddon<AutotrackConfig> {
|
|
|
62
60
|
private mirrorTimer;
|
|
63
61
|
private watchdogTimer;
|
|
64
62
|
constructor();
|
|
63
|
+
/** Load the per-camera records the store holds. */
|
|
64
|
+
protected loadRecords(): Promise<void>;
|
|
65
|
+
protected persistRecords(): Promise<void>;
|
|
65
66
|
protected onInitialize(): Promise<AddonInitResult>;
|
|
66
67
|
protected onShutdown(): Promise<void>;
|
|
67
|
-
protected
|
|
68
|
-
private recordOf;
|
|
68
|
+
protected recordOf(deviceId: number): AutotrackCameraRecord;
|
|
69
69
|
private statusOf;
|
|
70
70
|
private patchCamera;
|
|
71
71
|
private serialiseRecords;
|
|
@@ -3,7 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
let zod = require("zod");
|
|
7
8
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
9
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
10
|
deadZoneFraction: .5,
|
|
@@ -741,10 +742,13 @@ function round3(value) {
|
|
|
741
742
|
}
|
|
742
743
|
//#endregion
|
|
743
744
|
//#region src/builtins/autotrack/autotrack.addon.ts
|
|
745
|
+
/** Persisted shape (store key `cameras`): one entry per camera the operator has touched. */
|
|
746
|
+
var CamerasStateSchema = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
744
747
|
/** How often the silence watchdog runs. Small relative to the disappear delay
|
|
745
748
|
* it enforces — the delay is the budget, this is only the resolution. */
|
|
746
749
|
var WATCHDOG_INTERVAL_MS = 5e3;
|
|
747
750
|
var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
751
|
+
camerasState = this.state("cameras", CamerasStateSchema, {});
|
|
748
752
|
records = {};
|
|
749
753
|
sessions = /* @__PURE__ */ new Map();
|
|
750
754
|
/** Cameras whose `ptz-autotrack` binding names THIS addon, last time we read. */
|
|
@@ -766,10 +770,17 @@ var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
|
766
770
|
mirrorTimer = null;
|
|
767
771
|
watchdogTimer = null;
|
|
768
772
|
constructor() {
|
|
769
|
-
super({
|
|
773
|
+
super({});
|
|
774
|
+
}
|
|
775
|
+
/** Load the per-camera records the store holds. */
|
|
776
|
+
async loadRecords() {
|
|
777
|
+
this.records = parseCameraRecords(await this.camerasState.get());
|
|
778
|
+
}
|
|
779
|
+
async persistRecords() {
|
|
780
|
+
await this.camerasState.set(this.serialiseRecords());
|
|
770
781
|
}
|
|
771
782
|
async onInitialize() {
|
|
772
|
-
this.
|
|
783
|
+
await this.loadRecords();
|
|
773
784
|
this.unsubscribeFrames = this.ctx.eventBus.subscribe({ category: require_dist.EventCategory.PipelineAnalyticsFrameTracked }, (event) => {
|
|
774
785
|
if (!require_dist.isEvent(event, require_dist.EventCategory.PipelineAnalyticsFrameTracked)) return;
|
|
775
786
|
const session = this.sessions.get(event.data.deviceId);
|
|
@@ -833,10 +844,6 @@ var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
|
833
844
|
for (const session of this.sessions.values()) session.loop.logSummary();
|
|
834
845
|
this.sessions.clear();
|
|
835
846
|
}
|
|
836
|
-
async onConfigChanged() {
|
|
837
|
-
this.records = parseCameraRecords(this.config.cameras);
|
|
838
|
-
await this.reconcileSessions();
|
|
839
|
-
}
|
|
840
847
|
recordOf(deviceId) {
|
|
841
848
|
return this.records[deviceId] ?? DEFAULT_CAMERA_RECORD;
|
|
842
849
|
}
|
|
@@ -847,7 +854,7 @@ var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
|
847
854
|
const before = this.recordOf(deviceId).enabled;
|
|
848
855
|
this.records = withCameraPatch(this.records, deviceId, patch);
|
|
849
856
|
if (before !== this.recordOf(deviceId).enabled) this.lastChangedAt.set(deviceId, Date.now());
|
|
850
|
-
await this.
|
|
857
|
+
await this.persistRecords();
|
|
851
858
|
await this.refreshEverything();
|
|
852
859
|
}
|
|
853
860
|
serialiseRecords() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Oc as errMsg, Qi as ptzAutotrackCapability, Tn as bareAddonId, kc as EventCategory, qs as isEvent, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
4
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
5
|
deadZoneFraction: .5,
|
|
@@ -736,10 +737,13 @@ function round3(value) {
|
|
|
736
737
|
}
|
|
737
738
|
//#endregion
|
|
738
739
|
//#region src/builtins/autotrack/autotrack.addon.ts
|
|
740
|
+
/** Persisted shape (store key `cameras`): one entry per camera the operator has touched. */
|
|
741
|
+
var CamerasStateSchema = z.record(z.string(), z.unknown());
|
|
739
742
|
/** How often the silence watchdog runs. Small relative to the disappear delay
|
|
740
743
|
* it enforces — the delay is the budget, this is only the resolution. */
|
|
741
744
|
var WATCHDOG_INTERVAL_MS = 5e3;
|
|
742
745
|
var AutotrackAddon = class extends BaseAddon {
|
|
746
|
+
camerasState = this.state("cameras", CamerasStateSchema, {});
|
|
743
747
|
records = {};
|
|
744
748
|
sessions = /* @__PURE__ */ new Map();
|
|
745
749
|
/** Cameras whose `ptz-autotrack` binding names THIS addon, last time we read. */
|
|
@@ -761,10 +765,17 @@ var AutotrackAddon = class extends BaseAddon {
|
|
|
761
765
|
mirrorTimer = null;
|
|
762
766
|
watchdogTimer = null;
|
|
763
767
|
constructor() {
|
|
764
|
-
super({
|
|
768
|
+
super({});
|
|
769
|
+
}
|
|
770
|
+
/** Load the per-camera records the store holds. */
|
|
771
|
+
async loadRecords() {
|
|
772
|
+
this.records = parseCameraRecords(await this.camerasState.get());
|
|
773
|
+
}
|
|
774
|
+
async persistRecords() {
|
|
775
|
+
await this.camerasState.set(this.serialiseRecords());
|
|
765
776
|
}
|
|
766
777
|
async onInitialize() {
|
|
767
|
-
this.
|
|
778
|
+
await this.loadRecords();
|
|
768
779
|
this.unsubscribeFrames = this.ctx.eventBus.subscribe({ category: EventCategory.PipelineAnalyticsFrameTracked }, (event) => {
|
|
769
780
|
if (!isEvent(event, EventCategory.PipelineAnalyticsFrameTracked)) return;
|
|
770
781
|
const session = this.sessions.get(event.data.deviceId);
|
|
@@ -828,10 +839,6 @@ var AutotrackAddon = class extends BaseAddon {
|
|
|
828
839
|
for (const session of this.sessions.values()) session.loop.logSummary();
|
|
829
840
|
this.sessions.clear();
|
|
830
841
|
}
|
|
831
|
-
async onConfigChanged() {
|
|
832
|
-
this.records = parseCameraRecords(this.config.cameras);
|
|
833
|
-
await this.reconcileSessions();
|
|
834
|
-
}
|
|
835
842
|
recordOf(deviceId) {
|
|
836
843
|
return this.records[deviceId] ?? DEFAULT_CAMERA_RECORD;
|
|
837
844
|
}
|
|
@@ -842,7 +849,7 @@ var AutotrackAddon = class extends BaseAddon {
|
|
|
842
849
|
const before = this.recordOf(deviceId).enabled;
|
|
843
850
|
this.records = withCameraPatch(this.records, deviceId, patch);
|
|
844
851
|
if (before !== this.recordOf(deviceId).enabled) this.lastChangedAt.set(deviceId, Date.now());
|
|
845
|
-
await this.
|
|
852
|
+
await this.persistRecords();
|
|
846
853
|
await this.refreshEverything();
|
|
847
854
|
}
|
|
848
855
|
serialiseRecords() {
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_restore_archive = require("../../restore-archive-
|
|
8
|
+
const require_restore_archive = require("../../restore-archive-BDvLSZtj.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
11
11
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Ia as storageOccupancyCapability, _i as mayWriteToLocation, ac as nodePin, bc as toNodeId, kc as EventCategory, wn as backupCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-
|
|
3
|
+
import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-Dh3XnCR1.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, E as CalendarPreferencesSchema, Is as defineRecordKinds, Nn as calendarsCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Dc as DeviceType, Ei as motionCapability, J as DeclaredDevices, Oc as errMsg, Pn as cameraGridLayoutCapability, Ra as streamCatalogCapability, Tc as DeviceFeature, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Ws as hydrateSchema, bi as memoizePinnedFfmpeg, h as BaseDevice, ho as buildFfmpegArgs, ja as snapshotCapability, js as createEvent, kc as EventCategory, or as declarationOwnerNodeId, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { promises } from "node:fs";
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-DKCbVA67.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-BVpkq9Mv.js");
|
|
9
9
|
const require_retention = require("../../retention-BNONb5X_.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-
|
|
3
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
1
|
+
import { Ao as isForwardInputRef, Ar as fanControlCapability, Bi as petFountainCapability, Bn as climateControlCapability, Bo as BaseAddon, Br as groupTemplate, Co as createStatefulExpressionMemory, Da as sharedColorModes, Dc as DeviceType, Dn as brightnessCapability, Ea as sharedActuatorMethods, Ei as motionCapability, Eo as evaluateStatistic, Fo as planResetTier, Gn as composerCapability, Hn as colorCapability, Io as planStatisticTier, J as DeclaredDevices, Jn as consumablesCapability, Kn as compositionFieldKey, Lo as statisticCadenceMs, Mo as nextLocalMidnight, No as openReset, Nr as featureForwards, Oc as errMsg, Oo as historyRetentionFromSettings, Or as expressionContainsBuiltinCall, Po as openStatistic, Pt as PetFountainStatusSchema, Qa as valveCapability, Ri as parseColorInput, Ro as toExpressionValue, So as compositionSourceKey, Ta as sharedActuatorFeatures, To as evaluateDerivative, Ui as planComposition, Va as switchCapability, Vi as petFountainWaterItem, Xi as processTimeZoneOr, Xs as isReadingQuantity, _a as runFanOut, _o as composedDeviceRef, at as FanDirectionSchema, bo as compositionItemFieldPath, di as lockControlCapability, do as HISTORY_SLOW_MS, er as coverCapability, fo as HOUR_MS, go as cloneStatefulExpressionMemory, h as BaseDevice, i as ACTUATOR_TEMPLATE_IDS, jo as isHistoryHelper, jr as fanOutTargets, js as createEvent, k as ConsumableItemSchema, kc as EventCategory, kn as buildCapabilityLookup, ko as integrateReading, lo as DEFAULT_HISTORY_RETENTION, lt as GroupCommandResultSchema, mo as MINUTE_MS, mt as HvacModeSchema, ni as kebabToCamel, oo as COMPOSER_ADDON_ID, pa as resolveMutate, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, uo as HISTORY_FAST_MS, vi as mediaPlayerCapability, vo as composedDeviceStableId, wo as disarmRoseMemory, wr as evaluateCompositionField, x as COMPOSED_ITEM_FIXED_FIELDS, xi as methodRefusal, xo as compositionSliceKey, yi as mediaPlayerFeaturesOfRoles, yo as compositionFeatureEnabled, zr as groupCommandsCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-Br7JhpbD.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-D-oUDtX5.mjs";
|
|
4
4
|
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-B9l9TnGE.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, pi as logDestinationCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
6
|
-
const require_capture_engine = require("../../capture-engine-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-DKCbVA67.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-BVpkq9Mv.js");
|
|
7
7
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
8
8
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
9
9
|
let zod = require("zod");
|
|
@@ -96,8 +96,14 @@ export default class CoreBlockAddon extends BaseAddon {
|
|
|
96
96
|
this.disposer = null
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
// A block's values are cluster settings: rows \`core-block-<id>.<field>\`. It provides no capability
|
|
100
|
+
// of its own, so its form is declared under the one its manager provides (D986).
|
|
101
|
+
scopedSettingsCapabilities() {
|
|
102
|
+
return ['core-blocks']
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async clusterSettingsSchema(cap) {
|
|
106
|
+
return cap === 'core-blocks' ? BLOCK_SETTINGS_SCHEMA : null
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
async onInitialize() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as EMPTY_AUTOMATION_STATE, $
|
|
1
|
+
import { $ as EMPTY_AUTOMATION_STATE, $n as coreBlocksCapability, $s as isSecretMarker, A as ControlStatusSchema, Ai as normalizeCoreBlockWrite, Bo as BaseAddon, C as CORE_BLOCKS_ADDON_ID, Dc as DeviceType$1, Di as nextOccurrence, Do as helperMembers, Et as MediaPlayerStatusSchema, Fi as occurrenceOn, Ft as PowerSourceInfoSchema, Ga as timedRunLimitOf, Gi as powerSourceCapability, Gt as RemoteConfigSchema, Hr as internalActionId, In as capUnitResolver, Is as defineRecordKinds, J as DeclaredDevices, Ji as problemsBlockSave, Ka as timedRunSeconds, Ki as powerSourceLinkOfComposition, Kt as RunningStateStatusSchema, Mr as fanPresetsCapability, Ns as defineAddonMigrations, O as ConditionMirror, Oc as errMsg$1, Oi as normalizeActionUnits, On as buildActionSteps, Oo as historyRetentionFromSettings, Qn as coreBlockSourceKind, R as DEFAULT_HOLD_OVERRIDE, S as COMPOSER_RUNNER_ID, Sc as transformSecretWrite, So as compositionSourceKey, Tr as evaluateWhenTree, Ua as templateCapability, Ui as planComposition, Vn as collectWhenMirrorSources, Vt as REMOTE_MEDIA_COMMANDS, Wa as timedRunCapability, Wn as compileScalarOverride, Ws as hydrateSchema, Wt as RemoteAssumedStateSchema, Xn as coreBlockComposition, Xt as SchedulerError, Ya as validateComposition, Yn as coreBlockAddonId, Za as validateSchedulerInput, Zi as proposeRunningThreshold, Zn as coreBlockIdFromAddonId, Zr as isInternalActionId, Zt as SchedulerSchema, _c as secretTreeFromSchema, _o as composedDeviceRef, aa as resolveActionVariables, an as SwitchStatusSchema, ao as zoneOnlySite, ba as schedulersCapability, c as ActionError, ca as resolveCoreBlockEntry, ci as localDateOf, co as DAY_MS, d as ActionVariableSchema, dn as actionSourceCapability, dr as describeComposableCaps, et as EMPTY_REMOTE_ASSUMED_STATE, fi as lockDoorLinkOfComposition, fn as actionWaitTotalMs, ga as resolveStepArgs, gt as INTERNAL_ACTION_PREFIX, ht as IDLE_ACTION_STATUS, ia as replacedFieldKeys, it as FanControlStatusSchema, j as CoreBlockSchema, ji as normalizeStepTargets, ka as siteFor, kc as EventCategory$1, ki as normalizeCapStep, kn as buildCapabilityLookup, ks as collectSecretMarkerRefs, l as ActionStepSchema, la as resolveCoreBlockFiles, m as BUILTIN_REMOTE_COMPONENTS, mc as resolveSecretMarkers, mn as addonIdOfActionId, n as ACTION_TARGET_INVALIDATION_EVENTS, na as remoteCapability, ni as kebabToCamel, no as vocabActionIdFor, nr as customKeyOfRole, nt as FAN_CAPTURE_FIELDS, on as TemplateKindSchema, ot as FanPresetSchema, p as AutomationStateDocSchema, pn as actionsCapability, po as HelperMemberSchema, qn as compositionSourceRefs, ra as remoteLayoutComponentsCapability, ro as weekdayOfLocalDate, rr as customRole, s as ALL_CAPABILITY_DEFINITIONS, so as CompositionSchema, tc as isSecretRefOwnedBy, tt as EMPTY_REMOTE_CONFIG, u as ActionTargetResolver, un as actionEffect, va as runSteps, w as CORE_BLOCK_ADDON_PREFIX, xn as appendTrace, zn as checkTemplatePayload, zt as QuantityUnitError } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-
|
|
4
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
3
|
+
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-Br7JhpbD.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-D-oUDtX5.mjs";
|
|
5
5
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
6
6
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
@@ -91,8 +91,14 @@ export default class CoreBlockAddon extends BaseAddon {
|
|
|
91
91
|
this.disposer = null
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
// A block's values are cluster settings: rows \`core-block-<id>.<field>\`. It provides no capability
|
|
95
|
+
// of its own, so its form is declared under the one its manager provides (D986).
|
|
96
|
+
scopedSettingsCapabilities() {
|
|
97
|
+
return ['core-blocks']
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async clusterSettingsSchema(cap) {
|
|
101
|
+
return cap === 'core-blocks' ? BLOCK_SETTINGS_SCHEMA : null
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
async onInitialize() {
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-BVpkq9Mv.js");
|
|
8
8
|
const require_retention = require("../../retention-BNONb5X_.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-
|
|
1
|
+
import { Bo as BaseAddon, Dc as DeviceType, Is as defineRecordKinds, Rs as emitReadiness, Sn as armRemovalReconcile, Us as historyUnitFor, V as DEVICE_HISTORY_ENERGY_KEY, Xs as isReadingQuantity, Y as DeviceRunSchema, _r as deviceRemovalHookCapability, dt as HISTORY_ITEM_CATALOG, hr as deviceHistoryCapability, kc as EventCategory, ut as HISTORY_CATALOG, vr as deviceRunsCapability, zo as wattMillisecondsToKwh } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-D-oUDtX5.mjs";
|
|
3
3
|
import { a as FIVE_MINUTES_MS, c as bucketEndOf, i as DAY_MS, l as bucketStartOf, n as RetentionJob, o as HOUR_MS, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo } from "../../retention-B9l9TnGE.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
9
9
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $s as isSecretMarker, Aa as siteZoneKey, As as collectZodSecretPaths, Bo as BaseAddon, Cc as userError, Cr as enumerateSchemaFields, Dc as DeviceType, Dr as expandContainer, Ec as DeviceRole, Fn as canonicalIconKey, Is as defineRecordKinds, Ks as isDeviceConfigCap, L as DAY_NAMES, Lr as formatMinutes, Mi as normalizeUnit, Mn as buildStreamParamsConfigSchema, Oc as errMsg, Q as DiscoveryProposalBodySchema, Sc as transformSecretWrite, Sr as enumerateItemArrayFields, Tc as DeviceFeature, X as DeviceStatusSchema, Ys as isKeychainStoredField, Yt as STREAM_PROFILE_META, Z as DeviceTombstoneSchema, Zs as isSecretClear, _ as CAMERA_SWITCH_ORDER, ai as legacyAutoLinkIds, br as deviceStatusCapability, bs as WELL_KNOWN_TAB_MAP, ct as FieldClaimSchema, ec as isSecretMarkerLike, gc as secretTreeFromPaths, gr as deviceManagerCapability, hs as SECRET_CLEAR, kc as EventCategory, lr as defineExtensionSlotProvider, mc as resolveSecretMarkers, mr as deviceExtensionCapability, s as ALL_CAPABILITY_DEFINITIONS, st as FieldClaimModeSchema, tr as createDeviceExtensionProvider, ui as locationIconKey, wt as MINUTES_PER_DAY, xc as toSecretFieldView, y as CAP_NAMES_WITH_STATUS, ya as runtimeStatePolicyFor, yc as sleep$1, yr as deviceStateCapability, zi as parseStreamParamsFormPatch } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
4
4
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|