@camstack/system 1.2.208 → 1.2.210

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 (53) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  8. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  9. package/dist/builtins/console-logging/index.js +1 -1
  10. package/dist/builtins/console-logging/index.mjs +1 -1
  11. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  12. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  13. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  15. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  16. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  17. package/dist/builtins/hub-forwarder/index.js +1 -1
  18. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  19. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  20. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  21. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  22. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  23. package/dist/builtins/local-network/local-network.addon.js +1 -1
  24. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  25. package/dist/builtins/loki-logging/index.js +1 -1
  26. package/dist/builtins/loki-logging/index.mjs +1 -1
  27. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  28. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  29. package/dist/builtins/platform-probe/index.js +1 -1
  30. package/dist/builtins/platform-probe/index.mjs +1 -1
  31. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  32. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  33. package/dist/builtins/snapshot/index.js +1 -1
  34. package/dist/builtins/snapshot/index.mjs +1 -1
  35. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  36. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  38. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  39. package/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +52 -0
  40. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +13 -0
  41. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +112 -3
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +112 -3
  43. package/dist/builtins/system-config/system-config.addon.js +1 -1
  44. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  45. package/dist/builtins/winston-logging/index.js +1 -1
  46. package/dist/builtins/winston-logging/index.mjs +1 -1
  47. package/dist/{dist-CEUwB91M.js → dist-C_WvDOQ9.js} +141 -69
  48. package/dist/{dist-BTJq0ddi.mjs → dist-GU5g4fSq.mjs} +141 -69
  49. package/dist/index.js +1 -1
  50. package/dist/index.mjs +1 -1
  51. package/dist/{retired-settings-keys-DtPZcaQ_.js → retired-settings-keys-BpasSgff.js} +1 -1
  52. package/dist/{retired-settings-keys-BZZPFp77.mjs → retired-settings-keys-qv-MlPVD.mjs} +1 -1
  53. package/package.json +1 -1
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, bn as EventCategory, k as addonPagesCapability, qt as errMsg } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, bn as EventCategory, k as addonPagesCapability, qt as errMsg } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, bn as EventCategory, j as addonWidgetsCapability, qt as errMsg } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, bn as EventCategory, j as addonWidgetsCapability, qt as errMsg } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, M as alertsCapability, bn as EventCategory, n as AlertSchema, qt as errMsg, sn as createEvent } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, M as alertsCapability, bn as EventCategory, n as AlertSchema, qt as errMsg, sn as createEvent } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Bt as storageOccupancyCapability, Jt as BaseAddon, P as backupCapability, bn as EventCategory, yt as mayWriteToLocation } from "../../dist-BTJq0ddi.mjs";
1
+ import { Bt as storageOccupancyCapability, Jt as BaseAddon, P as backupCapability, bn as EventCategory, yt as mayWriteToLocation } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, ht as logDestinationCapability } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, ht as logDestinationCapability } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
3
+ const require_dist = require("../../dist-C_WvDOQ9.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 { B as coreBlockIdFromAddonId, Jt as BaseAddon, V as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, qt as errMsg, s as CORE_BLOCKS_ADDON_ID, z as coreBlockAddonId } from "../../dist-BTJq0ddi.mjs";
1
+ import { B as coreBlockIdFromAddonId, Jt as BaseAddon, V as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, qt as errMsg, s as CORE_BLOCKS_ADDON_ID, z as coreBlockAddonId } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-DtPZcaQ_.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-BpasSgff.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 { $t as DeviceRole, G as deviceManagerCapability, Jt as BaseAddon, K as deviceStateCapability, L as buildStreamParamsConfigSchema, Mt as runtimeStatePolicyFor, Qt as DeviceFeature, S as STREAM_PROFILE_META, St as normalizeUnit, X as enumerateItemArrayFields, Z as enumerateSchemaFields, a as CAMERA_SWITCH_ORDER, bn as EventCategory, en as DeviceType, f as DeviceStatusSchema, fn as isDeviceConfigCap, kt as resolveContainerPrimaryChild, o as CAP_NAMES_WITH_STATUS, q as deviceStatusCapability, qt as errMsg, rn as WELL_KNOWN_TAB_MAP, t as ALL_CAPABILITY_DEFINITIONS, wt as parseStreamParamsFormPatch, yn as sleep } from "../../dist-BTJq0ddi.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-BZZPFp77.mjs";
1
+ import { $t as DeviceRole, G as deviceManagerCapability, Jt as BaseAddon, K as deviceStateCapability, L as buildStreamParamsConfigSchema, Mt as runtimeStatePolicyFor, Qt as DeviceFeature, S as STREAM_PROFILE_META, St as normalizeUnit, X as enumerateItemArrayFields, Z as enumerateSchemaFields, a as CAMERA_SWITCH_ORDER, bn as EventCategory, en as DeviceType, f as DeviceStatusSchema, fn as isDeviceConfigCap, kt as resolveContainerPrimaryChild, o as CAP_NAMES_WITH_STATUS, q as deviceStatusCapability, qt as errMsg, rn as WELL_KNOWN_TAB_MAP, t as ALL_CAPABILITY_DEFINITIONS, wt as parseStreamParamsFormPatch, yn as sleep } from "../../dist-GU5g4fSq.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-qv-MlPVD.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { F as bareAddonId, J as doorbellCapability, Jt as BaseAddon, Q as evaluateSensorEdge, b as SOURCE_DEVICE_TYPES, bn as EventCategory, ct as isSameAddonId, en as DeviceType, lt as isSourceCap, qt as errMsg, sn as createEvent, y as SOURCE_CAPS } from "../../dist-BTJq0ddi.mjs";
1
+ import { F as bareAddonId, J as doorbellCapability, Jt as BaseAddon, Q as evaluateSensorEdge, b as SOURCE_DEVICE_TYPES, bn as EventCategory, ct as isSameAddonId, en as DeviceType, lt as isSourceCap, qt as errMsg, sn as createEvent, y as SOURCE_CAPS } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, ht as logDestinationCapability } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, ht as logDestinationCapability } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
3
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, bn as EventCategory, qt as errMsg, sn as createEvent, v as RecordingStatusSchema } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, bn as EventCategory, qt as errMsg, sn as createEvent, v as RecordingStatusSchema } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { C as ScopedTokenSchema, Jt as BaseAddon, N as authProviderCapability, O as UserRecordSchema, Ut as userManagementCapability, r as ApiKeyRecordSchema } from "../../dist-BTJq0ddi.mjs";
2
+ import { C as ScopedTokenSchema, Jt as BaseAddon, N as authProviderCapability, O as UserRecordSchema, Ut as userManagementCapability, r as ApiKeyRecordSchema } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
3
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, bn as EventCategory, mt as localNetworkCapability } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, bn as EventCategory, mt as localNetworkCapability } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, ht as logDestinationCapability } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, ht as logDestinationCapability } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Dt as reducePoints, Jt as BaseAddon, Ot as resolveBucketMs, bn as EventCategory, bt as metricsProviderCapability, nt as foldSnapshotByFunction, qt as errMsg, sn as createEvent } from "../../dist-BTJq0ddi.mjs";
1
+ import { Dt as reducePoints, Jt as BaseAddon, Ot as resolveBucketMs, bn as EventCategory, bt as metricsProviderCapability, nt as foldSnapshotByFunction, qt as errMsg, sn as createEvent } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Ft as scoreRuntimes, Jt as BaseAddon, Tt as platformProbeCapability, Y as enumerateInferenceDevices, bn as EventCategory, ln as emitReadiness, qt as errMsg } from "../../dist-BTJq0ddi.mjs";
2
+ import { Ft as scoreRuntimes, Jt as BaseAddon, Tt as platformProbeCapability, Y as enumerateInferenceDevices, bn as EventCategory, ln as emitReadiness, qt as errMsg } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, bn as EventCategory } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, bn as EventCategory } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { F as bareAddonId, Ht as streamQualityLabel, I as batteryCapability, Jt as BaseAddon, Lt as snapshotCapability, Qt as DeviceFeature, W as deriveBatteryPresence, bn as EventCategory, en as DeviceType, i as BatteryStatusSchema, pn as nodePin, qt as errMsg } from "../../dist-BTJq0ddi.mjs";
1
+ import { F as bareAddonId, Ht as streamQualityLabel, I as batteryCapability, Jt as BaseAddon, Lt as snapshotCapability, Qt as DeviceFeature, W as deriveBatteryPresence, bn as EventCategory, en as DeviceType, i as BatteryStatusSchema, pn as nodePin, qt as errMsg } from "../../dist-GU5g4fSq.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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.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 { Jt as BaseAddon, Vt as storageProviderCapability, tt as filesystemBrowseCapability } from "../../dist-BTJq0ddi.mjs";
1
+ import { Jt as BaseAddon, Vt as storageProviderCapability, tt as filesystemBrowseCapability } from "../../dist-GU5g4fSq.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";
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Moving a location's bytes when its root is re-pointed.
3
+ *
4
+ * ## Why this exists, and why only for singletons
5
+ *
6
+ * A `multi` location moves the sanctioned way: register a second instance,
7
+ * drain the first, watch it empty (D386). A **singleton** cannot — the
8
+ * cardinality guard in `upsertLocation` refuses the second instance by
9
+ * declaration, so there is no destination to drain into. For those, editing
10
+ * the `basePath` IS the migration, and either it carries the data or the data
11
+ * is stranded.
12
+ *
13
+ * It was stranded. On 2026-09-08 the `artifacts` root moved and 320 enrolled
14
+ * gallery blobs stayed at the previous path — invisible until every face in the
15
+ * Review panel answered 404, and one boot away from being collected as "the
16
+ * pixels are gone" by a reconcile that had no way to know better.
17
+ *
18
+ * ## The order is the safety property
19
+ *
20
+ * copy → verify → (caller saves the row) → delete. A crash at any point leaves
21
+ * the bytes somewhere that a location still points at: before the row moves,
22
+ * that is the OLD root; after it, the new one holds a verified copy. Nothing
23
+ * here deletes anything until every file has landed and been read back.
24
+ *
25
+ * A failure ABORTS with nothing deleted, so the caller can refuse the edit and
26
+ * leave the operator pointing at intact data.
27
+ *
28
+ * I/O is injected: the walk and the ordering are what matter and they are
29
+ * testable without a filesystem.
30
+ */
31
+ /** The four operations a move needs, in the caller's own terms. */
32
+ export interface RepointMoveIo {
33
+ /** Entries directly under `prefix` (undefined = the root), as relative paths. */
34
+ list(prefix: string | undefined): Promise<readonly string[]>;
35
+ /** Bytes of a source file. THROWS when the path is a directory. */
36
+ read(relativePath: string): Promise<Uint8Array<ArrayBuffer>>;
37
+ /** Write into the destination root. */
38
+ write(relativePath: string, data: Uint8Array<ArrayBuffer>): Promise<void>;
39
+ /** Read back from the DESTINATION, to prove the copy landed. */
40
+ readBack(relativePath: string): Promise<Uint8Array<ArrayBuffer>>;
41
+ /** Remove one file from the source root. */
42
+ deleteSource(relativePath: string): Promise<void>;
43
+ }
44
+ export interface RepointMoveResult {
45
+ readonly files: number;
46
+ readonly bytes: number;
47
+ }
48
+ /**
49
+ * Copy every file from the source root to the destination, verify each, then
50
+ * delete the originals. Throws with NOTHING deleted if any copy fails.
51
+ */
52
+ export declare function moveLocationTree(io: RepointMoveIo): Promise<RepointMoveResult>;
@@ -133,6 +133,19 @@ export declare class StorageOrchestratorAddon extends BaseAddon<StorageOrchestra
133
133
  */
