@camstack/system 1.2.8 → 1.2.9

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 (55) hide show
  1. package/dist/addon-runner.js +6 -6
  2. package/dist/addon-runner.mjs +6 -6
  3. package/dist/addon-utils.js +1 -1
  4. package/dist/addon-utils.mjs +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/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/native-metrics/native-metrics.addon.js +1 -1
  26. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  27. package/dist/builtins/platform-probe/index.js +1 -1
  28. package/dist/builtins/platform-probe/index.mjs +1 -1
  29. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  30. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  31. package/dist/builtins/snapshot/index.js +1 -1
  32. package/dist/builtins/snapshot/index.mjs +1 -1
  33. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  34. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  35. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  36. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  37. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +12 -0
  38. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +48 -7
  39. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +48 -7
  40. package/dist/builtins/storage-orchestrator/storage-pressure-manager.d.ts +27 -0
  41. package/dist/builtins/system-config/system-config.addon.js +1 -1
  42. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  43. package/dist/builtins/winston-logging/index.js +1 -1
  44. package/dist/builtins/winston-logging/index.mjs +1 -1
  45. package/dist/{custom-action-registry-BEXwC-oo.mjs → custom-action-registry-F__gp_VX.mjs} +1 -1
  46. package/dist/{custom-action-registry-vLYEFTtv.js → custom-action-registry-jY0NOZK8.js} +1 -1
  47. package/dist/{dist-CxM20CkF.mjs → dist-CVCNYn7D.mjs} +1658 -1434
  48. package/dist/{dist-CdgScQ3H.js → dist-SI-yNpKE.js} +1658 -1434
  49. package/dist/index.js +3 -3
  50. package/dist/index.mjs +3 -3
  51. package/dist/kernel/custom-action-registry.d.ts +3 -3
  52. package/dist/kernel/transport/child-cap-protocol.d.ts +11 -1
  53. package/dist/{manifest-python-deps-CUHn5wqq.js → manifest-python-deps-CEwMAaKZ.js} +5 -3
  54. package/dist/{manifest-python-deps-CcW0WpfS.mjs → manifest-python-deps-DyEweBkB.mjs} +5 -3
  55. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-CdgScQ3H.js");
3
- const require_manifest_python_deps = require("./manifest-python-deps-CUHn5wqq.js");
4
- const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
2
+ const require_dist = require("./dist-SI-yNpKE.js");
3
+ const require_manifest_python_deps = require("./manifest-python-deps-CEwMAaKZ.js");
4
+ const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
5
5
  let node_fs = require("node:fs");
6
6
  node_fs = require_chunk.__toESM(node_fs);
7
7
  let node_path = require("node:path");
@@ -274,7 +274,7 @@ function createChildAddonCallDispatch(deps) {
274
274
  if (typeof action !== "string" || action.length === 0) throw new Error(`child-addon-call: addon "${addonId}" custom call missing action name`);
275
275
  const entry = deps.customActions.resolve(addonId, action);
276
276
  if (entry === null) throw new Error(`child-addon-call: addon "${addonId}" has no custom action "${action}"`);
277
- return entry.handler(call.args);
277
+ return entry.handler(call.args, call.caller);
278
278
  }
