@camstack/server 1.2.888 → 1.2.889

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 (88) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +7 -8
  3. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/system/dist/builtins/autotrack/index.js +1 -1
  10. package/system/dist/builtins/autotrack/index.mjs +1 -1
  11. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  12. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  13. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  14. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  15. package/system/dist/builtins/camera-grid/index.js +1 -1
  16. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  17. package/system/dist/builtins/composer/composer.addon.js +4 -4
  18. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  19. package/system/dist/builtins/console-logging/index.js +1 -1
  20. package/system/dist/builtins/console-logging/index.mjs +1 -1
  21. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  22. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  23. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  24. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  25. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  26. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  27. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  28. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  29. package/system/dist/builtins/keychain/index.js +4 -4
  30. package/system/dist/builtins/keychain/index.mjs +4 -4
  31. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  32. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  33. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  34. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  35. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  36. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  37. package/system/dist/builtins/loki-logging/index.js +1 -1
  38. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  39. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  40. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  41. package/system/dist/builtins/platform-probe/index.js +1 -1
  42. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  43. package/system/dist/builtins/record-entries/index.js +1 -1
  44. package/system/dist/builtins/record-entries/index.mjs +1 -1
  45. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  46. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  47. package/system/dist/builtins/snapshot/index.js +1 -1
  48. package/system/dist/builtins/snapshot/index.mjs +1 -1
  49. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  50. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  51. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  52. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  53. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  54. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  55. package/system/dist/builtins/storage-orchestrator/location-occupancy.d.ts +1 -1
  56. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +21 -11
  57. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +21 -11
  58. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  59. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  60. package/system/dist/builtins/winston-logging/index.js +1 -1
  61. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  62. package/system/dist/{capture-engine-CIzuHcW5.mjs → capture-engine-BHLvY_so.mjs} +1 -1
  63. package/system/dist/{capture-engine-BQtS1bJu.js → capture-engine-DFKcC7u_.js} +1 -1
  64. package/system/dist/{composition-sources-BG56kyxT.mjs → composition-sources-BcZ0PuBm.mjs} +1 -1
  65. package/system/dist/{composition-sources-Ck2SVb6t.js → composition-sources-CYqL1SdI.js} +1 -1
  66. package/system/dist/{constants-BOtRWcUU.mjs → constants-DCE0x9nO.mjs} +1 -1
  67. package/system/dist/{constants-B2rCPAir.js → constants-dh68e2ow.js} +1 -1
  68. package/system/dist/{device-ca-CZ_wWfyt.js → device-ca-C8sDWceS.js} +1 -1
  69. package/system/dist/{device-ca-DKemGRa7.mjs → device-ca-CcrlsWuX.mjs} +1 -1
  70. package/system/dist/{dist-1r7BFeuz.mjs → dist-DgxQ6Idk.mjs} +36 -11
  71. package/system/dist/{dist-BC9-zzD-.js → dist-FcwhAIev.js} +36 -11
  72. package/system/dist/file-host-worker.js +1 -1
  73. package/system/dist/file-host-worker.mjs +1 -1
  74. package/system/dist/{hub-identity-CtxGsQyr.mjs → hub-identity-D3tZfKDY.mjs} +1 -1
  75. package/system/dist/{hub-identity-E3mTM7Ll.js → hub-identity-DfjMN5C2.js} +1 -1
  76. package/system/dist/{hub-mdns-ciao-CPoiWmkG.mjs → hub-mdns-ciao-CyPgxnZJ.mjs} +2 -2
  77. package/system/dist/{hub-mdns-ciao-ruddeiE8.js → hub-mdns-ciao-Do2L9s3a.js} +2 -2
  78. package/system/dist/index.js +8 -8
  79. package/system/dist/index.mjs +8 -8
  80. package/system/dist/{legacy-integration-rows-door-BwR2uJMG.mjs → legacy-integration-rows-door-C7uH7SxY.mjs} +1 -1
  81. package/system/dist/{legacy-integration-rows-door-cMhRbXzP.js → legacy-integration-rows-door-CT8Fnd_j.js} +1 -1
  82. package/system/dist/{rename-composition-block-Bcc0x_Oi.js → rename-composition-block-B7JR3e61.js} +1 -1
  83. package/system/dist/{rename-composition-block-DjVFKD_K.mjs → rename-composition-block-PCs14KlF.mjs} +1 -1
  84. package/system/dist/{restore-archive-DyFnTC0y.js → restore-archive-CpDjTbxg.js} +1 -1
  85. package/system/dist/{restore-archive-Cytts2c1.mjs → restore-archive-h6SFclX8.mjs} +1 -1
  86. package/system/dist/{wal-maintenance-GGloLxfY.mjs → wal-maintenance-B7C7iaqf.mjs} +0 -0
  87. package/system/dist/{wal-maintenance-DzJQxMoR.js → wal-maintenance-BQa-P90H.js} +0 -0
  88. package/system/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-BC9-zzD-.js");
