@camstack/system 1.2.447 → 1.2.449
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/assets/device-history/icon.svg +4 -0
- package/dist/{agent-https-5DYAOJMO.js → agent-https-CMz4S56_.js} +2 -2
- package/dist/{agent-https-BWUEf6ev.mjs → agent-https-D6lRxHma.mjs} +2 -2
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +2 -2
- package/dist/builtins/alerts/alerts.addon.mjs +2 -2
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-history/capture/capture-engine.d.ts +87 -0
- package/dist/builtins/device-history/capture/capture-filter.d.ts +37 -0
- package/dist/builtins/device-history/capture/device-directory.d.ts +47 -0
- package/dist/builtins/device-history/capture/field-path.d.ts +10 -0
- package/dist/builtins/device-history/capture/point-writer.d.ts +63 -0
- package/dist/builtins/device-history/device-history.addon.d.ts +38 -0
- package/dist/builtins/device-history/device-history.addon.js +2823 -0
- package/dist/builtins/device-history/device-history.addon.mjs +2816 -0
- package/dist/builtins/device-history/index.d.ts +3 -0
- package/dist/builtins/device-history/ingest/producer-ingest.d.ts +89 -0
- package/dist/builtins/device-history/query/history-query.d.ts +69 -0
- package/dist/builtins/device-history/retention/departure-tracker.d.ts +33 -0
- package/dist/builtins/device-history/retention/retention.d.ts +67 -0
- package/dist/builtins/device-history/rollup/rollup-engine.d.ts +72 -0
- package/dist/builtins/device-history/rollup/rollup-math.d.ts +44 -0
- package/dist/builtins/device-history/runtime/history-runtime.d.ts +93 -0
- package/dist/builtins/device-history/status/counters.d.ts +55 -0
- package/dist/builtins/device-history/store/history-door.d.ts +7 -0
- package/dist/builtins/device-history/store/history-schema.d.ts +26 -0
- package/dist/builtins/device-history/store/history-store.d.ts +86 -0
- package/dist/builtins/device-history/store/row-readers.d.ts +11 -0
- package/dist/builtins/device-history/store/series-registry.d.ts +39 -0
- package/dist/builtins/device-history/time/bucket-time.d.ts +25 -0
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +4 -4
- package/dist/builtins/keychain/index.mjs +4 -4
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +3 -3
- package/dist/builtins/local-auth/local-auth.addon.mjs +3 -3
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +4 -6
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +12 -15
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +12 -15
- package/dist/builtins/sqlite-storage/vector-provider.d.ts +6 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +3 -3
- package/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-BwIIltnZ.js → composition-sources-BQmhc3se.js} +1 -1
- package/dist/{composition-sources-BmC5jAUv.mjs → composition-sources-DzuruDVY.mjs} +1 -1
- package/dist/{constants-DA_tjzIk.js → constants-BPWA-r-Y.js} +1 -1
- package/dist/{constants-6XHGmEUF.mjs → constants-gzGZbnwO.mjs} +1 -1
- package/dist/{device-ca-CnbrgfmW.js → device-ca-75rt3U_U.js} +1 -1
- package/dist/{device-ca-Bh_ClxMO.mjs → device-ca-D05nqNXE.mjs} +1 -1
- package/dist/{dist-BkNfEJKa.js → dist-Ct88catN.js} +385 -1
- package/dist/{dist-CkZIrsAP.mjs → dist-DV2ll9Hi.mjs} +356 -2
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-CoyIUWHC.mjs → hub-mdns-ciao-BPOg2iyc.mjs} +2 -2
- package/dist/{hub-mdns-ciao-m5LIr4oA.js → hub-mdns-ciao-DAU1WttG.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -7
- package/dist/index.mjs +9 -8
- package/dist/{phase6-declare-gate-BDWZuB2n.mjs → phase6-declare-gate-BJplW6tX.mjs} +1 -1
- package/dist/{phase6-declare-gate-Bl7KocEs.js → phase6-declare-gate-C6WqagkC.js} +1 -1
- package/dist/{restore-archive-B57xI5Ue.js → restore-archive-Cprdh3P9.js} +1 -1
- package/dist/{restore-archive-CMr4V7Fi.mjs → restore-archive-Jiz63mVB.mjs} +1 -1
- package/dist/{wal-maintenance-Bqm4zrNA.mjs → wal-maintenance-BineOch3.mjs} +0 -0
- package/dist/{wal-maintenance-CuG1DUca.js → wal-maintenance-mwCBe3Vr.js} +0 -0
- package/package.json +24 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-Ct88catN.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-C4cOo48M.js");
|
|
4
|
-
const require_constants = require("./constants-
|
|
4
|
+
const require_constants = require("./constants-BPWA-r-Y.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mi as defineRecordKinds } from "./dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { S as backdatedNotBefore, _ 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-DK__ETIe.mjs";
|
|
3
|
-
import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-
|
|
3
|
+
import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-gzGZbnwO.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Vr as errMsg, ma as EventCategory, ut as addonPagesCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Vr as errMsg, ft as addonWidgetsCapability, ma as EventCategory } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-Ct88catN.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_phase6_declare_gate = require("../../phase6-declare-gate-
|
|
8
|
+
const require_phase6_declare_gate = require("../../phase6-declare-gate-C6WqagkC.js");
|
|
9
9
|
//#region src/builtins/alerts/critical-push.ts
|
|
10
10
|
/** Alert categories that are critical system findings. */
|
|
11
11
|
var CRITICAL_CATEGORIES = new Set([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Mi as defineRecordKinds, Oi as createEvent, Vr as errMsg, i as AlertSchema, ma as EventCategory, pt as alertsCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-
|
|
3
|
+
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-BJplW6tX.mjs";
|
|
4
4
|
//#region src/builtins/alerts/critical-push.ts
|
|
5
5
|
/** Alert categories that are critical system findings. */
|
|
6
6
|
var CRITICAL_CATEGORIES = new Set([
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, P as FIRST_LEVEL_MACRO_CLASSES, Un as ptzAutotrackCapability, Vr as errMsg, _t as bareAddonId, ma as EventCategory, zi as isEvent } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -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-Ct88catN.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-Cprdh3P9.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, gt as backupCapability, kn as mayWriteToLocation, la as toNodeId, ma as EventCategory, mr as storageOccupancyCapability, qi as nodePin } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { _ as parseBackupSecretKey, a as BackupSnapshotRefusedError, c as backupOrchestratorRecordKinds, d as BackupEncryptionKeyStore, g as generateBackupKeyPair, h as ENCRYPTED_BACKUP_SUFFIX, i as BackupCancelledError, l as backupRecordStoresOf, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, u as BackupSeedMarkerStore } from "../../restore-archive-
|
|
3
|
+
import { _ as parseBackupSecretKey, a as BackupSnapshotRefusedError, c as backupOrchestratorRecordKinds, d as BackupEncryptionKeyStore, g as generateBackupKeyPair, h as ENCRYPTED_BACKUP_SUFFIX, i as BackupCancelledError, l as backupRecordStoresOf, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, u as BackupSeedMarkerStore } from "../../restore-archive-Jiz63mVB.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
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-Ct88catN.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 { Ct as calendarsCapability, Hr as BaseAddon, Mi as defineRecordKinds, g as CalendarPreferencesSchema } from "../../dist-DV2ll9Hi.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-Ct88catN.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as memoizePinnedFfmpeg, Br as DeviceType, Dr as buildFfmpegArgs, Hr as BaseAddon, Li as hydrateSchema, Nn as motionCapability, Oi as createEvent, Rr as DeviceFeature, Rt as declarationOwnerNodeId, Vr as errMsg, gr as streamCatalogCapability, j as DeclaredDevices, lr as snapshotCapability, ma as EventCategory, o as BaseDevice, q as MOTION_CLOSE_AFTER_MS, w as DERIVED_CAMERA_SILENCED_CAP_NAMES, wt as cameraGridLayoutCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -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_composition_sources = require("../../composition-sources-
|
|
6
|
+
const require_dist = require("../../dist-Ct88catN.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-BQmhc3se.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/shared/device-state-changed.ts
|
|
10
10
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
1
|
+
import { $t as evaluateCompositionField, Ar as composedDeviceStableId, Bn as planComposition, Br as DeviceType, Dt as composerCapability, Er as COMPOSER_ADDON_ID, Fr as createStatefulExpressionMemory, Hr as BaseAddon, Ir as disarmRoseMemory, Lr as toExpressionValue, Mr as compositionItemFieldPath, Nr as compositionSliceKey, Oi as createEvent, Or as cloneStatefulExpressionMemory, Ot as compositionFieldKey, Pr as compositionSourceKey, Vr as errMsg, f as COMPOSED_ITEM_FIXED_FIELDS, j as DeclaredDevices, jr as compositionFeatureEnabled, kr as composedDeviceRef, ma as EventCategory, nn as expressionContainsBuiltinCall, o as BaseDevice, r as ALL_CAPABILITY_DEFINITIONS, yt as buildCapabilityLookup } from "../../dist-DV2ll9Hi.mjs";
|
|
2
|
+
import { n as normalizedNativeOwner } from "../../composition-sources-DzuruDVY.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/shared/device-state-changed.ts
|
|
5
5
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Tn as logDestinationCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -1,8 +1,8 @@
|
|
|
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-Ct88catN.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-BQmhc3se.js");
|
|
6
6
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
7
7
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
8
8
|
let zod = require("zod");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as coreBlockAddonId, Bn as planComposition, Ei as collectSecretMarkerRefs, Hi as isSecretMarker, Hr as BaseAddon, Ht as describeComposableCaps, Li as hydrateSchema, Mi as defineRecordKinds, Mt as coreBlockIdFromAddonId, Nt as coreBlockSourceKind, Pn as normalizeCoreBlockWrite, Pr as compositionSourceKey, Pt as coreBlocksCapability, Vr as errMsg, Wi as isSecretRefOwnedBy, Xn as resolveCoreBlockEntry, Zn as resolveCoreBlockFiles, br as validateComposition, da as transformSecretWrite, h as CORE_BLOCK_ADDON_PREFIX, ia as resolveSecretMarkers, j as DeclaredDevices, jt as coreBlockComposition, kr as composedDeviceRef, kt as compositionSourceRefs, m as CORE_BLOCKS_ADDON_ID, p as COMPOSER_RUNNER_ID, qn as replacedFieldKeys, r as ALL_CAPABILITY_DEFINITIONS, sa as secretTreeFromSchema, v as CoreBlockSchema, yt as buildCapabilityLookup } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { t as describeCompositionSources } from "../../composition-sources-
|
|
3
|
+
import { t as describeCompositionSources } from "../../composition-sources-DzuruDVY.mjs";
|
|
4
4
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
5
5
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capture of capability fields (D850, plan §5.3), driven by the GENERATED
|
|
3
|
+
* history catalog — a field is recorded because its `*.cap.ts` says so, never
|
|
4
|
+
* because someone listed it here.
|
|
5
|
+
*
|
|
6
|
+
* For a `DeviceStateChanged { deviceId, capName, slice }` the engine:
|
|
7
|
+
* 1. ignores a cap with no catalog entry (the common case — cheap, uncounted);
|
|
8
|
+
* 2. skips an opted-out device (counted), a device whose type is not yet
|
|
9
|
+
* known (parked, then replayed once the hub answers), and a `hub` /
|
|
10
|
+
* `container` (counted: not a real device);
|
|
11
|
+
* 3. per field: skips an excluded device type, an absent or non-numeric value
|
|
12
|
+
* (null is UNKNOWN, never 0), then runs {@link decideCapture} against the
|
|
13
|
+
* last RECORDED value — change-only, deadband, capture floor;
|
|
14
|
+
* 4. buffers the point for the batched write.
|
|
15
|
+
*
|
|
16
|
+
* A change inside the capture floor is kept PENDING and emitted when the floor
|
|
17
|
+
* has passed ({@link CaptureEngine.tickPending}), so the end of a burst is never
|
|
18
|
+
* lost. Reconcile ({@link CaptureEngine.reconcile}) restores what a dropped
|
|
19
|
+
* event missed from the state mirror's snapshot.
|
|
20
|
+
*/
|
|
21
|
+
import { type CapabilityHistoryField, type DeviceHistorySubject, type IScopedLogger } from "@camstack/types";
|
|
22
|
+
import type { HistoryCounters } from "../status/counters.js";
|
|
23
|
+
import type { SeriesRegistry } from "../store/series-registry.js";
|
|
24
|
+
import type { HistoryStore, MetricRecord } from "../store/history-store.js";
|
|
25
|
+
import { type RecordedState } from "./capture-filter.js";
|
|
26
|
+
import { type DeviceDirectory } from "./device-directory.js";
|
|
27
|
+
import type { PointWriter } from "./point-writer.js";
|
|
28
|
+
export type HistoryCatalog = Readonly<Record<string, Readonly<Record<string, CapabilityHistoryField>>>>;
|
|
29
|
+
export declare const CAP_KEY_PREFIX = "cap:";
|
|
30
|
+
export declare function capSeriesKey(capName: string, fieldPath: string): string;
|
|
31
|
+
/** The metric rows of every catalog field (owner `device-history`). */
|
|
32
|
+
export declare function catalogMetrics(catalog: HistoryCatalog, now: number): readonly MetricRecord[];
|
|
33
|
+
export type SnapshotMap = Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
|
|
34
|
+
export interface CaptureEngineDeps {
|
|
35
|
+
readonly catalog: HistoryCatalog;
|
|
36
|
+
readonly registry: SeriesRegistry;
|
|
37
|
+
readonly store: HistoryStore;
|
|
38
|
+
readonly directory: DeviceDirectory;
|
|
39
|
+
readonly writer: PointWriter;
|
|
40
|
+
readonly optedOut: () => ReadonlySet<number>;
|
|
41
|
+
readonly counters: HistoryCounters;
|
|
42
|
+
readonly logger: IScopedLogger;
|
|
43
|
+
readonly clock: () => number;
|
|
44
|
+
}
|
|
45
|
+
export declare class CaptureEngine {
|
|
46
|
+
private readonly deps;
|
|
47
|
+
private readonly recorded;
|
|
48
|
+
private readonly pending;
|
|
49
|
+
private readonly parked;
|
|
50
|
+
constructor(deps: CaptureEngineDeps);
|
|
51
|
+
/** Learn the last recorded value of every cap series from the store, so a restart repeats nothing. */
|
|
52
|
+
seed(): Promise<void>;
|
|
53
|
+
/** One `DeviceStateChanged`. Synchronous: the bus must never wait on us. */
|
|
54
|
+
handleState(deviceId: number, capName: string, slice: Readonly<Record<string, unknown>>, at: number): void;
|
|
55
|
+
private consider;
|
|
56
|
+
private emit;
|
|
57
|
+
/** Emit every pending change whose capture floor has passed, stamped where the floor ended. */
|
|
58
|
+
tickPending(now: number): void;
|
|
59
|
+
private park;
|
|
60
|
+
/**
|
|
61
|
+
* Restore a missed change from the state mirror's whole snapshot: a field whose
|
|
62
|
+
* value differs from the last recorded one gets a point stamped `now`.
|
|
63
|
+
* Additive only — it never removes anything, and a snapshot that could not be
|
|
64
|
+
* read is the CALLER's failure to count (D49), not an empty snapshot.
|
|
65
|
+
*/
|
|
66
|
+
reconcile(snapshots: SnapshotMap, now: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* Forget what was "recorded" for points that never reached the store (dropped),
|
|
69
|
+
* so the next change-only comparison — and the next reconcile — starts from what
|
|
70
|
+
* is really there instead of leaving a hole until the value moves.
|
|
71
|
+
*/
|
|
72
|
+
forget(points: readonly {
|
|
73
|
+
key: string;
|
|
74
|
+
subject: DeviceHistorySubject;
|
|
75
|
+
scope: string;
|
|
76
|
+
}[]): void;
|
|
77
|
+
/** A purged series leaves no state behind. */
|
|
78
|
+
forgetSeries(series: {
|
|
79
|
+
key: string;
|
|
80
|
+
subject: string;
|
|
81
|
+
scope: string;
|
|
82
|
+
}): void;
|
|
83
|
+
/** For status and specs. */
|
|
84
|
+
pendingCount(): number;
|
|
85
|
+
/** The last recorded state of a series, for specs. */
|
|
86
|
+
lastRecorded(key: string, subjectId: string): RecordedState | undefined;
|
|
87
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-point capture decision for a cap field (D850, plan §5.3). PURE.
|
|
3
|
+
*
|
|
4
|
+
* A point is written only when the value CHANGED from the last one recorded,
|
|
5
|
+
* by more than the field's deadband, and no sooner than its capture floor:
|
|
6
|
+
*
|
|
7
|
+
* - `unchanged` — the same value again; a change-only series stores nothing;
|
|
8
|
+
* - `deadband` — a change smaller than `deadband` (absolute) or
|
|
9
|
+
* `deadbandPct` (relative to the last recorded value); a slow
|
|
10
|
+
* drift is still caught, because the comparison is against
|
|
11
|
+
* the last RECORDED value, not the last seen one;
|
|
12
|
+
* - `defer` — changed, but inside `minIntervalMs` of the last recorded
|
|
13
|
+
* point. NOT dropped: the caller keeps it pending and emits it
|
|
14
|
+
* once the floor has passed, so a burst never loses its end.
|
|
15
|
+
*/
|
|
16
|
+
import { type CapabilityHistoryField } from "@camstack/types";
|
|
17
|
+
export interface RecordedState {
|
|
18
|
+
readonly value: number;
|
|
19
|
+
readonly ts: number;
|
|
20
|
+
}
|
|
21
|
+
export type CaptureSkipReason = "unchanged" | "deadband" | "non-finite";
|
|
22
|
+
export type CaptureDecision = {
|
|
23
|
+
readonly action: "emit";
|
|
24
|
+
} | {
|
|
25
|
+
readonly action: "skip";
|
|
26
|
+
readonly reason: CaptureSkipReason;
|
|
27
|
+
} | {
|
|
28
|
+
readonly action: "defer";
|
|
29
|
+
readonly notBefore: number;
|
|
30
|
+
};
|
|
31
|
+
/** The capture floor of a field: its own `minIntervalMs`, else the kind's default. */
|
|
32
|
+
export declare function minIntervalOf(spec: CapabilityHistoryField): number;
|
|
33
|
+
export interface DecideOptions {
|
|
34
|
+
/** Reconcile restores a missed value, so the floor does not apply to it. */
|
|
35
|
+
readonly ignoreFloor?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare function decideCapture(spec: CapabilityHistoryField, recorded: RecordedState | null, value: number, now: number, options?: DecideOptions): CaptureDecision;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which devices exist and what type they are — the "real devices only" gate
|
|
3
|
+
* (`hub` and `container` are not devices anyone charts) and the
|
|
4
|
+
* `excludeDeviceTypes` gate of a history field.
|
|
5
|
+
*
|
|
6
|
+
* Built from `deviceManager.listAll({ projection: 'slim' })` at boot and every
|
|
7
|
+
* reconcile, and per device (`getDevice`) the first time a state event names one
|
|
8
|
+
* the map does not know. A FAILED read changes nothing (D49): the previous map
|
|
9
|
+
* stays, and the failure is counted and logged, never read as "no devices".
|
|
10
|
+
*/
|
|
11
|
+
import { DeviceType, type IScopedLogger } from "@camstack/types";
|
|
12
|
+
import type { HistoryCounters } from "../status/counters.js";
|
|
13
|
+
export interface DeviceTypeSource {
|
|
14
|
+
listAll(): Promise<readonly {
|
|
15
|
+
readonly id: number;
|
|
16
|
+
readonly type: DeviceType;
|
|
17
|
+
}[]>;
|
|
18
|
+
getDevice(deviceId: number): Promise<{
|
|
19
|
+
readonly id: number;
|
|
20
|
+
readonly type: DeviceType;
|
|
21
|
+
} | null>;
|
|
22
|
+
}
|
|
23
|
+
export declare function isRealDeviceType(type: DeviceType): boolean;
|
|
24
|
+
export declare class DeviceDirectory {
|
|
25
|
+
private readonly source;
|
|
26
|
+
private readonly counters;
|
|
27
|
+
private readonly logger;
|
|
28
|
+
private readonly clock;
|
|
29
|
+
private types;
|
|
30
|
+
private readonly inflight;
|
|
31
|
+
private refreshInflight;
|
|
32
|
+
private lastFullRefreshAt;
|
|
33
|
+
constructor(source: DeviceTypeSource, counters: HistoryCounters, logger: IScopedLogger, clock: () => number);
|
|
34
|
+
typeOf(deviceId: number): DeviceType | undefined;
|
|
35
|
+
size(): number;
|
|
36
|
+
/** When the full listing last ANSWERED; `null` before the first answer. */
|
|
37
|
+
lastRefreshAt(): number | null;
|
|
38
|
+
/** Ids in the directory now (the last full listing plus per-device lookups). */
|
|
39
|
+
listedIds(): ReadonlySet<number>;
|
|
40
|
+
knows(deviceId: number): boolean;
|
|
41
|
+
/** Replace the map from the full listing. Returns false (map untouched) when the read failed. */
|
|
42
|
+
refresh(): Promise<boolean>;
|
|
43
|
+
private doRefresh;
|
|
44
|
+
/** The device's type, asking the hub once when the map does not know it. */
|
|
45
|
+
ensure(deviceId: number): Promise<DeviceType | undefined>;
|
|
46
|
+
private lookup;
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The value at `path`, or `undefined` when any step is missing or not an object. */
|
|
2
|
+
export declare function readPath(slice: Readonly<Record<string, unknown>>, path: string): unknown;
|
|
3
|
+
/**
|
|
4
|
+
* The number a field contributes: a finite number for a gauge/counter, 0/1 for
|
|
5
|
+
* a boolean field. Anything else (null, undefined, a string, NaN) is NOT a
|
|
6
|
+
* reading — `null` means unknown and must never become 0.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readNumeric(slice: Readonly<Record<string, unknown>>, path: string, kind: "gauge" | "counter" | "boolean"): number | null;
|
|
9
|
+
/** A unit string a `unitFrom` sibling field states, or `null` when it states none. */
|
|
10
|
+
export declare function readUnit(slice: Readonly<Record<string, unknown>>, unitFrom: string): string | null;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The write buffer for raw points — cap-field captures and producer `record`
|
|
3
|
+
* calls alike (plan §5.3): points are buffered and written with ONE batched
|
|
4
|
+
* `upsertMany` every flush (10 s), because the capture rate is bursty and the
|
|
5
|
+
* history thread should see a handful of transactions, not hundreds.
|
|
6
|
+
*
|
|
7
|
+
* A failed write KEEPS the batch (it goes back to the front of the queue and is
|
|
8
|
+
* retried at the next flush). Both bounds drop work OUT LOUD (D391):
|
|
9
|
+
* - a point older than {@link MAX_BUFFER_AGE_MS} after a failed write;
|
|
10
|
+
* - the OLDEST points when the queue passes {@link MAX_QUEUE_POINTS}, which a
|
|
11
|
+
* flush that hangs would otherwise let grow without limit.
|
|
12
|
+
* A drop logs one ERROR with the count, one tagged line per device (rate-capped),
|
|
13
|
+
* and tells the owner through `onDropped` so the capture engine forgets that it
|
|
14
|
+
* ever "recorded" those values — otherwise the next change-only comparison runs
|
|
15
|
+
* against a value that was never stored and the hole lasts until the value moves.
|
|
16
|
+
*/
|
|
17
|
+
import type { DeviceHistorySubject, IScopedLogger } from "@camstack/types";
|
|
18
|
+
import type { SeriesRegistry } from "../store/series-registry.js";
|
|
19
|
+
import type { HistoryStore } from "../store/history-store.js";
|
|
20
|
+
import type { HistoryCounters } from "../status/counters.js";
|
|
21
|
+
export declare const FLUSH_INTERVAL_MS = 1e4;
|
|
22
|
+
export declare const MAX_BUFFER_AGE_MS = 6e4;
|
|
23
|
+
/** Beyond this many queued points the oldest are dropped. */
|
|
24
|
+
export declare const MAX_QUEUE_POINTS = 1e5;
|
|
25
|
+
export interface BufferedPoint {
|
|
26
|
+
readonly key: string;
|
|
27
|
+
readonly subject: DeviceHistorySubject;
|
|
28
|
+
readonly scope: string;
|
|
29
|
+
readonly ts: number;
|
|
30
|
+
readonly value: number;
|
|
31
|
+
readonly bufferedAt: number;
|
|
32
|
+
}
|
|
33
|
+
export interface WrittenPoints {
|
|
34
|
+
readonly seriesId: number;
|
|
35
|
+
readonly timestamps: readonly number[];
|
|
36
|
+
}
|
|
37
|
+
export interface PointWriterDeps {
|
|
38
|
+
readonly registry: SeriesRegistry;
|
|
39
|
+
readonly store: HistoryStore;
|
|
40
|
+
readonly counters: HistoryCounters;
|
|
41
|
+
readonly logger: IScopedLogger;
|
|
42
|
+
readonly clock: () => number;
|
|
43
|
+
/** Called after a batch landed, so the rollup engine can mark the buckets dirty. */
|
|
44
|
+
readonly onWritten: (written: readonly WrittenPoints[]) => void;
|
|
45
|
+
/** Called with points that were buffered and then dropped. */
|
|
46
|
+
readonly onDropped: (dropped: readonly BufferedPoint[]) => void;
|
|
47
|
+
}
|
|
48
|
+
export declare class PointWriter {
|
|
49
|
+
private readonly deps;
|
|
50
|
+
private queue;
|
|
51
|
+
private flushing;
|
|
52
|
+
private lastDeviceLinesAt;
|
|
53
|
+
constructor(deps: PointWriterDeps);
|
|
54
|
+
enqueue(point: Omit<BufferedPoint, "bufferedAt">): void;
|
|
55
|
+
depth(): number;
|
|
56
|
+
/** One flush at a time; a call while one runs waits for it and returns. */
|
|
57
|
+
flush(): Promise<void>;
|
|
58
|
+
private doFlush;
|
|
59
|
+
private recordSpans;
|
|
60
|
+
private requeue;
|
|
61
|
+
/** Account for, say, and report to the owner a set of points that will never be written. */
|
|
62
|
+
private drop;
|
|
63
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* device-history — the ONE mechanism for numeric history (D850). Hub-only, its
|
|
3
|
+
* own runner (not grouped, D29): it writes through the settings door into
|
|
4
|
+
* `history.db`, a file with its own serving thread (D851), so a slow rollup can
|
|
5
|
+
* never queue behind — or in front of — configuration reads.
|
|
6
|
+
*
|
|
7
|
+
* This shell only wires: the capability provider, the bus subscription, the
|
|
8
|
+
* timers and the retention settings. The engine is {@link HistoryRuntime}.
|
|
9
|
+
*
|
|
10
|
+
* Boot waits for `onHubReachable` — the settings door and the device manager
|
|
11
|
+
* are hub capabilities, and a forked runner cannot call them from
|
|
12
|
+
* `onInitialize`. Until then the provider answers "starting" rather than an
|
|
13
|
+
* empty history (an unanswered query is not an empty one, D315).
|
|
14
|
+
*/
|
|
15
|
+
import { BaseAddon, type ConfigUISchema, type ProviderRegistration } from "@camstack/types";
|
|
16
|
+
export interface DeviceHistoryConfig extends Record<string, unknown> {
|
|
17
|
+
rawDays: number;
|
|
18
|
+
fiveMinuteDays: number;
|
|
19
|
+
hourDays: number;
|
|
20
|
+
/** `0` keeps the daily tier forever. */
|
|
21
|
+
dayDays: number;
|
|
22
|
+
}
|
|
23
|
+
/** The caller the transport stamped (never in an input schema); `null` when unstamped. */
|
|
24
|
+
export declare function callerOf(input: unknown): string | null;
|
|
25
|
+
export declare class DeviceHistoryAddon extends BaseAddon<DeviceHistoryConfig> {
|
|
26
|
+
private runtime;
|
|
27
|
+
private unsubscribe;
|
|
28
|
+
private removalHook;
|
|
29
|
+
constructor();
|
|
30
|
+
private retention;
|
|
31
|
+
private requireRuntime;
|
|
32
|
+
protected onInitialize(): Promise<ProviderRegistration[]>;
|
|
33
|
+
override onHubReachable(): Promise<void>;
|
|
34
|
+
private stopRuntime;
|
|
35
|
+
protected override onShutdown(): Promise<void>;
|
|
36
|
+
protected globalSettingsSchema(): ConfigUISchema;
|
|
37
|
+
}
|
|
38
|
+
export default DeviceHistoryAddon;
|