@camstack/server 1.2.884 → 1.2.886

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 (93) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/trpc/generated-cap-routers.js +18 -0
  3. package/package.json +10 -8
  4. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  5. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  6. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  7. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  8. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  9. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  10. package/system/dist/builtins/autotrack/index.js +1 -1
  11. package/system/dist/builtins/autotrack/index.mjs +1 -1
  12. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  13. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  14. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  15. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  16. package/system/dist/builtins/camera-grid/index.js +1 -1
  17. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  18. package/system/dist/builtins/composer/composer.addon.js +4 -4
  19. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  20. package/system/dist/builtins/console-logging/index.js +1 -1
  21. package/system/dist/builtins/console-logging/index.mjs +1 -1
  22. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  23. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  24. package/system/dist/builtins/device-history/device-history.addon.js +170 -2
  25. package/system/dist/builtins/device-history/device-history.addon.mjs +170 -2
  26. package/system/dist/builtins/device-history/retention/range-delete.d.ts +52 -0
  27. package/system/dist/builtins/device-history/rollup/rollup-engine.d.ts +11 -0
  28. package/system/dist/builtins/device-history/runtime/history-runtime.d.ts +5 -1
  29. package/system/dist/builtins/device-history/store/history-store.d.ts +5 -0
  30. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  31. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  32. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  33. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  34. package/system/dist/builtins/keychain/index.js +4 -4
  35. package/system/dist/builtins/keychain/index.mjs +4 -4
  36. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  37. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  38. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  39. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  40. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  41. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  42. package/system/dist/builtins/loki-logging/index.js +1 -1
  43. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  44. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  45. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  46. package/system/dist/builtins/platform-probe/index.js +1 -1
  47. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  48. package/system/dist/builtins/record-entries/index.js +1 -1
  49. package/system/dist/builtins/record-entries/index.mjs +1 -1
  50. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  51. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  52. package/system/dist/builtins/snapshot/index.js +1 -1
  53. package/system/dist/builtins/snapshot/index.mjs +1 -1
  54. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  55. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  56. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  57. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  58. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  59. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  60. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  61. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  62. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  63. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  64. package/system/dist/builtins/winston-logging/index.js +1 -1
  65. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  66. package/system/dist/{capture-engine-D14TTaaO.js → capture-engine-CFpIaN4h.js} +1 -1
  67. package/system/dist/{capture-engine-D1VxFidj.mjs → capture-engine-OY78v21k.mjs} +1 -1
  68. package/system/dist/{composition-sources-DW9aO1g9.js → composition-sources-887l8zZU.js} +1 -1
  69. package/system/dist/{composition-sources-D83ybKCS.mjs → composition-sources-BnjzY6h1.mjs} +1 -1
  70. package/system/dist/{constants-2GrhzN-T.js → constants-BrsZY2kk.js} +1 -1
  71. package/system/dist/{constants-BdZYM4pz.mjs → constants-hKRykChp.mjs} +1 -1
  72. package/system/dist/{device-ca-DsmVXeGp.js → device-ca-DH3kSBQU.js} +1 -1
  73. package/system/dist/{device-ca-GCSaBq5b.mjs → device-ca-Daa8UqCp.mjs} +1 -1
  74. package/system/dist/{dist-g8h5trmJ.js → dist-DNZdEzw0.js} +155 -1
  75. package/system/dist/{dist-BDoMdUU3.mjs → dist-jhKGWoOo.mjs} +155 -1
  76. package/system/dist/file-host-worker.js +1 -1
  77. package/system/dist/file-host-worker.mjs +1 -1
  78. package/system/dist/{hub-identity-mscSQisH.js → hub-identity-1S01Uoxg.js} +1 -1
  79. package/system/dist/{hub-identity-Dd-T60Rd.mjs → hub-identity-Cqefb2qH.mjs} +1 -1
  80. package/system/dist/{hub-mdns-ciao-x1wE7M7D.js → hub-mdns-ciao-DVPKAuTm.js} +2 -2
  81. package/system/dist/{hub-mdns-ciao-CJlJ0skx.mjs → hub-mdns-ciao-Qfdqv_j1.mjs} +2 -2
  82. package/system/dist/index.js +39 -13
  83. package/system/dist/index.mjs +39 -13
  84. package/system/dist/kernel/unsupported-addon-tracker.d.ts +10 -2
  85. package/system/dist/{legacy-integration-rows-door-COwJBP8g.js → legacy-integration-rows-door-CRmUwtJ-.js} +1 -1
  86. package/system/dist/{legacy-integration-rows-door-DOAAvsCM.mjs → legacy-integration-rows-door-nxoPlTyI.mjs} +1 -1
  87. package/system/dist/{rename-composition-block-4TI-pwzS.js → rename-composition-block-1tEV5PeJ.js} +1 -1
  88. package/system/dist/{rename-composition-block-AX9Lc9Bu.mjs → rename-composition-block-lIOVbvzB.mjs} +1 -1
  89. package/system/dist/{restore-archive-Bpqb4LSG.js → restore-archive-CPKCo4EZ.js} +1 -1
  90. package/system/dist/{restore-archive-DSHgzPzG.mjs → restore-archive-CpvNbRTS.mjs} +1 -1
  91. package/system/dist/{wal-maintenance-BU17H1Z1.js → wal-maintenance-BTqfYbnU.js} +0 -0
  92. package/system/dist/{wal-maintenance-Cp6aLpv5.mjs → wal-maintenance-Ck_hJBJr.mjs} +0 -0
  93. package/system/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Jc as defineRecordKinds } from "./dist-BDoMdUU3.mjs";