279
279
  case "settings": {
280
280
  const method = call.method;
@@ -608,10 +608,10 @@ async function main() {
608
608
  }
609
609
  if (initResult?.customActions && initResult.actionHandlers) {
610
610
  const handlers = initResult.actionHandlers;
611
- customActionRegistry.registerAddon(spec.addonId, initResult.customActions, (action, input) => {
611
+ customActionRegistry.registerAddon(spec.addonId, initResult.customActions, (action, input, caller) => {
612
612
  const fn = handlers[action];
613
613
  if (!fn) throw new Error(`addon '${spec.addonId}' has no handler for custom action '${action}'`);
614
- return fn(input);
614
+ return fn(input, caller);
615
615
  });
616
616
  }
617
617
  require_manifest_python_deps.validateProviderRegistrations(spec.addonId, declaration, registeredProviders, context.logger);
@@ -1,6 +1,6 @@
1
- import { M as isCollectionArrayMethod, t as ALL_CAPABILITY_DEFINITIONS } from "./dist-CxM20CkF.mjs";
2
- import { Ct as resolveAddonClass, I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps } from "./manifest-python-deps-CcW0WpfS.mjs";
3
- import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
1
+ import { M as isCollectionArrayMethod, t as ALL_CAPABILITY_DEFINITIONS } from "./dist-CVCNYn7D.mjs";
2
+ import { Ct as resolveAddonClass, I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps } from "./manifest-python-deps-DyEweBkB.mjs";
3
+ import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
4
4
  import { register } from "node:module";
5
5
  import * as fs from "node:fs";
6
6
  import * as path$1 from "node:path";
@@ -270,7 +270,7 @@ function createChildAddonCallDispatch(deps) {
270
270
  if (typeof action !== "string" || action.length === 0) throw new Error(`child-addon-call: addon "${addonId}" custom call missing action name`);
271
271
  const entry = deps.customActions.resolve(addonId, action);
272
272
  if (entry === null) throw new Error(`child-addon-call: addon "${addonId}" has no custom action "${action}"`);
273
- return entry.handler(call.args);
273
+ return entry.handler(call.args, call.caller);
274
274
  }
275
275
  case "settings": {
276
276
  const method = call.method;
@@ -604,10 +604,10 @@ async function main() {
604
604
  }
605
605
  if (initResult?.customActions && initResult.actionHandlers) {
606
606
  const handlers = initResult.actionHandlers;
607
- customActionRegistry.registerAddon(spec.addonId, initResult.customActions, (action, input) => {
607
+ customActionRegistry.registerAddon(spec.addonId, initResult.customActions, (action, input, caller) => {
608
608
  const fn = handlers[action];
609
609
  if (!fn) throw new Error(`addon '${spec.addonId}' has no handler for custom action '${action}'`);
610
- return fn(input);
610
+ return fn(input, caller);
611
611
  });
612
612
  }
613
613
  validateProviderRegistrations(spec.addonId, declaration, registeredProviders, context.logger);
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./chunk-Cek0wNdY.js");
3
3
  const require_model_download_service = require("./model-download-service-hf0ookyy.js");
4
- const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
4
+ const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
5
5
  exports.CustomActionRegistry = require_custom_action_registry.CustomActionRegistry;
6
6
  exports.ModelDownloadService = require_model_download_service.ModelDownloadService;
7
7
  exports.collectModelFiles = require_model_download_service.collectModelFiles;
@@ -1,3 +1,3 @@
1
1
  import { c as getModelFilePath, d as contentTypeFor, i as downloadFile, l as isModelDownloaded, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-Cp9f4dk6.mjs";
2
- import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
2
+ import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
3
3
  export { CustomActionRegistry, ModelDownloadService, collectModelFiles, contentTypeFor, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloaded, parseRangeHeader };
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, at as BaseAddon, f as addonPagesCapability, it as errMsg } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, at as BaseAddon, f as addonPagesCapability, it as errMsg } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, at as BaseAddon, it as errMsg, m as addonWidgetsCapability } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, at as BaseAddon, it as errMsg, m as addonWidgetsCapability } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.js");
7
7
  //#region src/builtins/alerts/alerts.addon.ts
8
8
  var CATEGORY_MAPPINGS = {
9
9
  "addon.crashed": {
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, at as BaseAddon, h as alertsCapability, it as errMsg, n as AlertSchema, vt as createEvent } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, at as BaseAddon, h as alertsCapability, it as errMsg, n as AlertSchema, vt as createEvent } from "../../dist-CVCNYn7D.mjs";
2
2
  //#region src/builtins/alerts/alerts.addon.ts
3
3
  var CATEGORY_MAPPINGS = {
4
4
  "addon.crashed": {
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, at as BaseAddon, v as backupCapability } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, at as BaseAddon, v as backupCapability } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { R as logDestinationCapability, at as BaseAddon } from "../../dist-CxM20CkF.mjs";
1
+ import { R as logDestinationCapability, at as BaseAddon } from "../../dist-CVCNYn7D.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 = {
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 getByPath, At as EventCategory, Ct as isDeviceConfigCap, D as evaluateLinkExpression, E as enumerateSchemaFields, H as normalizeUnit, S as deviceStatusCapability, T as enumerateItemArrayFields, W as parseStreamParamsFormPatch, Y as setByPath, a as DeviceStatusSchema, at as BaseAddon, b as deviceManagerCapability, c as STREAM_PROFILE_META, dt as DeviceType, g as applyTransform, i as CAP_NAMES_WITH_STATUS, it as errMsg, kt as sleep, lt as DeviceFeature, mt as WELL_KNOWN_TAB_MAP, rt as validateExpressionSource, t as ALL_CAPABILITY_DEFINITIONS, tt as toExpressionValue, ut as DeviceRole, x as deviceStateCapability, y as buildStreamParamsConfigSchema } from "../../dist-CxM20CkF.mjs";
1
+ import { A as getByPath, At as EventCategory, Ct as isDeviceConfigCap, D as evaluateLinkExpression, E as enumerateSchemaFields, H as normalizeUnit, S as deviceStatusCapability, T as enumerateItemArrayFields, W as parseStreamParamsFormPatch, Y as setByPath, a as DeviceStatusSchema, at as BaseAddon, b as deviceManagerCapability, c as STREAM_PROFILE_META, dt as DeviceType, g as applyTransform, i as CAP_NAMES_WITH_STATUS, it as errMsg, kt as sleep, lt as DeviceFeature, mt as WELL_KNOWN_TAB_MAP, rt as validateExpressionSource, t as ALL_CAPABILITY_DEFINITIONS, tt as toExpressionValue, ut as DeviceRole, x as deviceStateCapability, y as buildStreamParamsConfigSchema } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, C as doorbellCapability, at as BaseAddon, dt as DeviceType, it as errMsg, vt as createEvent } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, C as doorbellCapability, at as BaseAddon, dt as DeviceType, it as errMsg, vt as createEvent } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { R as logDestinationCapability, at as BaseAddon } from "../../dist-CxM20CkF.mjs";
1
+ import { R as logDestinationCapability, at as BaseAddon } from "../../dist-CVCNYn7D.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;
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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,4 +1,4 @@
1
- import { _ as authProviderCapability, at as BaseAddon, d as UserRecordSchema, l as ScopedTokenSchema, nt as userManagementCapability, r as ApiKeyRecordSchema } from "../../dist-CxM20CkF.mjs";
1
+ import { _ as authProviderCapability, at as BaseAddon, d as UserRecordSchema, l as ScopedTokenSchema, nt as userManagementCapability, r as ApiKeyRecordSchema } from "../../dist-CVCNYn7D.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as crypto$1 from "node:crypto";
4
4
  import { randomUUID } from "node: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-CdgScQ3H.js");
