@camstack/server 1.2.728 → 1.2.730

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 (114) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/agent/main.js +2 -14
  3. package/dist/api/core/cap-providers.js +0 -7
  4. package/dist/api/trpc/generated-cap-mounts.js +4 -1
  5. package/dist/api/trpc/generated-cap-routers.js +1923 -1839
  6. package/dist/boot/boot-config.js +1 -1
  7. package/dist/core/addon/addon-package.service.js +3 -105
  8. package/dist/core/addon-bridge/addon-bridge.service.js +1 -5
  9. package/dist/launcher.js +12 -124
  10. package/package.json +19 -17
  11. package/system/dist/addon-runner.js +1 -2
  12. package/system/dist/addon-runner.mjs +1 -2
  13. package/system/dist/{agent-https-B1XLr4nm.js → agent-https-C8Gz2jjS.js} +1 -1
  14. package/system/dist/{agent-https-BsedJhrb.mjs → agent-https-DZq8uf8L.mjs} +1 -1
  15. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  17. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  19. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  20. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  21. package/system/dist/builtins/autotrack/index.js +1 -1
  22. package/system/dist/builtins/autotrack/index.mjs +1 -1
  23. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  25. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  26. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  27. package/system/dist/builtins/camera-grid/index.js +1 -1
  28. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  29. package/system/dist/builtins/composer/composer.addon.js +3 -3
  30. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  31. package/system/dist/builtins/console-logging/index.js +1 -1
  32. package/system/dist/builtins/console-logging/index.mjs +1 -1
  33. package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +6 -0
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.js +1361 -440
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +1360 -440
  36. package/system/dist/builtins/core-blocks/fan-presets-action-source.d.ts +35 -0
  37. package/system/dist/builtins/core-blocks/fan-presets-service.d.ts +83 -0
  38. package/system/dist/builtins/core-blocks/fan-presets-wiring.d.ts +31 -0
  39. package/system/dist/builtins/core-blocks/record-kinds.d.ts +15 -0
  40. package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +84 -0
  41. package/system/dist/builtins/core-blocks/timed-run/timed-run-wiring.d.ts +21 -0
  42. package/system/dist/builtins/device-history/device-history.addon.d.ts +4 -0
  43. package/system/dist/builtins/device-history/device-history.addon.js +769 -17
  44. package/system/dist/builtins/device-history/device-history.addon.mjs +769 -17
  45. package/system/dist/builtins/device-history/runs/device-runs-provider.d.ts +7 -0
  46. package/system/dist/builtins/device-history/runs/device-runs-record-kinds.d.ts +15 -0
  47. package/system/dist/builtins/device-history/runs/device-runs-service.d.ts +42 -0
  48. package/system/dist/builtins/device-history/runs/energy-from-history.d.ts +22 -0
  49. package/system/dist/builtins/device-history/runs/run-recorder.d.ts +111 -0
  50. package/system/dist/builtins/device-history/runs/slice-readers.d.ts +9 -0
  51. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  52. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  53. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  54. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  55. package/system/dist/builtins/keychain/index.js +47 -38
  56. package/system/dist/builtins/keychain/index.mjs +47 -38
  57. package/system/dist/builtins/keychain/key-sources.d.ts +12 -7
  58. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  59. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  60. package/system/dist/builtins/local-auth/local-auth.addon.js +3 -3
  61. package/system/dist/builtins/local-auth/local-auth.addon.mjs +3 -3
  62. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  63. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  64. package/system/dist/builtins/loki-logging/index.js +1 -1
  65. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  66. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  67. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  68. package/system/dist/builtins/platform-probe/index.js +1 -1
  69. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  70. package/system/dist/builtins/record-entries/index.js +1 -1
  71. package/system/dist/builtins/record-entries/index.mjs +1 -1
  72. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  73. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  74. package/system/dist/builtins/snapshot/index.js +1 -1
  75. package/system/dist/builtins/snapshot/index.mjs +1 -1
  76. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  77. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  78. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  79. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  80. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  81. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  82. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  83. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  84. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  85. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  86. package/system/dist/builtins/winston-logging/index.js +1 -1
  87. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  88. package/system/dist/{composition-sources-BjuQ3xot.mjs → composition-sources-4M_NnTnV.mjs} +1 -1
  89. package/system/dist/{composition-sources-C5r8i46e.js → composition-sources-hokiaS3J.js} +1 -1
  90. package/system/dist/{constants-Bh5wQoTg.js → constants-B0L3suFC.js} +1 -1
  91. package/system/dist/{constants-GnxjCxT3.mjs → constants-DTVU00LZ.mjs} +1 -1
  92. package/system/dist/{device-ca-OWEYAYaG.mjs → device-ca-C_y2GrU5.mjs} +2 -2
  93. package/system/dist/{device-ca-oM-nuINR.js → device-ca-DaTT1Y9v.js} +2 -2
  94. package/system/dist/{dist-Cw8KtuQY.mjs → dist-9lvgpcnm.mjs} +43394 -42706
  95. package/system/dist/{dist-B9xpybTG.js → dist-B3S0ruBa.js} +43217 -42457
  96. package/system/dist/file-host-worker.js +1 -1
  97. package/system/dist/file-host-worker.mjs +1 -1
  98. package/system/dist/{hub-mdns-ciao-BPENkOKX.js → hub-mdns-ciao-Dkw38L-g.js} +2 -2
  99. package/system/dist/{hub-mdns-ciao-C3qMZFP0.mjs → hub-mdns-ciao-xgLfZIVx.mjs} +2 -2
  100. package/system/dist/index.js +40 -186
  101. package/system/dist/index.mjs +41 -185
  102. package/system/dist/kernel/addon-installer.d.ts +9 -60
  103. package/system/dist/kernel/bootstrap-config.d.ts +3 -1
  104. package/system/dist/kernel/config-schema.d.ts +2 -11
  105. package/system/dist/kernel/fs-utils.d.ts +0 -6
  106. package/system/dist/kernel/index.d.ts +2 -3
  107. package/system/dist/{restore-archive-DJv5ATV8.mjs → restore-archive-cxnuWxQM.mjs} +1 -1
  108. package/system/dist/{restore-archive-BiN1yKZV.js → restore-archive-orP6eHBd.js} +1 -1
  109. package/system/dist/{retention-BT7TgsUn.js → retention-CB2cyW9k.js} +1 -1
  110. package/system/dist/{retention-DQje-V4I.mjs → retention-Me4u6zMp.mjs} +1 -1
  111. package/system/dist/{wal-maintenance-DM08Htuy.mjs → wal-maintenance-De7Ifvph.mjs} +0 -0
  112. package/system/dist/{wal-maintenance-BLwgOIXb.js → wal-maintenance-_PXj626-.js} +0 -0
  113. package/system/package.json +11 -2
  114. package/system/dist/kernel/workspace-detect.d.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.730] - 2026-11-01
