@camstack/server 1.2.832 → 1.2.834

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 (95) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/trpc/cap-router-runtime.js +16 -1
  3. package/dist/api/trpc/generated-cap-mounts.js +1 -2
  4. package/dist/api/trpc/generated-cap-routers.js +2132 -2183
  5. package/dist/core/addon/instance-lifecycle.js +21 -3
  6. package/package.json +8 -7
  7. package/system/dist/addon-utils.mjs +1 -1
  8. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  10. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  12. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  13. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  14. package/system/dist/builtins/autotrack/index.js +1 -1
  15. package/system/dist/builtins/autotrack/index.mjs +1 -1
  16. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  17. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  18. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  19. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  20. package/system/dist/builtins/camera-grid/index.js +1 -1
  21. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  22. package/system/dist/builtins/composer/composer.addon.js +4 -4
  23. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  24. package/system/dist/builtins/console-logging/index.js +1 -1
  25. package/system/dist/builtins/console-logging/index.mjs +1 -1
  26. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  27. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  28. package/system/dist/builtins/device-history/capture/device-directory.d.ts +1 -1
  29. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  30. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  31. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  32. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  33. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  34. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  35. package/system/dist/builtins/keychain/index.js +4 -4
  36. package/system/dist/builtins/keychain/index.mjs +4 -4
  37. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  39. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  40. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  41. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  42. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  43. package/system/dist/builtins/loki-logging/index.js +1 -1
  44. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  45. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  46. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  47. package/system/dist/builtins/platform-probe/index.js +1 -1
  48. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  49. package/system/dist/builtins/record-entries/index.js +1 -1
  50. package/system/dist/builtins/record-entries/index.mjs +1 -1
  51. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  52. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  53. package/system/dist/builtins/snapshot/index.js +1 -1
  54. package/system/dist/builtins/snapshot/index.mjs +1 -1
  55. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  56. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  57. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  58. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  60. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  61. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  62. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  63. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  64. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  65. package/system/dist/builtins/winston-logging/index.js +1 -1
  66. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  67. package/system/dist/{capture-engine-D8AiIjQC.mjs → capture-engine-BQjIa865.mjs} +3 -3
  68. package/system/dist/{capture-engine-CAXBK7ww.js → capture-engine-Bgml6l8Z.js} +3 -3
  69. package/system/dist/{composition-sources-BunkRPGS.js → composition-sources-C7hUy8w0.js} +1 -1
  70. package/system/dist/{composition-sources-UhXWDHi8.mjs → composition-sources-CrL4KcSA.mjs} +1 -1
  71. package/system/dist/{constants-C0KB1WOf.mjs → constants-Bw5qtfbX.mjs} +1 -1
  72. package/system/dist/{constants-B5QCyskv.js → constants-CUAo3cLm.js} +1 -1
  73. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  74. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  75. package/system/dist/{device-ca-I_cMOy9W.mjs → device-ca-BDmoMgA3.mjs} +1 -1
  76. package/system/dist/{device-ca-DJNiUFgb.js → device-ca-YELIR9gF.js} +1 -1
  77. package/system/dist/{dist-BObCeiJC.js → dist-D3_60xED.js} +48 -232
  78. package/system/dist/{dist-BkjJt6LD.mjs → dist-yQfQUpYA.mjs} +48 -232
  79. package/system/dist/file-host-worker.js +1 -1
  80. package/system/dist/file-host-worker.mjs +1 -1
  81. package/system/dist/{hub-identity-Db2RwtZ2.mjs → hub-identity-C8FGw7Mt.mjs} +10 -10
  82. package/system/dist/{hub-identity-QhEXr2sn.js → hub-identity-c_zPVKOY.js} +1 -1
  83. package/system/dist/{hub-mdns-ciao-DJYolZOM.mjs → hub-mdns-ciao-CM64AtFQ.mjs} +2 -2
  84. package/system/dist/{hub-mdns-ciao-L9Qt3eVs.js → hub-mdns-ciao-CaWa1FY1.js} +2 -2
  85. package/system/dist/index.js +12 -10
  86. package/system/dist/index.mjs +223 -221
  87. package/system/dist/{legacy-integration-rows-door-4SwHHOO6.js → legacy-integration-rows-door-BnEJMuwz.js} +1 -1
  88. package/system/dist/{legacy-integration-rows-door-tl15MjSN.mjs → legacy-integration-rows-door-D5Qe0A95.mjs} +1 -1
  89. package/system/dist/{rename-composition-block-BRlgC6CC.js → rename-composition-block-CbAR4yC9.js} +1 -1
  90. package/system/dist/{rename-composition-block-DunKva8Y.mjs → rename-composition-block-DXN1dVXs.mjs} +1 -1
  91. package/system/dist/{restore-archive-WeQO8IMV.mjs → restore-archive-C88Ee7w9.mjs} +94 -94
  92. package/system/dist/{restore-archive-DDeWKKhR.js → restore-archive-DDzgcjNf.js} +1 -1
  93. package/system/dist/{wal-maintenance-CXx0PMNE.js → wal-maintenance-BNN52u-q.js} +0 -0
  94. package/system/dist/{wal-maintenance-7Zug5GTs.mjs → wal-maintenance-EvgkvDZK.mjs} +0 -0
  95. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.834] - 2026-11-11
