@camstack/system 1.2.47 → 1.2.49

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 (57) 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 +1 -1
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  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-provider.d.ts +1 -1
  36. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +64 -64
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +64 -64
  38. package/dist/builtins/sqlite-storage/index.d.ts +5 -6
  39. package/dist/builtins/sqlite-storage/index.js +20 -20
  40. package/dist/builtins/sqlite-storage/index.mjs +20 -20
  41. package/dist/builtins/sqlite-storage/integration-registry.d.ts +1 -1
  42. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
  43. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +10 -0
  44. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +513 -1
  45. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +513 -1
  46. package/dist/builtins/sqlite-storage/vector-index.d.ts +172 -0
  47. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  48. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  49. package/dist/builtins/system-config/system-config.addon.js +1 -1
  50. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  51. package/dist/builtins/winston-logging/index.js +1 -1
  52. package/dist/builtins/winston-logging/index.mjs +1 -1
  53. package/dist/{dist-BRBfh1_9.mjs → dist-C7rPTQLR.mjs} +33 -1
  54. package/dist/{dist-CKjrL1qP.js → dist-CH0DyAwh.js} +56 -0
  55. package/dist/index.js +1 -1
  56. package/dist/index.mjs +1 -1
  57. 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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { Pt as EventCategory, ct as BaseAddon, m as addonPagesCapability, st as errMsg } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, dt as errMsg, ft as BaseAddon, m as addonPagesCapability } from "../../dist-C7rPTQLR.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import * as fs from "node:fs";
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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { Pt as EventCategory, ct as BaseAddon, g as addonWidgetsCapability, st as errMsg } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, dt as errMsg, ft as BaseAddon, g as addonWidgetsCapability } from "../../dist-C7rPTQLR.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import * as fs from "node:fs";
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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { Pt as EventCategory, _ as alertsCapability, ct as BaseAddon, n as AlertSchema, st as errMsg, xt as createEvent } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, Tt as createEvent, _ as alertsCapability, dt as errMsg, ft as BaseAddon, n as AlertSchema } from "../../dist-C7rPTQLR.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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_fs$1 = require_chunk.__toESM(node_fs, 1);
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { Pt as EventCategory, b as backupCapability, ct as BaseAddon } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, b as backupCapability, ft as BaseAddon } from "../../dist-C7rPTQLR.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import Kt from "node:fs";
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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { H as logDestinationCapability, ct as BaseAddon } from "../../dist-BRBfh1_9.mjs";
1
+ import { W as logDestinationCapability, ft as BaseAddon } from "../../dist-C7rPTQLR.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-CKjrL1qP.js");
3
+ const require_dist = require("../../dist-CH0DyAwh.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
6
6
  let node_crypto = require("node:crypto");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { S as coreBlocksCapability, ct as BaseAddon, o as CoreBlockSchema } from "../../dist-BRBfh1_9.mjs";
2
+ import { S as coreBlocksCapability, ft as BaseAddon, o as CoreBlockSchema } from "../../dist-C7rPTQLR.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import * as fs 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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  let _camstack_types_node = require("@camstack/types/node");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { A as enumerateSchemaFields, E as deviceStatusCapability, Et as isDeviceConfigCap, J as parseStreamParamsFormPatch, K as normalizeUnit, Nt as sleep, P as getByPath, Pt as EventCategory, Q as setByPath, T as deviceStateCapability, _t as WELL_KNOWN_TAB_MAP, a as CAP_NAMES_WITH_STATUS, ct as BaseAddon, ft as DeviceFeature, it as toExpressionValue, j as evaluateLinkExpression, k as enumerateItemArrayFields, mt as DeviceType, ot as validateExpressionSource, pt as DeviceRole, s as DeviceStatusSchema, st as errMsg, t as ALL_CAPABILITY_DEFINITIONS, u as STREAM_PROFILE_META, v as applyTransform, w as deviceManagerCapability, x as buildStreamParamsConfigSchema } from "../../dist-BRBfh1_9.mjs";
1
+ import { At as isDeviceConfigCap, D as deviceStateCapability, E as deviceManagerCapability, I as getByPath, J as normalizeUnit, Lt as sleep, M as enumerateSchemaFields, N as evaluateLinkExpression, O as deviceStatusCapability, Rt as EventCategory, X as parseStreamParamsFormPatch, _t as DeviceRole, a as CAP_NAMES_WITH_STATUS, ct as validateExpressionSource, dt as errMsg, et as setByPath, ft as BaseAddon, gt as DeviceFeature, j as enumerateItemArrayFields, ot as toExpressionValue, s as DeviceStatusSchema, t as ALL_CAPABILITY_DEFINITIONS, u as STREAM_PROFILE_META, v as applyTransform, vt as DeviceType, x as buildStreamParamsConfigSchema, xt as WELL_KNOWN_TAB_MAP } from "../../dist-C7rPTQLR.mjs";
2
2
  import { canonicalDeviceFingerprint } from "@camstack/types/node";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { D as doorbellCapability, Pt as EventCategory, ct as BaseAddon, mt as DeviceType, st as errMsg, xt as createEvent } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, Tt as createEvent, dt as errMsg, ft as BaseAddon, k as doorbellCapability, vt as DeviceType } from "../../dist-C7rPTQLR.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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { H as logDestinationCapability, ct as BaseAddon } from "../../dist-BRBfh1_9.mjs";
