@camstack/system 1.2.413 → 1.2.415

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 (77) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  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/autotrack/index.js +1 -1
  12. package/dist/builtins/autotrack/index.mjs +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  15. package/dist/builtins/calendars/calendars.addon.js +1 -1
  16. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  17. package/dist/builtins/camera-grid/index.js +1 -1
  18. package/dist/builtins/camera-grid/index.mjs +1 -1
  19. package/dist/builtins/composer/composer.addon.js +2 -2
  20. package/dist/builtins/composer/composer.addon.mjs +2 -2
  21. package/dist/builtins/console-logging/index.js +1 -1
  22. package/dist/builtins/console-logging/index.mjs +1 -1
  23. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  24. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  25. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  26. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  27. package/dist/builtins/hub-forwarder/index.js +1 -1
  28. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  29. package/dist/builtins/keychain/index.js +3 -3
  30. package/dist/builtins/keychain/index.mjs +3 -3
  31. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  32. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  33. package/dist/builtins/local-auth/local-auth.addon.js +4 -3
  34. package/dist/builtins/local-auth/local-auth.addon.mjs +4 -3
  35. package/dist/builtins/local-network/local-network.addon.js +1 -1
  36. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  37. package/dist/builtins/loki-logging/index.js +1 -1
  38. package/dist/builtins/loki-logging/index.mjs +1 -1
  39. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  40. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  41. package/dist/builtins/platform-probe/index.js +1 -1
  42. package/dist/builtins/platform-probe/index.mjs +1 -1
  43. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  44. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  45. package/dist/builtins/snapshot/index.js +1 -1
  46. package/dist/builtins/snapshot/index.mjs +1 -1
  47. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  48. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  50. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  51. package/dist/builtins/storage-orchestrator/storage-location-band-monitor.d.ts +43 -0
  52. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +6 -0
  53. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +113 -1
  54. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +113 -1
  55. package/dist/builtins/system-config/system-config.addon.js +2 -2
  56. package/dist/builtins/system-config/system-config.addon.mjs +2 -2
  57. package/dist/builtins/winston-logging/index.js +1 -1
  58. package/dist/builtins/winston-logging/index.mjs +1 -1
  59. package/dist/{child-cap-dispatch-fnYkJDjG.js → child-cap-dispatch-DFBrdGH2.js} +1 -1
  60. package/dist/{child-cap-dispatch-CpYnlLNt.mjs → child-cap-dispatch-SF8oiwgo.mjs} +1 -1
  61. package/dist/{composition-sources-QndhKNb5.mjs → composition-sources-CXxkMoXq.mjs} +1 -1
  62. package/dist/{composition-sources-BX6Caql_.js → composition-sources-YlkCjf-1.js} +1 -1
  63. package/dist/{constants-vMEWqCqG.mjs → constants-BT-fudVK.mjs} +1 -1
  64. package/dist/{constants-CMXQ1QIC.js → constants-DChnQrhM.js} +1 -1
  65. package/dist/{dist-BcnmH70Z.js → dist-CvarXqQt.js} +47 -2
  66. package/dist/{dist-ItJ3qAAA.mjs → dist-dEsHYY8m.mjs} +47 -2
  67. package/dist/{event-loop-stall-monitor-CogzcENb.mjs → event-loop-stall-monitor-BEfMVUxz.mjs} +1 -1
  68. package/dist/{event-loop-stall-monitor-DoFaUgFf.js → event-loop-stall-monitor-LZvGqiHI.js} +1 -1
  69. package/dist/index.js +6 -6
  70. package/dist/index.mjs +6 -6
  71. package/dist/{jwt-signing-key-CST1LdM6.js → jwt-signing-key-CfiteETM.js} +1 -1
  72. package/dist/{jwt-signing-key-CpMSrZuI.mjs → jwt-signing-key-SFIxaH2x.mjs} +1 -1
  73. package/dist/{restore-archive-8F_M_wW0.mjs → restore-archive-Bww1Fl04.mjs} +1 -1
  74. package/dist/{restore-archive-pSlTKRgU.js → restore-archive-CAw_3iNq.js} +1 -1
  75. package/dist/{retired-settings-keys-CbkMnFXg.mjs → retired-settings-keys-ChQ3qH-V.mjs} +1 -1
  76. package/dist/{retired-settings-keys-D3E47aR_.js → retired-settings-keys-YLflwTPH.js} +1 -1
  77. 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-BcnmH70Z.js");