11
+
12
+ ### Added
13
+
14
+ - Serves the new fan-presets and timed-run capabilities (fan speed presets, heater and pump timed runs).
15
+
16
+ ### Changed
17
+
18
+ - The API gains the timed-run methods (run for, cancel, status).
19
+
20
+ ## [1.2.729] - 2026-11-01
21
+
22
+ ### Changed
23
+
24
+ - config.yaml bootstrap.requiredAddons is ignored (with a warning); the first-boot addon set always comes from the server package
25
+ - Addons now always install from npm: the bootstrap.installSource key and the CAMSTACK_INSTALL_SOURCE variable are gone (a config.yaml still carrying the key boots with one warning); a workspace build reaches a node through camstack deploy.
26
+ - The external keychain master key is read from the fixed path /run/secrets/camstack-master-key (and .previous to rotate) — keychain.keyFile and keychain.previousKeyFile in config.yaml are retired and only log a warning
27
+ - Generated capability routers include device-runs.
28
+
10
29
  ## [1.2.728] - 2026-11-01
11
30
 
12
31
  ### Changed
@@ -137,24 +137,12 @@ async function startAgent(configPath) {
137
137
  // the closure's own scope dir, `<resourcesPath>/node_modules/@camstack`
138
138
  // (`'local'` mode). Was a second `<resourcesPath>/addons` tree until
139
139
  // 2026-08-25 — see `packages/desktop/src/process-manager.ts`.
140
- // 2. Otherwise npm from registry. Local dev pushes addons via
140
+ // 2. Otherwise npm from registry. A workspace build reaches a node via
141
141
  // `camstack deploy` (CLI tarball upload), bypassing this path.
142
- const explicitSource = process.env['CAMSTACK_INSTALL_SOURCE'];
143
142
  const bundledDir = process.env['CAMSTACK_BUNDLED_ADDONS_DIR'];
144
- let workspaceDir = null;
145
- let resolvedSource = explicitSource;
146
- if (bundledDir && fs.existsSync(bundledDir)) {
147
- workspaceDir = bundledDir;
148
- resolvedSource = 'local';
149
- console.log(`[Agent] Using bundled addons from ${bundledDir}`);
150
- }
151
- else if (explicitSource === 'local') {
152
- workspaceDir = (0, system_1.detectWorkspacePackagesDir)(config.dataDir);
153
- }
154
143
  const installer = new system_1.AddonInstaller({
155
144
  addonsDir: config.addonsDir,
156
- workspacePackagesDir: workspaceDir ?? undefined,
157
- installSource: resolvedSource,
145
+ ...(bundledDir && fs.existsSync(bundledDir) ? { bundledAddonsDir: bundledDir } : {}),
158
146
  });
159
147
  await installer.ensureRequiredPackages(system_1.AddonInstaller.AGENT_PACKAGES);
160
148
  // Restore repair, mirroring the hub launcher (D338): reinstall ONLY the
@@ -1596,13 +1596,6 @@ function buildAddonsProvider(ar, ps, ls, moleculer, configService, ctx, agentReg
1596
1596
  requestHubChangeConvergence();
1597
1597
  return result;
1598
1598
  },
1599
- installFromWorkspace: async (input) => {
1600
- const result = await ps.installFromWorkspaceAndLoad(input.packageName);
1601
- requestHubChangeConvergence();
1602
- return result;
1603
- },
1604
- isWorkspaceAvailable: async () => ps.isWorkspaceAvailable(),
1605
- listWorkspacePackages: async () => ps.listWorkspacePackages(),
1606
1599
  uninstallPackage: async (input) => {
1607
1600
  try {
1608
1601
  const result = await (0, addon_uninstall_js_1.uninstallPackage)(uninstallSeam, input);
@@ -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: 193 Skipped (legacy): 3
5
+ // Mounted: 196 Skipped (legacy): 3
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.LEGACY_SHAPE_SKIP = void 0;
8
8
  exports.mountAllCaps = mountAllCaps;
@@ -274,6 +274,7 @@ function mountAllCaps(services) {
274
274
  listDeviceData: (0, cap_mount_helpers_js_1.concatCollection)(providers, 'listDeviceData'),
275
275
  };
276
276
  }, remoteCapProxy),
277
+ deviceRuns: (0, generated_cap_routers_js_1.createCapRouter_deviceRuns)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-runs'), remoteCapProxy),
277
278
  deviceState: (0, generated_cap_routers_js_1.createCapRouter_deviceState)((_ctx) => reg?.getSingleton('device-state') ?? null, remoteCapProxy),
278
279
  deviceStatus: (0, generated_cap_routers_js_1.createCapRouter_deviceStatus)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-status'), remoteCapProxy),
279
280
  dishwasher: (0, generated_cap_routers_js_1.createCapRouter_dishwasher)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'dishwasher'), remoteCapProxy),
