@camstack/server 1.2.898 → 1.2.899

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 +6 -0
  2. package/dist/api/trpc/cap-router-runtime.js +1 -0
  3. package/dist/api/trpc/generated-cap-mounts.js +2 -1
  4. package/dist/api/trpc/generated-cap-routers.js +1894 -1870
  5. package/dist/core/addon/hub-addon-api.js +1 -0
  6. package/dist/core/moleculer/moleculer.service.js +1 -0
  7. package/package.json +8 -14
  8. package/system/dist/addon-runner.js +111 -8
  9. package/system/dist/addon-runner.mjs +111 -8
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  11. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  13. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  14. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  15. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  16. package/system/dist/builtins/autotrack/index.js +1 -1
  17. package/system/dist/builtins/autotrack/index.mjs +1 -1
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  19. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  20. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  21. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  22. package/system/dist/builtins/camera-grid/index.js +1 -1
  23. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  24. package/system/dist/builtins/composer/composer.addon.js +4 -4
  25. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  26. package/system/dist/builtins/console-logging/index.js +1 -1
  27. package/system/dist/builtins/console-logging/index.mjs +1 -1
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  29. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  30. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  31. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  32. package/system/dist/builtins/device-manager/command-holds.d.ts +2 -0
  33. package/system/dist/builtins/device-manager/device-manager.addon.d.ts +1 -0
  34. package/system/dist/builtins/device-manager/device-manager.addon.js +706 -24
  35. package/system/dist/builtins/device-manager/device-manager.addon.mjs +694 -25
  36. package/system/dist/builtins/device-manager/device-state-mirror.d.ts +7 -0
  37. package/system/dist/builtins/device-manager/state-refresh-scheduler.d.ts +92 -0
  38. package/system/dist/builtins/device-manager/state-refresh-wiring.d.ts +23 -0
  39. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  40. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  41. package/system/dist/builtins/keychain/index.js +4 -4
  42. package/system/dist/builtins/keychain/index.mjs +4 -4
  43. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  44. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  45. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  46. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  47. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  48. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  49. package/system/dist/builtins/loki-logging/index.js +1 -1
  50. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  51. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  52. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  53. package/system/dist/builtins/platform-probe/index.js +1 -1
  54. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  55. package/system/dist/builtins/record-entries/index.js +1 -1
  56. package/system/dist/builtins/record-entries/index.mjs +1 -1
  57. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  58. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  59. package/system/dist/builtins/snapshot/index.js +1 -1
  60. package/system/dist/builtins/snapshot/index.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  64. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  65. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  66. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  67. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  68. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  69. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  70. package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
  71. package/system/dist/builtins/winston-logging/index.js +1 -1
  72. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  73. package/system/dist/{capture-engine-DBQDaDxJ.mjs → capture-engine-BcD6iCZM.mjs} +1 -1
  74. package/system/dist/{capture-engine-BWS0KTbm.js → capture-engine-LHKTf-nM.js} +1 -1
  75. package/system/dist/{composition-sources-CGUWmf-T.mjs → composition-sources-C3ARJk2g.mjs} +1 -1
  76. package/system/dist/{composition-sources-CDOW1dnY.js → composition-sources-DNUDbuXy.js} +1 -1
  77. package/system/dist/{constants-BwrRoq-j.js → constants-dL8fl9aI.js} +1 -1
  78. package/system/dist/{constants-BmrLkwZs.mjs → constants-er38mZOb.mjs} +1 -1
  79. package/system/dist/{device-ca-BGgZXEto.mjs → device-ca-Ccz5olgH.mjs} +1 -1
  80. package/system/dist/{device-ca-DiuwWyZY.js → device-ca-KWa6uJRU.js} +1 -1
  81. package/system/dist/{dist-D7t8wLTF.mjs → dist-DBanWvHF.mjs} +147 -2
  82. package/system/dist/{dist-CCd8IeIU.js → dist-DEAjZE_-.js} +164 -1
  83. package/system/dist/file-host-worker.js +1 -1
  84. package/system/dist/file-host-worker.mjs +1 -1
  85. package/system/dist/{hub-identity-BohJeqdO.mjs → hub-identity-CVv79TVO.mjs} +1 -1
  86. package/system/dist/{hub-identity-G_ZdyPpc.js → hub-identity-Dy8ZSUuq.js} +1 -1
  87. package/system/dist/{hub-mdns-ciao-CKD4EgkG.js → hub-mdns-ciao-C_XjO7YI.js} +2 -2
  88. package/system/dist/{hub-mdns-ciao-D5RxSMrH.mjs → hub-mdns-ciao-DtmIyWDL.mjs} +2 -2
  89. package/system/dist/index.js +59 -12
  90. package/system/dist/index.mjs +55 -14
  91. package/system/dist/kernel/cap-router-builder.d.ts +7 -0
  92. package/system/dist/kernel/command-follow-up.d.ts +33 -0
  93. package/system/dist/kernel/command-observation.d.ts +3 -0
  94. package/system/dist/kernel/index.d.ts +3 -0
  95. package/system/dist/kernel/moleculer/child-cap-descriptors.d.ts +3 -1
  96. package/system/dist/kernel/moleculer/device-cap-proxy.d.ts +2 -1
  97. package/system/dist/kernel/state-refresh-policies.d.ts +53 -0
  98. package/system/dist/kernel/transport/child-cap-protocol.d.ts +6 -1
  99. package/system/dist/kernel/transport/local-child-registry.d.ts +14 -0
  100. package/system/dist/{legacy-integration-rows-door-Rm9JmIsl.mjs → legacy-integration-rows-door-BL8T4lya.mjs} +1 -1
  101. package/system/dist/{legacy-integration-rows-door-BgCl68ek.js → legacy-integration-rows-door-DPInWtE6.js} +1 -1
  102. package/system/dist/{rename-composition-block-2Z2ED7Og.js → rename-composition-block-BxzETYOf.js} +1 -1
  103. package/system/dist/{rename-composition-block-DNO3mNEO.mjs → rename-composition-block-Dgo-9-Ts.mjs} +1 -1
  104. package/system/dist/{restore-archive-2L5TymvF.mjs → restore-archive-BUtuNTe1.mjs} +82 -82
  105. package/system/dist/{restore-archive-CZkQO8t3.js → restore-archive-Zvx9sHZP.js} +1 -1
  106. package/system/dist/{wal-maintenance-YjDJ73Qd.js → wal-maintenance-DS2IKwtK.js} +0 -0
  107. package/system/dist/{wal-maintenance-BMYe_n18.mjs → wal-maintenance-cASt_sYy.mjs} +0 -0
  108. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.899] - 2026-11-18