6
+ const require_dist = require("../../dist-CvarXqQt.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-W8oEm4ME.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -3342,6 +3342,64 @@ var StoragePressureManager = class {
3342
3342
  }
3343
3343
  };
3344
3344
  //#endregion
3345
+ //#region src/builtins/storage-orchestrator/storage-location-band-monitor.ts
3346
+ var DEFAULT_STORAGE_LOCATION_BAND_CONFIG = {
3347
+ lowPercent: 15,
3348
+ criticalPercent: 5
3349
+ };
3350
+ function bandOf(freePercent, config) {
3351
+ if (freePercent === null) return {
3352
+ band: "critical",
3353
+ reason: "capacity-unreadable"
3354
+ };
3355
+ if (freePercent <= config.criticalPercent) return {
3356
+ band: "critical",
3357
+ reason: "free-below-critical"
3358
+ };
3359
+ if (freePercent <= config.lowPercent) return {
3360
+ band: "low",
3361
+ reason: "free-below-warn"
3362
+ };
3363
+ return {
3364
+ band: "ok",
3365
+ reason: "free-ok"
3366
+ };
3367
+ }
3368
+ var StorageLocationBandMonitor = class {
3369
+ config;
3370
+ band = /* @__PURE__ */ new Map();
3371
+ constructor(config = DEFAULT_STORAGE_LOCATION_BAND_CONFIG) {
3372
+ this.config = config;
3373
+ }
3374
+ /**
3375
+ * Observe one sweep of managed locations. Locations missing from `samples`
3376
+ * drop their episode without emitting `ok` (disabled / removed).
3377
+ */
3378
+ observe(samples) {
3379
+ const seen = /* @__PURE__ */ new Set();
3380
+ const out = [];
3381
+ for (const sample of samples) {
3382
+ seen.add(sample.locationId);
3383
+ const { band, reason } = bandOf(sample.freePercent, this.config);
3384
+ const previous = this.band.get(sample.locationId) ?? null;
3385
+ if (previous === band) continue;
3386
+ this.band.set(sample.locationId, band);
3387
+ if (previous === null && band === "ok") continue;
3388
+ out.push({
3389
+ locationId: sample.locationId,
3390
+ ...sample.nodeId !== void 0 ? { nodeId: sample.nodeId } : {},
3391
+ ...sample.locationName !== void 0 ? { locationName: sample.locationName } : {},
3392
+ band,
3393
+ freePercent: sample.freePercent,
3394
+ reason,
3395
+ previous
3396
+ });
3397
+ }
3398
+ for (const id of [...this.band.keys()]) if (!seen.has(id)) this.band.delete(id);
3399
+ return out;
3400
+ }
3401
+ };
3402
+ //#endregion
3345
3403
  //#region src/builtins/storage-orchestrator/storage-orchestrator.addon.ts
