@camstack/system 1.2.313 → 1.2.315

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 (111) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/autotrack/index.js +1 -1
  10. package/dist/builtins/autotrack/index.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/camera-grid/index.js +1 -1
  14. package/dist/builtins/camera-grid/index.mjs +1 -1
  15. package/dist/builtins/composer/claim-gate.d.ts +32 -0
  16. package/dist/builtins/composer/composed-device-set.d.ts +38 -0
  17. package/dist/builtins/composer/composed-device.d.ts +4 -3
  18. package/dist/builtins/composer/composer-grafts.d.ts +54 -0
  19. package/dist/builtins/composer/composer-plan.d.ts +96 -0
  20. package/dist/builtins/composer/composer-verdict.d.ts +19 -0
  21. package/dist/builtins/composer/composer.addon.js +2717 -477
  22. package/dist/builtins/composer/composer.addon.mjs +2722 -482
  23. package/dist/builtins/composer/composer.d.ts +71 -52
  24. package/dist/builtins/composer/composition-runtime.d.ts +93 -9
  25. package/dist/builtins/composer/confirmed-seed.d.ts +32 -0
  26. package/dist/builtins/composer/existing-target.d.ts +96 -0
  27. package/dist/builtins/composer/field-record.d.ts +50 -0
  28. package/dist/builtins/composer/graft-host.d.ts +47 -0
  29. package/dist/builtins/composer/held-claims.d.ts +12 -0
  30. package/dist/builtins/composer/owned-fields-target.d.ts +55 -0
  31. package/dist/builtins/composer/slice-assembler.d.ts +10 -0
  32. package/dist/builtins/composer/source-readings.d.ts +122 -0
  33. package/dist/builtins/composer/source-tracker.d.ts +35 -42
  34. package/dist/builtins/console-logging/index.js +1 -1
  35. package/dist/builtins/console-logging/index.mjs +1 -1
  36. package/dist/builtins/core-blocks/composition-api.d.ts +7 -4
  37. package/dist/builtins/core-blocks/composition-peers.d.ts +9 -0
  38. package/dist/builtins/core-blocks/composition-sources.d.ts +16 -3
  39. package/dist/builtins/core-blocks/core-block-store.d.ts +8 -1
  40. package/dist/builtins/core-blocks/core-blocks.addon.d.ts +4 -3
  41. package/dist/builtins/core-blocks/core-blocks.addon.js +255 -79
  42. package/dist/builtins/core-blocks/core-blocks.addon.mjs +255 -79
  43. package/dist/builtins/device-manager/claimed-status-overlay.d.ts +12 -0
  44. package/dist/builtins/device-manager/device-manager.addon.d.ts +16 -0
  45. package/dist/builtins/device-manager/device-manager.addon.js +1825 -317
  46. package/dist/builtins/device-manager/device-manager.addon.mjs +1825 -317
  47. package/dist/builtins/device-manager/device-provider-context.d.ts +24 -2
  48. package/dist/builtins/device-manager/device-row-store.d.ts +2 -0
  49. package/dist/builtins/device-manager/device-state-claim-views.d.ts +77 -0
  50. package/dist/builtins/device-manager/device-state-claims.d.ts +43 -0
  51. package/dist/builtins/device-manager/device-state-mirror.d.ts +145 -61
  52. package/dist/builtins/device-manager/field-claims-index.d.ts +69 -0
  53. package/dist/builtins/device-manager/field-ownership.d.ts +53 -0
  54. package/dist/builtins/device-manager/migrate-device.d.ts +27 -0
  55. package/dist/builtins/device-manager/migrate-guard.d.ts +7 -0
  56. package/dist/builtins/device-manager/migrate-hardware-state.d.ts +55 -0
  57. package/dist/builtins/device-manager/migration-refused.d.ts +23 -0
  58. package/dist/builtins/device-manager/mirror-row-writer.d.ts +138 -0
  59. package/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +4 -0
  60. package/dist/builtins/doorbell/binding-mirror.d.ts +1 -0
  61. package/dist/builtins/doorbell/doorbell-composition-migration.d.ts +59 -0
  62. package/dist/builtins/doorbell/virtual-doorbell.addon.d.ts +3 -0
  63. package/dist/builtins/doorbell/virtual-doorbell.addon.js +315 -10
  64. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +315 -10
  65. package/dist/builtins/hub-forwarder/index.js +1 -1
  66. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  67. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  68. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  69. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  70. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  71. package/dist/builtins/local-network/local-network.addon.js +1 -1
  72. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  73. package/dist/builtins/loki-logging/index.js +1 -1
  74. package/dist/builtins/loki-logging/index.mjs +1 -1
  75. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  76. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  77. package/dist/builtins/platform-probe/index.js +1 -1
  78. package/dist/builtins/platform-probe/index.mjs +1 -1
  79. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  80. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  81. package/dist/builtins/snapshot/index.js +1 -1
  82. package/dist/builtins/snapshot/index.mjs +1 -1
  83. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  84. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  85. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  86. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  87. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  88. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  89. package/dist/builtins/system-config/system-config.addon.js +1 -1
  90. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  91. package/dist/builtins/winston-logging/index.js +1 -1
  92. package/dist/builtins/winston-logging/index.mjs +1 -1
  93. package/dist/{child-cap-dispatch-CHTiHbsv.mjs → child-cap-dispatch-AAltfBUH.mjs} +1484 -1417
  94. package/dist/{child-cap-dispatch-Dyn_7ezH.js → child-cap-dispatch-DzcUd_ct.js} +1503 -1424
  95. package/dist/composition-sources-DYqQLRzF.js +122 -0
  96. package/dist/composition-sources-yonsRneP.mjs +111 -0
  97. package/dist/{dist-CkRwnhbo.js → dist-DVKv5i-e.js} +5396 -4331
  98. package/dist/{dist-Cj7pJmXq.mjs → dist-MzYJVCLE.mjs} +5330 -4331
  99. package/dist/index.js +137 -8
  100. package/dist/index.mjs +133 -8
  101. package/dist/kernel/capability-registry.d.ts +43 -1
  102. package/dist/kernel/index.d.ts +3 -1
  103. package/dist/kernel/moleculer/device-cap-proxy.d.ts +0 -10
  104. package/dist/kernel/status-overlay.d.ts +18 -0
  105. package/dist/kernel/transport/claimed-get-status.d.ts +15 -0
  106. package/dist/kernel/transport/index.d.ts +2 -0
  107. package/dist/kernel/transport/local-child-registry.d.ts +23 -0
  108. package/dist/kernel/transport/parent-unowned-call.d.ts +25 -0
  109. package/dist/{retired-settings-keys-C1duPikd.mjs → retired-settings-keys-8yY2sTc-.mjs} +1 -1
  110. package/dist/{retired-settings-keys-CGSuXhP8.js → retired-settings-keys-iY5I0nKM.js} +1 -1
  111. package/package.json +1 -1