3
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, L as localNetworkCapability, at as BaseAddon } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, L as localNetworkCapability, at as BaseAddon } from "../../dist-CVCNYn7D.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
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, B as metricsProviderCapability, at as BaseAddon, vt as createEvent } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, B as metricsProviderCapability, at as BaseAddon, vt as createEvent } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, G as platformProbeCapability, J as scoreRuntimes, at as BaseAddon, bt as emitReadiness, it as errMsg, w as enumerateInferenceDevices } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, G as platformProbeCapability, J as scoreRuntimes, at as BaseAddon, bt as emitReadiness, it as errMsg, w as enumerateInferenceDevices } from "../../dist-CVCNYn7D.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import { execFile } 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
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { At as EventCategory, at as BaseAddon } from "../../dist-CxM20CkF.mjs";
1
+ import { At as EventCategory, at as BaseAddon } from "../../dist-CVCNYn7D.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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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 { V as nodePin, Z as snapshotCapability, at as BaseAddon, dt as DeviceType, et as streamQualityLabel, it as errMsg, lt as DeviceFeature } from "../../dist-CxM20CkF.mjs";
1
+ import { V as nodePin, Z as snapshotCapability, at as BaseAddon, dt as DeviceType, et as streamQualityLabel, it as errMsg, lt as DeviceFeature } from "../../dist-CVCNYn7D.mjs";
2
2
  import { execFile } from "node:child_process";