1
+ import { Jc as defineRecordKinds } from "./dist-jhKGWoOo.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { z } from "zod";
4
4
  import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-g8h5trmJ.js");
2
+ const require_dist = require("./dist-DNZdEzw0.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
- const require_hub_identity = require("./hub-identity-mscSQisH.js");
4
+ const require_hub_identity = require("./hub-identity-1S01Uoxg.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs = require("node:fs");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { Rl as userError } from "./dist-BDoMdUU3.mjs";
2
+ import { Rl as userError } from "./dist-jhKGWoOo.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
4
- import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-Dd-T60Rd.mjs";
4
+ import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-Cqefb2qH.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-g8h5trmJ.js");
4
- const require_device_ca = require("./device-ca-DsmVXeGp.js");
3
+ const require_dist = require("./dist-DNZdEzw0.js");
4
+ const require_device_ca = require("./device-ca-DH3kSBQU.js");
5
5
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
6
6
  const require_log_redactor = require("./log-redactor-BhIEMaG9.js");
7
7
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
@@ -28,22 +28,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
28
28
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
29
29
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
30
30
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
31
- const require_wal_maintenance = require("./wal-maintenance-BU17H1Z1.js");
32
- const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-COwJBP8g.js");
31
+ const require_wal_maintenance = require("./wal-maintenance-BTqfYbnU.js");
32
+ const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-CRmUwtJ-.js");
33
33
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
34
34
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
35
35
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
36
36
  require("./builtins/storage-orchestrator/index.js");
37
- const require_hub_identity = require("./hub-identity-mscSQisH.js");
38
- const require_constants = require("./constants-2GrhzN-T.js");
37
+ const require_hub_identity = require("./hub-identity-1S01Uoxg.js");
38
+ const require_constants = require("./constants-BrsZY2kk.js");
39
39
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
40
40
  require("./builtins/system-config/index.js");
41
41
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
42
42
  const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
43
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-x1wE7M7D.js");
43
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-DVPKAuTm.js");
44
44
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
45
45
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
46
- const require_restore_archive = require("./restore-archive-Bpqb4LSG.js");
46
+ const require_restore_archive = require("./restore-archive-CPKCo4EZ.js");
47
47
  const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
48
48
  let zod = require("zod");
49
49
  let node_crypto = require("node:crypto");
@@ -23623,8 +23623,12 @@ var AddonHealthMonitor = class {
23623
23623
  *
23624
23624
  * One tracker per process; the verdict is re-judged on every spawn path, and
23625
23625
  * `observe` is idempotent; given the node's full installed set, a streak whose
23626
- * package is no longer installed is resolved too. State is in memory: a restart raises a still-
23627
- * unsupported addon once more, and AlertCenter upserts it under the same id.
23626
+ * package is no longer installed is resolved too. State is in memory, so a restart
23627
+ * forgets which alerts this tracker raised: a still-unsupported addon is raised once
23628
+ * more (AlertCenter upserts it under the same id), and a package judged supported with
23629
+ * no streak is announced as resolved ONCE per process (after the settle window), because
23630
+ * the persisted card of the previous process may still be active and dismissing a
23631
+ * missing card is a no-op.
23628
23632
  */
23629
23633
  var UNSUPPORTED_ADDON_SETTLE_MS = 6e4;
23630
23634
  var UnsupportedAddonTracker = class {
@@ -23635,6 +23639,10 @@ var UnsupportedAddonTracker = class {
23635
23639
  startedAt;
23636
23640
  timer = null;
23637
23641
  logged = /* @__PURE__ */ new Set();
23642
+ /** Supported packages whose `AddonUnsupportedResolved` is due once the settle window is over. */
23643
+ pendingClear = /* @__PURE__ */ new Set();
23644
+ /** Supported packages already announced as resolved in this process. */
23645
+ announcedSupported = /* @__PURE__ */ new Set();
23638
23646
  constructor(options) {
23639
23647
  this.options = options;
23640
23648
  this.settleMs = options.settleMs ?? 6e4;
@@ -23677,12 +23685,22 @@ var UnsupportedAddonTracker = class {
23677
23685
  facts,
23678
23686
  raised: false
23679
23687
  });
23688
+ this.pendingClear.delete(facts.packageName);
23689
+ this.announcedSupported.delete(facts.packageName);
23680
23690
  }
23681
23691
  resolve(packageName) {
23682
23692
  const streak = this.streaks.get(packageName);
23683
- if (streak === void 0) return;
23693
+ if (streak === void 0) {
23694
+ if (!this.announcedSupported.has(packageName)) this.pendingClear.add(packageName);
23695
+ return;
23696
+ }
23684
23697
  this.streaks.delete(packageName);
23685
- if (!streak.raised) return;
23698
+ this.announcedSupported.add(packageName);
23699
+ if (!streak.raised) {
23700
+ this.pendingClear.add(packageName);
23701
+ return;
23702
+ }
23703
+ this.pendingClear.delete(packageName);
23686
23704
  this.options.log(`[unsupported-addon] ${streak.facts.addonId} (${packageName}) is supported again, alert cleared`);
23687
23705
  this.emit(require_dist.EventCategory.AddonUnsupportedResolved, {
23688
23706
  packageName,
@@ -23694,7 +23712,7 @@ var UnsupportedAddonTracker = class {
23694
23712
  flush() {
23695
23713
  const remaining = this.startedAt + this.settleMs - this.now();
23696
23714
  if (remaining > 0) {
23697
- if (this.timer === null && this.streaks.size > 0) {
23715
+ if (this.timer === null && (this.streaks.size > 0 || this.pendingClear.size > 0)) {
23698
23716
  this.timer = setTimeout(() => {
23699
23717
  this.timer = null;
23700
23718
  this.flush();
@@ -23703,6 +23721,14 @@ var UnsupportedAddonTracker = class {
23703
23721
  }
23704
23722
  return;
23705
23723
  }
23724
+ for (const packageName of [...this.pendingClear]) {
23725
+ this.pendingClear.delete(packageName);
23726
+ this.announcedSupported.add(packageName);
23727
+ this.emit(require_dist.EventCategory.AddonUnsupportedResolved, {
23728
+ packageName,
23729
+ nodeId: this.options.nodeId
23730
+ });
23731
+ }
23706
23732
  for (const streak of this.streaks.values()) {
23707
23733
  if (streak.raised) continue;
23708
23734
  streak.raised = true;
@@ -1,6 +1,6 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { A as CatalogFileSchema, Ac as asJsonObject$1, Al as scopeKey, Ar as describeUnmet, At as LOG_LEVEL_RANK, C as CATALOG_LANGS, Ci as isArrayOutputSchema, Cl as parseJsonUnknown, Dl as resolveCapMount, Dn as addonSettingsCapability, Ht as PackageRequiresSchema, Jc as defineRecordKinds, Jl as EventCategory$1, Js as CALLER_STAMPED_CAPABILITIES$1, Ki as logLevelAtMost, Kl as errMsg$1, Ln as bareAddonId, Lo as supportedRuntimes, Mc as asString$1, Ni as isVoidInput, Oo as splitTranslationRef, Pi as kebabToCamel$1, Qc as expandCapMethods, Rl as userError, Sl as parseJsonObject, Ti as isCollectionArrayMethod, Tl as readinessKey, Uc as createEvent$1, Vl as withoutCallerStamp, Xr as extractNestedAddonId, Xs as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Yc as emitDownForOwnedCaps, Yo as unmetRequirements, Ys as DATAPLANE_SECRET_HEADER$1, Zs as DEVICE_STATUS_METHOD, a as AGENT_MDNS_SERVICE_TYPE, al as isDebugChannelName, da as objectInputDeclaresAddonId, el as getDebugInterest, fa as objectInputDeclaresRequiredDeviceId, hc as ReadinessTimeoutError, ho as scopesAllowDeviceCap, jc as asNumber, ji as isObjectInput, jt as METHOD_ACCESS_MAP, ka as procedureAuthKey, mc as ReadinessRegistry, mo as scopesAllowAddon, no as resolveMethodAuth, o as AGENT_MDNS_TXT_KEYS, or as compareVersions, pc as RUNTIME_DEFAULTS, qi as looseSchema, s as ALL_CAPABILITY_DEFINITIONS, vi as interpolate, yi as isAddonInstanceId, zc as collectSecretMarkerRefs, zi as lifecycleJobSchema } from "./dist-BDoMdUU3.mjs";
3
- import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-GCSaBq5b.mjs";
2
+ import { A as CatalogFileSchema, Ac as asJsonObject$1, Al as scopeKey, Ar as describeUnmet, At as LOG_LEVEL_RANK, C as CATALOG_LANGS, Ci as isArrayOutputSchema, Cl as parseJsonUnknown, Dl as resolveCapMount, Dn as addonSettingsCapability, Ht as PackageRequiresSchema, Jc as defineRecordKinds, Jl as EventCategory$1, Js as CALLER_STAMPED_CAPABILITIES$1, Ki as logLevelAtMost, Kl as errMsg$1, Ln as bareAddonId, Lo as supportedRuntimes, Mc as asString$1, Ni as isVoidInput, Oo as splitTranslationRef, Pi as kebabToCamel$1, Qc as expandCapMethods, Rl as userError, Sl as parseJsonObject, Ti as isCollectionArrayMethod, Tl as readinessKey, Uc as createEvent$1, Vl as withoutCallerStamp, Xr as extractNestedAddonId, Xs as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Yc as emitDownForOwnedCaps, Yo as unmetRequirements, Ys as DATAPLANE_SECRET_HEADER$1, Zs as DEVICE_STATUS_METHOD, a as AGENT_MDNS_SERVICE_TYPE, al as isDebugChannelName, da as objectInputDeclaresAddonId, el as getDebugInterest, fa as objectInputDeclaresRequiredDeviceId, hc as ReadinessTimeoutError, ho as scopesAllowDeviceCap, jc as asNumber, ji as isObjectInput, jt as METHOD_ACCESS_MAP, ka as procedureAuthKey, mc as ReadinessRegistry, mo as scopesAllowAddon, no as resolveMethodAuth, o as AGENT_MDNS_TXT_KEYS, or as compareVersions, pc as RUNTIME_DEFAULTS, qi as looseSchema, s as ALL_CAPABILITY_DEFINITIONS, vi as interpolate, yi as isAddonInstanceId, zc as collectSecretMarkerRefs, zi as lifecycleJobSchema } from "./dist-jhKGWoOo.mjs";
3
+ import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-Daa8UqCp.mjs";
4
4
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
5
5
  import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-XLDrPzOi.mjs";
6
6
  import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
@@ -27,22 +27,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
27
27
  import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
28
28
  import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
29
29
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
30
- import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-Cp6aLpv5.mjs";
31
- import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-DOAAvsCM.mjs";
30
+ import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-Ck_hJBJr.mjs";
31
+ import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-nxoPlTyI.mjs";
32
32
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
33
33
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
34
34
  import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
35
35
  import "./builtins/storage-orchestrator/index.mjs";
36
- import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-Dd-T60Rd.mjs";
37
- import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-BdZYM4pz.mjs";
36
+ import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-Cqefb2qH.mjs";
37
+ import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-hKRykChp.mjs";
38
38
  import { $ as getProcessMeshCaState, A as emitProcessNodeRegistered, At as readCidrSetting, B as getProcessMeshTlsListenerState, C as verifyMembershipAnswer, Ct as isInsecureOrigin, D as ServiceBroker, Dt as createCidrMatcher, E as Errors, Et as readOriginSetting, F as onProcessNodeRegistered, G as MeshCertificateRegistry, H as setProcessMeshTlsListenerState, I as setProcessMeshHandshakeReporter, J as getProcessMeshCertificateRegistry, K as RENEWAL_ABANDONED, L as setProcessMeshPeerTransportLookup, M as getProcessNodeMeshTransport, N as getProcessPeerLeaf, O as setProcessMeshTlsEnabler, Ot as normalizeIp, P as isProcessVerifiedMeshPeer, Q as MeshCaKeeper, R as renewMeshCertificate, S as signMembershipProof, St as OPAQUE_ORIGIN, SystemConfigAddon, T as TlsTcpTransporter, Tt as parseOriginList, U as MESH_NODE_CERTIFICATES_COLLECTION, V as openMeshTlsWhenRevocationsLoaded, W as MESH_NODE_CERTIFICATES_COLUMNS, X as MeshCrl, Y as setProcessMeshCertificateRegistry, Z as processMeshCrl, _ as keyFingerprintShort, _t as isAllowedAgentDashboardReturnTo, a as dialableHubHost, at as generateMeshCa, b as MEMBERSHIP_PATHS, bt as verifyAgentUiUnlockTicket, c as PAIRING_MAX_CODE_ATTEMPTS, ct as issueMeshLeafForNode, d as PAIRING_PIN_DIGITS, dt as AGENT_DASHBOARD_ORIGINS_FIELD, et as requireProcessMeshCa, f as PAIRING_PROTOCOL, ft as AGENT_UI_UNLOCK_TTL_MS, g as describeCsr, gt as UnlockTicketJtiStore, h as computePairingSas, ht as AGENT_UI_UNLOCK_VERSION, i as AgentPairing, it as exportMeshPrivateKeyPem, j as getProcessMeshHandshakeReporter, k as dropProcessPeer, kt as parseCidrList, l as PAIRING_MAX_SESSIONS, lt as issueMeshLeafFromCsr, m as computePairingCommitment, mt as AGENT_UI_UNLOCK_USE, n as HubPairing, nt as caFingerprintCompact, o as hubHostFromMeshAddress, ot as generateMeshKeyPair, p as PAIRING_TTL_MS, pt as AGENT_UI_UNLOCK_TYP, q as describeMeshLeaf, r as PairingHttpError, rt as createMeshCsrPem, s as PAIRING_CODE_DIGITS, st as isValidAgentNodeId, tt as caFingerprint, u as PAIRING_PATHS, ut as loadMeshCa, v as signPairingProof, vt as mintAgentUiUnlockTicket, w as MESH_TLS_PORT_HELLO_FIELD, wt as normalizeOrigin, x as MembershipResponder, xt as InvalidCorsOriginError, y as verifyPairingProof, yt as parseAgentDashboardOrigins, z as revokeMeshCertificate } from "./builtins/system-config/system-config.addon.mjs";
39
39
  import "./builtins/system-config/index.mjs";
40
40
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
41
41
  import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
42
- import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-CJlJ0skx.mjs";
42
+ import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-Qfdqv_j1.mjs";
43
43
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
44
44
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
45
- import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-DSHgzPzG.mjs";
45
+ import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-CpvNbRTS.mjs";
46
46
  import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
47
47
  import { z } from "zod";
48
48
  import * as crypto$1 from "node:crypto";
@@ -23619,8 +23619,12 @@ var AddonHealthMonitor = class {
23619
23619
  *
23620
23620
  * One tracker per process; the verdict is re-judged on every spawn path, and
23621
23621
  * `observe` is idempotent; given the node's full installed set, a streak whose
23622
- * package is no longer installed is resolved too. State is in memory: a restart raises a still-
23623
- * unsupported addon once more, and AlertCenter upserts it under the same id.
23622
+ * package is no longer installed is resolved too. State is in memory, so a restart
23623
+ * forgets which alerts this tracker raised: a still-unsupported addon is raised once
23624
+ * more (AlertCenter upserts it under the same id), and a package judged supported with
23625
+ * no streak is announced as resolved ONCE per process (after the settle window), because
23626
+ * the persisted card of the previous process may still be active and dismissing a
23627
+ * missing card is a no-op.
23624
23628
  */
23625
23629
  var UNSUPPORTED_ADDON_SETTLE_MS = 6e4;
23626
23630
  var UnsupportedAddonTracker = class {
@@ -23631,6 +23635,10 @@ var UnsupportedAddonTracker = class {
23631
23635
  startedAt;
23632
23636
  timer = null;
23633
23637
  logged = /* @__PURE__ */ new Set();
23638
+ /** Supported packages whose `AddonUnsupportedResolved` is due once the settle window is over. */
23639
+ pendingClear = /* @__PURE__ */ new Set();
23640
+ /** Supported packages already announced as resolved in this process. */
23641
+ announcedSupported = /* @__PURE__ */ new Set();
23634
23642
  constructor(options) {
23635
23643
  this.options = options;
23636
23644
  this.settleMs = options.settleMs ?? 6e4;
@@ -23673,12 +23681,22 @@ var UnsupportedAddonTracker = class {
23673
23681
  facts,
23674
23682
  raised: false
23675
23683
  });
23684
+ this.pendingClear.delete(facts.packageName);
23685
+ this.announcedSupported.delete(facts.packageName);
23676
23686
  }
23677
23687
  resolve(packageName) {
23678
23688
  const streak = this.streaks.get(packageName);
23679
- if (streak === void 0) return;
23689
+ if (streak === void 0) {
23690
+ if (!this.announcedSupported.has(packageName)) this.pendingClear.add(packageName);
23691
+ return;
23692
+ }
23680
23693
  this.streaks.delete(packageName);
23681
- if (!streak.raised) return;
23694
+ this.announcedSupported.add(packageName);
23695
+ if (!streak.raised) {
23696
+ this.pendingClear.add(packageName);
23697
+ return;
23698
+ }
23699
+ this.pendingClear.delete(packageName);
23682
23700
  this.options.log(`[unsupported-addon] ${streak.facts.addonId} (${packageName}) is supported again, alert cleared`);
23683
23701
  this.emit(EventCategory$1.AddonUnsupportedResolved, {
23684
23702
  packageName,
@@ -23690,7 +23708,7 @@ var UnsupportedAddonTracker = class {
23690
23708
  flush() {
23691
23709
  const remaining = this.startedAt + this.settleMs - this.now();
23692
23710
  if (remaining > 0) {
23693
- if (this.timer === null && this.streaks.size > 0) {
23711
+ if (this.timer === null && (this.streaks.size > 0 || this.pendingClear.size > 0)) {
23694
23712
  this.timer = setTimeout(() => {
23695
23713
  this.timer = null;
23696
23714
  this.flush();
@@ -23699,6 +23717,14 @@ var UnsupportedAddonTracker = class {
23699
23717
  }
23700
23718
  return;
23701
23719
  }
23720
+ for (const packageName of [...this.pendingClear]) {
23721
+ this.pendingClear.delete(packageName);
23722
+ this.announcedSupported.add(packageName);
23723
+ this.emit(EventCategory$1.AddonUnsupportedResolved, {
23724
+ packageName,
23725
+ nodeId: this.options.nodeId
23726
+ });
23727
+ }
23702
23728
  for (const streak of this.streaks.values()) {
23703
23729
  if (streak.raised) continue;
23704
23730
  streak.raised = true;
@@ -18,8 +18,12 @@ import type { SystemEvent } from "@camstack/types";
18
18
  *
19
19
  * One tracker per process; the verdict is re-judged on every spawn path, and
20
20
  * `observe` is idempotent; given the node's full installed set, a streak whose
21
- * package is no longer installed is resolved too. State is in memory: a restart raises a still-
22
- * unsupported addon once more, and AlertCenter upserts it under the same id.
21
+ * package is no longer installed is resolved too. State is in memory, so a restart
22
+ * forgets which alerts this tracker raised: a still-unsupported addon is raised once
23
+ * more (AlertCenter upserts it under the same id), and a package judged supported with
24
+ * no streak is announced as resolved ONCE per process (after the settle window), because
25
+ * the persisted card of the previous process may still be active and dismissing a
26
+ * missing card is a no-op.
23
27
  */
24
28
  export declare const UNSUPPORTED_ADDON_SETTLE_MS = 6e4;
25
29
  /** What the gate knows about one addon that runs below its minimum. */
@@ -53,6 +57,10 @@ export declare class UnsupportedAddonTracker {
53
57
  private readonly startedAt;
54
58
  private timer;
55
59
  private readonly logged;
60
+ /** Supported packages whose `AddonUnsupportedResolved` is due once the settle window is over. */
61
+ private readonly pendingClear;
62
+ /** Supported packages already announced as resolved in this process. */
63
+ private readonly announcedSupported;
56
64
  constructor(options: UnsupportedAddonTrackerOptions);
57
65
  /**
58
66
  * One gate run. `judged` is every package the run looked at, `unsupported` the
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-g8h5trmJ.js");
1
+ const require_dist = require("./dist-DNZdEzw0.js");
2
2
  //#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
3
3
  /**
4
4
  * Migration-only door for the leftover integration rows (planning#416).
@@ -1,4 +1,4 @@
1
- import { zc as collectSecretMarkerRefs } from "./dist-BDoMdUU3.mjs";
1
+ import { zc as collectSecretMarkerRefs } from "./dist-jhKGWoOo.mjs";
2
2
  //#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
3
3
  /**
4
4
  * Migration-only door for the leftover integration rows (planning#416).
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-g8h5trmJ.js");
1
+ const require_dist = require("./dist-DNZdEzw0.js");
2
2
  //#region src/builtins/core-blocks/rename-composition-block.ts
3
3
  /**
4
4
  * An operator rename of a composed device writes the composition block's
@@ -1,4 +1,4 @@
1
- import { Hl as COMPOSED_DEVICE_STABLE_ID_PREFIX, Kl as errMsg } from "./dist-BDoMdUU3.mjs";
1
+ import { Hl as COMPOSED_DEVICE_STABLE_ID_PREFIX, Kl as errMsg } from "./dist-jhKGWoOo.mjs";
2
2
  //#region src/builtins/core-blocks/rename-composition-block.ts
3
3
  /**
4
4
  * An operator rename of a composed device writes the composition block's
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-g8h5trmJ.js");
2
+ const require_dist = require("./dist-DNZdEzw0.js");
3
3
  let zod = require("zod");
4
4
  let node_crypto = require("node:crypto");
5
5
  let buffer = require("buffer");
@@ -1,4 +1,4 @@
1
- import { I as DATABASE_SNAPSHOT_SUFFIX, Jc as defineRecordKinds, et as DataStoreDatabaseSchema } from "./dist-BDoMdUU3.mjs";
1
+ import { I as DATABASE_SNAPSHOT_SUFFIX, Jc as defineRecordKinds, et as DataStoreDatabaseSchema } from "./dist-jhKGWoOo.mjs";
2
2
  import { z } from "zod";
3
3
  import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
4
4
  import { Buffer as Buffer$1 } from "buffer";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.884",
3
+ "version": "1.2.886",
4
4
  "description": "CamStack builtins — shipped inside @camstack/server (generated, do not edit)",
5
5
  "license": "MIT",
6
6
  "camstack": {