@camstack/server 1.2.727 → 1.2.729

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 (108) hide show
  1. package/CHANGELOG.md +15 -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 +2 -1
  5. package/dist/api/trpc/generated-cap-routers.js +1872 -1847
  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 +22 -11
  11. package/system/dist/addon-runner.js +1 -2
  12. package/system/dist/addon-runner.mjs +1 -2
  13. package/system/dist/{agent-https-Cm8wrQ3N.js → agent-https-BMmfwElS.js} +1 -1
  14. package/system/dist/{agent-https-BFjd0kVS.mjs → agent-https-BXB7X23w.mjs} +1 -1
  15. package/system/dist/auth/user-manager.d.ts +9 -0
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  17. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  19. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  20. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  21. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  22. package/system/dist/builtins/autotrack/index.js +1 -1
  23. package/system/dist/builtins/autotrack/index.mjs +1 -1
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  25. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  26. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  27. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  28. package/system/dist/builtins/camera-grid/index.js +1 -1
  29. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  30. package/system/dist/builtins/composer/composer.addon.js +3 -3
  31. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  32. package/system/dist/builtins/console-logging/index.js +1 -1
  33. package/system/dist/builtins/console-logging/index.mjs +1 -1
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  36. package/system/dist/builtins/device-history/device-history.addon.d.ts +4 -0
  37. package/system/dist/builtins/device-history/device-history.addon.js +769 -17
  38. package/system/dist/builtins/device-history/device-history.addon.mjs +769 -17
  39. package/system/dist/builtins/device-history/runs/device-runs-provider.d.ts +7 -0
  40. package/system/dist/builtins/device-history/runs/device-runs-record-kinds.d.ts +15 -0
  41. package/system/dist/builtins/device-history/runs/device-runs-service.d.ts +42 -0
  42. package/system/dist/builtins/device-history/runs/energy-from-history.d.ts +22 -0
  43. package/system/dist/builtins/device-history/runs/run-recorder.d.ts +111 -0
  44. package/system/dist/builtins/device-history/runs/slice-readers.d.ts +9 -0
  45. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  46. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  47. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  48. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  49. package/system/dist/builtins/keychain/index.js +47 -38
  50. package/system/dist/builtins/keychain/index.mjs +47 -38
  51. package/system/dist/builtins/keychain/key-sources.d.ts +12 -7
  52. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  53. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  54. package/system/dist/builtins/local-auth/local-auth.addon.js +21 -3
  55. package/system/dist/builtins/local-auth/local-auth.addon.mjs +21 -3
  56. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  57. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  58. package/system/dist/builtins/loki-logging/index.js +1 -1
  59. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  60. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  61. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  62. package/system/dist/builtins/platform-probe/index.js +1 -1
  63. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  64. package/system/dist/builtins/record-entries/index.js +1 -1
  65. package/system/dist/builtins/record-entries/index.mjs +1 -1
  66. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  67. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  68. package/system/dist/builtins/snapshot/index.js +1 -1
  69. package/system/dist/builtins/snapshot/index.mjs +1 -1
  70. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  71. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  72. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  73. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  74. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +11 -3
  75. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +11 -3
  76. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  77. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  78. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  79. package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
  80. package/system/dist/builtins/winston-logging/index.js +1 -1
  81. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  82. package/system/dist/{composition-sources-CMLKuImu.mjs → composition-sources-BCfgVe9V.mjs} +1 -1
  83. package/system/dist/{composition-sources-DbRy2m6-.js → composition-sources-D6b0p8Hl.js} +1 -1
  84. package/system/dist/{constants-z0p-SIpO.mjs → constants-BQLyzulL.mjs} +1 -1
  85. package/system/dist/{constants-BpTCwvl7.js → constants-ePrW9DMj.js} +1 -1
  86. package/system/dist/{device-ca-IFiCeZUY.mjs → device-ca-C8X1AGHU.mjs} +2 -2
  87. package/system/dist/{device-ca-tXY-d38g.js → device-ca-Dh9wjg_e.js} +2 -2
  88. package/system/dist/{dist-BvVArCmo.js → dist-D-7p7cJp.js} +219 -36
  89. package/system/dist/{dist-8RpYuR_b.mjs → dist-XvOCXwnA.mjs} +208 -37
  90. package/system/dist/file-host-worker.js +1 -1
  91. package/system/dist/file-host-worker.mjs +1 -1
  92. package/system/dist/{hub-mdns-ciao-BGTQuEAj.js → hub-mdns-ciao-BFZZAJIx.js} +2 -2
  93. package/system/dist/{hub-mdns-ciao-ChnLH7jR.mjs → hub-mdns-ciao-CGwz5__T.mjs} +2 -2
  94. package/system/dist/index.js +40 -186
  95. package/system/dist/index.mjs +41 -185
  96. package/system/dist/kernel/addon-installer.d.ts +9 -60
  97. package/system/dist/kernel/bootstrap-config.d.ts +3 -1
  98. package/system/dist/kernel/config-schema.d.ts +2 -11
  99. package/system/dist/kernel/fs-utils.d.ts +0 -6
  100. package/system/dist/kernel/index.d.ts +2 -3
  101. package/system/dist/{restore-archive-CmljxWcJ.js → restore-archive-3e5X8g6h.js} +1 -1
  102. package/system/dist/{restore-archive-gcyWu7gb.mjs → restore-archive-B3M3ZwAl.mjs} +82 -82
  103. package/system/dist/{retention-DwnQVMqM.mjs → retention-BPxZj_Qf.mjs} +1 -1
  104. package/system/dist/{retention-DRAqh5oQ.js → retention-DacNjIXz.js} +1 -1
  105. package/system/dist/{wal-maintenance-CH6boUNm.mjs → wal-maintenance-C4K7pX1x.mjs} +0 -0
  106. package/system/dist/{wal-maintenance-DOIYwfc8.js → wal-maintenance-Dguwwx4N.js} +0 -0
  107. package/system/package.json +5 -2
  108. package/system/dist/kernel/workspace-detect.d.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.729] - 2026-11-01
11
+
12
+ ### Changed
13
+
14
+ - config.yaml bootstrap.requiredAddons is ignored (with a warning); the first-boot addon set always comes from the server package
15
+ - 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.
16
+ - 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
17
+ - Generated capability routers include device-runs.
18
+
19
+ ## [1.2.728] - 2026-11-01
20
+
21
+ ### Changed
22
+
23
+ - The hub serves userManagement.getAdminBootstrapStatus (admin-only: is the first-boot admin password still in use)
24
+
10
25
  ## [1.2.727] - 2026-11-01
11
26
 
12
27
  ### 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: 194 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),