@camstack/system 1.2.107 → 1.2.108
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/builtins/device-manager/device-aggregation.d.ts +2 -2
- package/dist/builtins/device-manager/device-bindings-store.d.ts +12 -6
- package/dist/builtins/device-manager/device-manager.addon.d.ts +6 -0
- package/dist/builtins/device-manager/device-manager.addon.js +1177 -824
- package/dist/builtins/device-manager/device-manager.addon.mjs +1177 -824
- package/dist/builtins/device-manager/device-meta-actions.d.ts +4 -4
- package/dist/builtins/device-manager/device-meta-store.d.ts +18 -43
- package/dist/builtins/device-manager/device-meta-types.d.ts +19 -17
- package/dist/builtins/device-manager/device-row-store.d.ts +229 -0
- package/dist/builtins/sqlite-storage/retired-settings-keys.d.ts +99 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -176
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -175
- package/dist/retired-settings-keys-Bsjf7HQ-.mjs +278 -0
- package/dist/retired-settings-keys-pNmoHPTg.js +295 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ContributionShape, DriverConfigSchemaResult } from './device-meta-types.js';
|
|
1
|
+
import { AddonContext, CapabilityDefinition, DeviceBindingEntry, DeviceConfigSpec, DeviceSettingsContribution, ICapabilityRegistry, IDevice, InferProvider, StreamProfile, StreamProfilePatch, deviceManagerCapability } from '@camstack/types';
|
|
3
2
|
import { BindingsDeps, RemoteNativeCaps } from './device-bindings-store.js';
|
|
3
|
+
import { ContributionShape, DriverConfigSchemaResult } from './device-meta-types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Dependencies the aggregation + update routing functions consume. Assembled
|
|
6
6
|
* by the addon from its own state and passed in explicitly — no hidden `this`
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AddonContext, CapabilityDefinition, DeviceBindingEntry, ICapabilityRegistry } from '@camstack/types';
|
|
2
|
-
import {
|
|
2
|
+
import { DeviceBindingsStore } from './device-meta-types.js';
|
|
3
|
+
import { DeviceRow, DeviceRowStore } from './device-row-store.js';
|
|
3
4
|
/** Push-fed remote native-cap cache shape (numeric deviceId → capName → owner). */
|
|
4
5
|
export type RemoteNativeCaps = Map<number, Map<string, {
|
|
5
6
|
addonId: string;
|
|
@@ -14,6 +15,9 @@ export interface BindingsDeps {
|
|
|
14
15
|
readonly ctx: AddonContext;
|
|
15
16
|
readonly capabilityRegistry: ICapabilityRegistry | undefined;
|
|
16
17
|
readonly remoteNativeCaps: RemoteNativeCaps;
|
|
18
|
+
/** Row access for `device-manager:devices` — the device ledger the type and
|
|
19
|
+
* presence gates below consult. */
|
|
20
|
+
readonly rows: DeviceRowStore;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Wire the push-fed cross-process native-cap cache (`remoteNativeCaps`).
|
|
@@ -73,7 +77,7 @@ export declare function resolveRemoteNativeCapFromRegistry(deps: BindingsDeps, c
|
|
|
73
77
|
* Resolve the device's declared TYPE (`'camera'`, `'event-emitter'`, …), or
|
|
74
78
|
* `undefined` when it cannot be established.
|
|
75
79
|
*
|
|
76
|
-
* The PERSISTED
|
|
80
|
+
* The PERSISTED row is the authority: `ctx.kernel.deviceRegistry` is hub-only
|
|
77
81
|
* and has been observed empty in the very process that answers `getBindings`
|
|
78
82
|
* correctly (see the note on `getAllBindings`). The registry is consulted only
|
|
79
83
|
* as a secondary source, for a device constructed but not yet persisted.
|
|
@@ -81,7 +85,7 @@ export declare function resolveRemoteNativeCapFromRegistry(deps: BindingsDeps, c
|
|
|
81
85
|
* `undefined` is a first-class answer and callers must treat it as "no
|
|
82
86
|
* filtering" — an absent row must never be the reason a device loses bindings.
|
|
83
87
|
*/
|
|
84
|
-
export declare function resolveDeviceType(deps: BindingsDeps,
|
|
88
|
+
export declare function resolveDeviceType(deps: BindingsDeps, row: DeviceRow | null, deviceId: number): string | undefined;
|
|
85
89
|
/**
|
|
86
90
|
* Whether the device-manager's own stores still know a device id.
|
|
87
91
|
*
|
|
@@ -98,11 +102,13 @@ export type DevicePresence = 'present' | 'absent' | 'unknown';
|
|
|
98
102
|
* PERSISTED meta, which is the index `getBindings` already reads and is present
|
|
99
103
|
* wherever this provider runs.
|
|
100
104
|
*
|
|
101
|
-
* `'absent'` is only ever returned against a NON-EMPTY
|
|
105
|
+
* `'absent'` is only ever returned against a NON-EMPTY ledger. An empty one
|
|
102
106
|
* means device restore has not run, not that the fleet was deleted (D49) — the
|
|
103
|
-
* same reason `getAllBindings` warns instead of reporting zero devices.
|
|
107
|
+
* same reason `getAllBindings` warns instead of reporting zero devices. That is
|
|
108
|
+
* the only reason this is async: the `COUNT(*)` runs solely on the miss path,
|
|
109
|
+
* where the alternative is to call a device gone because the store is empty.
|
|
104
110
|
*/
|
|
105
|
-
export declare function resolveDevicePresence(deps: BindingsDeps,
|
|
111
|
+
export declare function resolveDevicePresence(deps: BindingsDeps, row: DeviceRow | null, deviceId: number): Promise<DevicePresence>;
|
|
106
112
|
/**
|
|
107
113
|
* Does a capability apply to a device of type `deviceType`?
|
|
108
114
|
*
|
|
@@ -77,6 +77,12 @@ export declare class DeviceManagerAddon extends BaseAddon {
|
|
|
77
77
|
private discoveryProviderLabel;
|
|
78
78
|
/** Provider ids that report `supportsDiscovery() === true` (probed in parallel). */
|
|
79
79
|
private listDiscoveryCapableProviderIds;
|
|
80
|
+
/**
|
|
81
|
+
* Row access for `device-manager:devices`. Built once in `onInitialize`
|
|
82
|
+
* (which is also where the collection is declared) — every consumer reaches
|
|
83
|
+
* it through {@link bindingsDeps} or the `ProviderContext`.
|
|
84
|
+
*/
|
|
85
|
+
private deviceRows;
|
|
80
86
|
/** Build the dependency context the extracted binding resolvers consume. */
|
|
81
87
|
private get bindingsDeps();
|
|
82
88
|
getBindings(input: {
|