1
+ import { W as logDestinationCapability, ft as BaseAddon } from "../../dist-C7rPTQLR.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-CKjrL1qP.js");
3
+ const require_dist = require("../../dist-CH0DyAwh.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 { Pt as EventCategory, ct as BaseAddon, st as errMsg, xt as createEvent } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, Tt as createEvent, dt as errMsg, ft as BaseAddon } from "../../dist-C7rPTQLR.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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { at as userManagementCapability, ct as BaseAddon, d as ScopedTokenSchema, p as UserRecordSchema, r as ApiKeyRecordSchema, y as authProviderCapability } from "../../dist-BRBfh1_9.mjs";
2
+ import { d as ScopedTokenSchema, ft as BaseAddon, p as UserRecordSchema, r as ApiKeyRecordSchema, st as userManagementCapability, y as authProviderCapability } from "../../dist-C7rPTQLR.mjs";
3
3
  import * as crypto$1 from "node:crypto";
4
4
  import { randomUUID } 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-CKjrL1qP.js");
3
+ const require_dist = require("../../dist-CH0DyAwh.js");
4
4
  let node_os = require("node:os");
5
5
  node_os = require_chunk.__toESM(node_os);
6
6
  //#region src/builtins/local-network/local-network.addon.ts
@@ -1,4 +1,4 @@
1
- import { Pt as EventCategory, V as localNetworkCapability, ct as BaseAddon } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, U as localNetworkCapability, ft as BaseAddon } from "../../dist-C7rPTQLR.mjs";
2
2
  import * as os from "node:os";
3
3
  //#region src/builtins/local-network/local-network.addon.ts