3
3
  //#region src/builtins/snapshot/snapshot-coalescing.ts
4
4
  /**
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.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");
@@ -1,4 +1,4 @@
1
- import { $ as storageProviderCapability, at as BaseAddon, k as filesystemBrowseCapability } from "../../dist-CxM20CkF.mjs";
1
+ import { $ as storageProviderCapability, at as BaseAddon, k as filesystemBrowseCapability } from "../../dist-CVCNYn7D.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";
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let better_sqlite3 = require("better-sqlite3");
9
9
  better_sqlite3 = require_chunk.__toESM(better_sqlite3);
@@ -1,4 +1,4 @@
1
- import { Tt as parseJsonUnknown, X as settingsStoreCapability, at as BaseAddon, ht as asJsonObject, it as errMsg, s as RUNTIME_DEFAULTS } from "../../dist-CxM20CkF.mjs";
1
+ import { Tt as parseJsonUnknown, X as settingsStoreCapability, at as BaseAddon, ht as asJsonObject, it as errMsg, s as RUNTIME_DEFAULTS } from "../../dist-CVCNYn7D.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import Database from "better-sqlite3";
4
4
  //#region src/builtins/sqlite-storage/sqlite-settings-backend.ts
@@ -65,6 +65,18 @@ export declare class StorageOrchestratorAddon extends BaseAddon<StorageOrchestra
65
65
  */
66
66
  private resolveLocationThresholds;
67
67
  private locationBasePath;
68
+ /**
69
+ * A stable key for the PHYSICAL storage device behind a location — the
70
+ * `realpath` of its `basePath`, so symlinked / bind-mounted aliases and
71
+ * same-root managed locations (`recordings:default` + `recordingsLow:default`,
72
+ * both at `/recordings`) collapse to one key. Feeds the pressure manager's
73
+ * in-sweep dedup so a shared disk is relieved at most once per tick (closing
74
+ * the bounded over-eviction window; see `getLocationDeviceKey`). Falls back to
75
+ * the lexically-resolved path when realpath throws (root missing at boot),
76
+ * `null` when the location has no basePath — either way dedup degrades to
77
+ * per-location, never merging two distinct disks.
78
+ */
79
+ private locationDeviceKey;
68
80
  /** Free capacity (%) on a location's volume via `statfs`; 100 (guard inert) when unstattable. */
69
81
  private locationFreePercent;
70
82
  /** Total bytes on a location's volume via `statfs`; 0 when unstattable. */
@@ -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-CdgScQ3H.js");
6
+ const require_dist = require("../../dist-SI-yNpKE.js");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_chunk.__toESM(node_path);
9
9
  let node_fs_promises = require("node:fs/promises");