11
+
12
+ ### Changed
13
+
14
+ - Removed the retired device-discovery capability routes (deviceDiscovery.*) from the API.
15
+
16
+ ## [1.2.833] - 2026-11-11
17
+
18
+ ### Changed
19
+
20
+ - Switching an integration instance on or off while its addon is not running is refused with "<addon> is not running: start it first" instead of a generic provider error or a write routed elsewhere
21
+
10
22
  ## [1.2.832] - 2026-11-11
11
23
 
12
24
  ### Changed
@@ -32,6 +32,7 @@ exports.buildRuntimeCapRouters = buildRuntimeCapRouters;
32
32
  const system_1 = require("@camstack/server/system");
33
33
  const types_1 = require("@camstack/types");
34
34
  const server_1 = require("@trpc/server");
35
+ const instance_lifecycle_js_1 = require("../../core/addon/instance-lifecycle.js");
35
36
  const cap_mount_helpers_js_1 = require("./cap-mount-helpers.js");
36
37
  const device_collection_dispatch_js_1 = require("./device-collection-dispatch.js");
37
38
  const trpc_middleware_js_1 = require("./trpc.middleware.js");
@@ -402,13 +403,14 @@ async function inferDeviceAdoptionCollectionAddonPin(methodName, input, deps) {
402
403
  message: `deviceAdoption.${methodName} requires addonId (top-level pin) or integrationId to resolve the owning provider.`,
403
404
  });
404
405
  }
406
+ const INSTANCES_CAP = 'integration-instances';
405
407
  /**
406
408
  * May a NON-admin session call a `caller: 'scoped'` method on this provider? Only an
407
409
  * `integration-instances` provider that declares `describe().userScoped`: the provider is asked,
408
410
  * through the same call the Integrations page uses, so a forked addon answers like a resident one.
409
411
  */
410
412
  async function userScopedAdmission(capName, provider) {
411
- if (capName !== 'integration-instances')
413
+ if (capName !== INSTANCES_CAP)
412
414
  return false;
413
415
  const describe = provider['describe'];
414
416
  if (typeof describe !== 'function')
@@ -475,10 +477,23 @@ function createCapRouterServices(deps) {
475
477
  *
476
478
  * Refuses ONLY when the cap has providers and none matches: with zero local
477
479
  * providers the fallthrough is the legitimate forked-worker route and stays.
480
+ *
481
+ * `integration-instances` is the exception, refused in both cases and by
482
+ * name: every holder (forked ones included) registers here, so a pin that
483
+ * misses names an addon that is not running, and the hub proxy would answer
484
+ * for it from some other holder. The switch of an instance has one store,
485
+ * the addon's record — nothing keeps it while the addon is down (D1013).
478
486
  */
479
487
  const rejectUnresolvedAddonPin = (capName, addonId) => {
480
488
  if (!reg)
481
489
  return;
490
+ if (capName === INSTANCES_CAP) {
491
+ deps.logger?.warn('Refusing cap call: the pinned addon is not running', {
492
+ tags: { addonId },
493
+ meta: { capability: capName },
494
+ });
495
+ throw (0, instance_lifecycle_js_1.addonNotRunningError)(addonId);
496
+ }
482
497
  const known = reg.getProviderAddonIds(capName);
483
498
  if (known.length === 0)
484
499
  return;
@@ -2,7 +2,7 @@
2
2
  // AUTO-GENERATED by scripts/generate-cap-mounts.ts — DO NOT EDIT
3
3
  // Re-run: npx tsx scripts/generate-cap-mounts.ts
4
4
  //
5
- // Mounted: 203 Skipped (legacy): 3
5
+ // Mounted: 202 Skipped (legacy): 3
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.LEGACY_SHAPE_SKIP = void 0;
8
8
  exports.mountAllCaps = mountAllCaps;
@@ -215,7 +215,6 @@ function mountAllCaps(services) {
215
215
  return entries[0]?.[1] ?? null;
216
216
  }, remoteCapProxy),
217
217
  deviceCredentials: (0, generated_cap_routers_js_1.createCapRouter_deviceCredentials)((_ctx) => reg?.getSingleton('device-credentials') ?? null, remoteCapProxy),
218
- deviceDiscovery: (0, generated_cap_routers_js_1.createCapRouter_deviceDiscovery)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-discovery'), remoteCapProxy),
219
218
  deviceExport: (0, generated_cap_routers_js_1.createCapRouter_deviceExport)((_ctx, addonId) => {
220
219
  if (!reg)
221
220
  return null;