134
134
  private declaredSecretKeys;
135
135
  /** Which keys of a given stored config must never leave this process. */
136
+ /**
137
+ * Move a singleton location's bytes when its root changes.
138
+ *
139
+ * Runs BEFORE the row is saved: a copy that fails throws out of the mutation,
140
+ * so the location keeps pointing at the intact original and the operator is
141
+ * told why rather than discovering it in a blank panel weeks later.
142
+ * `moveLocationTree` deletes nothing until every file has been read back from
143
+ * the destination.
144
+ *
145
+ * A no-op for everything else — a rename, a mode change, a `multi` kind, or a
146
+ * location being created for the first time.
147
+ */
148
+ private carryDataOnRepoint;
136
149
  private secretKeysFor;
137
150
  /**
138
151
  * Ring the doorbell: the SET of storage locations changed (D387).
@@ -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-CEUwB91M.js");
6
+ const require_dist = require("../../dist-C_WvDOQ9.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1107,6 +1107,56 @@ function buildStorageLocationRegistry(perAddon) {
1107
1107
  };
1108
1108
  }
1109
1109
  //#endregion
1110
+ //#region src/builtins/storage-orchestrator/location-repoint-move.ts
1111
+ /**
1112
+ * Walk the source root and collect FILES.
1113
+ *
1114
+ * The storage cap's `list` reports names without saying which are directories,
1115
+ * so the walk decides by asking: an entry that lists children is a directory,
1116
+ * and one that lists none is a leaf. A leaf that turns out not to be readable
1117
+ * (an empty directory) is skipped by the copy loop, which is the only place
1118
+ * that can tell — and skipping it is right, since there is nothing to move.
1119
+ */
1120
+ async function collectFiles(io, prefix) {
1121
+ const entries = await io.list(prefix);
1122
+ const files = [];
1123
+ for (const entry of entries) {
1124
+ if ((await io.list(entry)).length > 0) {
1125
+ files.push(...await collectFiles(io, entry));
1126
+ continue;
1127
+ }
1128
+ files.push(entry);
1129
+ }
1130
+ return files;
1131
+ }
1132
+ /**
1133
+ * Copy every file from the source root to the destination, verify each, then
1134
+ * delete the originals. Throws with NOTHING deleted if any copy fails.
1135
+ */
1136
+ async function moveLocationTree(io) {
1137
+ const candidates = await collectFiles(io);
1138
+ const copied = [];
1139
+ let bytes = 0;
1140
+ for (const relativePath of candidates) {
1141
+ let data;
1142
+ try {
1143
+ data = await io.read(relativePath);
1144
+ } catch {
1145
+ continue;
1146
+ }
1147
+ await io.write(relativePath, data);
1148
+ const landed = await io.readBack(relativePath);
1149
+ if (landed.length !== data.length) throw new Error(`location repoint: size mismatch after copying "${relativePath}" (${String(landed.length)} != ${String(data.length)}) — nothing deleted`);
1150
+ copied.push(relativePath);
1151
+ bytes += data.length;
1152
+ }
1153
+ for (const relativePath of copied) await io.deleteSource(relativePath);
1154
+ return {
1155
+ files: copied.length,
1156
+ bytes
1157
+ };
1158
+ }
1159
+ //#endregion
1110
1160
  //#region src/builtins/storage-orchestrator/access-guards.ts