4
4
  /**
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { H as logDestinationCapability, ct as BaseAddon } from "../../dist-BRBfh1_9.mjs";
1
+ import { W as logDestinationCapability, ft as BaseAddon } from "../../dist-C7rPTQLR.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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_child_process = require("node:child_process");
@@ -1,4 +1,4 @@
1
- import { G as metricsProviderCapability, Pt as EventCategory, ct as BaseAddon, xt as createEvent } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, Tt as createEvent, ft as BaseAddon, q as metricsProviderCapability } from "../../dist-C7rPTQLR.mjs";
2
2
  import * as fs from "node:fs";
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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_child_process = require("node:child_process");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ct as emitReadiness, O as enumerateInferenceDevices, Pt as EventCategory, Y as platformProbeCapability, Z as scoreRuntimes, ct as BaseAddon, st as errMsg } from "../../dist-BRBfh1_9.mjs";
2
+ import { $ as scoreRuntimes, A as enumerateInferenceDevices, Dt as emitReadiness, Rt as EventCategory, Z as platformProbeCapability, dt as errMsg, ft as BaseAddon } from "../../dist-C7rPTQLR.mjs";
3
3
  import * as fs from "node:fs";
4
4
  import { execFile } from "node:child_process";
5
5
  import { promisify } from "node:util";
@@ -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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.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 { Pt as EventCategory, ct as BaseAddon } from "../../dist-BRBfh1_9.mjs";
1
+ import { Rt as EventCategory, ft as BaseAddon } from "../../dist-C7rPTQLR.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
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/builtins/snapshot/snapshot-coalescing.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { Dt as nodePin, ct as BaseAddon, et as snapshotCapability, ft as DeviceFeature, i as BatteryStatusSchema, mt as DeviceType, rt as streamQualityLabel, st as errMsg } from "../../dist-BRBfh1_9.mjs";
1
+ import { at as streamQualityLabel, dt as errMsg, ft as BaseAddon, gt as DeviceFeature, i as BatteryStatusSchema, jt as nodePin, nt as snapshotCapability, vt as DeviceType } from "../../dist-C7rPTQLR.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  //#region src/builtins/snapshot/snapshot-coalescing.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { IStorageProviderImpl, StorageLocation, StorageProviderInfoSchema } from '@camstack/types';
2
+ import { z } from 'zod';
3
3
  type StorageProviderInfo = z.infer<typeof StorageProviderInfoSchema>;
4
4
  export declare class FilesystemStorageProvider implements IStorageProviderImpl {
5
5
  static readonly providerId = "filesystem-storage";
@@ -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-CKjrL1qP.js");
6
+ const require_dist = require("../../dist-CH0DyAwh.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_path = require("node:path");
@@ -11,6 +11,69 @@ node_path = require_chunk.__toESM(node_path);
11
11
  let node_crypto = require("node:crypto");
12
12
  let node_os = require("node:os");
13
13
  let node_fs_promises = require("node:fs/promises");
14
+ //#region src/builtins/sqlite-storage/path-guard.ts
15
+ /**
16
+ * Allowed-root containment guard for the filesystem-browse cap. Pure +
17
+ * synchronous so it is trivially unit-testable; the provider applies it AFTER
18
+ * resolving the real path (so symlink escapes are also caught upstream).
19
+ */
20
+ /** True iff `candidate` is one of, or nested under, an allowed root. */
21
+ function isWithinAllowedRoots(candidate, allowedRoots) {
22
+ const norm = (0, node_path.resolve)(candidate);
23
+ return allowedRoots.some((root) => {
24
+ const r = (0, node_path.resolve)(root);
25
+ return norm === r || norm.startsWith(r.endsWith(node_path.sep) ? r : r + node_path.sep);
26
+ });
27
+ }
28
+ /** Throws unless `candidate` is within an allowed root. */
29
+ function assertWithinAllowedRoots(candidate, allowedRoots) {
30
+ if (!isWithinAllowedRoots(candidate, allowedRoots)) throw new Error(`path "${candidate}" is not within an allowed root`);
31
+ }
32
+ //#endregion
33
+ //#region src/builtins/sqlite-storage/filesystem-browse-provider.ts
34
+ /**
35
+ * Per-node filesystem-browse provider. Lists/creates directories under
36
+ * operator-configured allowed roots only (sandboxed by `path-guard`). Backs the
37
+ * `filesystem-browse` cap so the admin UI can pick a node + path for a
38
+ * node-local storage location.
39
+ */
40
+ var FilesystemBrowseProvider = class {
41
+ allowedRoots;
42
+ /** allowedRoots is injected (read from addon config) so it stays per-node + testable. */
43
+ constructor(allowedRoots) {
44
+ this.allowedRoots = allowedRoots;
45
+ }
46
+ async listAllowedRoots() {
47
+ return [...this.allowedRoots()];
48
+ }
49
+ async browse({ path }) {
50
+ const real = await (0, node_fs_promises.realpath)(path).catch(() => path);
51
+ assertWithinAllowedRoots(real, await this.resolvedRoots());
52
+ const entries = (await (0, node_fs_promises.readdir)(real, { withFileTypes: true })).filter((d) => d.isDirectory()).map((d) => ({
53
+ name: d.name,
54
+ path: (0, node_path.join)(real, d.name)
55
+ }));
56
+ const fs = await (0, node_fs_promises.statfs)(real);
57
+ const totalBytes = fs.blocks * fs.bsize;
58
+ return {
59
+ path: real,
60
+ entries,
61
+ freeBytes: fs.bavail * fs.bsize,
62
+ totalBytes
63
+ };
64
+ }
65
+ async createDir({ path }) {
66
+ const parent = (0, node_path.dirname)(path);
67
+ assertWithinAllowedRoots((0, node_path.join)(await (0, node_fs_promises.realpath)(parent).catch(() => parent), (0, node_path.basename)(path)), await this.resolvedRoots());
68
+ await (0, node_fs_promises.mkdir)(path, { recursive: true });
69
+ return { path };
70
+ }
71
+ /** Allowed roots with symlinks resolved (falls back to the raw root if it does not exist). */
72
+ async resolvedRoots() {
73
+ return Promise.all(this.allowedRoots().map((r) => (0, node_fs_promises.realpath)(r).catch(() => r)));
74
+ }
75
+ };
76
+ //#endregion
14
77
  //#region src/builtins/sqlite-storage/filesystem-storage-provider.ts
