@camstack/system 1.2.155 → 1.2.156

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.
Files changed (58) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +1 -1
  26. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  31. package/dist/builtins/platform-probe/index.js +1 -1
  32. package/dist/builtins/platform-probe/index.mjs +1 -1
  33. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/snapshot/index.js +1 -1
  36. package/dist/builtins/snapshot/index.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  41. package/dist/builtins/storage-orchestrator/storage-migration-coordinator.d.ts +101 -1
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +24 -0
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +348 -39
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +348 -39
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +37 -1
  46. package/dist/builtins/system-config/system-config.addon.js +1 -1
  47. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  48. package/dist/builtins/winston-logging/index.js +1 -1
  49. package/dist/builtins/winston-logging/index.mjs +1 -1
  50. package/dist/{dist-BPlfW-CG.js → dist-CDgIzo82.js} +169 -12
  51. package/dist/{dist-D_NyUV6Y.mjs → dist-LvKus-mT.mjs} +169 -12
  52. package/dist/index.js +2 -2
  53. package/dist/index.mjs +2 -2
  54. package/dist/{manifest-python-deps-BiWtkFGY.mjs → manifest-python-deps-CD14Pv0-.mjs} +1 -1
  55. package/dist/{manifest-python-deps-w48vOhGR.js → manifest-python-deps-DVODn-qc.js} +1 -1
  56. package/dist/{retired-settings-keys-DBY6ebwV.js → retired-settings-keys-BfAzWvPC.js} +1 -1
  57. package/dist/{retired-settings-keys-Bq1Tb84I.mjs → retired-settings-keys-CV4QVdXj.mjs} +1 -1
  58. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_manifest_python_deps = require("./manifest-python-deps-w48vOhGR.js");