@@ -614,10 +614,19 @@ var StoragePressureManager = class {
614
614
  /** Relieve every managed location currently under its threshold. */
615
615
  async sweep() {
616
616
  const thresholds = await this.deps.getLocationThresholds();
617
+ const relievedDevices = /* @__PURE__ */ new Set();
617
618
  for (const [locationId, threshold] of thresholds) {
618
619
  if (threshold <= 0) continue;
620
+ const deviceKey = await this.deps.getLocationDeviceKey?.(locationId) ?? null;
621
+ if (deviceKey !== null && relievedDevices.has(deviceKey)) {
622
+ this.deps.logger.debug("storage pressure: skipping location — physical device already relieved this sweep", { meta: {
623
+ locationId,
624
+ deviceKey
625
+ } });
626
+ continue;
627
+ }
619
628
  try {
620
- await this.relieveLocation(locationId, threshold);
629
+ if (await this.relieveLocation(locationId, threshold) && deviceKey !== null) relievedDevices.add(deviceKey);
621
630
  } catch (err) {
622
631
  this.deps.logger.warn("storage pressure: relief failed for location", { meta: {
623
632
  locationId,
@@ -626,16 +635,25 @@ var StoragePressureManager = class {
626
635
  }
627
636
  }
628
637
  }
638
+ /**
639
+ * Relieve one location until it recovers, nothing is evictable, or a round
640
+ * makes no progress. Returns `true` when at least one relief round actually
641
+ * reclaimed bytes (so the caller marks the location's physical device relieved
642
+ * for this sweep — the trigger for the over-eviction dedup: freed bytes mean a
643
+ * sibling alias may re-read a not-yet-settled `statfs`), `false` when nothing
644
+ * was freed (never breached, or breached with no evictable data).
645
+ */
629
646
  async relieveLocation(locationId, threshold) {
630
647
  const maxRounds = this.deps.maxRounds ?? DEFAULT_MAX_ROUNDS;
631
648
  const hysteresis = this.deps.hysteresisPercent ?? DEFAULT_HYSTERESIS_PERCENT;
649
+ let reclaimedAny = false;
632
650
  for (let round = 0; round < maxRounds; round++) {
633
651
  const free = await this.deps.getFreePercent(locationId);
634
- if (free >= threshold) return;
652
+ if (free >= threshold) return reclaimedAny;
635
653
  const total = await this.deps.getVolumeTotalBytes(locationId);
636
654
  const deficitPercent = threshold - free + hysteresis;
637
655
  const targetBytes = Math.ceil(total * deficitPercent / 100);
638
- if (targetBytes <= 0) return;
656
+ if (targetBytes <= 0) return reclaimedAny;
639
657
  const providers = this.deps.getEvictableProviders();
640
658
  const usages = await Promise.all(providers.map(async (p) => ({
641
659
  p,
@@ -648,7 +666,7 @@ var StoragePressureManager = class {
648
666
  freePercent: free,
649
667
  threshold
650
668
  } });
651
- return;
669
+ return reclaimedAny;
652
670
  }
653
671
  let reclaimed = 0;
654
672
  for (const u of usages) {
@@ -660,6 +678,7 @@ var StoragePressureManager = class {
660
678
  });
661
679
  reclaimed += res.reclaimedBytes;
662
680
  }
681
+ if (reclaimed > 0) reclaimedAny = true;
663
682
  this.deps.logger.info("storage pressure: relief round", { meta: {
664
683
  locationId,
665
684
  round,
@@ -668,8 +687,9 @@ var StoragePressureManager = class {
668
687
  targetBytes,
669
688
  reclaimedBytes: reclaimed
670
689
  } });
671
- if (reclaimed <= 0) return;
690
+ if (reclaimed <= 0) return reclaimedAny;
672
691
  }
692
+ return reclaimedAny;
673
693
  }
674
694
  };
675
695
  //#endregion
@@ -923,7 +943,8 @@ var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
923
943
  getFreePercent: (id) => this.locationFreePercent(id),
924
944
  getVolumeTotalBytes: (id) => this.locationVolumeTotalBytes(id),
925
945
  getEvictableProviders: () => this.ctx.kernel.capabilityRegistry?.getCollection(STORAGE_EVICTABLE_CAP_NAME) ?? [],
926
- getLocationThresholds: () => this.resolveLocationThresholds()
946
+ getLocationThresholds: () => this.resolveLocationThresholds(),
947
+ getLocationDeviceKey: (id) => this.locationDeviceKey(id)
927
948
  });
928
949
  this.pressureTimer = setInterval(() => {
929
950
  this.runPressureSweep();
@@ -1036,6 +1057,26 @@ var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
1036
1057
  const bp = (this.service?.listLocations().find((l) => l.id === locationId))?.config["basePath"];
1037
1058
  return typeof bp === "string" && bp.length > 0 ? bp : null;
1038
1059
  }
1060
+ /**
1061
+ * A stable key for the PHYSICAL storage device behind a location — the
1062
+ * `realpath` of its `basePath`, so symlinked / bind-mounted aliases and
1063
+ * same-root managed locations (`recordings:default` + `recordingsLow:default`,
1064
+ * both at `/recordings`) collapse to one key. Feeds the pressure manager's
1065
+ * in-sweep dedup so a shared disk is relieved at most once per tick (closing
1066
+ * the bounded over-eviction window; see `getLocationDeviceKey`). Falls back to
1067
+ * the lexically-resolved path when realpath throws (root missing at boot),
1068
+ * `null` when the location has no basePath — either way dedup degrades to
1069
+ * per-location, never merging two distinct disks.
1070
+ */
1071
+ async locationDeviceKey(locationId) {
1072
+ const bp = this.locationBasePath(locationId);
1073
+ if (!bp) return null;
1074
+ try {
1075
+ return await node_fs_promises.realpath(bp);
1076
+ } catch {
1077
+ return node_path.resolve(bp);
1078
+ }
1079
+ }
1039
1080
  /** Free capacity (%) on a location's volume via `statfs`; 100 (guard inert) when unstattable. */
1040
1081
  async locationFreePercent(locationId) {
1041
1082
  const bp = this.locationBasePath(locationId);
@@ -1,4 +1,4 @@
1
- import { Q as storageCapability, at as BaseAddon, u as StorageLocationTypeSchema, wt as parseJsonObject } from "../../dist-CxM20CkF.mjs";
1
+ import { Q as storageCapability, at as BaseAddon, u as StorageLocationTypeSchema, wt as parseJsonObject } from "../../dist-CVCNYn7D.mjs";
2
2
  import * as path$1 from "node:path";
3
3
  import * as fs from "node:fs/promises";
4
4
  import { buildStorageLocationRegistry } from "@camstack/system";
@@ -607,10 +607,19 @@ var StoragePressureManager = class {
607
607
  /** Relieve every managed location currently under its threshold. */
608
608
  async sweep() {
609
609
  const thresholds = await this.deps.getLocationThresholds();
610
+ const relievedDevices = /* @__PURE__ */ new Set();
610
611
  for (const [locationId, threshold] of thresholds) {
611
612
  if (threshold <= 0) continue;
613
+ const deviceKey = await this.deps.getLocationDeviceKey?.(locationId) ?? null;
614
+ if (deviceKey !== null && relievedDevices.has(deviceKey)) {
615
+ this.deps.logger.debug("storage pressure: skipping location — physical device already relieved this sweep", { meta: {
616
+ locationId,
617
+ deviceKey
618
+ } });
619
+ continue;
620
+ }
612
621
  try {
613
- await this.relieveLocation(locationId, threshold);
622
+ if (await this.relieveLocation(locationId, threshold) && deviceKey !== null) relievedDevices.add(deviceKey);
614
623
  } catch (err) {
615
624
  this.deps.logger.warn("storage pressure: relief failed for location", { meta: {
616
625
  locationId,
@@ -619,16 +628,25 @@ var StoragePressureManager = class {
619
628
  }
620
629
  }
621
630
  }
631
+ /**
632
+ * Relieve one location until it recovers, nothing is evictable, or a round
633
+ * makes no progress. Returns `true` when at least one relief round actually
634
+ * reclaimed bytes (so the caller marks the location's physical device relieved
635
+ * for this sweep — the trigger for the over-eviction dedup: freed bytes mean a
636
+ * sibling alias may re-read a not-yet-settled `statfs`), `false` when nothing
637
+ * was freed (never breached, or breached with no evictable data).
638
+ */
622
639
  async relieveLocation(locationId, threshold) {
623
640
  const maxRounds = this.deps.maxRounds ?? DEFAULT_MAX_ROUNDS;
624
641
  const hysteresis = this.deps.hysteresisPercent ?? DEFAULT_HYSTERESIS_PERCENT;
642
+ let reclaimedAny = false;
625
643
  for (let round = 0; round < maxRounds; round++) {
626
644
  const free = await this.deps.getFreePercent(locationId);
627
- if (free >= threshold) return;
645
+ if (free >= threshold) return reclaimedAny;
628
646
  const total = await this.deps.getVolumeTotalBytes(locationId);
629
647
  const deficitPercent = threshold - free + hysteresis;
630
648
  const targetBytes = Math.ceil(total * deficitPercent / 100);
631
- if (targetBytes <= 0) return;
649
+ if (targetBytes <= 0) return reclaimedAny;
632
650
  const providers = this.deps.getEvictableProviders();
633
651
  const usages = await Promise.all(providers.map(async (p) => ({
634
652
  p,
@@ -641,7 +659,7 @@ var StoragePressureManager = class {
641
659
  freePercent: free,
642
660
  threshold
643
661
  } });
644
- return;
662
+ return reclaimedAny;
645
663
  }
646
664
  let reclaimed = 0;
647
665
  for (const u of usages) {
@@ -653,6 +671,7 @@ var StoragePressureManager = class {
653
671
  });
654
672
  reclaimed += res.reclaimedBytes;
655
673
  }
674
+ if (reclaimed > 0) reclaimedAny = true;
656
675
  this.deps.logger.info("storage pressure: relief round", { meta: {
657
676
  locationId,
658
677
  round,
@@ -661,8 +680,9 @@ var StoragePressureManager = class {
661
680
  targetBytes,
662
681
  reclaimedBytes: reclaimed
663
682
  } });
664
- if (reclaimed <= 0) return;
683
+ if (reclaimed <= 0) return reclaimedAny;
665
684
  }
685
+ return reclaimedAny;
666
686
  }
667
687
  };
668
688
  //#endregion
@@ -916,7 +936,8 @@ var StorageOrchestratorAddon = class extends BaseAddon {
916
936
  getFreePercent: (id) => this.locationFreePercent(id),
917
937
  getVolumeTotalBytes: (id) => this.locationVolumeTotalBytes(id),
918
938
  getEvictableProviders: () => this.ctx.kernel.capabilityRegistry?.getCollection(STORAGE_EVICTABLE_CAP_NAME) ?? [],
919
- getLocationThresholds: () => this.resolveLocationThresholds()
939
+ getLocationThresholds: () => this.resolveLocationThresholds(),
940
+ getLocationDeviceKey: (id) => this.locationDeviceKey(id)
920
941
  });
921
942
  this.pressureTimer = setInterval(() => {
922
943
  this.runPressureSweep();
@@ -1029,6 +1050,26 @@ var StorageOrchestratorAddon = class extends BaseAddon {
1029
1050
  const bp = (this.service?.listLocations().find((l) => l.id === locationId))?.config["basePath"];
1030
1051
  return typeof bp === "string" && bp.length > 0 ? bp : null;
1031
1052
  }
1053
+ /**
1054
+ * A stable key for the PHYSICAL storage device behind a location — the
1055
+ * `realpath` of its `basePath`, so symlinked / bind-mounted aliases and
1056
+ * same-root managed locations (`recordings:default` + `recordingsLow:default`,
1057
+ * both at `/recordings`) collapse to one key. Feeds the pressure manager's
1058
+ * in-sweep dedup so a shared disk is relieved at most once per tick (closing
1059
+ * the bounded over-eviction window; see `getLocationDeviceKey`). Falls back to
1060
+ * the lexically-resolved path when realpath throws (root missing at boot),
1061
+ * `null` when the location has no basePath — either way dedup degrades to
1062
+ * per-location, never merging two distinct disks.
1063
+ */
1064
+ async locationDeviceKey(locationId) {
1065
+ const bp = this.locationBasePath(locationId);
1066
+ if (!bp) return null;
1067
+ try {
1068
+ return await fs.realpath(bp);
1069
+ } catch {
1070
+ return path$1.resolve(bp);
1071
+ }
1072
+ }
1032
1073
  /** Free capacity (%) on a location's volume via `statfs`; 100 (guard inert) when unstattable. */
1033
1074
  async locationFreePercent(locationId) {
1034
1075
  const bp = this.locationBasePath(locationId);