3346
3404
  /**
3347
3405
  * `storage-orchestrator` builtin — singleton owner of the consumer-
@@ -3386,6 +3444,7 @@ var CAP_PROVIDER_REGISTERED_CATEGORY = "capability:provider-registered";
3386
3444
  var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
3387
3445
  service = null;
3388
3446
  pressureManager = null;
3447
+ locationBandMonitor = new StorageLocationBandMonitor();
3389
3448
  /**
3390
3449
  * How much of each location CamStack itself holds (D388).
3391
3450
  *
@@ -3888,6 +3947,7 @@ var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
3888
3947
  this.pressureSweepInFlight = true;
3889
3948
  try {
3890
3949
  await this.pressureManager.sweep();
3950
+ await this.emitLocationBandEvents();
3891
3951
  } catch (err) {
3892
3952
  this.ctxIfReady?.logger.warn("storage pressure sweep failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
3893
3953
  } finally {
@@ -3895,6 +3955,58 @@ var StorageOrchestratorAddon = class extends require_dist.BaseAddon {
3895
3955
  }
3896
3956
  }
3897
3957
  /**
3958
+ * Sample free space for every managed location and emit NC band edges.
3959
+ * A failed capacity read stays `null` (critical) — never folded to 0 (D393).
3960
+ */
3961
+ async emitLocationBandEvents() {
3962
+ const svc = this.service;
3963
+ const ctx = this.ctxIfReady;
3964
+ if (!svc || !ctx) return;
3965
+ const thresholds = await this.resolveLocationThresholds();
3966
+ const byId = new Map(svc.listLocations().map((loc) => [loc.id, loc]));
3967
+ const samples = await Promise.all([...thresholds.keys()].map(async (locationId) => {
3968
+ const loc = byId.get(locationId);
3969
+ if (loc === void 0 || !require_dist.mayReadLocation(loc)) return {
3970
+ locationId,
3971
+ freePercent: null
3972
+ };
3973
+ const capacity = await this.volumeCapacityOf(locationId).catch(() => null);
3974
+ const freePercent = capacity === null ? null : freePercentOf(capacity);
3975
+ return {
3976
+ locationId,
3977
+ nodeId: loc.nodeId,
3978
+ locationName: loc.displayName,
3979
+ freePercent
3980
+ };
3981
+ }));
3982
+ for (const edge of this.locationBandMonitor.observe(samples)) {
3983
+ const category = edge.band === "low" ? require_dist.EventCategory.StorageLocationLow : edge.band === "critical" ? require_dist.EventCategory.StorageLocationCritical : require_dist.EventCategory.StorageLocationOk;
3984
+ ctx.logger.info("storage: location band changed", { meta: {
3985
+ locationId: edge.locationId,
3986
+ band: edge.band,
3987
+ freePercent: edge.freePercent,
3988
+ reason: edge.reason
3989
+ } });
3990
+ ctx.eventBus.emit({
3991
+ id: (0, node_crypto.randomUUID)(),
3992
+ timestamp: /* @__PURE__ */ new Date(),
3993
+ source: {
3994
+ type: "addon",
3995
+ id: this.manifest.id,
3996
+ nodeId: ctx.nodeId
3997
+ },
3998
+ category,
3999
+ data: {
4000
+ locationId: edge.locationId,
4001
+ ...edge.nodeId !== void 0 ? { nodeId: edge.nodeId } : {},
4002
+ ...edge.locationName !== void 0 ? { locationName: edge.locationName } : {},
4003
+ freePercent: edge.freePercent,
4004
+ reason: edge.reason
4005
+ }
4006
+ });
4007
+ }
4008
+ }
4009
+ /**
3898
4010
  * locationId → resolved `minFreePercent`. The policy is intrinsic to the
3899
4011
  * location's provider (`shouldSaveDiskSpace` gates the guard, `minFreePercent`
3900
4012
  * is the default), overridable per-location via `config.minFreePercent`.
@@ -1,4 +1,4 @@
1
- import { B as StorageCleanupJobSchema, Fn as storageCapability, Ft as gbToBytes, H as StorageLocationTypeSchema, In as storageMigrationCapability, Jn as withLocationMode, Jr as resolveSecretMarkers, Jt as legacyModeOf, Mn as settingsStoreCapability, O as LegacyStorageLocationDefaultSchema, Ot as evictionPolicyOfLocation, Rr as isSecretMarker, Tn as resolveLocationMode, U as StorageMigrationJobSchema, Ur as parseJsonObject, V as StorageLocationModeSchema, Vt as isLocationEnabled, Zr as secretTreeFromPaths, dr as BaseAddon, hr as REDACTED_SECRET, ni as transformSecretWrite, nn as mayReadLocation, on as modeMayWrite, ri as EventCategory, rn as mayWriteToLocation, wr as collectSecretConfigKeys } from "../../dist-ItJ3qAAA.mjs";
1
+ import { B as StorageCleanupJobSchema, Fn as storageCapability, Ft as gbToBytes, H as StorageLocationTypeSchema, In as storageMigrationCapability, Jn as withLocationMode, Jr as resolveSecretMarkers, Jt as legacyModeOf, Mn as settingsStoreCapability, O as LegacyStorageLocationDefaultSchema, Ot as evictionPolicyOfLocation, Rr as isSecretMarker, Tn as resolveLocationMode, U as StorageMigrationJobSchema, Ur as parseJsonObject, V as StorageLocationModeSchema, Vt as isLocationEnabled, Zr as secretTreeFromPaths, dr as BaseAddon, hr as REDACTED_SECRET, ni as transformSecretWrite, nn as mayReadLocation, on as modeMayWrite, ri as EventCategory, rn as mayWriteToLocation, wr as collectSecretConfigKeys } from "../../dist-dEsHYY8m.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-CDiN1p98.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3337,6 +3337,64 @@ var StoragePressureManager = class {
3337
3337
  }
3338
3338
  };
3339
3339
  //#endregion
3340
+ //#region src/builtins/storage-orchestrator/storage-location-band-monitor.ts
3341
+ var DEFAULT_STORAGE_LOCATION_BAND_CONFIG = {
3342
+ lowPercent: 15,
3343
+ criticalPercent: 5
3344
+ };
3345
+ function bandOf(freePercent, config) {
3346
+ if (freePercent === null) return {
3347
+ band: "critical",
3348
+ reason: "capacity-unreadable"
3349
+ };
3350
+ if (freePercent <= config.criticalPercent) return {
3351
+ band: "critical",
3352
+ reason: "free-below-critical"
3353
+ };
3354
+ if (freePercent <= config.lowPercent) return {
3355
+ band: "low",
3356
+ reason: "free-below-warn"
3357
+ };
3358
+ return {
3359
+ band: "ok",
3360
+ reason: "free-ok"
3361
+ };
3362
+ }
3363
+ var StorageLocationBandMonitor = class {
3364
+ config;
3365
+ band = /* @__PURE__ */ new Map();
3366
+ constructor(config = DEFAULT_STORAGE_LOCATION_BAND_CONFIG) {
3367
+ this.config = config;
3368
+ }
3369
+ /**
3370
+ * Observe one sweep of managed locations. Locations missing from `samples`
3371
+ * drop their episode without emitting `ok` (disabled / removed).
3372
+ */
3373
+ observe(samples) {
3374
+ const seen = /* @__PURE__ */ new Set();
3375
+ const out = [];
3376
+ for (const sample of samples) {
3377
+ seen.add(sample.locationId);
3378
+ const { band, reason } = bandOf(sample.freePercent, this.config);
3379
+ const previous = this.band.get(sample.locationId) ?? null;
3380
+ if (previous === band) continue;
3381
+ this.band.set(sample.locationId, band);
3382
+ if (previous === null && band === "ok") continue;
3383
+ out.push({
3384
+ locationId: sample.locationId,
3385
+ ...sample.nodeId !== void 0 ? { nodeId: sample.nodeId } : {},
3386
+ ...sample.locationName !== void 0 ? { locationName: sample.locationName } : {},
3387
+ band,
3388
+ freePercent: sample.freePercent,
3389
+ reason,
3390
+ previous
3391
+ });
3392
+ }
3393
+ for (const id of [...this.band.keys()]) if (!seen.has(id)) this.band.delete(id);
3394
+ return out;
3395
+ }
3396
+ };
3397
+ //#endregion
3340
3398
  //#region src/builtins/storage-orchestrator/storage-orchestrator.addon.ts
