@camstack/server 1.2.788 → 1.2.790

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 (127) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/agent/agent-child-manifest.js +39 -0
  3. package/dist/agent/agent-hub-registration.js +11 -1
  4. package/dist/agent/forward-to-hub.js +43 -0
  5. package/dist/agent/main.js +31 -81
  6. package/dist/agent/stale-addon-gate.js +70 -34
  7. package/dist/api/trpc/generated-cap-mounts.js +1 -6
  8. package/dist/api/trpc/generated-cap-routers.js +1221 -1417
  9. package/dist/core/addon/addon-registry.service.js +25 -33
  10. package/dist/core/addon/boot-health-snapshot.js +0 -28
  11. package/dist/core/addon/{hub-spawn-gate.js → hub-addon-support.js} +12 -35
  12. package/dist/core/moleculer/moleculer.service.js +2 -13
  13. package/dist/core/moleculer/runner-hosted-on-node.js +23 -0
  14. package/dist/core/updates/required-addon-update.js +1 -1
  15. package/package.json +23 -58
  16. package/system/dist/addon-utils.mjs +1 -1
  17. package/system/dist/{agent-https-jJDe-XNl.js → agent-https-BmXXKQAA.js} +1 -1
  18. package/system/dist/{agent-https-szf2FU49.mjs → agent-https-ByceQLwr.mjs} +1 -1
  19. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  20. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  21. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  22. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  23. package/system/dist/builtins/alerts/alerts.addon.d.ts +8 -0
  24. package/system/dist/builtins/alerts/alerts.addon.js +72 -1
  25. package/system/dist/builtins/alerts/alerts.addon.mjs +74 -3
  26. package/system/dist/builtins/autotrack/index.js +1 -1
  27. package/system/dist/builtins/autotrack/index.mjs +1 -1
  28. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  29. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  30. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  31. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  32. package/system/dist/builtins/camera-grid/index.js +1 -1
  33. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  34. package/system/dist/builtins/composer/composer.addon.js +3 -3
  35. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  36. package/system/dist/builtins/console-logging/index.js +1 -1
  37. package/system/dist/builtins/console-logging/index.mjs +1 -1
  38. package/system/dist/builtins/core-blocks/core-blocks.addon.js +11 -5
  39. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +11 -5
  40. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  41. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  42. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  43. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  44. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  45. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  46. package/system/dist/builtins/keychain/index.js +4 -4
  47. package/system/dist/builtins/keychain/index.mjs +4 -4
  48. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  49. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  50. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  51. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  52. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  53. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  54. package/system/dist/builtins/loki-logging/index.js +1 -1
  55. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  56. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  57. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  58. package/system/dist/builtins/platform-probe/index.js +1 -1
  59. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  60. package/system/dist/builtins/record-entries/index.js +1 -1
  61. package/system/dist/builtins/record-entries/index.mjs +1 -1
  62. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  63. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  64. package/system/dist/builtins/snapshot/index.js +1 -1
  65. package/system/dist/builtins/snapshot/index.mjs +1 -1
  66. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  67. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  68. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  69. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  70. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  71. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  72. package/system/dist/builtins/storage-orchestrator/access-guards.d.ts +1 -1
  73. package/system/dist/builtins/storage-orchestrator/custom-actions.d.ts +11 -0
  74. package/system/dist/builtins/storage-orchestrator/index.d.ts +1 -0
  75. package/system/dist/builtins/storage-orchestrator/index.js +2 -0
  76. package/system/dist/builtins/storage-orchestrator/index.mjs +2 -2
  77. package/system/dist/builtins/storage-orchestrator/location-instances.d.ts +72 -0
  78. package/system/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +1 -1
  79. package/system/dist/builtins/storage-orchestrator/location-secret-refs.d.ts +26 -0
  80. package/system/dist/builtins/storage-orchestrator/location-store.d.ts +28 -2
  81. package/system/dist/builtins/storage-orchestrator/migrations/index.d.ts +9 -2
  82. package/system/dist/builtins/storage-orchestrator/migrations/legacy-location-secret-refs.d.ts +13 -0
  83. package/system/dist/builtins/storage-orchestrator/migrations/location-secret-ports.d.ts +15 -0
  84. package/system/dist/builtins/storage-orchestrator/migrations/location-secrets-to-record.d.ts +57 -0
  85. package/system/dist/builtins/storage-orchestrator/provider-discovery.d.ts +10 -13
  86. package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +6 -0
  87. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +39 -8
  88. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +954 -131
  89. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +954 -132
  90. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +8 -0
  91. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  92. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  93. package/system/dist/builtins/winston-logging/index.js +112 -3
  94. package/system/dist/builtins/winston-logging/index.mjs +112 -3
  95. package/system/dist/builtins/winston-logging/migrations/index.d.ts +8 -0
  96. package/system/dist/builtins/winston-logging/migrations/node-fields.d.ts +43 -0
  97. package/system/dist/builtins/winston-logging/winston-logging.addon.d.ts +10 -2
  98. package/system/dist/{capture-engine-DNHgjQot.js → capture-engine-BHj1fNYC.js} +1 -1
  99. package/system/dist/{capture-engine-BsKY_3xa.mjs → capture-engine-D9n4KDaN.mjs} +1 -1
  100. package/system/dist/{composition-sources-BgO0GQYW.js → composition-sources-BGgIuuvd.js} +1 -1
  101. package/system/dist/{composition-sources-BRdGsbVT.mjs → composition-sources-wI4qWTz2.mjs} +1 -1
  102. package/system/dist/{constants-CQeMrR4f.mjs → constants-DHqkxbYk.mjs} +1 -1
  103. package/system/dist/{constants-C3jGKQSQ.js → constants-DNdriMRD.js} +1 -1
  104. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  105. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  106. package/system/dist/{device-ca-D3y6wGmn.js → device-ca-C2RzT1VT.js} +1 -1
  107. package/system/dist/{device-ca-ByVi5eUC.mjs → device-ca-gr5eE3h5.mjs} +1 -1
  108. package/system/dist/{dist-BsQA6-0i.mjs → dist-BUoL5bbr.mjs} +116 -418
  109. package/system/dist/{dist-BRI-Mwx0.js → dist-DV0V3JiE.js} +133 -417
  110. package/system/dist/file-host-worker.js +1 -1
  111. package/system/dist/file-host-worker.mjs +1 -1
  112. package/system/dist/{hub-mdns-ciao-Ry_Jpljx.js → hub-mdns-ciao-Be5PGXW6.js} +2 -2
  113. package/system/dist/{hub-mdns-ciao-8dJTW2LI.mjs → hub-mdns-ciao-DoSb8dwB.mjs} +2 -2
  114. package/system/dist/index.js +151 -53
  115. package/system/dist/index.mjs +362 -266
  116. package/system/dist/kernel/addon-health-monitor.d.ts +0 -21
  117. package/system/dist/kernel/index.d.ts +2 -0
  118. package/system/dist/kernel/transport/runner-of-addon.d.ts +2 -0
  119. package/system/dist/kernel/unsupported-addon-tracker.d.ts +74 -0
  120. package/system/dist/{legacy-integration-rows-door-D5BdSNla.js → legacy-integration-rows-door-D5s8oM7e.js} +1 -1
  121. package/system/dist/{legacy-integration-rows-door-CjXTbmvH.mjs → legacy-integration-rows-door-DRC0xn6k.mjs} +1 -1
  122. package/system/dist/migrations/hub/2026-11-06-addon-settings-bare-rows.d.ts +3 -0
  123. package/system/dist/{restore-archive-Co2lk3OU.mjs → restore-archive-DH3P9j-V.mjs} +94 -94
  124. package/system/dist/{restore-archive-GoWJMdHy.js → restore-archive-Dh4gfCRY.js} +1 -1
  125. package/system/dist/{wal-maintenance-DRnV6QYu.mjs → wal-maintenance-BWfH3Lov.mjs} +0 -0
  126. package/system/dist/{wal-maintenance-C1Haue74.js → wal-maintenance-DgN_WD5T.js} +0 -0
  127. package/system/package.json +4 -1