@@ -309,6 +310,7 @@ function mountAllCaps(services) {
309
310
  };
310
311
  }, remoteCapProxy),
311
312
  fanControl: (0, generated_cap_routers_js_1.createCapRouter_fanControl)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'fan-control'), remoteCapProxy),
313
+ fanPresets: (0, generated_cap_routers_js_1.createCapRouter_fanPresets)((_ctx) => reg?.getSingleton('fan-presets') ?? null, remoteCapProxy),
312
314
  featureProbe: (0, generated_cap_routers_js_1.createCapRouter_featureProbe)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'feature-probe'), remoteCapProxy),
313
315
  filesystemBrowse: (0, generated_cap_routers_js_1.createCapRouter_filesystemBrowse)((_ctx) => reg?.getSingleton('filesystem-browse') ??
314
316
  null, remoteCapProxy),
@@ -639,6 +641,7 @@ function mountAllCaps(services) {
639
641
  }, remoteCapProxy),
640
642
  terminalSession: (0, generated_cap_routers_js_1.createCapRouter_terminalSession)((_ctx) => reg?.getSingleton('terminal-session') ??
641
643
  null, remoteCapProxy),
644
+ timedRun: (0, generated_cap_routers_js_1.createCapRouter_timedRun)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'timed-run'), remoteCapProxy),
642
645
  toast: (0, generated_cap_routers_js_1.createCapRouter_toast)((_ctx) => reg?.getSingleton('toast') ?? null, remoteCapProxy),
643
646
  training: (0, generated_cap_routers_js_1.createCapRouter_training)((_ctx) => reg?.getSingleton('training') ?? null, remoteCapProxy),
644
647
  trainingProvider: (0, generated_cap_routers_js_1.createCapRouter_trainingProvider)((_ctx, addonId) => {