15
78
  /**
16
79
  * Filesystem `storage-provider` (Task 7).
@@ -272,69 +335,6 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
272
335
  }
273
336
  };
274
337
  //#endregion
275
- //#region src/builtins/sqlite-storage/path-guard.ts
276
- /**
277
- * Allowed-root containment guard for the filesystem-browse cap. Pure +
278
- * synchronous so it is trivially unit-testable; the provider applies it AFTER
279
- * resolving the real path (so symlink escapes are also caught upstream).
280
- */
281
- /** True iff `candidate` is one of, or nested under, an allowed root. */
282
- function isWithinAllowedRoots(candidate, allowedRoots) {
283
- const norm = (0, node_path.resolve)(candidate);
284
- return allowedRoots.some((root) => {
285
- const r = (0, node_path.resolve)(root);
286
- return norm === r || norm.startsWith(r.endsWith(node_path.sep) ? r : r + node_path.sep);
287
- });
288
- }
289
- /** Throws unless `candidate` is within an allowed root. */
290
- function assertWithinAllowedRoots(candidate, allowedRoots) {
291
- if (!isWithinAllowedRoots(candidate, allowedRoots)) throw new Error(`path "${candidate}" is not within an allowed root`);
292
- }
293
- //#endregion
294
- //#region src/builtins/sqlite-storage/filesystem-browse-provider.ts
295
- /**
296
- * Per-node filesystem-browse provider. Lists/creates directories under
297
- * operator-configured allowed roots only (sandboxed by `path-guard`). Backs the
298
- * `filesystem-browse` cap so the admin UI can pick a node + path for a
299
- * node-local storage location.
300
- */
301
- var FilesystemBrowseProvider = class {
302
- allowedRoots;
303
- /** allowedRoots is injected (read from addon config) so it stays per-node + testable. */
304
- constructor(allowedRoots) {
305
- this.allowedRoots = allowedRoots;
306
- }
307
- async listAllowedRoots() {
308
- return [...this.allowedRoots()];
309
- }
310
- async browse({ path }) {
311
- const real = await (0, node_fs_promises.realpath)(path).catch(() => path);
312
- assertWithinAllowedRoots(real, await this.resolvedRoots());
313
- const entries = (await (0, node_fs_promises.readdir)(real, { withFileTypes: true })).filter((d) => d.isDirectory()).map((d) => ({
314
- name: d.name,
315
- path: (0, node_path.join)(real, d.name)
316
- }));
317
- const fs = await (0, node_fs_promises.statfs)(real);
318
- const totalBytes = fs.blocks * fs.bsize;
319
- return {
320
- path: real,
321
- entries,
322
- freeBytes: fs.bavail * fs.bsize,
323
- totalBytes
324
- };
325
- }
326
- async createDir({ path }) {
327
- const parent = (0, node_path.dirname)(path);
328
- assertWithinAllowedRoots((0, node_path.join)(await (0, node_fs_promises.realpath)(parent).catch(() => parent), (0, node_path.basename)(path)), await this.resolvedRoots());
329
- await (0, node_fs_promises.mkdir)(path, { recursive: true });
330
- return { path };
331
- }
332
- /** Allowed roots with symlinks resolved (falls back to the raw root if it does not exist). */
333
- async resolvedRoots() {
334
- return Promise.all(this.allowedRoots().map((r) => (0, node_fs_promises.realpath)(r).catch(() => r)));
335
- }
336
- };
337
- //#endregion
338
338
  //#region src/builtins/sqlite-storage/filesystem-storage.addon.ts