1111
1161
  /**
1112
1162
  * May `storage.resolve` return a path for this location?
@@ -3300,10 +3350,12 @@ var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
3300
3350
  upsertLocation: async (input) => {
3301
3351
  const stored = service.getLocationById(input.id);
3302
3352
  const config = restoreRedactedSecrets(input.config, stored?.config, this.secretKeysFor(input.providerId, stored?.config ?? {}));
3303
- const saved = service.upsertLocation(config === input.config ? input : {
3353
+ const next = config === input.config ? input : {
3304
3354
  ...input,
3305
3355
  config
3306
- });
3356
+ };
3357
+ await this.carryDataOnRepoint(stored, next);
3358
+ const saved = service.upsertLocation(next);
3307
3359
  this.announceLocationsChanged(saved.id, saved.type, "upsert");
3308
3360
  return this.redacted(saved);
3309
3361
  },
@@ -3796,6 +3848,63 @@ var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
3796
3848
  return this.secretKeysByProvider.get(providerId);
3797
3849
  }
3798
3850
  /** Which keys of a given stored config must never leave this process. */
3851
+ /**
3852
+ * Move a singleton location's bytes when its root changes.
3853
+ *
3854
+ * Runs BEFORE the row is saved: a copy that fails throws out of the mutation,
3855
+ * so the location keeps pointing at the intact original and the operator is
3856
+ * told why rather than discovering it in a blank panel weeks later.
3857
+ * `moveLocationTree` deletes nothing until every file has been read back from
3858
+ * the destination.
3859
+ *
3860
+ * A no-op for everything else — a rename, a mode change, a `multi` kind, or a
3861
+ * location being created for the first time.
3862
+ */
3863
+ async carryDataOnRepoint(stored, next) {
3864
+ if (stored === void 0) return;
3865
+ const service = this.service;
3866
+ if (service === null) return;
3867
+ if (service.listDeclarations().find((entry) => entry.id === next.type)?.cardinality !== "single") return;
3868
+ const from = stored.config["basePath"];
3869
+ const to = next.config["basePath"];
3870
+ if (typeof from !== "string" || typeof to !== "string" || from === to) return;
3871
+ const source = await service.getProviderFor(stored);
3872
+ const target = {
3873
+ ...stored,
3874
+ config: next.config
3875
+ };
3876
+ const destination = await service.getProviderFor(target);
3877
+ const moved = await moveLocationTree({
3878
+ list: (prefix) => source.list(prefix === void 0 ? { location: stored } : {
3879
+ location: stored,
3880
+ prefix
3881
+ }),
3882
+ read: (relativePath) => source.read({
3883
+ location: stored,
3884
+ relativePath
3885
+ }),
3886
+ write: (relativePath, data) => destination.write({
3887
+ location: target,
3888
+ relativePath,
3889
+ data
3890
+ }),
3891
+ readBack: (relativePath) => destination.read({
3892
+ location: target,
3893
+ relativePath
3894
+ }),
3895
+ deleteSource: (relativePath) => source.delete({
3896
+ location: stored,
3897
+ relativePath
3898
+ })
3899
+ });
3900
+ this.ctx.logger.info("storage-orchestrator: singleton location re-pointed — its data was carried over", { meta: {
3901
+ id: stored.id,
3902
+ type: stored.type,
3903
+ from,
3904
+ to,
3905
+ ...moved
3906
+ } });
3907
+ }
3799
3908
  secretKeysFor(providerId, config) {
3800
3909
  return secretKeysForConfig(config, this.declaredSecretKeys(providerId));
3801
3910
  }