@camstack/server 1.2.858 → 1.2.860

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 +16 -0
  2. package/dist/api/trpc/generated-cap-routers.js +16 -0
  3. package/dist/core/cluster-update/cluster-update-steps.js +10 -2
  4. package/dist/server-root/index.js +1125 -45
  5. package/package.json +17 -16
  6. package/system/dist/addon-runner.js +76 -1
  7. package/system/dist/addon-runner.mjs +76 -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 +1 -1
  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 +1 -1
  12. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  13. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  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 +2 -2
  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/device-history.addon.js +2 -2
  29. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  30. package/system/dist/builtins/device-manager/device-manager.addon.js +32 -23
  31. package/system/dist/builtins/device-manager/device-manager.addon.mjs +32 -23
  32. package/system/dist/builtins/device-manager/device-search.d.ts +4 -3
  33. package/system/dist/builtins/device-manager/removal-fence.d.ts +2 -2
  34. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  35. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  36. package/system/dist/builtins/keychain/index.js +4 -4
  37. package/system/dist/builtins/keychain/index.mjs +4 -4
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  39. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  40. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  41. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  42. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  43. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  44. package/system/dist/builtins/loki-logging/index.js +1 -1
  45. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  46. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  47. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  48. package/system/dist/builtins/platform-probe/index.js +1 -1
  49. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  50. package/system/dist/builtins/record-entries/index.js +1 -1
  51. package/system/dist/builtins/record-entries/index.mjs +1 -1
  52. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  53. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  54. package/system/dist/builtins/snapshot/index.js +1 -1
  55. package/system/dist/builtins/snapshot/index.mjs +1 -1
  56. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  57. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  58. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  59. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  60. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  61. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  62. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  63. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  64. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  65. package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
  66. package/system/dist/builtins/winston-logging/index.js +1 -1
  67. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  68. package/system/dist/{capture-engine-B4_fq2JB.mjs → capture-engine-B5OYzCH1.mjs} +1 -1
  69. package/system/dist/{capture-engine-yhFFC7F8.js → capture-engine-BManwD48.js} +1 -1
  70. package/system/dist/{composition-sources-BQOEYCJG.mjs → composition-sources-B8hoUx1K.mjs} +1 -1
  71. package/system/dist/{composition-sources-CKSSe5ny.js → composition-sources-DWu-IL2w.js} +1 -1
  72. package/system/dist/{constants-dfnEfsX7.js → constants-CUAopsxj.js} +1 -1
  73. package/system/dist/{constants-h8wJE_8O.mjs → constants-qDKQ7NaY.mjs} +1 -1
  74. package/system/dist/{device-ca-h54CenJx.mjs → device-ca-BOUTrISA.mjs} +1 -1
  75. package/system/dist/{device-ca-_o0-3jJ6.js → device-ca-DNrM4Ao-.js} +1 -1
  76. package/system/dist/{dist-atHH8IeD.mjs → dist-3MQdfUTG.mjs} +254 -71
  77. package/system/dist/{dist-WEGVb8qV.js → dist-B9Kzw974.js} +259 -70
  78. package/system/dist/file-host-worker.js +1 -1
  79. package/system/dist/file-host-worker.mjs +1 -1
  80. package/system/dist/{hub-identity-nIMYA24i.js → hub-identity-BQIE6w3g.js} +1 -1
  81. package/system/dist/{hub-identity-DLF698tj.mjs → hub-identity-DEbxcoVh.mjs} +1 -1
  82. package/system/dist/{hub-mdns-ciao-B6ZHStt1.js → hub-mdns-ciao-Bj_RdJiH.js} +2 -2
  83. package/system/dist/{hub-mdns-ciao-DchpUVAk.mjs → hub-mdns-ciao-BzKGywE2.mjs} +2 -2
  84. package/system/dist/index.js +84 -9
  85. package/system/dist/index.mjs +84 -9
  86. package/system/dist/kernel/moleculer/switch-toggle.d.ts +41 -0
  87. package/system/dist/{legacy-integration-rows-door-BbaIE1qF.js → legacy-integration-rows-door-CRfEC_HP.js} +1 -1
  88. package/system/dist/{legacy-integration-rows-door-DBO3ZLmn.mjs → legacy-integration-rows-door-rgL9olef.mjs} +1 -1
  89. package/system/dist/{rename-composition-block-IIfaFnEl.js → rename-composition-block-Bbt43q6n.js} +1 -1
  90. package/system/dist/{rename-composition-block-6ISzMLgj.mjs → rename-composition-block-DlgSgxch.mjs} +1 -1
  91. package/system/dist/{restore-archive-ChRNoqGg.js → restore-archive-DJBACMC0.js} +1 -1
  92. package/system/dist/{restore-archive-DeDRh7Lf.mjs → restore-archive-aQzQt2Kv.mjs} +82 -82
  93. package/system/dist/{wal-maintenance-BXj9xnDD.mjs → wal-maintenance-Bu6vjJlR.mjs} +0 -0
  94. package/system/dist/{wal-maintenance-l3CsKEaJ.js → wal-maintenance-BvIEU1r1.js} +0 -0
  95. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.860] - 2026-11-13