3341
3399
  /**
3342
3400
  * `storage-orchestrator` builtin — singleton owner of the consumer-
@@ -3381,6 +3439,7 @@ var CAP_PROVIDER_REGISTERED_CATEGORY = "capability:provider-registered";
3381
3439
  var StorageOrchestratorAddon = class extends BaseAddon {
3382
3440
  service = null;
3383
3441
  pressureManager = null;
3442
+ locationBandMonitor = new StorageLocationBandMonitor();
3384
3443
  /**
3385
3444
  * How much of each location CamStack itself holds (D388).
3386
3445
  *
@@ -3883,6 +3942,7 @@ var StorageOrchestratorAddon = class extends BaseAddon {
3883
3942
  this.pressureSweepInFlight = true;
3884
3943
  try {
3885
3944
  await this.pressureManager.sweep();
3945
+ await this.emitLocationBandEvents();
3886
3946
  } catch (err) {
3887
3947
  this.ctxIfReady?.logger.warn("storage pressure sweep failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
3888
3948
  } finally {
@@ -3890,6 +3950,58 @@ var StorageOrchestratorAddon = class extends BaseAddon {
3890
3950
  }
3891
3951
  }
3892
3952
  /**
3953
+ * Sample free space for every managed location and emit NC band edges.
3954
+ * A failed capacity read stays `null` (critical) — never folded to 0 (D393).
3955
+ */
3956
+ async emitLocationBandEvents() {
3957
+ const svc = this.service;
3958
+ const ctx = this.ctxIfReady;
3959
+ if (!svc || !ctx) return;
3960
+ const thresholds = await this.resolveLocationThresholds();
3961
+ const byId = new Map(svc.listLocations().map((loc) => [loc.id, loc]));
3962
+ const samples = await Promise.all([...thresholds.keys()].map(async (locationId) => {
3963
+ const loc = byId.get(locationId);
3964
+ if (loc === void 0 || !mayReadLocation(loc)) return {
3965
+ locationId,
3966
+ freePercent: null
3967
+ };
3968
+ const capacity = await this.volumeCapacityOf(locationId).catch(() => null);
3969
+ const freePercent = capacity === null ? null : freePercentOf(capacity);
3970
+ return {
3971
+ locationId,
3972
+ nodeId: loc.nodeId,
3973
+ locationName: loc.displayName,
3974
+ freePercent
3975
+ };
3976
+ }));
3977
+ for (const edge of this.locationBandMonitor.observe(samples)) {
3978
+ const category = edge.band === "low" ? EventCategory.StorageLocationLow : edge.band === "critical" ? EventCategory.StorageLocationCritical : EventCategory.StorageLocationOk;
3979
+ ctx.logger.info("storage: location band changed", { meta: {
3980
+ locationId: edge.locationId,
3981
+ band: edge.band,
3982
+ freePercent: edge.freePercent,
3983
+ reason: edge.reason
3984
+ } });
3985
+ ctx.eventBus.emit({
3986
+ id: randomUUID(),
3987
+ timestamp: /* @__PURE__ */ new Date(),
3988
+ source: {
3989
+ type: "addon",
3990
+ id: this.manifest.id,
3991
+ nodeId: ctx.nodeId
3992
+ },
3993
+ category,
3994
+ data: {
3995
+ locationId: edge.locationId,
3996
+ ...edge.nodeId !== void 0 ? { nodeId: edge.nodeId } : {},
3997
+ ...edge.locationName !== void 0 ? { locationName: edge.locationName } : {},
3998
+ freePercent: edge.freePercent,
3999
+ reason: edge.reason
4000
+ }
4001
+ });
4002
+ }
4003
+ }
4004
+ /**
3893
4005
  * locationId → resolved `minFreePercent`. The policy is intrinsic to the
3894
4006
  * location's provider (`shouldSaveDiskSpace` gates the guard, `minFreePercent`
3895
4007
  * is the default), overridable per-location via `config.minFreePercent`.
@@ -3,9 +3,9 @@ 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-BcnmH70Z.js");
6
+ const require_dist = require("../../dist-CvarXqQt.js");
7
7
  const require_ms$1 = require("../../ms-t68_FaqE.js");
8
- const require_constants$8 = require("../../constants-CMXQ1QIC.js");
8
+ const require_constants$8 = require("../../constants-DChnQrhM.js");
9
9
  const require_x509_es = require("../../x509.es-BhTzcFhZ.js");
10
10
  let zod = require("zod");
11
11
  let node_crypto = require("node:crypto");
@@ -1,7 +1,7 @@
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 { Br as makeSecretMarker, Dr as customAction, Lr as isSecretClear, Nr as hydrateSchema, Or as defineCustomActions, Qr as secretTreeFromSchema, Rr as isSecretMarker, dr as BaseAddon, ni as transformSecretWrite, ur as errMsg } from "../../dist-ItJ3qAAA.mjs";
2
+ import { Br as makeSecretMarker, Dr as customAction, Lr as isSecretClear, Nr as hydrateSchema, Or as defineCustomActions, Qr as secretTreeFromSchema, Rr as isSecretMarker, dr as BaseAddon, ni as transformSecretWrite, ur as errMsg } from "../../dist-dEsHYY8m.mjs";
3
3
  import { n as require_safe_buffer, t as require_ms } from "../../ms-DlIWNkkk.mjs";
4
- import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, 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, v as hashClusterSecret } from "../../constants-vMEWqCqG.mjs";
4
+ import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, 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, v as hashClusterSecret } from "../../constants-BT-fudVK.mjs";
5
5
  import { a as KeyUsagesExtension, c as Pkcs10CertificateRequestGenerator, d as X509Certificate$1, f as X509CertificateGenerator, i as KeyUsageFlags, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, s as Pkcs10CertificateRequest, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "../../x509.es-Xf3K_brW.mjs";
6
6
  import { z } from "zod";
7
7
  import { X509Certificate, createHash, createHmac, randomBytes, timingSafeEqual, 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-BcnmH70Z.js");
6
+ const require_dist = require("../../dist-CvarXqQt.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { Qt as logDestinationCapability, dr as BaseAddon } from "../../dist-ItJ3qAAA.mjs";
1
+ import { Qt as logDestinationCapability, dr as BaseAddon } from "../../dist-dEsHYY8m.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BcnmH70Z.js");
2
+ const require_dist = require("./dist-CvarXqQt.js");
3
3
  const require_proc_stat = require("./proc-stat-DL-WUOhl.js");
4
4
  require("./hub-cap-forward-W8oEm4ME.js");
5
5
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Er as createEvent, Xr as scrubKnownSecrets, ri as EventCategory$1, tn as maskUrlCredentials } from "./dist-ItJ3qAAA.mjs";
1
+ import { Er as createEvent, Xr as scrubKnownSecrets, ri as EventCategory$1, tn as maskUrlCredentials } from "./dist-dEsHYY8m.mjs";
2
2
  import { a as parseProcStat, i as nodeProcReader } from "./proc-stat-CbC55Kqi.mjs";
3
3
  import "./hub-cap-forward-CDiN1p98.mjs";
4
4
  import * as crypto$1 from "node:crypto";
@@ -1,4 +1,4 @@
1
- import { rr as compositionSourceKey, ur as errMsg } from "./dist-ItJ3qAAA.mjs";
1
+ import { rr as compositionSourceKey, ur as errMsg } from "./dist-dEsHYY8m.mjs";
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BcnmH70Z.js");
1
+ const require_dist = require("./dist-CvarXqQt.js");
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- import { Cr as buildSecretRef } from "./dist-ItJ3qAAA.mjs";
1
+ import { Cr as buildSecretRef } from "./dist-dEsHYY8m.mjs";
2
2
  import { createHash, timingSafeEqual } from "node:crypto";
3
3
  //#region src/kernel/moleculer/cluster-secret.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BcnmH70Z.js");
1
+ const require_dist = require("./dist-CvarXqQt.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/kernel/moleculer/cluster-secret.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  let zod = require("zod");
2
2
  require("node:crypto");
3
- //#region ../types/dist/event-category-DaIZi00R.mjs
3
+ //#region ../types/dist/event-category-C4hVnRo8.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -219,7 +219,17 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
219
219
  EventCategory["RecordingStopped"] = "recording.stopped";
220
220
  EventCategory["RecordingError"] = "recording.error";
221
221
  EventCategory["RecordingHealthDegraded"] = "recording.health.degraded";
222
+ /** Recording enabled but no segment finalized for the NC stall window. */
223
+ EventCategory["RecordingHealthStalled"] = "recording.health.stalled";
224
+ /** Recovery from {@link RecordingHealthStalled}. */
225
+ EventCategory["RecordingHealthOk"] = "recording.health.ok";
222
226
  EventCategory["RecordingStorageCritical"] = "recording.storage.critical";