339
339
  function defaultAllowedRoots() {
340
340
  return [
@@ -1,10 +1,73 @@
1
- import { N as filesystemBrowseCapability, ct as BaseAddon, nt as storageProviderCapability } from "../../dist-BRBfh1_9.mjs";
1
+ import { F as filesystemBrowseCapability, ft as BaseAddon, it as storageProviderCapability } from "../../dist-C7rPTQLR.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import * as path$1 from "node:path";
4
4
  import { basename, dirname, join, resolve, sep } from "node:path";
5
5
  import { randomUUID } from "node:crypto";
6
6
  import { homedir } from "node:os";
7
7
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
8
+ //#region src/builtins/sqlite-storage/path-guard.ts
9
+ /**
10
+ * Allowed-root containment guard for the filesystem-browse cap. Pure +
11
+ * synchronous so it is trivially unit-testable; the provider applies it AFTER
12
+ * resolving the real path (so symlink escapes are also caught upstream).
13
+ */
14
+ /** True iff `candidate` is one of, or nested under, an allowed root. */
15
+ function isWithinAllowedRoots(candidate, allowedRoots) {
16
+ const norm = resolve(candidate);
17
+ return allowedRoots.some((root) => {
18
+ const r = resolve(root);
19
+ return norm === r || norm.startsWith(r.endsWith(sep) ? r : r + sep);
20
+ });
21
+ }
22
+ /** Throws unless `candidate` is within an allowed root. */
23
+ function assertWithinAllowedRoots(candidate, allowedRoots) {
24
+ if (!isWithinAllowedRoots(candidate, allowedRoots)) throw new Error(`path "${candidate}" is not within an allowed root`);
25
+ }
26
+ //#endregion
27
+ //#region src/builtins/sqlite-storage/filesystem-browse-provider.ts
28
+ /**
29
+ * Per-node filesystem-browse provider. Lists/creates directories under
30
+ * operator-configured allowed roots only (sandboxed by `path-guard`). Backs the
31
+ * `filesystem-browse` cap so the admin UI can pick a node + path for a
32
+ * node-local storage location.
33
+ */
34
+ var FilesystemBrowseProvider = class {
35
+ allowedRoots;
36
+ /** allowedRoots is injected (read from addon config) so it stays per-node + testable. */
37
+ constructor(allowedRoots) {
38
+ this.allowedRoots = allowedRoots;
39
+ }
40
+ async listAllowedRoots() {
41
+ return [...this.allowedRoots()];
42
+ }
43
+ async browse({ path }) {
44
+ const real = await realpath(path).catch(() => path);
45
+ assertWithinAllowedRoots(real, await this.resolvedRoots());
46
+ const entries = (await readdir(real, { withFileTypes: true })).filter((d) => d.isDirectory()).map((d) => ({
47
+ name: d.name,
48
+ path: join(real, d.name)
49
+ }));
50
+ const fs = await statfs(real);
51
+ const totalBytes = fs.blocks * fs.bsize;
52
+ return {
53
+ path: real,
54
+ entries,
55
+ freeBytes: fs.bavail * fs.bsize,
56
+ totalBytes
57
+ };
58
+ }
59
+ async createDir({ path }) {
60
+ const parent = dirname(path);
61
+ assertWithinAllowedRoots(join(await realpath(parent).catch(() => parent), basename(path)), await this.resolvedRoots());
62
+ await mkdir(path, { recursive: true });
63
+ return { path };
64
+ }
65
+ /** Allowed roots with symlinks resolved (falls back to the raw root if it does not exist). */
66
+ async resolvedRoots() {
67
+ return Promise.all(this.allowedRoots().map((r) => realpath(r).catch(() => r)));
68
+ }
69
+ };
70
+ //#endregion
8
71
  //#region src/builtins/sqlite-storage/filesystem-storage-provider.ts
9
72
  /**
10
73
  * Filesystem `storage-provider` (Task 7).
@@ -266,69 +329,6 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
266
329
  }
267
330
  };
268
331
  //#endregion
269
- //#region src/builtins/sqlite-storage/path-guard.ts
270
- /**
271
- * Allowed-root containment guard for the filesystem-browse cap. Pure +
272
- * synchronous so it is trivially unit-testable; the provider applies it AFTER
273
- * resolving the real path (so symlink escapes are also caught upstream).
274
- */
275
- /** True iff `candidate` is one of, or nested under, an allowed root. */
276
- function isWithinAllowedRoots(candidate, allowedRoots) {
277
- const norm = resolve(candidate);
278
- return allowedRoots.some((root) => {
279
- const r = resolve(root);
280
- return norm === r || norm.startsWith(r.endsWith(sep) ? r : r + sep);
281
- });
282
- }
283
- /** Throws unless `candidate` is within an allowed root. */
284
- function assertWithinAllowedRoots(candidate, allowedRoots) {
285
- if (!isWithinAllowedRoots(candidate, allowedRoots)) throw new Error(`path "${candidate}" is not within an allowed root`);
286
- }
287
- //#endregion
288
- //#region src/builtins/sqlite-storage/filesystem-browse-provider.ts
289
- /**
290
- * Per-node filesystem-browse provider. Lists/creates directories under
291
- * operator-configured allowed roots only (sandboxed by `path-guard`). Backs the
292
- * `filesystem-browse` cap so the admin UI can pick a node + path for a
293
- * node-local storage location.
294
- */
295
- var FilesystemBrowseProvider = class {
296
- allowedRoots;
297
- /** allowedRoots is injected (read from addon config) so it stays per-node + testable. */
298
- constructor(allowedRoots) {
299
- this.allowedRoots = allowedRoots;
300
- }
301
- async listAllowedRoots() {
302
- return [...this.allowedRoots()];
303
- }
304
- async browse({ path }) {
305
- const real = await realpath(path).catch(() => path);
306
- assertWithinAllowedRoots(real, await this.resolvedRoots());
307
- const entries = (await readdir(real, { withFileTypes: true })).filter((d) => d.isDirectory()).map((d) => ({
308
- name: d.name,
309
- path: join(real, d.name)
310
- }));
311
- const fs = await statfs(real);
312
- const totalBytes = fs.blocks * fs.bsize;
313
- return {
314
- path: real,
315
- entries,
316
- freeBytes: fs.bavail * fs.bsize,
317
- totalBytes
318
- };
319
- }
320
- async createDir({ path }) {
321
- const parent = dirname(path);
322
- assertWithinAllowedRoots(join(await realpath(parent).catch(() => parent), basename(path)), await this.resolvedRoots());
323
- await mkdir(path, { recursive: true });
324
- return { path };
325
- }
326
- /** Allowed roots with symlinks resolved (falls back to the raw root if it does not exist). */
327
- async resolvedRoots() {
328
- return Promise.all(this.allowedRoots().map((r) => realpath(r).catch(() => r)));
329
- }
330
- };
331
- //#endregion
332
332
  //#region src/builtins/sqlite-storage/filesystem-storage.addon.ts
333
333
  function defaultAllowedRoots() {
334
334
  return [
@@ -1,8 +1,7 @@
1
+ export { ConfigStore } from './config-store.js';
2
+ export type { DeviceRow } from './device-store.js';
3
+ export { DeviceStore } from './device-store.js';
4
+ export { FilesystemStorageAddon, FilesystemStorageAddon as default, } from './filesystem-storage.addon.js';
1
5
  export { FilesystemStorageProvider } from './filesystem-storage-provider.js';
2
- export { FilesystemStorageAddon } from './filesystem-storage.addon.js';
3
- export { SqliteSettingsBackend } from './sqlite-settings-backend.js';
4
6
  export { SqliteSettingsAddon } from './sqlite-settings.addon.js';
5
- export { DeviceStore } from './device-store.js';
6
- export type { DeviceRow } from './device-store.js';
7
- export { ConfigStore } from './config-store.js';
8
- export { FilesystemStorageAddon as default } from './filesystem-storage.addon.js';
7
+ export { SqliteSettingsBackend } from './sqlite-settings-backend.js';