@camstack/server 1.2.826 → 1.2.828
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-routers.js +257 -40
- package/dist/core/addon/addon-registry.service.js +3 -0
- package/package.json +10 -12
- package/system/dist/addon-runner.js +19 -2
- package/system/dist/addon-runner.mjs +19 -2
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-BBO2OtNH.mjs → agent-https-BSxTUzKT.mjs} +1 -1
- package/system/dist/{agent-https-B2nqARmj.js → agent-https-BlLVD9hG.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 +4 -4
- 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 +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- 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 +17 -6
- package/system/dist/builtins/composer/composer.addon.mjs +17 -6
- package/system/dist/builtins/composer/graft-host.d.ts +2 -0
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-bindings-store.d.ts +7 -4
- package/system/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +269 -25
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +269 -25
- package/system/dist/builtins/device-manager/device-meta-actions.d.ts +11 -1
- package/system/dist/builtins/device-manager/device-projection.d.ts +7 -0
- package/system/dist/builtins/device-manager/device-template/mirror-resolver.d.ts +2 -0
- package/system/dist/builtins/device-manager/device-template/template-filters.d.ts +13 -0
- package/system/dist/builtins/device-manager/device-template/template-host.d.ts +11 -3
- package/system/dist/builtins/device-manager/device-template-actions.d.ts +1 -0
- package/system/dist/builtins/device-manager/feature-deriver.d.ts +61 -0
- 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 +5 -5
- 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 +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- 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 +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 +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- 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-DP4HbT3W.js → capture-engine-1A7HAX3x.js} +1 -1
- package/system/dist/{capture-engine-C-rHYVFq.mjs → capture-engine-B0yQx6hA.mjs} +1 -1
- package/system/dist/{composition-sources-CM9c_jAj.js → composition-sources-BzM19ASO.js} +1 -1
- package/system/dist/{composition-sources-CL9JFN4y.mjs → composition-sources-CyJ0d6Sc.mjs} +1 -1
- package/system/dist/{constants-DzGFnCKZ.mjs → constants-B_FLEjP_.mjs} +1 -1
- package/system/dist/{constants-jk7JccZ0.js → constants-DSO4ZEO3.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-DZ_OQiCc.mjs → device-ca-CveuNCHp.mjs} +1 -1
- package/system/dist/{device-ca-B7_R5WJh.js → device-ca-DLTDsonl.js} +1 -1
- package/system/dist/device-template-worker.js +61 -1
- package/system/dist/device-template-worker.mjs +61 -1
- package/system/dist/{dist-BgRMQHuL.mjs → dist-CIyyHwVx.mjs} +373 -175
- package/system/dist/{dist-BpTL3uNe.js → dist-DhbzVygm.js} +408 -174
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-DIcBingB.mjs → hub-mdns-ciao-CQdCUsrI.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DPUaYAD3.js → hub-mdns-ciao-C_ITDs0-.js} +2 -2
- package/system/dist/index.js +26 -9
- package/system/dist/index.mjs +238 -221
- package/system/dist/kernel/moleculer/migration-api-facade.d.ts +3 -1
- package/system/dist/{legacy-integration-rows-door-DYNePgj4.js → legacy-integration-rows-door-D_tfRhsx.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-1GnkpMgH.mjs → legacy-integration-rows-door-tX6Qktxd.mjs} +1 -1
- package/system/dist/{rename-composition-block-Cp0_nwAI.mjs → rename-composition-block-COaMxshT.mjs} +1 -1
- package/system/dist/{rename-composition-block-Dn2z4fnA.js → rename-composition-block-DNhbAonr.js} +1 -1
- package/system/dist/{restore-archive-DasubaYH.mjs → restore-archive-BMqp_hMT.mjs} +94 -94
- package/system/dist/{restore-archive-BGa5pdp9.js → restore-archive-Dbzuv5hK.js} +1 -1
- package/system/dist/{template-protocol-CTP4eAo_.js → template-protocol-DRZ4cm95.js} +4 -1
- package/system/dist/{template-protocol-BmMM5VBf.mjs → template-protocol-D_6uVHKs.mjs} +4 -1
- package/system/dist/{wal-maintenance-GWFxnSnE.js → wal-maintenance-CWODOTsa.js} +0 -0
- package/system/dist/{wal-maintenance-BLWLlVfF.mjs → wal-maintenance-ITsLGvFA.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -39,8 +39,8 @@ let node_vm = require("node:vm");
|
|
|
39
39
|
node_vm = __toESM(node_vm);
|
|
40
40
|
let node_fs_promises = require("node:fs/promises");
|
|
41
41
|
let node_async_hooks = require("node:async_hooks");
|
|
42
|
-
let _trpc_client = require("@trpc/client");
|
|
43
42
|
let _camstack_types_node = require("@camstack/types/node");
|
|
43
|
+
let _trpc_client = require("@trpc/client");
|
|
44
44
|
let node_http = require("node:http");
|
|
45
45
|
let node_events = require("node:events");
|
|
46
46
|
let node_module = require("node:module");
|
|
@@ -5601,7 +5601,15 @@ function createMigrationApi(backing) {
|
|
|
5601
5601
|
return found === void 0 ? null : toIntegration(found);
|
|
5602
5602
|
}
|
|
5603
5603
|
},
|
|
5604
|
+
deviceSettings: {
|
|
5605
|
+
listIds: async () => ({ deviceIds: [...await requireSettings(backing.settings).listDeviceStoreIds()] }),
|
|
5606
|
+
read: async ({ deviceIds }) => {
|
|
5607
|
+
const found = await requireSettings(backing.settings).readDeviceStoreBatch(deviceIds);
|
|
5608
|
+
return { blobs: Object.fromEntries([...found].filter(([, blob]) => Object.keys(blob).length > 0).map(([id, blob]) => [String(id), { ...blob }])) };
|
|
5609
|
+
}
|
|
5610
|
+
},
|
|
5604
5611
|
devices: {
|
|
5612
|
+
aliases: async ({ deviceIds }) => ({ aliases: Object.fromEntries([...await backing.devices.aliasesOf(deviceIds)].map(([id, alias]) => [String(id), alias])) }),
|
|
5605
5613
|
list: async ({ addonId, integrationId }) => ({ devices: (await backing.devices.list(addonId)).filter((d) => integrationId === void 0 || d.integrationId === integrationId).map((d) => ({ ...d })) }),
|
|
5606
5614
|
get: async ({ deviceId }) => {
|
|
5607
5615
|
const found = await backing.devices.get(deviceId);
|
|
@@ -5675,6 +5683,14 @@ function createMigrationApiOverContext(deps) {
|
|
|
5675
5683
|
deviceId,
|
|
5676
5684
|
integrationId
|
|
5677
5685
|
});
|
|
5686
|
+
},
|
|
5687
|
+
aliasesOf: async (deviceIds) => {
|
|
5688
|
+
const found = /* @__PURE__ */ new Map();
|
|
5689
|
+
for (const deviceId of new Set(deviceIds)) {
|
|
5690
|
+
const device = await deps.api().deviceManager.getDevice.query({ deviceId });
|
|
5691
|
+
if (device?.alias !== void 0) found.set(deviceId, device.alias);
|
|
5692
|
+
}
|
|
5693
|
+
return found;
|
|
5678
5694
|
}
|
|
5679
5695
|
},
|
|
5680
5696
|
records: deps.records,
|
|
@@ -6313,7 +6329,8 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6313
6329
|
capName: cap.name,
|
|
6314
6330
|
reason: "native-registered",
|
|
6315
6331
|
addonId,
|
|
6316
|
-
nodeId
|
|
6332
|
+
nodeId,
|
|
6333
|
+
implementedMethods: (0, _camstack_types_node.implementedMethodsOf)(Object.keys(cap.methods), finalProvider)
|
|
6317
6334
|
}
|
|
6318
6335
|
});
|
|
6319
6336
|
(0, _camstack_types_addon.emitReadiness)(eventBus, {
|
|
@@ -16,8 +16,8 @@ import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
|
16
16
|
import * as vm from "node:vm";
|
|
17
17
|
import { mkdir, rm, stat, unlink } from "node:fs/promises";
|
|
18
18
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
19
|
+
import { EDGETPU_LIB_ENV, chooseEdgetpuDelegate, declaresEdgetpuDelegate, ensureBinary, ensureEdgetpuDelegate, ensureFfmpeg, ensurePython, implementedMethodsOf, installPythonPackages, installPythonRequirements, nodeDataRootFromEnv } from "@camstack/types/node";
|
|
19
20
|
import { TRPCClientError, createTRPCClient } from "@trpc/client";
|
|
20
|
-
import { EDGETPU_LIB_ENV, chooseEdgetpuDelegate, declaresEdgetpuDelegate, ensureBinary, ensureEdgetpuDelegate, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements, nodeDataRootFromEnv } from "@camstack/types/node";
|
|
21
21
|
import { createServer as createServer$1, request } from "node:http";
|
|
22
22
|
import { once } from "node:events";
|
|
23
23
|
import { pathToFileURL } from "node:url";
|
|
@@ -5546,7 +5546,15 @@ function createMigrationApi(backing) {
|
|
|
5546
5546
|
return found === void 0 ? null : toIntegration(found);
|
|
5547
5547
|
}
|
|
5548
5548
|
},
|
|
5549
|
+
deviceSettings: {
|
|
5550
|
+
listIds: async () => ({ deviceIds: [...await requireSettings(backing.settings).listDeviceStoreIds()] }),
|
|
5551
|
+
read: async ({ deviceIds }) => {
|
|
5552
|
+
const found = await requireSettings(backing.settings).readDeviceStoreBatch(deviceIds);
|
|
5553
|
+
return { blobs: Object.fromEntries([...found].filter(([, blob]) => Object.keys(blob).length > 0).map(([id, blob]) => [String(id), { ...blob }])) };
|
|
5554
|
+
}
|
|
5555
|
+
},
|
|
5549
5556
|
devices: {
|
|
5557
|
+
aliases: async ({ deviceIds }) => ({ aliases: Object.fromEntries([...await backing.devices.aliasesOf(deviceIds)].map(([id, alias]) => [String(id), alias])) }),
|
|
5550
5558
|
list: async ({ addonId, integrationId }) => ({ devices: (await backing.devices.list(addonId)).filter((d) => integrationId === void 0 || d.integrationId === integrationId).map((d) => ({ ...d })) }),
|
|
5551
5559
|
get: async ({ deviceId }) => {
|
|
5552
5560
|
const found = await backing.devices.get(deviceId);
|
|
@@ -5620,6 +5628,14 @@ function createMigrationApiOverContext(deps) {
|
|
|
5620
5628
|
deviceId,
|
|
5621
5629
|
integrationId
|
|
5622
5630
|
});
|
|
5631
|
+
},
|
|
5632
|
+
aliasesOf: async (deviceIds) => {
|
|
5633
|
+
const found = /* @__PURE__ */ new Map();
|
|
5634
|
+
for (const deviceId of new Set(deviceIds)) {
|
|
5635
|
+
const device = await deps.api().deviceManager.getDevice.query({ deviceId });
|
|
5636
|
+
if (device?.alias !== void 0) found.set(deviceId, device.alias);
|
|
5637
|
+
}
|
|
5638
|
+
return found;
|
|
5623
5639
|
}
|
|
5624
5640
|
},
|
|
5625
5641
|
records: deps.records,
|
|
@@ -6258,7 +6274,8 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6258
6274
|
capName: cap.name,
|
|
6259
6275
|
reason: "native-registered",
|
|
6260
6276
|
addonId,
|
|
6261
|
-
nodeId
|
|
6277
|
+
nodeId,
|
|
6278
|
+
implementedMethods: implementedMethodsOf(Object.keys(cap.methods), finalProvider)
|
|
6262
6279
|
}
|
|
6263
6280
|
});
|
|
6264
6281
|
emitReadiness(eventBus, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as readCurrentCommandOrigin } from "./cap-call-scope-Bic6Ekfw.mjs";
|
|
2
|
-
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
2
|
+
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
|
|
3
3
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
|
|
4
4
|
export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, readCurrentCommandOrigin, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mc as defineRecordKinds } from "./dist-CIyyHwVx.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DhbzVygm.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -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-DhbzVygm.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dl as errMsg, pl as EventCategory, ps as BaseAddon, yn as addonPagesCapability } from "../../dist-CIyyHwVx.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
-
import * as fs from "node:fs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/builtins/addon-pages-aggregator/dedupe-pages.ts
|
|
7
7
|
/** Stable identity for an addon page, independent of which node reported it. */
|
|
@@ -211,11 +211,11 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
|
|
|
211
211
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
212
212
|
if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
213
213
|
try {
|
|
214
|
-
const stat = fs.statSync(bundlePath);
|
|
214
|
+
const stat = fs$1.statSync(bundlePath);
|
|
215
215
|
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
216
216
|
let v = this.bundleHashCache.get(cacheKey);
|
|
217
217
|
if (v === void 0) {
|
|
218
|
-
v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
218
|
+
v = createHash("sha1").update(fs$1.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
219
219
|
this.bundleHashCache.set(cacheKey, v);
|
|
220
220
|
}
|
|
221
221
|
return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
|
|
@@ -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-DhbzVygm.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dl as errMsg, pl as EventCategory, ps as BaseAddon, xn as addonWidgetsCapability } from "../../dist-CIyyHwVx.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
-
import * as fs from "node:fs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.ts
|
|
7
7
|
/**
|
|
@@ -204,9 +204,9 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
204
204
|
if (entryPath === null) return String(Math.floor(Date.now()));
|
|
205
205
|
try {
|
|
206
206
|
const dir = path$1.dirname(entryPath);
|
|
207
|
-
const files = fs.readdirSync(dir).filter((f) => fs.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
207
|
+
const files = fs$1.readdirSync(dir).filter((f) => fs$1.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
208
208
|
const cacheKey = `${dir}#${files.map((f) => {
|
|
209
|
-
const s = fs.statSync(path$1.join(dir, f));
|
|
209
|
+
const s = fs$1.statSync(path$1.join(dir, f));
|
|
210
210
|
return `${f}:${s.size}:${s.mtimeMs}`;
|
|
211
211
|
}).join("|")}`;
|
|
212
212
|
const cached = this.bundleHashCache.get(cacheKey);
|
|
@@ -214,7 +214,7 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
214
214
|
const hash = createHash("sha1");
|
|
215
215
|
for (const f of files) {
|
|
216
216
|
hash.update(f);
|
|
217
|
-
hash.update(fs.readFileSync(path$1.join(dir, f)));
|
|
217
|
+
hash.update(fs$1.readFileSync(path$1.join(dir, f)));
|
|
218
218
|
}
|
|
219
219
|
const digest = hash.digest("hex").slice(0, 12);
|
|
220
220
|
this.bundleHashCache.set(cacheKey, digest);
|
|
@@ -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-DhbzVygm.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_log_redactor = require("../../log-redactor-BhIEMaG9.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cn as alertEpisodePayload, Sn as alertEpisodeId, T as CORE_BLOCK_ADDON_PREFIX, dl as errMsg, lc as createEvent, mc as defineRecordKinds, ni as isAlertEpisodeSeverity, p as AlertSchema, pl as EventCategory, ps as BaseAddon, ti as isAlertEpisodeOpen, wn as alertsCapability } from "../../dist-CIyyHwVx.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { a as redactLogText } from "../../log-redactor-XLDrPzOi.mjs";
|
|
4
|
-
import * as fs from "node:fs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
7
7
|
/**
|
|
@@ -148,7 +148,7 @@ function lastCauseAfterChunk(previous, chunk) {
|
|
|
148
148
|
function readRunnerDisplayName(addonDirs, runnerId) {
|
|
149
149
|
const names = [];
|
|
150
150
|
for (const dir of addonDirs) try {
|
|
151
|
-
const raw = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
151
|
+
const raw = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
152
152
|
const camstack = typeof raw === "object" && raw !== null ? Reflect.get(raw, "camstack") : null;
|
|
153
153
|
const addons = typeof camstack === "object" && camstack !== null ? Reflect.get(camstack, "addons") : null;
|
|
154
154
|
if (!Array.isArray(addons)) continue;
|
|
@@ -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-DhbzVygm.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
9
9
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dc as isEvent, da as ptzAutotrackCapability, dl as errMsg, kn as bareAddonId, lt as FIRST_LEVEL_MACRO_CLASSES, pl as EventCategory, ps as BaseAddon } from "../../dist-CIyyHwVx.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
4
4
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
@@ -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-DhbzVygm.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-Dbzuv5hK.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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { On as backupCapability, ao as storageOccupancyCapability, ki as mayWriteToLocation, pl as EventCategory, ps as BaseAddon, tl as toNodeId, zc as nodePin } from "../../dist-CIyyHwVx.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-BMqp_hMT.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
|
-
import * as fs from "node:fs";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import * as fsp from "node:fs/promises";
|
|
8
8
|
//#region src/builtins/backup-orchestrator/backup-databases.ts
|
|
@@ -1018,7 +1018,7 @@ async function downloadArchiveToCache(input) {
|
|
|
1018
1018
|
location: input.locationId,
|
|
1019
1019
|
relativePath: input.filename
|
|
1020
1020
|
});
|
|
1021
|
-
const writeStream = fs.createWriteStream(input.cachePath);
|
|
1021
|
+
const writeStream = fs$1.createWriteStream(input.cachePath);
|
|
1022
1022
|
let offset = 0;
|
|
1023
1023
|
try {
|
|
1024
1024
|
while (offset < sizeBytes) {
|
|
@@ -2502,7 +2502,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
2502
2502
|
});
|
|
2503
2503
|
try {
|
|
2504
2504
|
let offset = 0;
|
|
2505
|
-
const stream = fs.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2505
|
+
const stream = fs$1.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2506
2506
|
for await (const rawChunk of stream) {
|
|
2507
2507
|
if (input.signal?.aborted) {
|
|
2508
2508
|
stream.destroy();
|
|
@@ -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-DhbzVygm.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 { D as CalendarPreferencesSchema,
|
|
1
|
+
import { D as CalendarPreferencesSchema, Rn as calendarsCapability, mc as defineRecordKinds, ps as BaseAddon } from "../../dist-CIyyHwVx.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-DhbzVygm.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $a as snapshotCapability, At as MOTION_CLOSE_AFTER_MS, B as DERIVED_CAMERA_SILENCED_CAP_NAMES, Cc as hydrateSchema, Ls as RecordIntegrationInstances, Mi as memoizePinnedFfmpeg, Oc as isInstanceEnabled, Qr as integrationInstancesCapability, Ri as motionCapability, Vo as buildFfmpegArgs, cl as DeviceFeature, dl as errMsg, et as DeclaredDevices, fr as declarationOwnerNodeId, g as BaseDevice, kn as bareAddonId, lc as createEvent, pc as defineEntryKind, pl as EventCategory, ps as BaseAddon, so as streamCatalogCapability, ul as DeviceType, zn as cameraGridLayoutCapability } from "../../dist-CIyyHwVx.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
@@ -3,11 +3,11 @@ 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-DhbzVygm.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-BzM19ASO.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-1A7HAX3x.js");
|
|
9
9
|
const require_retention = require("../../retention-BcOSL6b9.js");
|
|
10
|
-
const require_rename_composition_block = require("../../rename-composition-block-
|
|
10
|
+
const require_rename_composition_block = require("../../rename-composition-block-DNhbAonr.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
13
13
|
/**
|
|
@@ -5206,9 +5206,20 @@ var GraftHost = class {
|
|
|
5206
5206
|
if (def === null) return this.refuse(deviceId, capName, `unknown capability \`${capName}\``);
|
|
5207
5207
|
const missing = unanswered(def);
|
|
5208
5208
|
if (missing.length > 0) return this.refuse(deviceId, capName, `\`${capName}\` has ${missing.map((m) => `\`${m}\``).join(", ")} with no composed answer — a graft cannot serve it until commands arrive (slice 3)`);
|
|
5209
|
+
const provider = this.providerFor(deviceId, def);
|
|
5210
|
+
if (Object.keys(provider).length === 0) {
|
|
5211
|
+
this.ports.logger.info("graft skipped — the cap has no method a graft can answer", {
|
|
5212
|
+
tags: { deviceId },
|
|
5213
|
+
meta: {
|
|
5214
|
+
cap: capName,
|
|
5215
|
+
stableId
|
|
5216
|
+
}
|
|
5217
|
+
});
|
|
5218
|
+
return { kind: "nothing-to-serve" };
|
|
5219
|
+
}
|
|
5209
5220
|
const ctx = this.contextFor(deviceId, stableId);
|
|
5210
5221
|
try {
|
|
5211
|
-
ctx.registerNativeCap(def,
|
|
5222
|
+
ctx.registerNativeCap(def, provider);
|
|
5212
5223
|
} catch (err) {
|
|
5213
5224
|
return this.refuse(deviceId, capName, `registerNativeCap threw — ${require_dist.errMsg(err)}`);
|
|
5214
5225
|
}
|
|
@@ -5304,7 +5315,7 @@ var GraftHost = class {
|
|
|
5304
5315
|
return isSliceRecord(slice) ? slice : null;
|
|
5305
5316
|
};
|
|
5306
5317
|
const answers = Object.entries(def.composedMethods ?? {}).map(([name, answer]) => [name, composedMethod(answer, readSlice)]);
|
|
5307
|
-
const withStatus = def.status === void 0
|
|
5318
|
+
const withStatus = def.status === void 0 ? [] : [["getStatus", async () => this.readMerged(deviceId, def.name)]];
|
|
5308
5319
|
return Object.fromEntries([...answers, ...withStatus]);
|
|
5309
5320
|
}
|
|
5310
5321
|
refuse(deviceId, capName, reason) {
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { $i as petFountainWaterItem, $n as compositionFieldKey, A as ConsumableItemSchema, Aa as resolveMutate, Ac as isReadingQuantity, Ai as mediaPlayerCapability, Bo as MINUTE_MS, Ci as lockControlCapability, Fo as DEFAULT_HISTORY_RETENTION, Go as compositionFeatureEnabled, Ho as cloneStatefulExpressionMemory, Ia as runFanOut, Io as HISTORY_FAST_MS, Ir as expressionContainsBuiltinCall, Ja as sharedActuatorMethods, Jo as compositionSourceKey, Kn as climateControlCapability, Ko as compositionItemFieldPath, Lo as HISTORY_SLOW_MS, Mo as COMPOSER_ADDON_ID, Ni as methodRefusal, Nn as buildCapabilityLookup, Qi as petFountainCapability, Qn as composerCapability, Qo as evaluateStatistic, Ri as motionCapability, Ro as HOUR_MS, Rr as fanControlCapability, S as COMPOSED_ITEM_FIXED_FIELDS, Uo as composedDeviceRef, Vr as featureForwards, Wo as composedDeviceStableId, Xi as parseColorInput, Xo as disarmRoseMemory, Xr as groupTemplate, Ya as sharedColorModes, Yn as colorCapability, Yo as createStatefulExpressionMemory, Yr as groupCommandsCapability, Zo as evaluateDerivative, as as nextLocalMidnight, bt as HvacModeSchema, ca as processTimeZoneOr, cs as planResetTier, dl as errMsg, ds as toExpressionValue, dt as FanDirectionSchema, es as historyRetentionFromSettings, et as DeclaredDevices, fl as featuresOfBoundCaps, g as BaseDevice, ht as GroupCommandResultSchema, i as ACTUATOR_TEMPLATE_IDS, is as isHistoryHelper, ji as mediaPlayerFeaturesOfRoles, jn as brightnessCapability, jr as evaluateCompositionField, ko as withDefaultRunning, lc as createEvent, ls as planStatisticTier, mi as kebabToCamel, ns as integrateReading, os as openReset, pl as EventCategory, pr as declaredSeriesKind, ps as BaseAddon, qa as sharedActuatorFeatures, qo as compositionSliceKey, r as ACTUATOR_METHODS, rs as isForwardInputRef, s as ALL_CAPABILITY_DEFINITIONS, sr as coverCapability, ss as openStatistic, ta as planComposition, tr as consumablesCapability, ul as DeviceType, uo as switchCapability, us as statisticCadenceMs, wo as valveCapability, zr as fanOutTargets, zt as PetFountainStatusSchema } from "../../dist-CIyyHwVx.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-CyJ0d6Sc.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-B0yQx6hA.mjs";
|
|
4
4
|
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-CUOVI1p7.mjs";
|
|
5
|
-
import { n as renameCompositionBlock } from "../../rename-composition-block-
|
|
5
|
+
import { n as renameCompositionBlock } from "../../rename-composition-block-COaMxshT.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
8
8
|
/**
|
|
@@ -5201,9 +5201,20 @@ var GraftHost = class {
|
|
|
5201
5201
|
if (def === null) return this.refuse(deviceId, capName, `unknown capability \`${capName}\``);
|
|
5202
5202
|
const missing = unanswered(def);
|
|
5203
5203
|
if (missing.length > 0) return this.refuse(deviceId, capName, `\`${capName}\` has ${missing.map((m) => `\`${m}\``).join(", ")} with no composed answer — a graft cannot serve it until commands arrive (slice 3)`);
|
|
5204
|
+
const provider = this.providerFor(deviceId, def);
|
|
5205
|
+
if (Object.keys(provider).length === 0) {
|
|
5206
|
+
this.ports.logger.info("graft skipped — the cap has no method a graft can answer", {
|
|
5207
|
+
tags: { deviceId },
|
|
5208
|
+
meta: {
|
|
5209
|
+
cap: capName,
|
|
5210
|
+
stableId
|
|
5211
|
+
}
|
|
5212
|
+
});
|
|
5213
|
+
return { kind: "nothing-to-serve" };
|
|
5214
|
+
}
|
|
5204
5215
|
const ctx = this.contextFor(deviceId, stableId);
|
|
5205
5216
|
try {
|
|
5206
|
-
ctx.registerNativeCap(def,
|
|
5217
|
+
ctx.registerNativeCap(def, provider);
|
|
5207
5218
|
} catch (err) {
|
|
5208
5219
|
return this.refuse(deviceId, capName, `registerNativeCap threw — ${errMsg(err)}`);
|
|
5209
5220
|
}
|
|
@@ -5299,7 +5310,7 @@ var GraftHost = class {
|
|
|
5299
5310
|
return isSliceRecord(slice) ? slice : null;
|
|
5300
5311
|
};
|
|
5301
5312
|
const answers = Object.entries(def.composedMethods ?? {}).map(([name, answer]) => [name, composedMethod(answer, readSlice)]);
|
|
5302
|
-
const withStatus = def.status === void 0
|
|
5313
|
+
const withStatus = def.status === void 0 ? [] : [["getStatus", async () => this.readMerged(deviceId, def.name)]];
|
|
5303
5314
|
return Object.fromEntries([...answers, ...withStatus]);
|
|
5304
5315
|
}
|
|
5305
5316
|
refuse(deviceId, capName, reason) {
|
|
@@ -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-DhbzVygm.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 { Ti as logDestinationCapability, ps as BaseAddon } from "../../dist-CIyyHwVx.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-DhbzVygm.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-BzM19ASO.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-1A7HAX3x.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
|
const require_cap_call_scope = require("../../cap-call-scope-8eiugfLl.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $o as helperMembers, $r as internalActionId, Ba as schedulersCapability, Bi as normalizeActionUnits, Br as fanPresetsCapability, Bt as PowerSourceInfoSchema, C as COMPOSER_RUNNER_ID, Cc as hydrateSchema, Co as validateSchedulerInput, Ea as resolveHeroLayout, Fc as isSecretRefOwnedBy, Gn as checkTemplatePayload, Hi as normalizeCoreBlockWrite, In as buildHeroModel, Jc as resolveSecretMarkers, Jn as collectWhenMirrorSources, Jo as compositionSourceKey, Kt as REMOTE_MEDIA_COMMANDS, La as runSteps, Ls as RecordIntegrationInstances, M as CoreBlockSchema, Ma as resolveRemoteSource, Mn as buildActionSteps, Mo as COMPOSER_ADDON_ID, Mr as evaluateStepCondition, Nc as isSecretMarker, Nn as buildCapabilityLookup, No as CompositionSchema, Nr as evaluateWhenTree, Oo as weekdayOfLocalDate, Pa as resolveStepArgs, Po as DAY_MS, Qc as secretTreeFromSchema, Qr as integrationInstancesCapability, St as INTERNAL_ACTION_PREFIX, T as CORE_BLOCK_ADDON_PREFIX, Ta as resolveCoreBlockFiles, Tn as appendTrace, Ui as normalizeStepTargets, Uo as composedDeviceRef, Ur as findChannelSource, Vi as normalizeCapStep, Vn as capUnitResolver, Wa as seedInstanceOnce, Wo as composedDeviceStableId, Wt as QuantityUnitError, Xt as RemoteLayoutPayloadSchema, Yc as ruleFireOfClaim, Ys as actionEffect, Yt as RemoteAssumedStateSchema, Za as siteFor, Zn as compileScalarOverride, Zr as heroLayoutCapability, Zt as RunningStateStatusSchema, _a as remoteCapability, _c as entryBody, _n as actionsCapability, _o as timedRunSeconds, _r as describeComposableCaps, ac as collectSecretMarkerRefs, al as vocabActionIdFor, ar as coreBlockSourceKind, at as EMPTY_AUTOMATION_STATE, ba as replacedFieldKeys, bi as localDateOf, c as ActionError, cc as commandOrigin$1, ci as isInternalActionId, ct as FAN_CAPTURE_FIELDS, d as ActionTargetResolver, dc as defineAddonMigrations, dl as errMsg$1, dn as TemplateKindSchema, er as compositionSourceRefs, es as historyRetentionFromSettings, et as DeclaredDevices, f as ActionVariableSchema, fa as readStoredRemoteConfig, fo as templateCapability, ft as FanPresetSchema, gn as actionWaitTotalMs, go as timedRunQuickRun, h as BUILTIN_REMOTE_COMPONENTS, hn as actionSourceCapability, ho as timedRunMaxIn, ia as powerSourceLinkOfComposition, ir as coreBlockIdFromAddonId, j as ControlStatusSchema, jo as zoneOnlySite, jt as MediaPlayerStatusSchema, k as ConditionMirror, l as ActionMinDelaySecSchema, la as projectDeviceRow, lr as customKeyOfRole, m as AutomationStateDocSchema, mc as defineRecordKinds, mi as kebabToCamel, mo as timedRunLimitOf, n as ACTION_TARGET_INVALIDATION_EVENTS, nn as SchedulerSchema, nr as coreBlockAddonId, oa as problemsBlockSave, or as coreBlocksCapability, ot as EMPTY_REMOTE_ASSUMED_STATE, pc as defineEntryKind, pl as EventCategory$1, po as timedRunCapability, ps as BaseAddon, qi as occurrenceOn, qn as collectDeviceTemplates, ra as powerSourceCapability, rl as transformSecretWrite, rr as coreBlockComposition, s as ALL_CAPABILITY_DEFINITIONS, st as EMPTY_REMOTE_CONFIG, ta as planComposition, tn as SchedulerError, to as stableIdMapOf, u as ActionStepSchema, ua as proposeRunningThreshold, ul as DeviceType$1, un as SwitchStatusSchema, ut as FanControlStatusSchema, va as remoteLayoutComponentsCapability, vn as addonIdOfActionId, vo as toTimings, w as CORE_BLOCKS_ADDON_ID, wa as resolveCoreBlockEntry, wi as lockDoorLinkOfComposition, xa as resolveActionVariables, xo as validateComposition, xt as IDLE_ACTION_STATUS, ya as remoteSourceSteps, z as DEFAULT_HOLD_OVERRIDE, zi as nextOccurrence, zo as HelperMemberSchema } from "../../dist-CIyyHwVx.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, r as isRecord$1, t as describeCompositionSources } from "../../composition-sources-
|
|
4
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
3
|
+
import { i as parseDeviceStateChanged, r as isRecord$1, t as describeCompositionSources } from "../../composition-sources-CyJ0d6Sc.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-B0yQx6hA.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 { n as readCurrentCommandOrigin } from "../../cap-call-scope-Bic6Ekfw.mjs";
|
|
@@ -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-DhbzVygm.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-1A7HAX3x.js");
|
|
8
8
|
const require_retention = require("../../retention-BcOSL6b9.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 { Ac as isReadingQuantity, Bs as RecordTooLargeError, Cr as deviceRemovalHookCapability, Dr as deviceTransitionsCapability, En as armRemovalReconcile, H as DEVICE_HISTORY_ENERGY_KEY, Sc as historyUnitFor, _t as HISTORY_ITEM_CATALOG, bs as DeviceTransitionSchema, fs as wattMillisecondsToKwh, gc as emitReadiness, gt as HISTORY_CATALOG, mc as defineRecordKinds, pl as EventCategory, ps as BaseAddon, tt as DeviceRunSchema, ul as DeviceType, wr as deviceRunsCapability, ws as InvalidRecordError, xr as deviceHistoryCapability } from "../../dist-CIyyHwVx.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-B0yQx6hA.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-CUOVI1p7.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -16,10 +16,13 @@ import type { DeviceRow, DeviceRowStore } from "./device-row-store.js";
|
|
|
16
16
|
import type { StaleWrapperActivations } from "./stale-wrapper-activations.js";
|
|
17
17
|
import type { WriteLock } from "./write-lock.js";
|
|
18
18
|
/** Push-fed remote native-cap cache shape (numeric deviceId → capName → owner). */
|
|
19
|
-
export
|
|
20
|
-
addonId: string;
|
|
21
|
-
nodeId: string;
|
|
22
|
-
|
|
19
|
+
export interface RemoteNativeCapInfo {
|
|
20
|
+
readonly addonId: string;
|
|
21
|
+
readonly nodeId: string;
|
|
22
|
+
/** The cap's methods the remote provider implements; absent = all (older worker). */
|
|
23
|
+
readonly implementedMethods?: string[];
|
|
24
|
+
}
|
|
25
|
+
export type RemoteNativeCaps = Map<number, Map<string, RemoteNativeCapInfo>>;
|
|
23
26
|
/**
|
|
24
27
|
* Low-level dependencies the binding resolver needs. Assembled by the addon
|
|
25
28
|
* from its own (mostly private) state and passed in explicitly — no hidden
|
|
@@ -40,6 +40,8 @@ export declare class DeviceManagerAddon extends BaseAddon {
|
|
|
40
40
|
* populated. Stopped in `onShutdown`.
|
|
41
41
|
*/
|
|
42
42
|
private propagator;
|
|
43
|
+
/** Stops the bindings → features subscription; run in `onShutdown`. */
|
|
44
|
+
private unsubscribeFeatureDeriver;
|
|
43
45
|
/**
|
|
44
46
|
* Hub-side mirror of every device's cap-keyed runtime state.
|
|
45
47
|
* Populated whenever any caller writes via `deviceState.setCapSlice`
|