2
+ const require_manifest_python_deps = require("./manifest-python-deps-DVODn-qc.js");
3
3
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { F as createUdsLoggerWithControl, I as LocalChildClient, It as RUNNER_RSS_BUDGET_ENV, Yt as startRunnerHeapWatch, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, en as emitHeapDiagnosticReport, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-BiWtkFGY.mjs";
1
+ import { F as createUdsLoggerWithControl, I as LocalChildClient, It as RUNNER_RSS_BUDGET_ENV, Yt as startRunnerHeapWatch, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, en as emitHeapDiagnosticReport, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-CD14Pv0-.mjs";
2
2
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
3
3
  import { register } from "node:module";
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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { Ot as errMsg, S as addonPagesCapability, kt as BaseAddon, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ot as errMsg, S as addonPagesCapability, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { Ot as errMsg, kt as BaseAddon, tn as EventCategory, w as addonWidgetsCapability } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ot as errMsg, kt as BaseAddon, tn as EventCategory, w as addonWidgetsCapability } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { Ht as createEvent, Ot as errMsg, T as alertsCapability, kt as BaseAddon, n as AlertSchema, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ht as createEvent, Ot as errMsg, T as alertsCapability, kt as BaseAddon, n as AlertSchema, tn as EventCategory } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { D as backupCapability, kt as BaseAddon, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { D as backupCapability, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-D_NyUV6Y.mjs";
1
+ import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
3
+ const require_dist = require("../../dist-CDgIzo82.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 { M as coreBlockIdFromAddonId, N as coreBlocksCapability, Ot as errMsg, c as CoreBlockSchema, j as coreBlockAddonId, kt as BaseAddon, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, u as DeclaredDevices } from "../../dist-D_NyUV6Y.mjs";
1
+ import { M as coreBlockIdFromAddonId, N as coreBlocksCapability, Ot as errMsg, c as CoreBlockSchema, j as coreBlockAddonId, kt as BaseAddon, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, u as DeclaredDevices } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-DBY6ebwV.js");
6
+ const require_dist = require("../../dist-CDgIzo82.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-BfAzWvPC.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
@@ -1,5 +1,5 @@
1
- import { A as buildStreamParamsConfigSchema, Ft as DeviceType, H as enumerateItemArrayFields, L as deviceManagerCapability, Nt as DeviceFeature, Ot as errMsg, Pt as DeviceRole, R as deviceStateCapability, Rt as WELL_KNOWN_TAB_MAP, U as enumerateSchemaFields, _ as STREAM_PROFILE_META, a as CAP_NAMES_WITH_STATUS, d as DeviceStatusSchema, en as sleep, ht as runtimeStatePolicyFor, kt as BaseAddon, lt as parseStreamParamsFormPatch, qt as isDeviceConfigCap, st as normalizeUnit, t as ALL_CAPABILITY_DEFINITIONS, tn as EventCategory, z as deviceStatusCapability } from "../../dist-D_NyUV6Y.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-Bq1Tb84I.mjs";
1
+ import { A as buildStreamParamsConfigSchema, Ft as DeviceType, H as enumerateItemArrayFields, L as deviceManagerCapability, Nt as DeviceFeature, Ot as errMsg, Pt as DeviceRole, R as deviceStateCapability, Rt as WELL_KNOWN_TAB_MAP, U as enumerateSchemaFields, _ as STREAM_PROFILE_META, a as CAP_NAMES_WITH_STATUS, d as DeviceStatusSchema, en as sleep, ht as runtimeStatePolicyFor, kt as BaseAddon, lt as parseStreamParamsFormPatch, qt as isDeviceConfigCap, st as normalizeUnit, t as ALL_CAPABILITY_DEFINITIONS, tn as EventCategory, z as deviceStatusCapability } from "../../dist-LvKus-mT.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-CV4QVdXj.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
@@ -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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { B as doorbellCapability, Ft as DeviceType, Ht as createEvent, O as bareAddonId, Ot as errMsg, Q as isSourceCap, W as evaluateSensorEdge, Z as isSameAddonId, g as SOURCE_DEVICE_TYPES, h as SOURCE_CAPS, kt as BaseAddon, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { B as doorbellCapability, Ft as DeviceType, Ht as createEvent, O as bareAddonId, Ot as errMsg, Q as isSourceCap, W as evaluateSensorEdge, Z as isSameAddonId, g as SOURCE_DEVICE_TYPES, h as SOURCE_CAPS, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-D_NyUV6Y.mjs";
1
+ import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
3
+ const require_dist = require("../../dist-CDgIzo82.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 { Ht as createEvent, Ot as errMsg, kt as BaseAddon, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ht as createEvent, Ot as errMsg, kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { E as authProviderCapability, Tt as userManagementCapability, kt as BaseAddon, r as ApiKeyRecordSchema, v as ScopedTokenSchema, x as UserRecordSchema } from "../../dist-D_NyUV6Y.mjs";
2
+ import { E as authProviderCapability, Tt as userManagementCapability, kt as BaseAddon, r as ApiKeyRecordSchema, v as ScopedTokenSchema, x as UserRecordSchema } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
3
+ const require_dist = require("../../dist-CDgIzo82.js");
4
4
  const require_tls = require("../../tls-BxQlomxd.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, nt as localNetworkCapability, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { kt as BaseAddon, nt as localNetworkCapability, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
2
2
  import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-DOTmtLCW.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } 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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-D_NyUV6Y.mjs";
1
+ import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.js");
7
7
  let node_fs_promises = require("node:fs/promises");
8
8
  let node_child_process = require("node:child_process");
9
9
  let node_util = require("node:util");
@@ -1,4 +1,4 @@
1
- import { Ht as createEvent, Ot as errMsg, ft as reducePoints, kt as BaseAddon, ot as metricsProviderCapability, pt as resolveBucketMs, q as foldSnapshotByFunction, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ht as createEvent, Ot as errMsg, ft as reducePoints, kt as BaseAddon, ot as metricsProviderCapability, pt as resolveBucketMs, q as foldSnapshotByFunction, tn as EventCategory } from "../../dist-LvKus-mT.mjs";
2
2
  import { readFile, readdir } from "node:fs/promises";
3
3
  import { execFile, execFileSync } from "node:child_process";
4
4
  import { promisify } from "node:util";
@@ -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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_util = require("node:util");
9
9
  let node_fs = require("node:fs");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ot as errMsg, V as enumerateInferenceDevices, Wt as emitReadiness, kt as BaseAddon, tn as EventCategory, ut as platformProbeCapability, vt as scoreRuntimes } from "../../dist-D_NyUV6Y.mjs";
2
+ import { Ot as errMsg, V as enumerateInferenceDevices, Wt as emitReadiness, kt as BaseAddon, tn as EventCategory, ut as platformProbeCapability, vt as scoreRuntimes } from "../../dist-LvKus-mT.mjs";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
5
5
  import * as fs from "node:fs";
@@ -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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { kt as BaseAddon, tn as EventCategory } from "../../dist-D_NyUV6Y.mjs";
1
+ import { kt as BaseAddon, tn as EventCategory } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { Ft as DeviceType, I as deriveBatteryPresence, Jt as nodePin, Nt as DeviceFeature, O as bareAddonId, Ot as errMsg, bt as snapshotCapability, i as BatteryStatusSchema, k as batteryCapability, kt as BaseAddon, tn as EventCategory, wt as streamQualityLabel } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ft as DeviceType, I as deriveBatteryPresence, Jt as nodePin, Nt as DeviceFeature, O as bareAddonId, Ot as errMsg, bt as snapshotCapability, i as BatteryStatusSchema, k as batteryCapability, kt as BaseAddon, tn as EventCategory, wt as streamQualityLabel } from "../../dist-LvKus-mT.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-BPlfW-CG.js");
6
+ const require_dist = require("../../dist-CDgIzo82.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 { Ct as storageProviderCapability, K as filesystemBrowseCapability, kt as BaseAddon } from "../../dist-D_NyUV6Y.mjs";
1
+ import { Ct as storageProviderCapability, K as filesystemBrowseCapability, kt as BaseAddon } from "../../dist-LvKus-mT.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,4 @@
1
- import { RelocateJob, StorageMigrationFootageMoveInput, StorageMigrationInput, StorageMigrationJob, StorageMigrationMediaMoveInput, StorageMigrationPlan } from '@camstack/types';
1
+ import { RelocateFootageInput, RelocateJob, RelocateMediaInput, StorageMigrationFootageMoveInput, StorageMigrationInput, StorageMigrationJob, StorageMigrationMediaMoveInput, StorageMigrationPlan, UnstampedEventMediaCount } from '@camstack/types';
2
2
  import { StorageOrchestratorService } from './storage-orchestrator.service.js';
3
3
  export interface MigrationState {
4
4
  get(): Promise<StorageMigrationJob | null>;
@@ -12,6 +12,15 @@ export interface FootageMigrationParticipant extends LeaseParticipant {
12
12
  startMove(input: StorageMigrationFootageMoveInput): Promise<{
13
13
  jobId: string;
14
14
  }>;
15
+ /**
16
+ * The SAME engine, armed without a maintenance lease — `recording.relocateFootage`.
17
+ * The `draining` phase runs after every writer has already been resumed, so
18
+ * there is no lease left to present; a lease-gated call there would be
19
+ * refused by the participant.
20
+ */
21
+ startDrain(input: RelocateFootageInput): Promise<{
22
+ jobId: string;
23
+ }>;
15
24
  getMove(jobId: string): Promise<RelocateJob | null>;
16
25
  cancelMove(jobId: string): Promise<boolean>;
17
26
  refresh(leaseId: string): Promise<void>;
@@ -20,6 +29,15 @@ export interface MediaMigrationParticipant extends LeaseParticipant {
20
29
  startMove(input: StorageMigrationMediaMoveInput): Promise<{
21
30
  jobId: string;
22
31
  }>;
32
+ /** Unleased twin of {@link startMove} — `pipelineAnalytics.relocateMedia`.
33
+ * Also the only way to run the `seal` pass, which happens BEFORE any lease
34
+ * exists. */
35
+ startDrain(input: RelocateMediaInput): Promise<{
36
+ jobId: string;
37
+ }>;
38
+ /** Rows that still carry no `locationId`. Read at plan time and re-read after
39
+ * the seal; never inferred from a seal job's terminal state. */
40
+ countUnstamped(): Promise<UnstampedEventMediaCount>;
23
41
  getMove(jobId: string): Promise<RelocateJob | null>;
24
42
  cancelMove(jobId: string): Promise<boolean>;
25
43
  refresh(leaseId: string): Promise<void>;
@@ -37,6 +55,20 @@ export interface StorageMigrationCoordinatorDeps {
37
55
  readonly newId: () => string;
38
56
  readonly sleep?: (ms: number) => Promise<void>;
39
57
  readonly pollMs?: number;
58
+ /**
59
+ * A stable key for the PHYSICAL device behind a location — the orchestrator's
60
+ * own `getLocationDeviceKey`, injected so the planner does not reach for
61
+ * `fs` itself.
62
+ *
63
+ * `null` = not answerable here. It is PATH identity (a realpath), not
64
+ * `st_dev`: two distinct directories on one filesystem produce two different
65
+ * keys and are NOT detected as the same device. And a location can carry a
66
+ * `nodeId`, in which case the realpath would have to be taken on THAT node —
67
+ * so a remote location answers `null` rather than a meaningless local
68
+ * answer. Both limits are surfaced to the operator as plan findings; neither
69
+ * is papered over.
70
+ */
71
+ readonly deviceKeyOf?: (locationId: string) => Promise<string | null>;
40
72
  }
41
73
  /**
42
74
  * Durable orchestration layer over the independent recorder and event-media
@@ -50,19 +82,87 @@ export declare class StorageMigrationCoordinator {
50
82
  private startReserved;
51
83
  constructor(deps: StorageMigrationCoordinatorDeps);
52
84
  plan(input: StorageMigrationInput): Promise<StorageMigrationPlan>;
85
+ /**
86
+ * HARD refusal: `galleryMedia` onto a volume a recordings class lives on.
87
+ *
88
+ * This is the one same-device case that is a refusal rather than a finding,
89
+ * because its consequence is silent and arrives months later — the gallery is
90
+ * wiped by the next footage wipe, quota eviction or recordings disk swap, and
91
+ * nothing at that moment points back at this migration.
92
+ *
93
+ * It can only refuse what it can SEE. `deviceKeyOf` is a realpath, so it
94
+ * catches a symlink, a bind mount and a literally-shared directory — and
95
+ * misses two distinct directories on one filesystem, and any location pinned
96
+ * to another node. Those come back `null`/distinct and produce a
97
+ * `deviceIdentityUnknown` finding instead.
98
+ */
99
+ private refuseGalleryOntoRecordingsVolume;
100
+ /** Same-device observations that are reported, not refused. */
101
+ private deviceFindings;
102
+ private deviceKey;
53
103
  start(input: StorageMigrationInput): Promise<string>;
54
104
  status(jobId?: string): Promise<StorageMigrationJob | null>;
55
105
  cancel(jobId: string): Promise<boolean>;
56
106
  /** Boot recovery resumes a durable unfinished state. A missing in-memory
57
107
  * child mover is recreated from the same copy-if-absent input. */
58
108
  recover(): Promise<void>;
109
+ /**
110
+ * The state machine. Both modes run the SAME phase handlers; only the order
111
+ * differs, which is the whole of the non-blocking design — no second mover,
112
+ * no parallel code path, nothing that can drift between the two.
113
+ *
114
+ * blocking: planning → pausing → moving → verifying → repointing →
115
+ * refreshing → resuming → done
116
+ * nonBlocking: planning → sealing → pausing → repointing → refreshing →
117
+ * resuming → draining → verifying → done
118
+ *
119
+ * Written as a straight-line sequence of `if (phase === X)` blocks so boot
120
+ * recovery re-enters at whatever phase the durable record says, exactly as
121
+ * before.
122
+ */
59
123
  private run;
60
124
  private pauseParticipants;
61
125
  private resumeParticipants;
62
126
  private releaseAfterTerminal;
127
+ /**
128
+ * Start whatever is startable, honouring the ONE constraint the engines
129
+ * impose: each is single-flight.
130
+ *
131
+ * Two lanes — the recorder's footage engine and post-analysis's media engine
132
+ * — run in parallel with each other and strictly FIFO within themselves.
133
+ * `galleryMedia` shares the media lane with `eventMedia` because it shares
134
+ * the same `MediaRelocateEngine`, which refuses a second running job; starting
135
+ * both would fail the second one instantly.
136
+ */
63
137
  private startOrResumeMoves;
64
138
  private waitForMoves;
139
+ /**
140
+ * Nail every unstamped `eventMedia`/retrain row to the location its bytes are
141
+ * ALREADY on, before anything repoints. Runs with every writer up — it moves
142
+ * no bytes at all.
143
+ *
144
+ * The gate is the RE-COUNT, not the seal job's terminal state: a seal that
145
+ * failed some rows still finishes, and "finished" is not "there are none
146
+ * left". A non-zero count here fails the job while nothing has been paused
147
+ * and nothing has been repointed, which is the cheapest possible place to
148
+ * discover it.
149
+ *
150
+ * The seal's own mover job id is deliberately NOT durable. It is idempotent
151
+ * and cheap, so a coordinator restart mid-seal simply re-runs the whole
152
+ * phase — and the count that follows is what actually decides, so a lost job
153
+ * id cannot make the gate pass.
154
+ */
155
+ private sealEventMedia;
156
+ private waitForSeal;
65
157
  private verifyMoves;
158
+ /**
159
+ * Arm one class's mover.
160
+ *
161
+ * `draining` runs after every writer has been resumed, so there is no lease
162
+ * left to present — it goes through the participants' UNLEASED entry points
163
+ * (`recording.relocateFootage` / `pipelineAnalytics.relocateMedia`), which
164
+ * are the same engines, not a second mover.
165
+ */
66
166
  private startMove;
67
167
  private moveStatus;
68
168
  private cancelMove;
@@ -81,6 +81,30 @@ export declare class StorageOrchestratorAddon extends BaseAddon<StorageOrchestra
81
81
  * per-location, never merging two distinct disks.
82
82
  */
83
83
  private locationDeviceKey;
84
+ /**
85
+ * Does this location still hold anything? A SHALLOW `readdir` of its
86
+ * `basePath` — one syscall, never a walk. `/recordings` holds one entry per
87
+ * camera, so this is cheap on a volume with millions of segments, and a
88
+ * `find`-style walk of a saturated recordings disk is precisely what must
89
+ * not happen here.
90
+ *
91
+ * **What it cannot see, stated rather than papered over:**
92
+ *
93
+ * - A location on ANOTHER node, or behind a remote provider (S3 / SFTP /
94
+ * WebDAV): its bytes are not on this filesystem and this probe answers
95
+ * `unknown`, never `empty`.
96
+ * - A location with no `basePath` — same answer.
97
+ * - The difference between "holds live footage" and "holds one stray
98
+ * lock-file". It measures BYTES ON DISK, not durable rows, so it refuses
99
+ * a location holding orphan files that no index names. That direction is
100
+ * the safe one, and `force` is the escape hatch for it.
101
+ *
102
+ * A missing root (`ENOENT`) is `empty`, not `unknown`: an unmounted disk and
103
+ * a deleted directory are indistinguishable here, and if the record's own
104
+ * path does not exist there is nothing this delete can strand. Every OTHER
105
+ * errno — `EACCES`, `EIO`, a stale NFS handle — is `unknown` and refuses.
106
+ */
107
+ private locationOccupancy;
84
108
  /** Free capacity (%) on a location's volume via `statfs`; 100 (guard inert) when unstattable. */
85
109
  private locationFreePercent;
86
110
  /** Total bytes on a location's volume via `statfs`; 0 when unstattable. */