6
+ const require_dist = require("../../dist-FcwhAIev.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { Ks as BaseAddon, Po as storageProviderCapability, ri as filesystemBrowseCapability } from "../../dist-1r7BFeuz.mjs";
1
+ import { Ks as BaseAddon, Po as storageProviderCapability, ri as filesystemBrowseCapability } from "../../dist-DgxQ6Idk.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as fs$1 from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
6
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
7
- const require_wal_maintenance = require("../../wal-maintenance-DzJQxMoR.js");
7
+ const require_wal_maintenance = require("../../wal-maintenance-BQa-P90H.js");
8
8
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
9
9
  //#region src/builtins/sqlite-storage/config-store.ts
10
10
  var ConfigStore = class {
@@ -1,5 +1,5 @@
1
1
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
2
- import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-GGloLxfY.mjs";
2
+ import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-B7C7iaqf.mjs";
3
3
  import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
4
4
  //#region src/builtins/sqlite-storage/config-store.ts
5
5
  var ConfigStore = class {
@@ -3,12 +3,12 @@ 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-BC9-zzD-.js");
6
+ const require_dist = require("../../dist-FcwhAIev.js");
7
7
  const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
8
- const require_wal_maintenance = require("../../wal-maintenance-DzJQxMoR.js");
8
+ const require_wal_maintenance = require("../../wal-maintenance-BQa-P90H.js");
9
9
  const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
10
10
  const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
11
- const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-cMhRbXzP.js");
11
+ const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-CT8Fnd_j.js");
12
12
  let zod = require("zod");
13
13
  let node_crypto = require("node:crypto");
14
14
  let node_fs = require("node:fs");
@@ -1,9 +1,9 @@
1
- import { Ao as storageAdminCapability, Ec as UnknownRecordKindError, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, I as DATABASE_SNAPSHOT_SUFFIX, Jl as EventCategory, Kc as defineCustomActions, Kl as errMsg$1, Ks as BaseAddon, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Ln as bareAddonId, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Qn as catalogueIssues, Qs as DeclarationRefusedError, R as DATA_STORE_DATABASES, Ra as recordsCapability, Sr as databaseSnapshotCapability, Wc as customAction, _c as RecordKindDeclarationSchema, ic as NoCallerError, ma as orderMigrations, oo as resolveRunnerId, pc as RUNTIME_DEFAULTS, rc as InvalidRecordError, rs as vectorStoreCapability, ta as migrationsCapability, uc as RECORD_SWEEP_INTERVAL_MS, wc as TransactRefusedError, xl as normalizeSecretOwner, xr as dataStoreProviderCapability, zc as collectSecretMarkerRefs } from "../../dist-1r7BFeuz.mjs";
1
+ import { Ao as storageAdminCapability, Ec as UnknownRecordKindError, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, I as DATABASE_SNAPSHOT_SUFFIX, Jl as EventCategory, Kc as defineCustomActions, Kl as errMsg$1, Ks as BaseAddon, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Ln as bareAddonId, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Qn as catalogueIssues, Qs as DeclarationRefusedError, R as DATA_STORE_DATABASES, Ra as recordsCapability, Sr as databaseSnapshotCapability, Wc as customAction, _c as RecordKindDeclarationSchema, ic as NoCallerError, ma as orderMigrations, oo as resolveRunnerId, pc as RUNTIME_DEFAULTS, rc as InvalidRecordError, rs as vectorStoreCapability, ta as migrationsCapability, uc as RECORD_SWEEP_INTERVAL_MS, wc as TransactRefusedError, xl as normalizeSecretOwner, xr as dataStoreProviderCapability, zc as collectSecretMarkerRefs } from "../../dist-DgxQ6Idk.mjs";
2
2
  import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-u6xQA6r7.mjs";
3
- import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-GGloLxfY.mjs";
3
+ import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-B7C7iaqf.mjs";
4
4
  import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
5
5
  import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
6
- import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-BwR2uJMG.mjs";
6
+ import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-C7uH7SxY.mjs";
7
7
  import { createRequire } from "node:module";
8
8
  import { z } from "zod";
9
9
  import { randomUUID } from "node:crypto";
@@ -10,7 +10,7 @@ export declare const STORAGE_CLASS_SUBTREES: Readonly<Record<string, readonly st
10
10
  * Occupancy of `basePath` for a location of `type`.
11
11
  *
12
12
  * - missing root → `empty` (nothing this delete can strand)
13
- * - class-mapped type → occupied iff any `<camera>/<subtree>` has an entry
13
+ * - class-mapped type → occupied iff any `<camera>/<subtree>` holds a file (empty folders do not count)
14
14
  * - other types → occupied iff the root has a non-dot entry
15
15
  */
16
16
  export declare function probeLocalDirectoryOccupancy(input: {
@@ -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-BC9-zzD-.js");
6
+ const require_dist = require("../../dist-FcwhAIev.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1320,9 +1320,10 @@ function locationSecretPortsOver(deps) {
1320
1320
  * drained `eventMedia:default` still looks full because high footage is
1321
1321
  * writing next to it (observed 2026-09-01).
1322
1322
  *
1323
- * The walk is shallow: one `readdir` of the root (one dirent per camera)
1324
- * plus `opendir`+first-entry of each named subtree. No recursive find of
1325
- * segments — that is the walk that saturates a USB disk.
1323
+ * A subtree is occupied iff a FILE exists anywhere beneath it: a drain
1324
+ * leaves empty date folders behind, and those must not block a delete. The
1325
+ * walk is depth-first and stops at the first file, so an occupied disk is
1326
+ * answered fast; only a drained tree is walked in full (directories only).
1326
1327
  */
1327
1328
  /**
1328
1329
  * Class → directories under `<root>/<camera>/`. Same map as the discard
@@ -1339,10 +1340,13 @@ function isDotEntry(name) {
1339
1340
  return name.startsWith(".");
1340
1341
  }
1341
1342
  /**
1342
- * True when `dir` exists and contains at least one dirent. Missing → false.
1343
- * Any other errno throws so the caller can answer `unknown` (D49).
1343
+ * True when `dir` exists and holds at least one non-directory entry (a file,
1344
+ * symlink, …) anywhere beneath it. Empty folders (the date directories a
1345
+ * drain leaves behind) do not count. Depth-first, stops at the first file.
1346
+ * Missing → false. Any other errno throws so the caller can answer
1347
+ * `unknown` (D49).
1344
1348
  */
1345
- async function dirHasAnyEntry(dir) {
1349
+ async function dirHasAnyFile(dir) {
1346
1350
  let handle;
1347
1351
  try {
1348
1352
  handle = await (0, node_fs_promises.opendir)(dir);
@@ -1350,17 +1354,23 @@ async function dirHasAnyEntry(dir) {
1350
1354
  if (err.code === "ENOENT") return false;
1351
1355
  throw err;
1352
1356
  }
1357
+ const subdirs = [];
1353
1358
  try {
1354
- return await handle.read() !== null;
1359
+ for await (const entry of handle) {
1360
+ if (!entry.isDirectory()) return true;
1361
+ subdirs.push(node_path.default.join(dir, entry.name));
1362
+ }
1355
1363
  } finally {
1356
- await handle.close();
1364
+ await handle.close().catch(() => void 0);
1357
1365
  }
1366
+ for (const sub of subdirs) if (await dirHasAnyFile(sub)) return true;
1367
+ return false;
1358
1368
  }
1359
1369
  /**
1360
1370
  * Occupancy of `basePath` for a location of `type`.
1361
1371
  *
1362
1372
  * - missing root → `empty` (nothing this delete can strand)
1363
- * - class-mapped type → occupied iff any `<camera>/<subtree>` has an entry
1373
+ * - class-mapped type → occupied iff any `<camera>/<subtree>` holds a file (empty folders do not count)
1364
1374
  * - other types → occupied iff the root has a non-dot entry
1365
1375
  */
1366
1376
  async function probeLocalDirectoryOccupancy(input) {
@@ -1375,7 +1385,7 @@ async function probeLocalDirectoryOccupancy(input) {
1375
1385
  const subtrees = STORAGE_CLASS_SUBTREES[input.type];
1376
1386
  if (subtrees === void 0) return visible.length > 0 ? "occupied" : "empty";
1377
1387
  try {
1378
- for (const camera of visible) for (const subtree of subtrees) if (await dirHasAnyEntry(node_path.default.join(input.basePath, camera, subtree))) return "occupied";
1388
+ for (const camera of visible) for (const subtree of subtrees) if (await dirHasAnyFile(node_path.default.join(input.basePath, camera, subtree))) return "occupied";
1379
1389
  } catch {
1380
1390
  return "unknown";
1381
1391
  }
@@ -1,4 +1,4 @@
1
- import { Ai as isLocationEnabled, El as recordSecretRef, Gc as defineAddonMigrations, Ic as buildSecretRef, Il as toSecretFieldView, Jc as defineRecordKinds, Ji as mayReadLocation, Jl as EventCategory, Kc as defineCustomActions, Ks as BaseAddon, Lc as collectSecretConfigKeys, Mo as storageMigrationCapability, Ol as resolveSecretMarkers, Wc as customAction, Yi as mayWriteToLocation, bl as normalizeNodeId, ci as gbToBytes, dc as REDACTED_SECRET, dl as isSecretClear, dn as StorageCleanupJobSchema, fl as isSecretFieldView, fn as StorageLocationModeSchema, gi as integrationInstancesCapability, gl as makeSecretMarker, jo as storageCapability, mn as StorageMigrationJobSchema, na as modeForSwitch, os as withLocationMode, pl as isSecretMarker, pn as StorageLocationTypeSchema, qr as evictionPolicyOfLocation, ra as modeMayWrite, rn as STORAGE_LOCATION_MODES, to as resolveLocationMode, wl as parseSecretRef, yo as settingsStoreCapability, zo as switchStateOfMode } from "../../dist-1r7BFeuz.mjs";
1
+ import { Ai as isLocationEnabled, El as recordSecretRef, Gc as defineAddonMigrations, Ic as buildSecretRef, Il as toSecretFieldView, Jc as defineRecordKinds, Ji as mayReadLocation, Jl as EventCategory, Kc as defineCustomActions, Ks as BaseAddon, Lc as collectSecretConfigKeys, Mo as storageMigrationCapability, Ol as resolveSecretMarkers, Wc as customAction, Yi as mayWriteToLocation, bl as normalizeNodeId, ci as gbToBytes, dc as REDACTED_SECRET, dl as isSecretClear, dn as StorageCleanupJobSchema, fl as isSecretFieldView, fn as StorageLocationModeSchema, gi as integrationInstancesCapability, gl as makeSecretMarker, jo as storageCapability, mn as StorageMigrationJobSchema, na as modeForSwitch, os as withLocationMode, pl as isSecretMarker, pn as StorageLocationTypeSchema, qr as evictionPolicyOfLocation, ra as modeMayWrite, rn as STORAGE_LOCATION_MODES, to as resolveLocationMode, wl as parseSecretRef, yo as settingsStoreCapability, zo as switchStateOfMode } from "../../dist-DgxQ6Idk.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -1315,9 +1315,10 @@ function locationSecretPortsOver(deps) {
1315
1315
  * drained `eventMedia:default` still looks full because high footage is
1316
1316
  * writing next to it (observed 2026-09-01).
1317
1317
  *
1318
- * The walk is shallow: one `readdir` of the root (one dirent per camera)
1319
- * plus `opendir`+first-entry of each named subtree. No recursive find of
1320
- * segments — that is the walk that saturates a USB disk.
1318
+ * A subtree is occupied iff a FILE exists anywhere beneath it: a drain
1319
+ * leaves empty date folders behind, and those must not block a delete. The
1320
+ * walk is depth-first and stops at the first file, so an occupied disk is
1321
+ * answered fast; only a drained tree is walked in full (directories only).
1321
1322
  */
1322
1323
  /**
1323
1324
  * Class → directories under `<root>/<camera>/`. Same map as the discard
@@ -1334,10 +1335,13 @@ function isDotEntry(name) {
1334
1335
  return name.startsWith(".");
1335
1336
  }
1336
1337
  /**
1337
- * True when `dir` exists and contains at least one dirent. Missing → false.
1338
- * Any other errno throws so the caller can answer `unknown` (D49).
1338
+ * True when `dir` exists and holds at least one non-directory entry (a file,
1339
+ * symlink, …) anywhere beneath it. Empty folders (the date directories a
1340
+ * drain leaves behind) do not count. Depth-first, stops at the first file.
1341
+ * Missing → false. Any other errno throws so the caller can answer
1342
+ * `unknown` (D49).
1339
1343
  */
1340
- async function dirHasAnyEntry(dir) {
1344
+ async function dirHasAnyFile(dir) {
1341
1345
  let handle;
1342
1346
  try {
1343
1347
  handle = await opendir(dir);
@@ -1345,17 +1349,23 @@ async function dirHasAnyEntry(dir) {
1345
1349
  if (err.code === "ENOENT") return false;
1346
1350
  throw err;
1347
1351
  }
1352
+ const subdirs = [];
1348
1353
  try {
1349
- return await handle.read() !== null;
1354
+ for await (const entry of handle) {
1355
+ if (!entry.isDirectory()) return true;
1356
+ subdirs.push(path.join(dir, entry.name));
1357
+ }
1350
1358
  } finally {
1351
- await handle.close();
1359
+ await handle.close().catch(() => void 0);
1352
1360
  }
1361
+ for (const sub of subdirs) if (await dirHasAnyFile(sub)) return true;
1362
+ return false;
1353
1363
  }
1354
1364
  /**
1355
1365
  * Occupancy of `basePath` for a location of `type`.
1356
1366
  *
1357
1367
  * - missing root → `empty` (nothing this delete can strand)
1358
- * - class-mapped type → occupied iff any `<camera>/<subtree>` has an entry
1368
+ * - class-mapped type → occupied iff any `<camera>/<subtree>` holds a file (empty folders do not count)
1359
1369
  * - other types → occupied iff the root has a non-dot entry
1360
1370
  */
1361
1371
  async function probeLocalDirectoryOccupancy(input) {
@@ -1370,7 +1380,7 @@ async function probeLocalDirectoryOccupancy(input) {
1370
1380
  const subtrees = STORAGE_CLASS_SUBTREES[input.type];
1371
1381
  if (subtrees === void 0) return visible.length > 0 ? "occupied" : "empty";
1372
1382
  try {
1373
- for (const camera of visible) for (const subtree of subtrees) if (await dirHasAnyEntry(path.join(input.basePath, camera, subtree))) return "occupied";
1383
+ for (const camera of visible) for (const subtree of subtrees) if (await dirHasAnyFile(path.join(input.basePath, camera, subtree))) return "occupied";
1374
1384
  } catch {
1375
1385
  return "unknown";
1376
1386
  }
@@ -3,11 +3,11 @@ 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-BC9-zzD-.js");
6
+ const require_dist = require("../../dist-FcwhAIev.js");
7
7
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
8
  const require_x509_es = require("../../x509.es-WtnRNyYS.js");
9
- const require_hub_identity = require("../../hub-identity-E3mTM7Ll.js");
10
- const require_constants$8 = require("../../constants-B2rCPAir.js");
9
+ const require_hub_identity = require("../../hub-identity-DfjMN5C2.js");
10
+ const require_constants$8 = require("../../constants-dh68e2ow.js");
11
11
  const require_src$1 = require("../../src-CnAqG6EF.js");
12
12
  let zod = require("zod");
13
13
  let node_crypto = require("node:crypto");
@@ -1,9 +1,9 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Kc as defineCustomActions, Kl as errMsg, Ks as BaseAddon, Wc as customAction, cn as ServerNameSchema, rl as hydrateSchema, wo as shortHostname } from "../../dist-1r7BFeuz.mjs";
2
+ import { Kc as defineCustomActions, Kl as errMsg, Ks as BaseAddon, Wc as customAction, cn as ServerNameSchema, rl as hydrateSchema, wo as shortHostname } from "../../dist-DgxQ6Idk.mjs";
3
3
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
4
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
5
- import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-CtxGsQyr.mjs";
6
- import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-BOtRWcUU.mjs";
5
+ import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-D3tZfKDY.mjs";
6
+ import { a as MESH_CA_KEY_REF, c as MESH_LEAF_NOT_AFTER, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-DCE0x9nO.mjs";
7
7
  import { t as require_src } from "../../src-hG4grMU4.mjs";
8
8
  import { z } from "zod";
9
9
  import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BC9-zzD-.js");
6
+ const require_dist = require("../../dist-FcwhAIev.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  const require_log_file_read_protocol = require("../../log-file-read-protocol-DSV_vQRb.js");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ea as preconditionOf, Gc as defineAddonMigrations, Gi as logDestinationCapability, Ks as BaseAddon } from "../../dist-1r7BFeuz.mjs";
1
+ import { Ea as preconditionOf, Gc as defineAddonMigrations, Gi as logDestinationCapability, Ks as BaseAddon } from "../../dist-DgxQ6Idk.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
3
  import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-hTaAsYlX.mjs";
4
4
  import { createRequire } from "node:module";
@@ -1,4 +1,4 @@
1
- import { Gl as DeviceType, nc as HISTORY_DEFAULT_MIN_INTERVAL_MS, tl as historyItemFieldPath } from "./dist-1r7BFeuz.mjs";
1
+ import { Gl as DeviceType, nc as HISTORY_DEFAULT_MIN_INTERVAL_MS, tl as historyItemFieldPath } from "./dist-DgxQ6Idk.mjs";
2
2
  //#region src/builtins/device-history/store/series-registry.ts
3
3
  function subjectIdOf(subject) {
4
4
  return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BC9-zzD-.js");
1
+ const require_dist = require("./dist-FcwhAIev.js");
2
2
  //#region src/builtins/device-history/store/series-registry.ts
3
3
  function subjectIdOf(subject) {
4
4
  return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
@@ -1,4 +1,4 @@
1
- import { Ds as compositionSourceKey, Kl as errMsg } from "./dist-1r7BFeuz.mjs";
1
+ import { Ds as compositionSourceKey, Kl as errMsg } from "./dist-DgxQ6Idk.mjs";
2
2
  //#region src/builtins/shared/device-state-changed.ts
3
3
  /** Structural narrowing helper for untrusted bus payloads. */
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BC9-zzD-.js");
1
+ const require_dist = require("./dist-FcwhAIev.js");
2
2
  //#region src/builtins/shared/device-state-changed.ts
3
3
  /** Structural narrowing helper for untrusted bus payloads. */
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- import { Ic as buildSecretRef } from "./dist-1r7BFeuz.mjs";
1
+ import { Ic as buildSecretRef } from "./dist-DgxQ6Idk.mjs";
2
2
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
3
3
  var MESH_CA_KEY_REF = buildSecretRef({
4
4
  owner: "system",
@@ -1,5 +1,5 @@
1
1
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
2
- var MESH_CA_KEY_REF = require("./dist-BC9-zzD-.js").buildSecretRef({
2
+ var MESH_CA_KEY_REF = require("./dist-FcwhAIev.js").buildSecretRef({
3
3
  owner: "system",
4
4
  scope: { kind: "global" },
5
5
  fieldPath: "meshCaKey"
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BC9-zzD-.js");
1
+ const require_dist = require("./dist-FcwhAIev.js");
2
2
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -1,4 +1,4 @@
1
- import { Ic as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-1r7BFeuz.mjs";
1
+ import { Ic as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-DgxQ6Idk.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -78303,6 +78303,12 @@ var HeroRowModelSchema = z.object({
78303
78303
  /** `null` = the type has no inline control, or the caller may not act on it. */
78304
78304
  primary: HeroControlSchema.nullable(),
78305
78305
  /**
78306
+ * `true` when the primary exists but the model gates it (the caller may not act): the
78307
+ * row is read-only and a client draws no control, not a fallback. `false` = nothing
78308
+ * covers the type yet. Absent = an older server.
78309
+ */
78310
+ primaryGated: z.boolean().optional(),
78311
+ /**
78306
78312
  * Beside `primary` when the device offers a timed run: Run while idle, Stop
78307
78313
  * while armed. `null` when there is no slot, or the caller may not act.
78308
78314
  */
@@ -78357,26 +78363,44 @@ function primaryOf(model) {
78357
78363
  const named = ROW_PRIMARY_BY_TYPE[model.type];
78358
78364
  if (named !== void 0) {
78359
78365
  const found = extraOf(model, named);
78360
- if (found !== null) return found;
78366
+ if (found !== null) return {
78367
+ control: found,
78368
+ gated: false
78369
+ };
78361
78370
  }
78362
78371
  const power = model.ownPower;
78363
78372
  if (power !== null) {
78364
- if (model.gated.includes("own-power")) return null;
78373
+ if (model.gated.includes("own-power")) return {
78374
+ control: null,
78375
+ gated: true
78376
+ };
78365
78377
  return {
78366
- kind: "toggle",
78367
- id: "own-power",
78368
- label: power.turnOn.label,
78369
- on: power.on,
78370
- turnOn: power.turnOn,
78371
- turnOff: power.turnOff
78378
+ control: {
78379
+ kind: "toggle",
78380
+ id: "own-power",
78381
+ label: power.turnOn.label,
78382
+ on: power.on,
78383
+ turnOn: power.turnOn,
78384
+ turnOff: power.turnOff
78385
+ },
78386
+ gated: false
78372
78387
  };
78373
78388
  }
78374
78389
  for (const row of model.rows) {
78375
78390
  const control = row.controls[0];
78376
78391
  if (control === void 0) continue;
78377
- return model.gated.includes(row.id) ? null : control;
78392
+ return model.gated.includes(row.id) ? {
78393
+ control: null,
78394
+ gated: true
78395
+ } : {
78396
+ control,
78397
+ gated: false
78398
+ };
78378
78399
  }
78379
- return null;
78400
+ return {
78401
+ control: null,
78402
+ gated: false
78403
+ };
78380
78404
  }
78381
78405
  /**
78382
78406
  * The extras of a type, by control id, in the order they are drawn. The ids are the
@@ -78443,7 +78467,7 @@ function timedRunOf(model) {
78443
78467
  }
78444
78468
  function projectDeviceRow(model) {
78445
78469
  const trailing = trailingOf(model);
78446
- const primary = primaryOf(model);
78470
+ const { control: primary, gated: primaryGated } = primaryOf(model);
78447
78471
  return {
78448
78472
  deviceId: model.deviceId,
78449
78473
  name: model.name,
@@ -78454,6 +78478,7 @@ function projectDeviceRow(model) {
78454
78478
  scene: model.scene,
78455
78479
  statusLine: statusLineOf(model, trailing),
78456
78480
  primary,
78481
+ primaryGated,
78457
78482
  timedRun: timedRunOf(model),
78458
78483
  extras: extrasOf(model, primary),
78459
78484
  trailing,
@@ -78303,6 +78303,12 @@ var HeroRowModelSchema = zod.z.object({
78303
78303
  /** `null` = the type has no inline control, or the caller may not act on it. */
78304
78304
  primary: HeroControlSchema.nullable(),
78305
78305
  /**
78306
+ * `true` when the primary exists but the model gates it (the caller may not act): the
78307
+ * row is read-only and a client draws no control, not a fallback. `false` = nothing
78308
+ * covers the type yet. Absent = an older server.
78309
+ */
78310
+ primaryGated: zod.z.boolean().optional(),
78311
+ /**
78306
78312
  * Beside `primary` when the device offers a timed run: Run while idle, Stop
78307
78313
  * while armed. `null` when there is no slot, or the caller may not act.
78308
78314
  */
@@ -78357,26 +78363,44 @@ function primaryOf(model) {
78357
78363
  const named = ROW_PRIMARY_BY_TYPE[model.type];
78358
78364
  if (named !== void 0) {
78359
78365
  const found = extraOf(model, named);
78360
- if (found !== null) return found;
78366
+ if (found !== null) return {
78367
+ control: found,
78368
+ gated: false
78369
+ };
78361
78370
  }
78362
78371
  const power = model.ownPower;
78363
78372
  if (power !== null) {
78364
- if (model.gated.includes("own-power")) return null;
78373
+ if (model.gated.includes("own-power")) return {
78374
+ control: null,
78375
+ gated: true
78376
+ };
78365
78377
  return {
78366
- kind: "toggle",
78367
- id: "own-power",
78368
- label: power.turnOn.label,
78369
- on: power.on,
78370
- turnOn: power.turnOn,
78371
- turnOff: power.turnOff
78378
+ control: {
78379
+ kind: "toggle",
78380
+ id: "own-power",
78381
+ label: power.turnOn.label,
78382
+ on: power.on,
78383
+ turnOn: power.turnOn,
78384
+ turnOff: power.turnOff
78385
+ },
78386
+ gated: false
78372
78387
  };
78373
78388
  }
78374
78389
  for (const row of model.rows) {
78375
78390
  const control = row.controls[0];
78376
78391
  if (control === void 0) continue;
78377
- return model.gated.includes(row.id) ? null : control;
78392
+ return model.gated.includes(row.id) ? {
78393
+ control: null,
78394
+ gated: true
78395
+ } : {
78396
+ control,
78397
+ gated: false
78398
+ };
78378
78399
  }
78379
- return null;
78400
+ return {
78401
+ control: null,
78402
+ gated: false
78403
+ };
78380
78404
  }
78381
78405
  /**
78382
78406
  * The extras of a type, by control id, in the order they are drawn. The ids are the
@@ -78443,7 +78467,7 @@ function timedRunOf(model) {
78443
78467
  }
78444
78468
  function projectDeviceRow(model) {
78445
78469
  const trailing = trailingOf(model);
78446
- const primary = primaryOf(model);
78470
+ const { control: primary, gated: primaryGated } = primaryOf(model);
78447
78471
  return {
78448
78472
  deviceId: model.deviceId,
78449
78473
  name: model.name,
@@ -78454,6 +78478,7 @@ function projectDeviceRow(model) {
78454
78478
  scene: model.scene,
78455
78479
  statusLine: statusLineOf(model, trailing),
78456
78480
  primary,
78481
+ primaryGated,
78457
78482
  timedRun: timedRunOf(model),
78458
78483
  extras: extrasOf(model, primary),
78459
78484
  trailing,
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.js");
2
- const require_wal_maintenance = require("./wal-maintenance-DzJQxMoR.js");
2
+ const require_wal_maintenance = require("./wal-maintenance-BQa-P90H.js");
3
3
  let node_worker_threads = require("node:worker_threads");
4
4
  //#region src/builtins/sqlite-storage/file-host-worker.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-GGloLxfY.mjs";
1
+ import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-B7C7iaqf.mjs";
2
2
  import { parentPort, threadId, workerData } from "node:worker_threads";
3
3
  //#region src/builtins/sqlite-storage/file-host-worker.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { Jc as defineRecordKinds } from "./dist-1r7BFeuz.mjs";
1
+ import { Jc as defineRecordKinds } from "./dist-DgxQ6Idk.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { z } from "zod";
4
4
  import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BC9-zzD-.js");
2
+ const require_dist = require("./dist-FcwhAIev.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
4
  let zod = require("zod");
5
5
  let node_crypto = require("node:crypto");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { Rl as userError } from "./dist-1r7BFeuz.mjs";
2
+ import { Rl as userError } from "./dist-DgxQ6Idk.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
4
- import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-CtxGsQyr.mjs";
4
+ import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-D3tZfKDY.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BC9-zzD-.js");
2
+ const require_dist = require("./dist-FcwhAIev.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
- const require_hub_identity = require("./hub-identity-E3mTM7Ll.js");
4
+ const require_hub_identity = require("./hub-identity-DfjMN5C2.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs = require("node:fs");
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-BC9-zzD-.js");
4
- const require_device_ca = require("./device-ca-CZ_wWfyt.js");
3
+ const require_dist = require("./dist-FcwhAIev.js");
4
+ const require_device_ca = require("./device-ca-C8sDWceS.js");
5
5
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
6
6
  const require_log_redactor = require("./log-redactor-BhIEMaG9.js");
7
7
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
@@ -28,22 +28,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
28
28
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
29
29
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
30
30
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
31
- const require_wal_maintenance = require("./wal-maintenance-DzJQxMoR.js");
32
- const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-cMhRbXzP.js");
31
+ const require_wal_maintenance = require("./wal-maintenance-BQa-P90H.js");
32
+ const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-CT8Fnd_j.js");
33
33
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
34
34
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
35
35
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
36
36
  require("./builtins/storage-orchestrator/index.js");
37
- const require_hub_identity = require("./hub-identity-E3mTM7Ll.js");
38
- const require_constants = require("./constants-B2rCPAir.js");
37
+ const require_hub_identity = require("./hub-identity-DfjMN5C2.js");
38
+ const require_constants = require("./constants-dh68e2ow.js");
39
39
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
40
40
  require("./builtins/system-config/index.js");
41
41
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
42
42
  const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
43
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-ruddeiE8.js");
43
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-Do2L9s3a.js");
44
44
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
45
45
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
46
- const require_restore_archive = require("./restore-archive-DyFnTC0y.js");
46
+ const require_restore_archive = require("./restore-archive-CpDjTbxg.js");
47
47
  const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
48
48
  let zod = require("zod");
49
49
  let node_crypto = require("node:crypto");