227
+ /** Free space on a storage location crossed the warn bar. */
228
+ EventCategory["StorageLocationLow"] = "storage.location.low";
229
+ /** Free space at/under the critical bar, or capacity probe failed (`null`). */
230
+ EventCategory["StorageLocationCritical"] = "storage.location.critical";
231
+ /** Recovery from low/critical on a storage location. */
232
+ EventCategory["StorageLocationOk"] = "storage.location.ok";
223
233
  EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
224
234
  EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
225
235
  EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
@@ -708,7 +718,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
708
718
  return EventCategory;
709
719
  }({});
710
720
  //#endregion
711
- //#region ../types/dist/sleep-DwAQ9sqX.mjs
721
+ //#region ../types/dist/sleep-Tkp9dHXv.mjs
712
722
  /**
713
723
  * The audio chunk plane's byte format, and the ONE expansion from a coded
714
724
  * window to float samples (D455).
@@ -22309,6 +22319,12 @@ var NcSystemEventKindSchema = zod.z.enum([
22309
22319
  "node-updating",
22310
22320
  "node-inference-unavailable",
22311
22321
  "detection-blind",
22322
+ "recording-stalled",
22323
+ "recording-healthy",
22324
+ "recording-degraded",
22325
+ "storage-location-low",
22326
+ "storage-location-critical",
22327
+ "storage-location-ok",
22312
22328
  "addon-crash-loop",
22313
22329
  "addon-update-available",
22314
22330
  "server-update-available",
@@ -63878,6 +63894,9 @@ new Map(Object.entries({
63878
63894
  "stream-online": "device-events",
63879
63895
  "stream-offline": "device-events",
63880
63896
  "detection-blind": "device-events",
63897
+ "recording-stalled": "device-events",
63898
+ "recording-healthy": "device-events",
63899
+ "recording-degraded": "device-events",
63881
63900
  "node-online": "system",
63882
63901
  "node-offline": "system",
63883
63902
  "node-restarting": "system",
@@ -63891,6 +63910,9 @@ new Map(Object.entries({
63891
63910
  "wrapper-update-available": "system",
63892
63911
  "backup-completed": "system",
63893
63912
  "export-completed": "system",
63913
+ "storage-location-low": "system",
63914
+ "storage-location-critical": "system",
63915
+ "storage-location-ok": "system",
63894
63916
  "alarm-triggered": "alarm",
63895
63917
  "alarm-armed": "alarm",
63896
63918
  "alarm-disarmed": "alarm",
@@ -63952,6 +63974,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
63952
63974
  label: "Detecting nothing",
63953
63975
  kinds: ["detection-blind"]
63954
63976
  },
63977
+ {
63978
+ id: "recording",
63979
+ family: "device-events",
63980
+ label: "Recording",
63981
+ kinds: [
63982
+ "recording-stalled",
63983
+ "recording-healthy",
63984
+ "recording-degraded"
63985
+ ]
63986
+ },
63955
63987
  {
63956
63988
  id: "nodes",
63957
63989
  family: "system",
@@ -63992,6 +64024,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
63992
64024
  label: "Backups & exports",
63993
64025
  kinds: ["backup-completed", "export-completed"]
63994
64026
  },
64027
+ {
64028
+ id: "storage",
64029
+ family: "system",
64030
+ label: "Storage locations",
64031
+ kinds: [
64032
+ "storage-location-low",
64033
+ "storage-location-critical",
64034
+ "storage-location-ok"
64035
+ ]
64036
+ },
63995
64037
  {
63996
64038
  id: "alarm",
63997
64039
  family: "alarm",
@@ -64074,6 +64116,9 @@ var DEVICE_EVENTS = [
64074
64116
  "stream-online",
64075
64117
  "stream-offline",
64076
64118
  "detection-blind",
64119
+ "recording-stalled",
64120
+ "recording-healthy",
64121
+ "recording-degraded",
64077
64122
  ...ALARM
64078
64123
  ];
64079
64124
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import "node:crypto";
3
- //#region ../types/dist/event-category-DaIZi00R.mjs
3
+ //#region ../types/dist/event-category-C4hVnRo8.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -219,7 +219,17 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
219
219
  EventCategory["RecordingStopped"] = "recording.stopped";
220
220
  EventCategory["RecordingError"] = "recording.error";
221
221
  EventCategory["RecordingHealthDegraded"] = "recording.health.degraded";
222
+ /** Recording enabled but no segment finalized for the NC stall window. */
223
+ EventCategory["RecordingHealthStalled"] = "recording.health.stalled";
224
+ /** Recovery from {@link RecordingHealthStalled}. */
225
+ EventCategory["RecordingHealthOk"] = "recording.health.ok";
222
226
  EventCategory["RecordingStorageCritical"] = "recording.storage.critical";
