@camstack/server 1.2.786 → 1.2.788

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 (104) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/core/cap-providers.js +62 -96
  3. package/dist/api/trpc/generated-cap-mounts.js +1 -10
  4. package/dist/api/trpc/generated-cap-routers.js +2289 -2366
  5. package/dist/core/addon/addon-registry.service.js +29 -28
  6. package/dist/core/addon/boot-health-snapshot.js +42 -0
  7. package/dist/core/addon/hub-spawn-gate.js +1 -0
  8. package/dist/core/addon/instances-of-cap.js +35 -0
  9. package/package.json +64 -46
  10. package/system/dist/addon-utils.mjs +1 -1
  11. package/system/dist/{agent-https-snFEmSqQ.js → agent-https-jJDe-XNl.js} +1 -1
  12. package/system/dist/{agent-https-D779EYj3.mjs → agent-https-szf2FU49.mjs} +1 -1
  13. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  14. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  15. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  16. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  17. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  18. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  19. package/system/dist/builtins/autotrack/index.js +1 -1
  20. package/system/dist/builtins/autotrack/index.mjs +1 -1
  21. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  22. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  23. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  24. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  25. package/system/dist/builtins/camera-grid/index.js +1 -1
  26. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  27. package/system/dist/builtins/composer/composer.addon.js +3 -3
  28. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  29. package/system/dist/builtins/console-logging/index.js +1 -1
  30. package/system/dist/builtins/console-logging/index.mjs +1 -1
  31. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  32. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  33. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  34. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  35. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  36. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  37. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  38. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  39. package/system/dist/builtins/keychain/index.js +4 -4
  40. package/system/dist/builtins/keychain/index.mjs +4 -4
  41. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  42. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  43. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  44. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  45. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  46. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  47. package/system/dist/builtins/loki-logging/index.js +1 -1
  48. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  51. package/system/dist/builtins/platform-probe/index.js +1 -1
  52. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  53. package/system/dist/builtins/record-entries/index.js +1 -1
  54. package/system/dist/builtins/record-entries/index.mjs +1 -1
  55. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  56. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  57. package/system/dist/builtins/snapshot/index.js +1 -1
  58. package/system/dist/builtins/snapshot/index.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  61. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/integration-record-kinds.d.ts +0 -1
  64. package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +2 -4
  65. package/system/dist/builtins/sqlite-storage/migrations/migration-types.d.ts +6 -1
  66. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +7 -4
  67. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +7 -4
  68. package/system/dist/builtins/storage-orchestrator/drain-state-store.d.ts +4 -8
  69. package/system/dist/builtins/storage-orchestrator/location-store.d.ts +9 -26
  70. package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +0 -1
  71. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +35 -407
  72. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +36 -407
  73. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  74. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  75. package/system/dist/builtins/winston-logging/index.js +1 -1
  76. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  77. package/system/dist/{capture-engine-DkTEWrRe.mjs → capture-engine-BsKY_3xa.mjs} +1 -1
  78. package/system/dist/{capture-engine-NZ11ORZS.js → capture-engine-DNHgjQot.js} +1 -1
  79. package/system/dist/{composition-sources-B9-lkIvO.mjs → composition-sources-BRdGsbVT.mjs} +1 -1
  80. package/system/dist/{composition-sources-B6GYTy_7.js → composition-sources-BgO0GQYW.js} +1 -1
  81. package/system/dist/{constants-DR8hdi45.js → constants-C3jGKQSQ.js} +1 -1
  82. package/system/dist/{constants--9ui1LK0.mjs → constants-CQeMrR4f.mjs} +1 -1
  83. package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
  84. package/system/dist/{custom-action-registry-B9zFBNVa.mjs → custom-action-registry-N7flBDwT.mjs} +37 -37
  85. package/system/dist/{device-ca-D-7tAHJ_.mjs → device-ca-ByVi5eUC.mjs} +1 -1
  86. package/system/dist/{device-ca-sIFmKkGM.js → device-ca-D3y6wGmn.js} +1 -1
  87. package/system/dist/{dist-h3Yla8gE.js → dist-BRI-Mwx0.js} +824 -957
  88. package/system/dist/{dist-D-iGSnX_.mjs → dist-BsQA6-0i.mjs} +824 -957
  89. package/system/dist/file-host-worker.js +1 -1
  90. package/system/dist/file-host-worker.mjs +1 -1
  91. package/system/dist/{hub-mdns-ciao-DuEfM0fI.mjs → hub-mdns-ciao-8dJTW2LI.mjs} +2 -2
  92. package/system/dist/{hub-mdns-ciao-C5DkUEZF.js → hub-mdns-ciao-Ry_Jpljx.js} +2 -2
  93. package/system/dist/index.d.ts +2 -2
  94. package/system/dist/index.js +85 -223
  95. package/system/dist/index.mjs +298 -434
  96. package/system/dist/kernel/addon-health-monitor.d.ts +21 -0
  97. package/system/dist/{legacy-integration-rows-door-BTdhD-Yp.mjs → legacy-integration-rows-door-CjXTbmvH.mjs} +1 -1
  98. package/system/dist/{legacy-integration-rows-door-DTDD5wwC.js → legacy-integration-rows-door-D5BdSNla.js} +1 -1
  99. package/system/dist/migrations/hub/2026-11-06-drop-legacy-integrations-and-storage-locations.d.ts +12 -0
  100. package/system/dist/{restore-archive-DQWz5Wp-.mjs → restore-archive-Co2lk3OU.mjs} +94 -94
  101. package/system/dist/{restore-archive-CkAD_-E9.js → restore-archive-GoWJMdHy.js} +1 -1
  102. package/system/dist/{wal-maintenance-CB-O-GPP.js → wal-maintenance-C1Haue74.js} +0 -0
  103. package/system/dist/{wal-maintenance-DouX1XsY.mjs → wal-maintenance-DRnV6QYu.mjs} +0 -0
  104. package/system/package.json +1 -1