@@ -2,6 +2,7 @@ import { IReadinessRegistryRecord, SystemEvent } from '@camstack/types';
2
2
  import { CapUsageCallRecord } from '../moleculer/cap-usage-registry.js';
3
3
  import { CapActionReading } from './cap-action-census.js';
4
4
  import { CapRoutingHints } from './cap-routing-hints.js';
5
+ import { ClaimedStatusResolver } from '../status-overlay.js';
5
6
  import { AddonCallInput, CapCallInput, ChildLogMessage, RegisteredChild } from './child-cap-protocol.js';
6
7
  import { LocalTransportServer } from './local-transport.js';
7
8
  import { SocketTrafficSample } from './socket-traffic.js';
@@ -180,6 +181,26 @@ export interface LocalChildRegistryOptions {
180
181
  * performs the routing — a rule implemented twice is a rule that drifts.
181
182
  */
182
183
  readonly isAddonPinnedCall?: (capName: string, method: string, hints: CapRoutingHints) => boolean;
184
+ /**
185
+ * The hub's claim authority for a device-scoped `getStatus` (D663, ruling
186
+ * S3) — fifth member of the "an explicit intent must win over a co-located
187
+ * provider" family. A `getStatus` about a device whose cap is CLAIMED is
188
+ * answered HERE, from the hub mirror's merged slice, before `resolveChildId`
189
+ * is consulted: the sibling short-circuit would dispatch it straight to the
190
+ * owning child, whose `getStatus` is the NATIVE slice — an HA-MQTT / HomeKit
191
+ * exporter or the notification center (hub-local forked children) asking
192
+ * `battery.getStatus({ deviceId })` of a device owned by the hub-local
193
+ * `provider-homeassistant` child read the native value while the UI showed
194
+ * the merged one. The parent's `onUnownedCall` had the same answer, on a path
195
+ * this call never took. Same shared function (`answerClaimedGetStatus`) as
196
+ * that handler and the hub's `callCapabilityOnNode`, so the three entries
197
+ * cannot drift; a device whose claims are not yet known has them resolved
198
+ * first and is never answered native.
199
+ *
200
+ * Omitted (the agent has no claim authority) ⇒ prior behaviour exactly. The
201
+ * kernel has no cap registry, so the wiring side injects it.
202
+ */
203
+ readonly claimedStatus?: ClaimedStatusResolver;
183
204
  /**
184
205
  * Per-cap-method bound for UDS cap calls, in ms — read from the cap
185
206
  * definition's declared `timeoutMs`. The SAME resolver the remote plane uses
@@ -274,6 +295,8 @@ export declare class LocalChildRegistry {
274
295
  private readonly actionCensus;
275
296
  /** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
276
297
  private readonly capTimeoutMs?;
298
+ /** See {@link LocalChildRegistryOptions.claimedStatus}. */
299
+ private readonly claimedStatus?;
277
300
  /** See {@link LocalChildRegistryOptions.capUsageObserver}. */
278
301
  private readonly capUsageObserver?;
279
302
  /** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
@@ -1,6 +1,7 @@
1
1
  import { CapCallInput } from './child-cap-protocol.js';
2
2
  import { CapRouteResolver, HubLocalChildDispatcher } from './cap-route-resolver.js';
3
3
  import { HubNodeRegistry } from '../moleculer/node-registry.js';
4
+ import { ClaimedStatusResolver } from '../status-overlay.js';
4
5
  import { ServiceBroker } from 'moleculer';
5
6
  /**
6
7
  * Minimal logger surface accepted by the unowned-call handler. Matches the
@@ -202,6 +203,30 @@ export interface ParentUnownedCallDeps {
202
203
  * rejected (no forwarder) — never silently downgraded to wrapper routing.
203
204
  */
204
205
  readonly resolveNative?: (capName: string, deviceId: number) => Record<string, (input: unknown) => Promise<unknown>> | null;
206
+ /**
207
+ * The hub's claim authority for a device-scoped `getStatus` (D663, ruling
208
+ * S3). Wired to `CapabilityRegistry.resolveClaimedStatus` — the SAME question
209
+ * the registry's own wrappers and the other two transport entries ask, through
210
+ * the one shared `answerClaimedGetStatus` (`claimed-get-status.ts`).
211
+ *
212
+ * Why here: every capName-based route below dispatches STRAIGHT to the owning
213
+ * runner (`hub-local-uds`, `remote-moleculer`), whose `getStatus` answers the
214
+ * NATIVE slice. This handler is the entry for a call no co-resident sibling
215
+ * owns (a remote agent's device, a hub-in-process cap, the agent's forward);
216
+ * the sibling short-circuit in `LocalChildRegistry` and the hub's
217
+ * `callCapabilityOnNode` are the other two, and each asks first. When the
218
+ * answer is `claimed` the merged slice IS the answer (`null` for a held claim,
219
+ * and for a device whose claims cannot be known) and the resolver is never
220
+ * consulted; a node pin does not bypass it — the hub is the one claim
221
+ * authority wherever the device runs. `unclaimed` routes exactly as before.
222
+ *
223
+ * Omitted (the agent has no claim authority; its handler forwards to the hub
224
+ * for hub-hosted caps, which answer through THIS hook on the hub) ⇒ legacy
225
+ * routing exactly. Known gap: an agent-resident child calling `getStatus` of
226
+ * an agent-resident device is answered by the agent's local dispatcher with
227
+ * no hub round-trip, so a claim is not honoured there (D663 open item).
228
+ */
229
+ readonly claimedStatus?: ClaimedStatusResolver;
205
230
  /** Optional logger for the broker-fallback diagnostic line. */
206
231
  readonly logger?: ParentUnownedCallLogger;
207
232
  }
@@ -1,4 +1,4 @@
1
- import { Vn as asJsonObject } from "./dist-Cj7pJmXq.mjs";
1
+ import { Qn as asJsonObject } from "./dist-MzYJVCLE.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CkRwnhbo.js");
1
+ const require_dist = require("./dist-DVKv5i-e.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.313",
3
+ "version": "1.2.315",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",