11
+
12
+ ### Added
13
+
14
+ - A switch offers Toggle, which flips it from its current state and refuses when that state is unknown.
15
+
16
+ ### Fixed
17
+
18
+ - A cluster update reports a stalled server install, and one that hit its time limit, as their own reasons.
19
+
20
+ ## [1.2.859] - 2026-11-13
21
+
22
+ ### Changed
23
+
24
+ - Rebuilt against updated dependencies.
25
+
10
26
  ## [1.2.858] - 2026-11-13
11
27
 
12
28
  ### Changed
@@ -13193,6 +13193,22 @@ function createCapRouter_switch(getProvider, createRemoteProxy) {
13193
13193
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13194
13194
  return p.setState(methodInput);
13195
13195
  }),
13196
+ toggle: trpc_middleware_js_1.protectedProcedure
13197
+ .input(types_152.switchCapability.methods.toggle.input.loose())
13198
+ .output(types_152.switchCapability.methods.toggle.output)
13199
+ .mutation(async ({ input, ctx }) => {
13200
+ const { nodeId, ...methodInput } = input;
13201
+ const p = resolveProvider('switch', nodeId, () => getProvider(ctx), createRemoteProxy);
13202
+ const fn = p.toggle;
13203
+ if (typeof fn !== 'function') {
13204
+ throw new server_1.TRPCError({
13205
+ code: 'NOT_IMPLEMENTED',
13206
+ message: 'Capability "switch" provider does not implement "toggle"',
13207
+ });
13208
+ }
13209
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13210
+ return fn.call(p, methodInput);
13211
+ }),
13196
13212
  });
13197
13213
  }
13198
13214
  function createCapRouter_system(getProvider, createRemoteProxy) {
@@ -165,6 +165,13 @@ async function waitForAgentOnline(seams, nodeId) {
165
165
  : failed(wait.last.reason, `${nodeId} was not online at its turn: ${wait.last.why}; not updated`);
166
166
  }
167
167
  /** Did the apply answer say "this will not happen"? */
168
+ function serverStepReason(reason) {
169
+ if (reason === 'timeout-stall')
170
+ return 'timeout-stall';
171
+ if (reason === 'timeout-ceiling')
172
+ return 'timeout-ceiling';
173
+ return 'server-refused';
174
+ }
168
175
  function refusal(result) {
169
176
  if (result.outcome === 'already-current')
170
177
  return null;
@@ -186,8 +193,9 @@ async function runServerStep(seams, nodeId, target) {
186
193
  try {
187
194
  const result = await seams.applyServerUpdate(nodeId, target);
188
195
  const refused = refusal(result);
189
- if (refused !== null)
190
- return failed('server-refused', `${name} refused the update (${refused})`);
196
+ if (refused !== null) {
197
+ return failed(serverStepReason(result.reason), `${name} refused the update (${refused})`);
198
+ }
191
199
  note = result.outcome ?? '';
192
200
  }
193
201
  catch (err) {