@@ -63,6 +63,12 @@ export interface AddonHealthState {
63
63
  alertEmitted: boolean;
64
64
  /** True if a retry attempt is currently in flight. */
65
65
  retrying: boolean;
66
+ /**
67
+ * True while the hub spawn gate holds the addon back (its package is below what
68
+ * the running server requires). Retried on the same backoff, but never a
69
+ * failure: no alert, no failure event.
70
+ */
71
+ heldBack: boolean;
66
72
  }
67
73
  export interface AddonHealthSnapshot {
68
74
  readonly packageName: string;
@@ -78,6 +84,7 @@ export interface AddonHealthSnapshot {
78
84
  readonly nextRetryAt: number | null;
79
85
  readonly alertEmitted: boolean;
80
86
  readonly retrying: boolean;
87
+ readonly heldBack: boolean;
81
88
  /** Whether the boot grace window is still open (suppresses alerts). */
82
89
  readonly inGracePeriod: boolean;
83
90
  }
@@ -91,6 +98,11 @@ export interface AddonHealthMonitorOptions {
91
98
  * success; throws on failure (the monitor records the new error).
92
99
  */
93
100
  readonly retryFn: (packageName: string) => Promise<void>;
101
+ /**
102
+ * Whether the spawn gate currently holds this addon back. A failure recorded for
103
+ * a held-back addon (a retry the gate refused) stays a quiet retry, not an alert.
104
+ */
105
+ readonly isHeldBack?: (addonId: string) => boolean;
94
106
  /** Override for tests. Defaults to `HEALTH_MONITOR_TICK_MS`. */
95
107
  readonly tickIntervalMs?: number;
96
108
  /** Override for tests. Defaults to `HEALTH_MONITOR_GRACE_PERIOD_MS`. */
@@ -110,6 +122,7 @@ export declare class AddonHealthMonitor {
110
122
  private readonly logger;
111
123
  private readonly retryFn;
112
124
  private readonly now;
125
+ private readonly isHeldBack;
113
126
  private timer;
114
127
  private graceEmittedFor;
115
128
  constructor(opts: AddonHealthMonitorOptions);
@@ -128,6 +141,14 @@ export declare class AddonHealthMonitor {
128
141
  */
129
142
  recordFailure(packageName: string, err: unknown, addonId?: string): void;
130
143
  /**
144
+ * The spawn gate holds this addon back (its package is not yet at the version the
145
+ * server requires). Not a failure: the same retry backoff is armed, so the addon
146
+ * is reloaded once its package is current, but no failure is logged as a warning
147
+ * and no `AddonLoadFailed` / `AddonRetryScheduled` event is emitted. A retry that
148
+ * finds the gate open records success the normal way.
149
+ */
150
+ recordHeldBack(packageName: string, reason: string, addonId?: string): void;
151
+ /**
131
152
  * Force an immediate retry attempt for a package, resetting the
132
153
  * counter back to 0 (next failure goes to the 60s interval again).
133
154
  * Used by the user-facing `addons.retryLoad` tRPC procedure and by
@@ -1,4 +1,4 @@
1
- import { Es as collectSecretMarkerRefs } from "./dist-D-iGSnX_.mjs";
1
+ import { Es as collectSecretMarkerRefs } from "./dist-BsQA6-0i.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-h3Yla8gE.js");
1
+ const require_dist = require("./dist-BRI-Mwx0.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).
@@ -0,0 +1,12 @@
1
+ import type { HubSqlMigration } from "../../builtins/sqlite-storage/migrations/migration-types.js";
2
+ export declare const DROP_LEGACY_INTEGRATIONS_AND_STORAGE_LOCATIONS_MIGRATION_ID = "hub/2026-11-06-drop-legacy-integrations-and-storage-locations";
3
+ export interface UncopiedLegacyStore {
4
+ readonly table: string;
5
+ readonly missingIds: readonly string[];
6
+ }
7
+ /** The drop refused: a legacy table holds rows its record kind never received. */
8
+ export declare class LegacyStoreDropRefused extends Error {
9
+ readonly blocked: readonly UncopiedLegacyStore[];
10
+ constructor(blocked: readonly UncopiedLegacyStore[]);
11
+ }
12
+ export declare const DROP_LEGACY_INTEGRATIONS_AND_STORAGE_LOCATIONS_MIGRATION: HubSqlMigration;