227
+ /** Free space on a storage location crossed the warn bar. */
228
+ EventCategory["StorageLocationLow"] = "storage.location.low";
229
+ /** Free space at/under the critical bar, or capacity probe failed (`null`). */
230
+ EventCategory["StorageLocationCritical"] = "storage.location.critical";
231
+ /** Recovery from low/critical on a storage location. */
232
+ EventCategory["StorageLocationOk"] = "storage.location.ok";
223
233
  EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
224
234
  EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
225
235
  EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
@@ -708,7 +718,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
708
718
  return EventCategory;
709
719
  }({});
710
720
  //#endregion
711
- //#region ../types/dist/sleep-DwAQ9sqX.mjs
721
+ //#region ../types/dist/sleep-Tkp9dHXv.mjs
712
722
  /**
713
723
  * The audio chunk plane's byte format, and the ONE expansion from a coded
714
724
  * window to float samples (D455).
@@ -22309,6 +22319,12 @@ var NcSystemEventKindSchema = z.enum([
22309
22319
  "node-updating",
22310
22320
  "node-inference-unavailable",
22311
22321
  "detection-blind",
22322
+ "recording-stalled",
22323
+ "recording-healthy",
22324
+ "recording-degraded",
22325
+ "storage-location-low",
22326
+ "storage-location-critical",
22327
+ "storage-location-ok",
22312
22328
  "addon-crash-loop",
22313
22329
  "addon-update-available",
22314
22330
  "server-update-available",
@@ -63878,6 +63894,9 @@ new Map(Object.entries({
63878
63894
  "stream-online": "device-events",
63879
63895
  "stream-offline": "device-events",
63880
63896
  "detection-blind": "device-events",
63897
+ "recording-stalled": "device-events",
63898
+ "recording-healthy": "device-events",
63899
+ "recording-degraded": "device-events",
63881
63900
  "node-online": "system",
63882
63901
  "node-offline": "system",
63883
63902
  "node-restarting": "system",
@@ -63891,6 +63910,9 @@ new Map(Object.entries({
63891
63910
  "wrapper-update-available": "system",
63892
63911
  "backup-completed": "system",
63893
63912
  "export-completed": "system",
63913
+ "storage-location-low": "system",
63914
+ "storage-location-critical": "system",
63915
+ "storage-location-ok": "system",
63894
63916
  "alarm-triggered": "alarm",
63895
63917
  "alarm-armed": "alarm",
63896
63918
  "alarm-disarmed": "alarm",
@@ -63952,6 +63974,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
63952
63974
  label: "Detecting nothing",
63953
63975
  kinds: ["detection-blind"]
63954
63976
  },
63977
+ {
63978
+ id: "recording",
63979
+ family: "device-events",
63980
+ label: "Recording",
63981
+ kinds: [
63982
+ "recording-stalled",
63983
+ "recording-healthy",
63984
+ "recording-degraded"
63985
+ ]
63986
+ },
63955
63987
  {
63956
63988
  id: "nodes",
63957
63989
  family: "system",
@@ -63992,6 +64024,16 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
63992
64024
  label: "Backups & exports",
63993
64025
  kinds: ["backup-completed", "export-completed"]
63994
64026
  },
64027
+ {
64028
+ id: "storage",
64029
+ family: "system",
64030
+ label: "Storage locations",
64031
+ kinds: [
64032
+ "storage-location-low",
64033
+ "storage-location-critical",
64034
+ "storage-location-ok"
64035
+ ]
64036
+ },
63995
64037
  {
63996
64038
  id: "alarm",
63997
64039
  family: "alarm",
@@ -64074,6 +64116,9 @@ var DEVICE_EVENTS = [
64074
64116
  "stream-online",
64075
64117
  "stream-offline",
64076
64118
  "detection-blind",
64119
+ "recording-stalled",
64120
+ "recording-healthy",
64121
+ "recording-degraded",
64077
64122
  ...ALARM
64078
64123
  ];
64079
64124
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -1,4 +1,4 @@
1
- import { It as hfModelUrl, M as MODEL_FORMATS, T as HF_REPO } from "./dist-ItJ3qAAA.mjs";
1
+ import { It as hfModelUrl, M as MODEL_FORMATS, T as HF_REPO } from "./dist-dEsHYY8m.mjs";
2
2
  import { createHash } from "node:crypto";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BcnmH70Z.js");
2
+ const require_dist = require("./dist-CvarXqQt.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
package/dist/index.js CHANGED
@@ -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-BcnmH70Z.js");
4
- const require_jwt_signing_key = require("./jwt-signing-key-CST1LdM6.js");
3
+ const require_dist = require("./dist-CvarXqQt.js");
4
+ const require_jwt_signing_key = require("./jwt-signing-key-CfiteETM.js");
5
5
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
6
6
  require("./builtins/alerts/index.js");
7
7
  const require_builtins_calendars_calendars_addon = require("./builtins/calendars/calendars.addon.js");
@@ -27,17 +27,17 @@ const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage
27
27
  const require_hub_cap_forward = require("./hub-cap-forward-W8oEm4ME.js");
28
28
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
29
29
  require("./builtins/storage-orchestrator/index.js");
30
- const require_constants = require("./constants-CMXQ1QIC.js");
30
+ const require_constants = require("./constants-DChnQrhM.js");
31
31
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
32
32
  require("./builtins/system-config/index.js");
33
33
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
34
- const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-DoFaUgFf.js");
34
+ const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-LZvGqiHI.js");
35
35
  const require_tls = require("./tls-BWpwU-d5.js");
36
- const require_child_cap_dispatch = require("./child-cap-dispatch-fnYkJDjG.js");
36
+ const require_child_cap_dispatch = require("./child-cap-dispatch-DFBrdGH2.js");
37
37
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
38
38
  const require_resource_monitor = require("./resource-monitor-BgWGRxN5.js");
39
39
  const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.js");
40
- const require_restore_archive = require("./restore-archive-pSlTKRgU.js");
40
+ const require_restore_archive = require("./restore-archive-CAw_3iNq.js");
41
41
  let zod = require("zod");
42
42
  let node_crypto = require("node:crypto");
43
43
  let _camstack_types_node = require("@camstack/types/node");