@@ -45,7 +45,7 @@ const fs = __importStar(require("node:fs"));
45
45
  const os = __importStar(require("node:os"));
46
46
  const path = __importStar(require("node:path"));
47
47
  const boot_health_snapshot_js_1 = require("./boot-health-snapshot.js");
48
- const hub_spawn_gate_js_1 = require("./hub-spawn-gate.js");
48
+ const hub_addon_support_js_1 = require("./hub-addon-support.js");
49
49
  const system_1 = require("@camstack/server/system");
50
50
  const types_1 = require("@camstack/types");
51
51
  const types_2 = require("@camstack/types");
@@ -292,8 +292,6 @@ class AddonRegistryService {
292
292
  moleculer;
293
293
  streamProbe;
294
294
  addonEntries = new Map();
295
- /** Addons the hub spawn gate holds back (id -> reason): neither started nor failed. */
296
- heldBackAddons = new boot_health_snapshot_js_1.HeldBackAddons();
297
295
  capabilityRegistry;
298
296
  /** Single router for addon-level calls (routes / custom / settings). */
299
297
  addonCallGateway;
@@ -328,6 +326,8 @@ class AddonRegistryService {
328
326
  logger;
329
327
  addonLoader;
330
328
  healthMonitor;
329
+ /** Raises and clears the alert for an addon that runs below the server's minimum (D1017). */
330
+ unsupportedAddons;
331
331
  addonRouteRegistry = null;
332
332
  dataPlaneRegistry = null;
333
333
  // Broker-routed AddonApi proxy — every addon's `ctx.api` resolves
@@ -449,7 +449,11 @@ class AddonRegistryService {
449
449
  eventBus: this.eventBusService,
450
450
  logger: this.loggingService.createLogger('AddonHealthMonitor'),
451
451
  retryFn: (packageName) => this.tryReloadPackage(packageName),
452
- isHeldBack: (addonId) => this.heldBackAddons.has(addonId),
452
+ });
453
+ this.unsupportedAddons = new system_1.UnsupportedAddonTracker({
454
+ eventBus: this.eventBusService,
455
+ nodeId: 'hub',
456
+ log: (line) => this.logger.warn(line),
453
457
  });
454
458
  // Create capability registry with config reader for singleton preferences
455
459
  this.capabilityRegistry = new system_1.CapabilityRegistry(this.loggingService.createLogger('CapabilityRegistry'), this.eventBusService);
@@ -1027,7 +1031,6 @@ class AddonRegistryService {
1027
1031
  // recorded above from `addonLoader.listLoadFailures()`.
1028
1032
  (0, boot_health_snapshot_js_1.recordBootHealth)({
1029
1033
  entries: this.addonEntries.entries(),
1030
- heldBack: this.heldBackAddons.asMap(),
1031
1034
  monitor: this.healthMonitor,
1032
1035
  });
1033
1036
  // Start the kernel-level retry tick (30s). Fires immediately
@@ -1161,6 +1164,7 @@ class AddonRegistryService {
1161
1164
  async onModuleDestroy() {
1162
1165
  this.logger.info('Shutting down all addons…');
1163
1166
  this.healthMonitor.stop();
1167
+ this.unsupportedAddons.stop();
1164
1168
  await this.shutdownAll();
1165
1169
  this.logger.info('All addons shut down');
1166
1170
  }
@@ -1919,7 +1923,7 @@ class AddonRegistryService {
1919
1923
  const suppressed = new Set([addonId]);
1920
1924
  if (this.isForkedAddonEntry(entry)) {
1921
1925
  const runnerId = (0, types_2.resolveRunnerId)(entry.declaration, addonId);
1922
- for (const { addonId: siblingId } of this.buildSpawnPlan([...this.addonEntries.keys()], () => undefined).get(runnerId) ?? []) {
1926
+ for (const { addonId: siblingId } of this.buildSpawnPlan([...this.addonEntries.keys()]).get(runnerId) ?? []) {
1923
1927
  suppressed.add(siblingId);
1924
1928
  }
1925
1929
  }
@@ -3345,24 +3349,21 @@ class AddonRegistryService {
3345
3349
  * diagnostics that want to render the current topology.
3346
3350
  */
3347
3351
  /**
3348
- * The plan the hub actually SPAWNS: `buildAddonGroupPlan` over the ids whose
3349
- * package passes the stale gate (planning#447). An addon below the running
3350
- * server's `requires.addons`, or needing a newer server, stays unspawned and
3351
- * is logged with both versions; the post-swap required-addon update brings it
3352
- * current and a reload spawns it then.
3352
+ * The plan the hub SPAWNS: `buildAddonGroupPlan` over `addonIds`, after the
3353
+ * support judgement of each one. An addon below the running server's
3354
+ * `requires.addons`, or needing a newer server, is NOT left out: it runs, and
3355
+ * the tracker raises (once) or clears the operator alert with both versions
3356
+ * (D1017). The post-swap required-addon update brings the package current.
3353
3357
  */
3354
- buildSpawnPlan(addonIds, log = (line) => this.logger.warn(line)) {
3355
- return this.buildAddonGroupPlan(this.spawnableIds(addonIds, log));
3356
- }
3357
- spawnableIds(addonIds, log) {
3358
- return this.heldBackAddons.track(addonIds, (onDeferred) => (0, hub_spawn_gate_js_1.spawnableAddonIds)({
3358
+ buildSpawnPlan(addonIds) {
3359
+ (0, hub_addon_support_js_1.reportHubAddonSupport)({
3359
3360
  addonIds,
3360
3361
  candidateOf: (id) => this.staleCandidateOf(id),
3361
- context: (0, hub_spawn_gate_js_1.readHubStaleGateContext)(),
3362
- infraCapabilities: new Set(system_1.INFRA_CAPABILITIES.map((c) => c.name)),
3363
- log,
3364
- onDeferred,
3365
- }));
3362
+ context: (0, hub_addon_support_js_1.readHubStaleGateContext)(),
3363
+ tracker: this.unsupportedAddons,
3364
+ installedPackages: [...this.addonEntries.values()].map((e) => e.packageName),
3365
+ });
3366
+ return this.buildAddonGroupPlan(addonIds);
3366
3367
  }
3367
3368
  staleCandidateOf(addonId) {
3368
3369
  const entry = this.addonEntries.get(addonId);
@@ -3571,18 +3572,9 @@ class AddonRegistryService {
3571
3572
  throw new Error(`ensureForkedRunner("${addonId}") requires an on-disk forked addon`);
3572
3573
  }
3573
3574
  const runnerId = (0, types_2.resolveRunnerId)(entry.declaration, addonId);
3574
- // The same gate as the boot plan: a restart, a hot-install or a retry must not spawn an addon
3575
- // the running server cannot host, nor carry a held-back sibling into its runner.
3576
- const held = [];
3577
- if (this.spawnableIds([addonId], (line) => held.push(line)).length === 0) {
3578
- const reason = held.join('; ');
3579
- this.logger.warn('ensureForkedRunner: addon is held back by the stale gate, not spawned', {
3580
- tags: { addonId },
3581
- meta: { reason },
3582
- });
3583
- throw new Error(`addon "${addonId}" is held back until its package is reconciled: ${reason}`);
3584
- }
3585
- const roster = this.buildSpawnPlan([...this.addonEntries.keys()], () => undefined).get(runnerId) ?? [{ addonId, addonDir: entry.addonDir }];
3575
+ const roster = this.buildSpawnPlan([...this.addonEntries.keys()]).get(runnerId) ?? [
3576
+ { addonId, addonDir: entry.addonDir },
3577
+ ];
3586
3578
  // Claim before the queue so a member that arrives while this one is
3587
3579
  // waiting is visible to the fork that has not started yet. Solo runners
3588
3580
  // (roster of one) never claim — each of their restarts forks.
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HeldBackAddons = void 0;
4
3
  exports.recordBootHealth = recordBootHealth;
5
4
  function recordBootHealth(input) {
6
5
  for (const [id, entry] of input.entries) {
@@ -8,35 +7,8 @@ function recordBootHealth(input) {
8
7
  input.monitor.recordSuccess(entry.packageName, id);
9
8
  continue;
10
9
  }
11
- const reason = input.heldBack.get(id);
12
- if (reason !== undefined) {
13
- input.monitor.recordHeldBack(entry.packageName, reason, id);
14
- continue;
15
- }
16
10
  // The catch handlers of Phase 1/2 do not carry the error forward, so a generic one is
17
11
  // synthesized; the real error is in the addon log.
18
12
  input.monitor.recordFailure(entry.packageName, new Error(`Addon "${id}" failed to initialize — see addon logs for details`), id);
19
13
  }
20
14
  }
21
- /**
22
- * The ids the spawn gate currently holds back, with the gate's reason. Each gate
23
- * run over a set of ids replaces what was held for THOSE ids (an addon the gate
24
- * now lets through is released) and leaves every other id alone.
25
- */
26
- class HeldBackAddons {
27
- reasons = new Map();
28
- track(addonIds, run) {
29
- for (const id of addonIds)
30
- this.reasons.delete(id);
31
- return run((id, reason) => {
32
- this.reasons.set(id, reason);
33
- });
34
- }
35
- has(addonId) {
36
- return this.reasons.has(addonId);
37
- }
38
- asMap() {
39
- return this.reasons;
40
- }
41
- }
42
- exports.HeldBackAddons = HeldBackAddons;
@@ -33,54 +33,31 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.spawnableAddonIds = spawnableAddonIds;
36
+ exports.reportHubAddonSupport = reportHubAddonSupport;
37
37
  exports.readHubStaleGateContext = readHubStaleGateContext;
38
38
  /**
39
- * The hub's spawn gate for a stale addon package (planning#447, D989).
39
+ * The hub's support judgement for an addon package (planning#447, D989, D1017).
40
40
  *
41
- * An agent already holds an addon back when its package is below what the
42
- * running server requires (`agent/stale-addon-gate.ts`, #346). The hub planned
43
- * every addon it found on disk, so after a server swap an addon built for the
44
- * previous framework was spawned, crashed, and burned the D6 respawn budget
45
- * before the post-swap update reached it. The hub now asks the SAME gate before
46
- * it plans a runner: a held-back addon stays unspawned, is logged with both
47
- * versions, and is not part of the plan.
41
+ * An addon whose package is below what the running server requires is spawned
42
+ * like any other and reported to the operator (`UnsupportedAddonTracker`); the
43
+ * hub asks the SAME judgement an agent does (`agent/stale-addon-gate.ts`).
44
+ * `readHubStaleGateContext` reads its facts for THIS hub from disk.
48
45
  */
49
46
  const path = __importStar(require("node:path"));
50
47
  const stale_addon_gate_js_1 = require("../../agent/stale-addon-gate.js");
51
48
  const addon_requirements_js_1 = require("./addon-requirements.js");
52
49
  const installed_addon_versions_js_1 = require("./installed-addon-versions.js");
53
- /** The ids of `addonIds` that may be spawned; every held-back one is logged. */
54
- function spawnableAddonIds(input) {
50
+ /** Judge the addons of `addonIds` the registry holds and report the verdict; nothing is held back. */
51
+ function reportHubAddonSupport(input) {
55
52
  const candidates = [];
56
- const known = new Set();
57
53
  for (const id of input.addonIds) {
58
54
  const candidate = input.candidateOf(id);
59
- if (candidate === undefined)
60
- continue;
61
- known.add(id);
62
- candidates.push(candidate);
55
+ if (candidate !== undefined)
56
+ candidates.push(candidate);
63
57
  }
64
- const { ready, deferred, unjudged } = (0, stale_addon_gate_js_1.gateStaleCandidates)(candidates, input.context);
65
- for (const line of unjudged)
66
- input.log(line);
67
- const readyIds = new Set(ready.map((c) => c.addonId));
68
- for (const d of deferred) {
69
- const isInfra = d.candidate.capabilities.some((c) => input.infraCapabilities.has(typeof c === 'string' ? c : c.name));
70
- if (isInfra) {
71
- // Holding a data-store or storage provider leaves the node with no storage at all.
72
- readyIds.add(d.candidate.addonId);
73
- input.log(`${d.reason} — infrastructure provider, SPAWNED ANYWAY so the node keeps its storage`);
74
- }
75
- else {
76
- input.log(d.reason);
77
- input.onDeferred?.(d.candidate.addonId, d.reason);
78
- }
79
- }
80
- // An id the registry cannot describe is not this gate's to judge: keep it, the plan drops it as before.
81
- return input.addonIds.filter((id) => readyIds.has(id) || !known.has(id));
58
+ (0, stale_addon_gate_js_1.reportSupport)(candidates, input.context, input.tracker, input.installedPackages);
82
59
  }
83
- /** The gate's facts for THIS hub, read from disk: the running server and the addons dir. */
60
+ /** The judgement's facts for THIS hub, read from disk: the running server and the addons dir. */
84
61
  function readHubStaleGateContext() {
85
62
  const dataDir = path.resolve(process.env.CAMSTACK_DATA ?? 'camstack-data');
86
63
  const addonsDir = process.env.CAMSTACK_ADDONS_DIR ?? path.resolve(dataDir, 'addons');
@@ -14,6 +14,7 @@ const instance_links_service_js_1 = require("../addon/instance-links.service.js"
14
14
  const hub_mesh_guard_js_1 = require("./hub-mesh-guard.js");
15
15
  const hub_server_version_js_1 = require("./hub-server-version.js");
16
16
  const cap_call_fn_js_1 = require("./cap-call-fn.js");
17
+ const runner_hosted_on_node_js_1 = require("./runner-hosted-on-node.js");
17
18
  const cap_route_authority_js_1 = require("./cap-route-authority.js");
18
19
  class MoleculerService {
19
20
  eventBus;
@@ -138,19 +139,7 @@ class MoleculerService {
138
139
  * registered hosts nothing.
139
140
  */
140
141
  isRunnerOnNode(nodeId, runnerId) {
141
- const nodes = this.nodeRegistry
142
- .listNodeIds()
143
- .filter((id) => id === nodeId || id.startsWith(`${nodeId}/`));
144
- if (nodes.includes(`${nodeId}/${runnerId}`))
145
- return true;
146
- for (const id of nodes) {
147
- for (const entry of this.nodeRegistry.getNodeManifest(id) ?? []) {
148
- const runner = this.runnerIdResolver?.(entry.addonId) ?? entry.addonId;
149
- if (entry.addonId === runnerId || runner === runnerId)
150
- return true;
151
- }
152
- }
153
- return false;
142
+ return (0, runner_hosted_on_node_js_1.isRunnerHostedByNode)(this.nodeRegistry, (addonId) => this.runnerIdResolver?.(addonId) ?? addonId, nodeId, runnerId);
154
143
  }
155
144
  get childRegistry() {
156
145
  return this.localChildRegistry;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isRunnerHostedByNode = isRunnerHostedByNode;
4
+ /**
5
+ * Does `nodeId` (an agent) host the runner `runnerId`? Read from what the node itself
6
+ * registered: its manifest names the addons it runs, and an addon's runner is its
7
+ * `execution.group` or itself. A node that never registered hosts nothing.
8
+ *
9
+ * A stamp names a runner id (any cap) or, for the caps keyed by the ADDON (`records`,
10
+ * `migrations`), the member addon of a grouped runner; both resolve through the manifest.
11
+ */
12
+ function isRunnerHostedByNode(registry, runnerOfAddon, nodeId, runnerId) {
13
+ const nodes = registry.listNodeIds().filter((id) => id === nodeId || id.startsWith(`${nodeId}/`));
14
+ if (nodes.includes(`${nodeId}/${runnerId}`))
15
+ return true;
16
+ for (const id of nodes) {
17
+ for (const entry of registry.getNodeManifest(id) ?? []) {
18
+ if (entry.addonId === runnerId || runnerOfAddon(entry.addonId) === runnerId)
19
+ return true;
20
+ }
21
+ }
22
+ return false;
23
+ }
@@ -67,7 +67,7 @@ async function runRequiredAddonUpdates(deps) {
67
67
  }
68
68
  const reason = outcome.error ?? 'the update did not succeed';
69
69
  failed.push({ name: item.name, reason });
70
- deps.logger.warn('Required addon update failed — the addon stays held back', {
70
+ deps.logger.warn('Required addon update failed — the addon keeps running below the minimum', {
71
71
  meta: {
72
72
  name: item.name,
73
73
  installed: item.installed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.788",
3
+ "version": "1.2.790",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,56 +66,21 @@
66
66
  ],
67
67
  "requires": {
68
68
  "addons": {
69
- "@camstack/addon-admin-ui": ">=1.2.601",
70
- "@camstack/addon-agent-ui": ">=1.2.336",
71
- "@camstack/addon-ai": ">=0.4.179",
72
- "@camstack/addon-auth": ">=1.2.177",
73
- "@camstack/addon-benchmark": ">=1.2.312",
74
- "@camstack/addon-cloudflare": ">=1.2.158",
75
- "@camstack/addon-decoder-nodeav": ">=1.2.147",
76
- "@camstack/addon-export-alexa": ">=1.2.186",
77
- "@camstack/addon-export-google": ">=0.1.129",
78
- "@camstack/addon-export-hap": ">=1.2.195",
79
- "@camstack/addon-google-services": ">=0.2.42",
80
- "@camstack/addon-import-alexa": ">=0.2.194",
81
- "@camstack/addon-matter-broker": ">=0.2.162",
82
- "@camstack/addon-model-studio": ">=1.1.343",
83
- "@camstack/addon-mqtt-broker": ">=1.2.155",
84
- "@camstack/addon-notifiers": ">=1.2.632",
85
- "@camstack/addon-osd-manager": ">=0.1.316",
86
- "@camstack/addon-pipeline": ">=1.2.644",
87
- "@camstack/addon-pipeline-orchestrator": ">=1.2.664",
88
- "@camstack/addon-post-analysis": ">=1.2.676",
89
- "@camstack/addon-provider-amcrest": ">=0.2.169",
90
- "@camstack/addon-provider-bosch": ">=0.1.42",
91
- "@camstack/addon-provider-dreame": ">=0.2.169",
92
- "@camstack/addon-provider-dreo": ">=0.2.161",
93
- "@camstack/addon-provider-ecowitt": ">=0.2.159",
94
- "@camstack/addon-provider-enpal": ">=0.1.13",
95
- "@camstack/addon-provider-esphome": ">=0.1.16",
96
- "@camstack/addon-provider-gree": ">=0.2.155",
97
- "@camstack/addon-provider-hikvision": ">=1.2.185",
98
- "@camstack/addon-provider-homeassistant": ">=1.2.669",
99
- "@camstack/addon-provider-homematic": ">=1.2.186",
100
- "@camstack/addon-provider-mqtt-ha": ">=0.1.42",
101
- "@camstack/addon-provider-onvif": ">=1.2.157",
102
- "@camstack/addon-provider-petkit": ">=0.2.164",
103
- "@camstack/addon-provider-rademacher": ">=0.2.163",
104
- "@camstack/addon-provider-reolink": ">=1.2.232",
105
- "@camstack/addon-provider-rtsp": ">=1.2.155",
106
- "@camstack/addon-provider-tuya": ">=0.2.155",
107
- "@camstack/addon-provider-unifi": ">=0.2.160",
108
- "@camstack/addon-provider-unraid": ">=0.2.161",
109
- "@camstack/addon-provider-velux": ">=0.2.163",
110
- "@camstack/addon-provider-vesync": ">=0.2.153",
111
- "@camstack/addon-provider-wyze": ">=0.2.168",
112
- "@camstack/addon-remote-storage": ">=1.2.145",
113
- "@camstack/addon-smtp-nodemailer": ">=1.2.151",
114
- "@camstack/addon-static-turn": ">=1.2.145",
115
- "@camstack/addon-tailscale": ">=1.2.152",
116
- "@camstack/addon-terminal": ">=0.1.160",
117
- "@camstack/addon-training": ">=0.1.133",
118
- "@camstack/addon-waste-collections": ">=0.1.36"
69
+ "@camstack/addon-admin-ui": ">=1.2.602",
70
+ "@camstack/addon-agent-ui": ">=1.2.337",
71
+ "@camstack/addon-ai": ">=0.4.180",
72
+ "@camstack/addon-auth": ">=1.2.178",
73
+ "@camstack/addon-export-alexa": ">=1.2.187",
74
+ "@camstack/addon-export-google": ">=0.1.130",
75
+ "@camstack/addon-export-hap": ">=1.2.196",
76
+ "@camstack/addon-google-services": ">=0.2.43",
77
+ "@camstack/addon-import-alexa": ">=0.2.195",
78
+ "@camstack/addon-notifiers": ">=1.2.633",
79
+ "@camstack/addon-post-analysis": ">=1.2.677",
80
+ "@camstack/addon-provider-homeassistant": ">=1.2.670",
81
+ "@camstack/addon-remote-storage": ">=1.2.146",
82
+ "@camstack/addon-tailscale": ">=1.2.153",
83
+ "@camstack/addon-waste-collections": ">=0.1.37"
119
84
  },
120
85
  "wrapper": {
121
86
  "desktop": ">=0.0.1",
@@ -124,19 +89,19 @@
124
89
  }
125
90
  },
126
91
  "dependencies": {
127
- "@camstack/addon-admin-ui": "1.2.601",
128
- "@camstack/addon-agent-ui": "1.2.336",
129
- "@camstack/addon-auth": "1.2.177",
92
+ "@camstack/addon-admin-ui": "1.2.602",
93
+ "@camstack/addon-agent-ui": "1.2.337",
94
+ "@camstack/addon-auth": "1.2.178",
130
95
  "@camstack/addon-benchmark": "1.2.312",
131
96
  "@camstack/addon-decoder-nodeav": "1.2.147",
132
- "@camstack/addon-notifiers": "1.2.632",
97
+ "@camstack/addon-notifiers": "1.2.633",
133
98
  "@camstack/addon-pipeline": "1.2.644",
134
99
  "@camstack/addon-pipeline-orchestrator": "1.2.664",
135
- "@camstack/addon-post-analysis": "1.2.676",
100
+ "@camstack/addon-post-analysis": "1.2.677",
136
101
  "@camstack/develop": "0.1.48",
137
102
  "@camstack/sdk": "1.2.156",
138
- "@camstack/types": "1.2.514",
139
- "@camstack/ui-library": "1.2.394",
103
+ "@camstack/types": "1.2.515",
104
+ "@camstack/ui-library": "1.2.395",
140
105
  "@fastify/compress": "^9.0.0",
141
106
  "@fastify/cookie": "^11.0.2",
142
107
  "@fastify/cors": "^11.2.0",
@@ -1,3 +1,3 @@
1
- import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, 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, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-N7flBDwT.mjs";
1
+ import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, 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, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
3
3
  export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BRI-Mwx0.js");
2
+ const require_dist = require("./dist-DV0V3JiE.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
4
  let zod = require("zod");
5
5
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Ns as defineRecordKinds } from "./dist-BsQA6-0i.mjs";
1
+ import { Is as defineRecordKinds } from "./dist-BUoL5bbr.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";
@@ -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-BRI-Mwx0.js");
6
+ const require_dist = require("../../dist-DV0V3JiE.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_fs = require("node:fs");
@@ -1,7 +1,7 @@
1
- import { Ec as EventCategory, Lo as BaseAddon, Tc as errMsg, mn as addonPagesCapability } from "../../dist-BsQA6-0i.mjs";
1
+ import { Bo as BaseAddon, Oc as errMsg, hn as addonPagesCapability, kc as EventCategory } from "../../dist-BUoL5bbr.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
- import * as fs from "node:fs";
4
+ import * as fs$1 from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  //#region src/builtins/addon-pages-aggregator/dedupe-pages.ts
7
7
  /** Stable identity for an addon page, independent of which node reported it. */
@@ -211,11 +211,11 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
211
211
  const bundlePath = this.resolveBundlePath(addonId, bundle);
212
212
  if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
213
213
  try {
214
- const stat = fs.statSync(bundlePath);
214
+ const stat = fs$1.statSync(bundlePath);
215
215
  const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
216
216
  let v = this.bundleHashCache.get(cacheKey);
217
217
  if (v === void 0) {
218
- v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
218
+ v = createHash("sha1").update(fs$1.readFileSync(bundlePath)).digest("hex").slice(0, 12);
219
219
  this.bundleHashCache.set(cacheKey, v);
220
220
  }
221
221
  return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
@@ -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-BRI-Mwx0.js");
6
+ const require_dist = require("../../dist-DV0V3JiE.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_fs = require("node:fs");
@@ -1,7 +1,7 @@
1
- import { Ec as EventCategory, Lo as BaseAddon, Tc as errMsg, gn as addonWidgetsCapability } from "../../dist-BsQA6-0i.mjs";
1
+ import { Bo as BaseAddon, Oc as errMsg, _n as addonWidgetsCapability, kc as EventCategory } from "../../dist-BUoL5bbr.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
- import * as fs from "node:fs";
4
+ import * as fs$1 from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  //#region src/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.ts
7
7
  /**
@@ -204,9 +204,9 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
204
204
  if (entryPath === null) return String(Math.floor(Date.now()));
205
205
  try {
206
206
  const dir = path$1.dirname(entryPath);
207
- const files = fs.readdirSync(dir).filter((f) => fs.statSync(path$1.join(dir, f)).isFile()).sort();
207
+ const files = fs$1.readdirSync(dir).filter((f) => fs$1.statSync(path$1.join(dir, f)).isFile()).sort();
208
208
  const cacheKey = `${dir}#${files.map((f) => {
209
- const s = fs.statSync(path$1.join(dir, f));
209
+ const s = fs$1.statSync(path$1.join(dir, f));
210
210
  return `${f}:${s.size}:${s.mtimeMs}`;
211
211
  }).join("|")}`;
212
212
  const cached = this.bundleHashCache.get(cacheKey);
@@ -214,7 +214,7 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
214
214
  const hash = createHash("sha1");
215
215
  for (const f of files) {
216
216
  hash.update(f);
217
- hash.update(fs.readFileSync(path$1.join(dir, f)));
217
+ hash.update(fs$1.readFileSync(path$1.join(dir, f)));
218
218
  }
219
219
  const digest = hash.digest("hex").slice(0, 12);
220
220
  this.bundleHashCache.set(cacheKey, digest);
@@ -90,6 +90,14 @@ export declare class AlertCenterAddon extends BaseAddon<AlertCenterConfig> {
90
90
  */
91
91
  private handleAddonLoadRecovered;
92
92
  /**
93
+ * AddonUnsupportedVersion — an addon RUNS although its installed package is
94
+ * below what the server requires (D1017). One card per node and package, keyed
95
+ * `addon-unsupported:<nodeId>:<packageName>` so the resolve edge dismisses it.
96
+ */
97
+ private handleAddonUnsupportedVersion;
98
+ /** The package reached a supported version — drop its unsupported-version card. */
99
+ private handleAddonUnsupportedResolved;
100
+ /**
93
101
  * SystemLivenessFailed — a liveness invariant of this node is false.
94
102
  *
95
103
  * `findingId` is already stable across ticks (`liveness:no-devices`,
@@ -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-BRI-Mwx0.js");
6
+ const require_dist = require("../../dist-DV0V3JiE.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -772,6 +772,10 @@ var CATEGORY_MAPPINGS = {
772
772
  severity: "error",
773
773
  titleTemplate: "Addon failed to load"
774
774
  },
775
+ "addon.unsupported-version": {
776
+ severity: "warning",
777
+ titleTemplate: "Addon version unsupported"
778
+ },
775
779
  "system.liveness-failed": {
776
780
  severity: "error",
777
781
  titleTemplate: "Node liveness"
@@ -801,6 +805,7 @@ var CATEGORY_MAPPINGS = {
801
805
  var SILENT_TRACKED_CATEGORIES = [
802
806
  "process.state-changed",
803
807
  "addon.load-recovered",
808
+ "addon.unsupported-resolved",
804
809
  "system.liveness-recovered",
805
810
  "stream.online",
806
811
  "notification.rule-repaired",
@@ -823,6 +828,8 @@ function streamIdsOf(listed, fallback) {
823
828
  }
824
829
  return fallback !== void 0 ? [fallback] : [];
825
830
  }
831
+ /** Stable-id prefix of the unsupported-addon-version card (D1017). */
832
+ var ADDON_UNSUPPORTED_ALERT_PREFIX = "addon-unsupported:";
826
833
  var TRACKED_CATEGORIES = [...Object.keys(CATEGORY_MAPPINGS), ...SILENT_TRACKED_CATEGORIES];
827
834
  /**
828
835
  * `[ALERT-CENTER-EVENTS]` — rate limiting. Events that fire thousands of
@@ -1083,6 +1090,14 @@ var AlertCenterAddon = class extends require_dist.BaseAddon {
1083
1090
  await this.handleAddonLoadRecovered(event);
1084
1091
  return;
1085
1092
  }
1093
+ if (category === require_dist.EventCategory.AddonUnsupportedVersion) {
1094
+ await this.handleAddonUnsupportedVersion(event);
1095
+ return;
1096
+ }
1097
+ if (category === require_dist.EventCategory.AddonUnsupportedResolved) {
1098
+ await this.handleAddonUnsupportedResolved(event);
1099
+ return;
1100
+ }
1086
1101
  if (category === require_dist.EventCategory.SystemLivenessFailed) {
1087
1102
  await this.handleLivenessFailed(event);
1088
1103
  return;
@@ -1500,6 +1515,62 @@ var AlertCenterAddon = class extends require_dist.BaseAddon {
1500
1515
  }
1501
1516
  }
1502
1517
  /**
1518
+ * AddonUnsupportedVersion — an addon RUNS although its installed package is
1519
+ * below what the server requires (D1017). One card per node and package, keyed
1520
+ * `addon-unsupported:<nodeId>:<packageName>` so the resolve edge dismisses it.
1521
+ */
1522
+ async handleAddonUnsupportedVersion(event) {
1523
+ const data = event.data;
1524
+ const packageName = typeof data["packageName"] === "string" ? data["packageName"] : "";
1525
+ if (packageName.length === 0) return;
1526
+ const addonId = typeof data["addonId"] === "string" ? data["addonId"] : packageName;
1527
+ const nodeId = typeof data["nodeId"] === "string" ? data["nodeId"] : "hub";
1528
+ const installed = typeof data["installedVersion"] === "string" ? data["installedVersion"] : "unknown";
1529
+ const minimum = typeof data["requiredMinimum"] === "string" ? data["requiredMinimum"] : null;
1530
+ const server = typeof data["serverVersion"] === "string" ? data["serverVersion"] : "unknown";
1531
+ const unmet = Array.isArray(data["unmet"]) ? data["unmet"].filter((line) => typeof line === "string") : [];
1532
+ const required = minimum === null ? unmet.join("; ") : `requires >= ${minimum}`;
1533
+ const alert = {
1534
+ id: `${ADDON_UNSUPPORTED_ALERT_PREFIX}${nodeId}:${packageName}`,
1535
+ category: require_dist.EventCategory.AddonUnsupportedVersion,
1536
+ severity: "warning",
1537
+ title: `Addon version unsupported: ${addonId}`,
1538
+ message: `${addonId} on ${nodeId} runs ${installed}, but server ${server} ${required}. It keeps running; update the package.`,
1539
+ status: "active",
1540
+ read: false,
1541
+ createdAt: Date.now(),
1542
+ updatedAt: Date.now(),
1543
+ source: {
1544
+ type: "addon",
1545
+ id: packageName
1546
+ },
1547
+ metadata: {
1548
+ packageName,
1549
+ addonId,
1550
+ nodeId,
1551
+ installedVersion: installed,
1552
+ requiredMinimum: minimum,
1553
+ serverVersion: server,
1554
+ unmet
1555
+ }
1556
+ };
1557
+ await this.emitAlert(alert);
1558
+ }
1559
+ /** The package reached a supported version — drop its unsupported-version card. */
1560
+ async handleAddonUnsupportedResolved(event) {
1561
+ const packageName = event.data["packageName"];
1562
+ if (typeof packageName !== "string" || packageName.length === 0) return;
1563
+ const stableId = `${ADDON_UNSUPPORTED_ALERT_PREFIX}${typeof event.data["nodeId"] === "string" ? event.data["nodeId"] : "hub"}:${packageName}`;
1564
+ try {
1565
+ await this.dismiss(stableId);
1566
+ } catch (err) {
1567
+ this.ctx.logger?.debug("AddonUnsupportedResolved: dismiss failed (likely already dismissed)", { meta: {
1568
+ stableId,
1569
+ error: require_dist.errMsg(err)
1570
+ } });
1571
+ }
1572
+ }
1573
+ /**
1503
1574
  * SystemLivenessFailed — a liveness invariant of this node is false.
1504
1575
  *
1505
1576
  * `findingId` is already stable across ticks (`liveness:no-devices`,