11
+
12
+ ### Changed
13
+
14
+ - Device commands wait for the hub's state re-read before they answer, so the state shown after a command is the device's real one (D1062).
15
+
10
16
  ## [1.2.898] - 2026-11-18
11
17
 
12
18
  ### Changed
@@ -565,6 +565,7 @@ function createCapRouterServices(deps) {
565
565
  // Device commands served by the hub mount (D1022): the principal is read
566
566
  // from the request context; the hub mirror's correlator listens here.
567
567
  commandObserver: (obs) => (0, system_1.getCommandObserverRegistry)().observe(obs),
568
+ commandFollowUp: (target, outcome) => (0, system_1.getCommandFollowUpRegistry)().run(target, outcome),
568
569
  };
569
570
  }
570
571
  /**
@@ -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: 210 Skipped (legacy): 3
5
+ // Mounted: 211 Skipped (legacy): 3
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.LEGACY_SHAPE_SKIP = void 0;
8
8
  exports.mountAllCaps = mountAllCaps;
@@ -276,6 +276,7 @@ function mountAllCaps(services) {
276
276
  }, remoteCapProxy),
277
277
  deviceRuns: (0, generated_cap_routers_js_1.createCapRouter_deviceRuns)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-runs'), remoteCapProxy),
278
278
  deviceState: (0, generated_cap_routers_js_1.createCapRouter_deviceState)((_ctx) => reg?.getSingleton('device-state') ?? null, remoteCapProxy),
279
+ deviceStateRefresh: (0, generated_cap_routers_js_1.createCapRouter_deviceStateRefresh)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-state-refresh'), remoteCapProxy),
279
280
  deviceStatus: (0, generated_cap_routers_js_1.createCapRouter_deviceStatus)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-status'), remoteCapProxy),
280
281
  deviceTransitions: (0, generated_cap_routers_js_1.createCapRouter_deviceTransitions)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'device-transitions'), remoteCapProxy),
281
282
  dishwasher: (0, generated_cap_routers_js_1.createCapRouter_dishwasher)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'dishwasher'), remoteCapProxy),