@camstack/system 1.2.108 → 1.2.110
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/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 +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- 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 +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +22 -3
- package/dist/builtins/device-manager/device-manager.addon.mjs +22 -3
- package/dist/builtins/device-manager/device-row-store.d.ts +20 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.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/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 +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- 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/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/integration-registry.d.ts +15 -12
- package/dist/builtins/sqlite-storage/retired-collections.d.ts +52 -0
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +22 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +102 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +102 -2
- 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 +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-Ctfhlrtl.js → dist-CQkr5Kw0.js} +31 -51
- package/dist/{dist-_oC_QkQA.mjs → dist-CW4Cims4.mjs} +31 -51
- package/dist/index.js +12 -293
- package/dist/index.mjs +12 -293
- package/dist/kernel/host-externals.d.ts +1 -1
- package/dist/{retired-settings-keys-pNmoHPTg.js → retired-settings-keys-DCESas5O.js} +1 -1
- package/dist/{retired-settings-keys-Bsjf7HQ-.mjs → retired-settings-keys-DGgOxOir.mjs} +1 -1
- package/package.json +1 -2
|
@@ -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-CQkr5Kw0.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 { Gt as EventCategory, v as addonPagesCapability, vt as errMsg, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Gt as EventCategory, v as addonPagesCapability, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.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-CQkr5Kw0.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 { Gt as EventCategory, b as addonWidgetsCapability, vt as errMsg, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Gt as EventCategory, b as addonWidgetsCapability, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.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
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CQkr5Kw0.js");
|
|
7
7
|
//#region src/builtins/alerts/prune-policy.ts
|
|
8
8
|
/**
|
|
9
9
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gt as EventCategory, Mt as createEvent, n as AlertSchema, vt as errMsg, x as alertsCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Gt as EventCategory, Mt as createEvent, n as AlertSchema, vt as errMsg, x as alertsCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
//#region src/builtins/alerts/prune-policy.ts
|
|
3
3
|
/**
|
|
4
4
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let buffer = require("buffer");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as backupCapability, Gt as EventCategory, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { C as backupCapability, Gt as EventCategory, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
3
3
|
import { Buffer as Buffer$1 } from "buffer";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -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-CQkr5Kw0.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 { X as logDestinationCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.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,6 +1,6 @@
|
|
|
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-CQkr5Kw0.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as coreBlockAddonId, O as coreBlockIdFromAddonId, c as CoreBlockSchema, k as coreBlocksCapability, l as DeclaredDevices, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, vt as errMsg, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { D as coreBlockAddonId, O as coreBlockIdFromAddonId, c as CoreBlockSchema, k as coreBlocksCapability, l as DeclaredDevices, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as path$1 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_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-CQkr5Kw0.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-DCESas5O.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
10
10
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -3810,13 +3810,32 @@ var DeviceMetaStore = class {
|
|
|
3810
3810
|
//#endregion
|
|
3811
3811
|
//#region src/builtins/device-manager/device-row-store.ts
|
|
3812
3812
|
/**
|
|
3813
|
-
* @durable class=
|
|
3813
|
+
* @durable class=ledger owner=device-manager
|
|
3814
3814
|
* write="one row per device, written by `allocateDeviceId` (identity placeholder),
|
|
3815
3815
|
* `registerDevice` (full reconcile) and every meta setter (single-column patch);
|
|
3816
3816
|
* `setMetadata` patches the `metadata` column of the same row"
|
|
3817
3817
|
* retention="none — a row goes only when the operator removes the device
|
|
3818
3818
|
* (`removeDevice`), or when an integration is deleted and cascades. Bounded by the
|
|
3819
3819
|
* fleet an operator configures (974 rows on the reference hub)."
|
|
3820
|
+
*
|
|
3821
|
+
* ### Why `ledger` and not `config`
|
|
3822
|
+
*
|
|
3823
|
+
* This shipped as `class=registry`, a sixth class that does not exist —
|
|
3824
|
+
* `DURABLE_CLASSES` is `ledger | mirror | ephemeral | config | audit`, so
|
|
3825
|
+
* `check-durable-state-declared.ts` has failed since. `config` is the tempting
|
|
3826
|
+
* answer, because a device's `name` and `location` ARE operator intent. It is
|
|
3827
|
+
* the wrong one, and wrong in the dangerous direction: `config`'s rule is
|
|
3828
|
+
* *"already durable everywhere"*, and that is exactly the premise that made the
|
|
3829
|
+
* dead `devices` table look harmless right up to D183.
|
|
3830
|
+
*
|
|
3831
|
+
* Nothing else holds a device's NUMERIC id. `allocateDeviceId` mints it here
|
|
3832
|
+
* and every other store in the system keys on it — `addon-device-settings`,
|
|
3833
|
+
* `device-runtime-state`, every `pipeline-analytics:*` row, every recorder path.
|
|
3834
|
+
* That is `ledger`'s definition verbatim ("a fact only this component ever
|
|
3835
|
+
* held"), and `ledger`'s rule — *must not be pruned against a fallible read* —
|
|
3836
|
+
* is precisely the rule this collection needs (D49): a `getBindings` or an
|
|
3837
|
+
* integration listing that answers empty because it FAILED must never be
|
|
3838
|
+
* allowed to retire a device row.
|
|
3820
3839
|
*/
|
|
3821
3840
|
var DEVICE_ROWS_COLLECTION = "device-manager:devices";
|
|
3822
3841
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ct as DeviceFeature, E as buildStreamParamsConfigSchema, F as deviceStatusCapability, Gt as EventCategory, Lt as isDeviceConfigCap, N as deviceManagerCapability, Ot as WELL_KNOWN_TAB_MAP, P as deviceStateCapability, R as enumerateItemArrayFields, Tt as DeviceType, Wt as sleep, a as CAP_NAMES_WITH_STATUS, at as runtimeStatePolicyFor, et as normalizeUnit, nt as parseStreamParamsFormPatch, p as STREAM_PROFILE_META, t as ALL_CAPABILITY_DEFINITIONS, u as DeviceStatusSchema, vt as errMsg, wt as DeviceRole, yt as BaseAddon, z as enumerateSchemaFields } from "../../dist-
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { Ct as DeviceFeature, E as buildStreamParamsConfigSchema, F as deviceStatusCapability, Gt as EventCategory, Lt as isDeviceConfigCap, N as deviceManagerCapability, Ot as WELL_KNOWN_TAB_MAP, P as deviceStateCapability, R as enumerateItemArrayFields, Tt as DeviceType, Wt as sleep, a as CAP_NAMES_WITH_STATUS, at as runtimeStatePolicyFor, et as normalizeUnit, nt as parseStreamParamsFormPatch, p as STREAM_PROFILE_META, t as ALL_CAPABILITY_DEFINITIONS, u as DeviceStatusSchema, vt as errMsg, wt as DeviceRole, yt as BaseAddon, z as enumerateSchemaFields } from "../../dist-CW4Cims4.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-DGgOxOir.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
5
5
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -3805,13 +3805,32 @@ var DeviceMetaStore = class {
|
|
|
3805
3805
|
//#endregion
|
|
3806
3806
|
//#region src/builtins/device-manager/device-row-store.ts
|
|
3807
3807
|
/**
|
|
3808
|
-
* @durable class=
|
|
3808
|
+
* @durable class=ledger owner=device-manager
|
|
3809
3809
|
* write="one row per device, written by `allocateDeviceId` (identity placeholder),
|
|
3810
3810
|
* `registerDevice` (full reconcile) and every meta setter (single-column patch);
|
|
3811
3811
|
* `setMetadata` patches the `metadata` column of the same row"
|
|
3812
3812
|
* retention="none — a row goes only when the operator removes the device
|
|
3813
3813
|
* (`removeDevice`), or when an integration is deleted and cascades. Bounded by the
|
|
3814
3814
|
* fleet an operator configures (974 rows on the reference hub)."
|
|
3815
|
+
*
|
|
3816
|
+
* ### Why `ledger` and not `config`
|
|
3817
|
+
*
|
|
3818
|
+
* This shipped as `class=registry`, a sixth class that does not exist —
|
|
3819
|
+
* `DURABLE_CLASSES` is `ledger | mirror | ephemeral | config | audit`, so
|
|
3820
|
+
* `check-durable-state-declared.ts` has failed since. `config` is the tempting
|
|
3821
|
+
* answer, because a device's `name` and `location` ARE operator intent. It is
|
|
3822
|
+
* the wrong one, and wrong in the dangerous direction: `config`'s rule is
|
|
3823
|
+
* *"already durable everywhere"*, and that is exactly the premise that made the
|
|
3824
|
+
* dead `devices` table look harmless right up to D183.
|
|
3825
|
+
*
|
|
3826
|
+
* Nothing else holds a device's NUMERIC id. `allocateDeviceId` mints it here
|
|
3827
|
+
* and every other store in the system keys on it — `addon-device-settings`,
|
|
3828
|
+
* `device-runtime-state`, every `pipeline-analytics:*` row, every recorder path.
|
|
3829
|
+
* That is `ledger`'s definition verbatim ("a fact only this component ever
|
|
3830
|
+
* held"), and `ledger`'s rule — *must not be pruned against a fallible read* —
|
|
3831
|
+
* is precisely the rule this collection needs (D49): a `getBindings` or an
|
|
3832
|
+
* integration listing that answers empty because it FAILED must never be
|
|
3833
|
+
* allowed to retire a device row.
|
|
3815
3834
|
*/
|
|
3816
3835
|
var DEVICE_ROWS_COLLECTION = "device-manager:devices";
|
|
3817
3836
|
/**
|
|
@@ -2,13 +2,32 @@ import { ChildLayout, CollectionColumn, CollectionIndex, DeviceDisplayOverride,
|
|
|
2
2
|
import { RetiredRowStore } from '../sqlite-storage/retired-settings-keys.js';
|
|
3
3
|
import { PersistedDeviceMeta } from './device-meta-types.js';
|
|
4
4
|
/**
|
|
5
|
-
* @durable class=
|
|
5
|
+
* @durable class=ledger owner=device-manager
|
|
6
6
|
* write="one row per device, written by `allocateDeviceId` (identity placeholder),
|
|
7
7
|
* `registerDevice` (full reconcile) and every meta setter (single-column patch);
|
|
8
8
|
* `setMetadata` patches the `metadata` column of the same row"
|
|
9
9
|
* retention="none — a row goes only when the operator removes the device
|
|
10
10
|
* (`removeDevice`), or when an integration is deleted and cascades. Bounded by the
|
|
11
11
|
* fleet an operator configures (974 rows on the reference hub)."
|
|
12
|
+
*
|
|
13
|
+
* ### Why `ledger` and not `config`
|
|
14
|
+
*
|
|
15
|
+
* This shipped as `class=registry`, a sixth class that does not exist —
|
|
16
|
+
* `DURABLE_CLASSES` is `ledger | mirror | ephemeral | config | audit`, so
|
|
17
|
+
* `check-durable-state-declared.ts` has failed since. `config` is the tempting
|
|
18
|
+
* answer, because a device's `name` and `location` ARE operator intent. It is
|
|
19
|
+
* the wrong one, and wrong in the dangerous direction: `config`'s rule is
|
|
20
|
+
* *"already durable everywhere"*, and that is exactly the premise that made the
|
|
21
|
+
* dead `devices` table look harmless right up to D183.
|
|
22
|
+
*
|
|
23
|
+
* Nothing else holds a device's NUMERIC id. `allocateDeviceId` mints it here
|
|
24
|
+
* and every other store in the system keys on it — `addon-device-settings`,
|
|
25
|
+
* `device-runtime-state`, every `pipeline-analytics:*` row, every recorder path.
|
|
26
|
+
* That is `ledger`'s definition verbatim ("a fact only this component ever
|
|
27
|
+
* held"), and `ledger`'s rule — *must not be pruned against a fallible read* —
|
|
28
|
+
* is precisely the rule this collection needs (D49): a `getBindings` or an
|
|
29
|
+
* integration listing that answers empty because it FAILED must never be
|
|
30
|
+
* allowed to retire a device row.
|
|
12
31
|
*/
|
|
13
32
|
export declare const DEVICE_ROWS_COLLECTION = "device-manager:devices";
|
|
14
33
|
/**
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
8
8
|
/**
|
|
9
9
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as isSameAddonId, Gt as EventCategory, I as doorbellCapability, Mt as createEvent, Tt as DeviceType, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { G as isSameAddonId, Gt as EventCategory, I as doorbellCapability, Mt as createEvent, Tt as DeviceType, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
3
3
|
/**
|
|
4
4
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-CQkr5Kw0.js");
|
|
4
4
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
5
5
|
var NO_DEVICES = "liveness:no-devices";
|
|
6
6
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gt as EventCategory, Mt as createEvent, vt as errMsg, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Gt as EventCategory, Mt as createEvent, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
3
3
|
var NO_DEVICES = "liveness:no-devices";
|
|
4
4
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
9
9
|
let crypto$1 = require("crypto");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { S as authProviderCapability, _ as UserRecordSchema, ht as userManagementCapability, m as ScopedTokenSchema, r as ApiKeyRecordSchema, yt as BaseAddon } from "../../dist-
|
|
2
|
+
import { S as authProviderCapability, _ as UserRecordSchema, ht as userManagementCapability, m as ScopedTokenSchema, r as ApiKeyRecordSchema, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
3
3
|
import * as crypto$2 from "node:crypto";
|
|
4
4
|
import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import nodeCrypto from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
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-CQkr5Kw0.js");
|
|
4
4
|
let node_os = require("node:os");
|
|
5
5
|
node_os = require_chunk.__toESM(node_os);
|
|
6
6
|
//#region src/builtins/local-network/local-network.addon.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gt as EventCategory, Y as localNetworkCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Gt as EventCategory, Y as localNetworkCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
//#region src/builtins/local-network/local-network.addon.ts
|
|
4
4
|
/**
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
8
8
|
/**
|
|
9
9
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_os = require("node:os");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as metricsProviderCapability, Gt as EventCategory, Mt as createEvent, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { $ as metricsProviderCapability, Gt as EventCategory, Mt as createEvent, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import { execFile, execFileSync } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as os from "node:os";
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_os = require("node:os");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Gt as EventCategory, L as enumerateInferenceDevices, Pt as emitReadiness, ct as scoreRuntimes, rt as platformProbeCapability, vt as errMsg, yt as BaseAddon } from "../../dist-
|
|
2
|
+
import { Gt as EventCategory, L as enumerateInferenceDevices, Pt as emitReadiness, ct as scoreRuntimes, rt as platformProbeCapability, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import * as os from "node:os";
|
|
@@ -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-CQkr5Kw0.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gt as EventCategory, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Gt as EventCategory, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -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-CQkr5Kw0.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 { Ct as DeviceFeature, Gt as EventCategory, M as deriveBatteryPresence, Rt as nodePin, T as batteryCapability, Tt as DeviceType, i as BatteryStatusSchema, mt as streamQualityLabel, ut as snapshotCapability, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { Ct as DeviceFeature, Gt as EventCategory, M as deriveBatteryPresence, Rt as nodePin, T as batteryCapability, Tt as DeviceType, i as BatteryStatusSchema, mt as streamQualityLabel, ut as snapshotCapability, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { signExpiringUrl, verifyExpiringUrl } 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-CQkr5Kw0.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as filesystemBrowseCapability, pt as storageProviderCapability, yt as BaseAddon } from "../../dist-
|
|
1
|
+
import { V as filesystemBrowseCapability, pt as storageProviderCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateIntegrationInput, IIntegrationRegistry, Integration, ISettingsStoreProvider } from '@camstack/types';
|
|
2
|
+
/**
|
|
3
|
+
* The persisted INTEGRATIONS — one row per provider instance an operator (or a
|
|
4
|
+
* declaring addon) added, plus that instance's settings.
|
|
5
|
+
*
|
|
6
|
+
* It had a device half once: `devices` + `device_settings_kv`, `dev_NNNN` ids,
|
|
7
|
+
* `createDevice` / `listCameras` / `setDeviceSetting`. It was removed on
|
|
8
|
+
* 2026-08-19 with both tables ([D183](../../../../../docs/decisions/adr-0183-code-that-is-deleted-takes-its-tables-with-it.md)):
|
|
9
|
+
* measured on the reference hub it held 0 rows against 974 live devices, no
|
|
10
|
+
* production caller ever reached it, and its id-space could not be reconciled
|
|
11
|
+
* with the numeric ids every track, rule and binding in the system uses. The
|
|
12
|
+
* fleet is `device-manager:devices`. Do not add a device method here — the
|
|
13
|
+
* device authority is the device-manager, and a second one that agrees with
|
|
14
|
+
* nothing is how this half came to exist.
|
|
15
|
+
*/
|
|
2
16
|
export declare class IntegrationRegistry implements IIntegrationRegistry {
|
|
3
17
|
private readonly store;
|
|
4
18
|
constructor(backend: ISettingsStoreProvider);
|
|
@@ -22,16 +36,5 @@ export declare class IntegrationRegistry implements IIntegrationRegistry {
|
|
|
22
36
|
getIntegrationSettings(integrationId: string): Promise<Record<string, unknown>>;
|
|
23
37
|
setIntegrationSetting(integrationId: string, key: string, value: unknown): Promise<void>;
|
|
24
38
|
setIntegrationSettings(integrationId: string, settings: Record<string, unknown>): Promise<void>;
|
|
25
|
-
createDevice(input: CreateDeviceInput): Promise<PersistedDevice>;
|
|
26
|
-
getDevice(id: string): Promise<PersistedDevice | null>;
|
|
27
|
-
getDeviceByStableId(stableId: string): Promise<PersistedDevice | null>;
|
|
28
|
-
listDevices(integrationId?: string): Promise<readonly PersistedDevice[]>;
|
|
29
|
-
listCameras(): Promise<readonly PersistedDevice[]>;
|
|
30
|
-
updateDevice(id: string, updates: Partial<Pick<PersistedDevice, 'name' | 'enabled' | 'info'>>): Promise<PersistedDevice | null>;
|
|
31
|
-
deleteDevice(id: string): Promise<boolean>;
|
|
32
|
-
getDeviceSettings(deviceId: string): Promise<Record<string, unknown>>;
|
|
33
|
-
setDeviceSetting(deviceId: string, key: string, value: unknown): Promise<void>;
|
|
34
|
-
setDeviceSettings(deviceId: string, settings: Record<string, unknown>): Promise<void>;
|
|
35
39
|
private mapIntegration;
|
|
36
|
-
private mapDevice;
|
|
37
40
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { RetiredKeyLogger } from './retired-settings-keys.js';
|
|
2
|
+
import { DroppedTable, SqliteSettingsBackend } from './sqlite-settings-backend.js';
|
|
3
|
+
/** One retired-table declaration. */
|
|
4
|
+
export interface RetiredCollectionSpec {
|
|
5
|
+
/**
|
|
6
|
+
* The table name as it exists on disk. These tables are NOT namespaced —
|
|
7
|
+
* the retired code declared them bare — so this is the literal name, not a
|
|
8
|
+
* `<namespace>:<collection>` pair to be resolved.
|
|
9
|
+
*/
|
|
10
|
+
readonly collection: string;
|
|
11
|
+
/** The code that used to own it — reported, never used to address it. */
|
|
12
|
+
readonly owner: string;
|
|
13
|
+
/** Why it is dead. Cited in the log line, not re-derived at the call site. */
|
|
14
|
+
readonly reason: string;
|
|
15
|
+
}
|
|
16
|
+
/** What one drop destroyed. */
|
|
17
|
+
export interface RetiredCollectionDrop {
|
|
18
|
+
readonly collection: string;
|
|
19
|
+
readonly owner: string;
|
|
20
|
+
/** Rows the table held. Zero is the expected case and is still reported. */
|
|
21
|
+
readonly rows: number;
|
|
22
|
+
}
|
|
23
|
+
/** The engine access the purge needs. Narrow on purpose — trivially fakeable. */
|
|
24
|
+
export interface RetiredCollectionStore {
|
|
25
|
+
/** Drop `collection`, or answer `null` when it is not there. Throws on fault. */
|
|
26
|
+
drop(collection: string): Promise<DroppedTable | null>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The dead tables.
|
|
30
|
+
*
|
|
31
|
+
* `devices` / `device_settings_kv` — the device half of the
|
|
32
|
+
* integration-registry ([D183](../../../../../docs/decisions/adr-0183.md)).
|
|
33
|
+
* The registry's INTEGRATION half is live (`integrations`,
|
|
34
|
+
* `integration_settings`); its device half never had a production caller and
|
|
35
|
+
* never had a row. The fleet lives in `device-manager:devices`, under numeric
|
|
36
|
+
* ids, while these tables key on `dev_NNNN` — the two id-spaces could not be
|
|
37
|
+
* reconciled even if something had wanted to.
|
|
38
|
+
*/
|
|
39
|
+
export declare const RETIRED_COLLECTIONS: readonly RetiredCollectionSpec[];
|
|
40
|
+
/**
|
|
41
|
+
* Adapt the SQLite engine to {@link RetiredCollectionStore}.
|
|
42
|
+
*
|
|
43
|
+
* The DDL itself is the engine's — it owns the handle and the memos a drop has
|
|
44
|
+
* to evict. This module owns only the list and the reporting.
|
|
45
|
+
*/
|
|
46
|
+
export declare function retiredCollectionStoreOf(backend: SqliteSettingsBackend): RetiredCollectionStore;
|
|
47
|
+
/**
|
|
48
|
+
* Drop every retired table that is still present. Returns one entry per table
|
|
49
|
+
* actually dropped — empty when the schema is already clean, which is the
|
|
50
|
+
* steady state after the first boot that ran it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function purgeRetiredCollections(store: RetiredCollectionStore, logger: RetiredKeyLogger, specs?: readonly RetiredCollectionSpec[]): Promise<readonly RetiredCollectionDrop[]>;
|
|
@@ -20,6 +20,11 @@ interface SettingsUpdateWhereInput {
|
|
|
20
20
|
interface SettingsUpdateWhereResult {
|
|
21
21
|
readonly updated: number;
|
|
22
22
|
}
|
|
23
|
+
/** What {@link SqliteSettingsBackend.dropRetiredTable} destroyed. */
|
|
24
|
+
export interface DroppedTable {
|
|
25
|
+
/** Rows the table held at the moment it was dropped. */
|
|
26
|
+
readonly rows: number;
|
|
27
|
+
}
|
|
23
28
|
/**
|
|
24
29
|
* SQLite implementation of ISettingsBackend.
|
|
25
30
|
*
|
|
@@ -213,6 +218,23 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
|
|
|
213
218
|
/** Serialise per-column values for SQL binding: objects → JSON, booleans → 0/1. */
|
|
214
219
|
private serializeColumnValue;
|
|
215
220
|
private ensureTable;
|
|
221
|
+
/**
|
|
222
|
+
* Drop a table nothing declares any more, reporting what went with it.
|
|
223
|
+
*
|
|
224
|
+
* The DDL lives here because the engine owns the handle AND the two memos
|
|
225
|
+
* that outlive a table: `structuredTables` (schema fingerprint) and
|
|
226
|
+
* `declaredCollections` (the column set `compileFilter` resolves against).
|
|
227
|
+
* Dropping behind their backs would leave a ghost — a later declaration of
|
|
228
|
+
* the same name would be memoised as "already materialised" against a table
|
|
229
|
+
* that no longer exists.
|
|
230
|
+
*
|
|
231
|
+
* WHICH tables are retired, and the logging, are policy: they live in
|
|
232
|
+
* `retired-collections.ts`. This method knows only how to drop one.
|
|
233
|
+
*
|
|
234
|
+
* Answers `null` when the table is not there — the steady state after the
|
|
235
|
+
* first boot that ran the purge, and the case on a fresh install.
|
|
236
|
+
*/
|
|
237
|
+
dropRetiredTable(table: string): DroppedTable | null;
|
|
216
238
|
private tableInsert;
|
|
217
239
|
private tableUpdate;
|
|
218
240
|
private tableDelete;
|