@camstack/system 1.2.313 → 1.2.314
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.
- package/dist/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/claim-gate.d.ts +32 -0
- package/dist/builtins/composer/composed-device-set.d.ts +38 -0
- package/dist/builtins/composer/composed-device.d.ts +4 -3
- package/dist/builtins/composer/composer-grafts.d.ts +54 -0
- package/dist/builtins/composer/composer-plan.d.ts +89 -0
- package/dist/builtins/composer/composer-verdict.d.ts +19 -0
- package/dist/builtins/composer/composer.addon.js +2500 -422
- package/dist/builtins/composer/composer.addon.mjs +2493 -415
- package/dist/builtins/composer/composer.d.ts +66 -51
- package/dist/builtins/composer/composition-runtime.d.ts +84 -9
- package/dist/builtins/composer/confirmed-seed.d.ts +32 -0
- package/dist/builtins/composer/existing-target.d.ts +87 -0
- package/dist/builtins/composer/field-record.d.ts +41 -0
- package/dist/builtins/composer/graft-host.d.ts +47 -0
- package/dist/builtins/composer/held-claims.d.ts +12 -0
- package/dist/builtins/composer/owned-fields-target.d.ts +55 -0
- package/dist/builtins/composer/slice-assembler.d.ts +10 -0
- package/dist/builtins/composer/source-readings.d.ts +122 -0
- package/dist/builtins/composer/source-tracker.d.ts +35 -42
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/composition-api.d.ts +7 -4
- package/dist/builtins/core-blocks/composition-peers.d.ts +9 -0
- package/dist/builtins/core-blocks/composition-sources.d.ts +14 -3
- package/dist/builtins/core-blocks/core-block-store.d.ts +8 -1
- package/dist/builtins/core-blocks/core-blocks.addon.d.ts +4 -3
- package/dist/builtins/core-blocks/core-blocks.addon.js +326 -50
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +326 -50
- package/dist/builtins/device-manager/claimed-status-overlay.d.ts +12 -0
- package/dist/builtins/device-manager/device-manager.addon.d.ts +16 -0
- package/dist/builtins/device-manager/device-manager.addon.js +1825 -317
- package/dist/builtins/device-manager/device-manager.addon.mjs +1825 -317
- package/dist/builtins/device-manager/device-provider-context.d.ts +24 -2
- package/dist/builtins/device-manager/device-row-store.d.ts +2 -0
- package/dist/builtins/device-manager/device-state-claim-views.d.ts +77 -0
- package/dist/builtins/device-manager/device-state-claims.d.ts +43 -0
- package/dist/builtins/device-manager/device-state-mirror.d.ts +145 -61
- package/dist/builtins/device-manager/field-claims-index.d.ts +69 -0
- package/dist/builtins/device-manager/field-ownership.d.ts +53 -0
- package/dist/builtins/device-manager/migrate-device.d.ts +27 -0
- package/dist/builtins/device-manager/migrate-guard.d.ts +7 -0
- package/dist/builtins/device-manager/migrate-hardware-state.d.ts +55 -0
- package/dist/builtins/device-manager/migration-refused.d.ts +23 -0
- package/dist/builtins/device-manager/mirror-row-writer.d.ts +138 -0
- package/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +4 -0
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -3
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -3
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{child-cap-dispatch-CHTiHbsv.mjs → child-cap-dispatch-AAltfBUH.mjs} +1484 -1417
- package/dist/{child-cap-dispatch-Dyn_7ezH.js → child-cap-dispatch-DzcUd_ct.js} +1503 -1424
- package/dist/{dist-CkRwnhbo.js → dist-BtNkk3Qz.js} +4577 -3824
- package/dist/{dist-Cj7pJmXq.mjs → dist-cH4t1ZEm.mjs} +4541 -3824
- package/dist/index.js +137 -8
- package/dist/index.mjs +133 -8
- package/dist/kernel/capability-registry.d.ts +43 -1
- package/dist/kernel/index.d.ts +3 -1
- package/dist/kernel/moleculer/device-cap-proxy.d.ts +0 -10
- package/dist/kernel/status-overlay.d.ts +18 -0
- package/dist/kernel/transport/claimed-get-status.d.ts +15 -0
- package/dist/kernel/transport/index.d.ts +2 -0
- package/dist/kernel/transport/local-child-registry.d.ts +23 -0
- package/dist/kernel/transport/parent-unowned-call.d.ts +25 -0
- package/dist/{retired-settings-keys-CGSuXhP8.js → retired-settings-keys-B7imb-qH.js} +1 -1
- package/dist/{retired-settings-keys-C1duPikd.mjs → retired-settings-keys-DQYHfZ0S.mjs} +1 -1
- 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
|
}
|