@camstack/types 1.2.544 → 1.2.545

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.
@@ -173,7 +173,6 @@ export interface CapabilityProviderMap {
173
173
  'ptz-autotrack': InferProvider<typeof import('../capabilities/ptz-autotrack.cap.js').ptzAutotrackCapability>;
174
174
  consumables: InferProvider<typeof import('../capabilities/consumables.cap.js').consumablesCapability>;
175
175
  reboot: InferProvider<typeof import('../capabilities/reboot.cap.js').rebootCapability>;
176
- 'device-discovery': InferProvider<typeof import('../capabilities/device-discovery.cap.js').deviceDiscoveryCapability>;
177
176
  brightness: InferProvider<typeof import('../capabilities/brightness.cap.js').brightnessCapability>;
178
177
  'motion-trigger': InferProvider<typeof import('../capabilities/motion-trigger.cap.js').motionTriggerCapability>;
179
178
  recording: InferProvider<typeof import('../capabilities/recording.cap.js').recordingCapability>;
@@ -11113,10 +11113,6 @@ var CAMERA_CAP_VOCABULARY = {
11113
11113
  scope: "device",
11114
11114
  noun: t("Admin link", "Link di amministrazione")
11115
11115
  },
11116
- "device-discovery": {
11117
- scope: "device",
11118
- noun: t("Discovery", "Rilevamento dispositivi")
11119
- },
11120
11116
  "device-extension": {
11121
11117
  scope: "device",
11122
11118
  noun: t("Device extension", "Estensione del dispositivo")
@@ -13023,7 +13019,6 @@ var CAP_NAMES = Object.freeze([
13023
13019
  "device-admin-link",
13024
13020
  "device-adoption",
13025
13021
  "device-credentials",
13026
- "device-discovery",
13027
13022
  "device-export",
13028
13023
  "device-extension",
13029
13024
  "device-history",
@@ -13646,13 +13641,6 @@ var CAP_STATE_LEAVES = Object.freeze({
13646
13641
  "valueType": "string"
13647
13642
  }
13648
13643
  ],
13649
- "device-discovery": [{
13650
- "path": "lastDiscoveryAt",
13651
- "valueType": "number"
13652
- }, {
13653
- "path": "lastError",
13654
- "valueType": "string"
13655
- }],
13656
13644
  "device-export": [
13657
13645
  {
13658
13646
  "path": "linkState",
@@ -15662,13 +15650,6 @@ function createDeviceProxy(api, binding, opts) {
15662
15650
  applyDeviceSettingsPatch: (input) => dispatch("detection-pipeline", "detectionPipeline", "applyDeviceSettingsPatch", "mutation", input)
15663
15651
  };
15664
15652
  const deviceAdminLinkInterface = { getAdminLink: (input) => dispatch("device-admin-link", "deviceAdminLink", "getAdminLink", "query", input) };
15665
- const deviceDiscoveryInterface = {
15666
- listDiscovered: (input) => dispatch("device-discovery", "deviceDiscovery", "listDiscovered", "query", input),
15667
- refreshDiscovery: (input) => dispatch("device-discovery", "deviceDiscovery", "refreshDiscovery", "mutation", input),
15668
- adoptDevice: (input) => dispatch("device-discovery", "deviceDiscovery", "adoptDevice", "mutation", input),
15669
- releaseDevice: (input) => dispatch("device-discovery", "deviceDiscovery", "releaseDevice", "mutation", input),
15670
- getStatus: (input) => dispatch("device-discovery", "deviceDiscovery", "getStatus", "query", input)
15671
- };
15672
15653
  const deviceExtensionInterface = {
15673
15654
  listSources: (input) => dispatch("device-extension", "deviceExtension", "listSources", "query", input),
15674
15655
  listSlots: (input) => dispatch("device-extension", "deviceExtension", "listSlots", "query", input),
@@ -16339,7 +16320,6 @@ function createDeviceProxy(api, binding, opts) {
16339
16320
  control: createSliceHandle(stateSource, binding.deviceId, "control"),
16340
16321
  cover: createSliceHandle(stateSource, binding.deviceId, "cover"),
16341
16322
  dayNight: createSliceHandle(stateSource, binding.deviceId, "day-night"),
16342
- deviceDiscovery: createSliceHandle(stateSource, binding.deviceId, "device-discovery"),
16343
16323
  deviceStatus: createSliceHandle(stateSource, binding.deviceId, "device-status"),
16344
16324
  dishwasher: createSliceHandle(stateSource, binding.deviceId, "dishwasher"),
16345
16325
  doNotDisturb: createSliceHandle(stateSource, binding.deviceId, "do-not-disturb"),
@@ -16430,7 +16410,6 @@ function createDeviceProxy(api, binding, opts) {
16430
16410
  ...bound("day-night") ? { dayNight: dayNightInterface } : {},
16431
16411
  ...bound("detection-pipeline") ? { detectionPipeline: detectionPipelineInterface } : {},
16432
16412
  ...bound("device-admin-link") ? { deviceAdminLink: deviceAdminLinkInterface } : {},
16433
- ...bound("device-discovery") ? { deviceDiscovery: deviceDiscoveryInterface } : {},
16434
16413
  ...bound("device-extension") ? { deviceExtension: deviceExtensionInterface } : {},
16435
16414
  ...bound("device-ops") ? { deviceOps: deviceOpsInterface } : {},
16436
16415
  ...bound("device-runs") ? { deviceRuns: deviceRunsInterface } : {},
@@ -16540,7 +16519,7 @@ function createDeviceProxy(api, binding, opts) {
16540
16519
  * can answer "may a rule actuate this?" without importing the schema barrel
16541
16520
  * (~144MB RSS per runner, D28).
16542
16521
  *
16543
- * Coverage: 105 device-scoped capabilities.
16522
+ * Coverage: 104 device-scoped capabilities.
16544
16523
  */
16545
16524
  var DEVICE_SCOPED_CAPS = new Set([
16546
16525
  "accessories",
@@ -16569,7 +16548,6 @@ var DEVICE_SCOPED_CAPS = new Set([
16569
16548
  "day-night",
16570
16549
  "detection-pipeline",
16571
16550
  "device-admin-link",
16572
- "device-discovery",
16573
16551
  "device-extension",
16574
16552
  "device-ops",
16575
16553
  "device-runs",
@@ -11113,10 +11113,6 @@ var CAMERA_CAP_VOCABULARY = {
11113
11113
  scope: "device",
11114
11114
  noun: t("Admin link", "Link di amministrazione")
11115
11115
  },
11116
- "device-discovery": {
11117
- scope: "device",
11118
- noun: t("Discovery", "Rilevamento dispositivi")
11119
- },
11120
11116
  "device-extension": {
11121
11117
  scope: "device",
11122
11118
  noun: t("Device extension", "Estensione del dispositivo")
@@ -13023,7 +13019,6 @@ var CAP_NAMES = Object.freeze([
13023
13019
  "device-admin-link",
13024
13020
  "device-adoption",
13025
13021
  "device-credentials",
13026
- "device-discovery",
13027
13022
  "device-export",
13028
13023
  "device-extension",
13029
13024
  "device-history",
@@ -13646,13 +13641,6 @@ var CAP_STATE_LEAVES = Object.freeze({
13646
13641
  "valueType": "string"
13647
13642
  }
13648
13643
  ],
13649
- "device-discovery": [{
13650
- "path": "lastDiscoveryAt",
13651
- "valueType": "number"
13652
- }, {
13653
- "path": "lastError",
13654
- "valueType": "string"
13655
- }],
13656
13644
  "device-export": [
13657
13645
  {
13658
13646
  "path": "linkState",
@@ -15662,13 +15650,6 @@ function createDeviceProxy(api, binding, opts) {
15662
15650
  applyDeviceSettingsPatch: (input) => dispatch("detection-pipeline", "detectionPipeline", "applyDeviceSettingsPatch", "mutation", input)
15663
15651
  };
15664
15652
  const deviceAdminLinkInterface = { getAdminLink: (input) => dispatch("device-admin-link", "deviceAdminLink", "getAdminLink", "query", input) };
15665
- const deviceDiscoveryInterface = {
15666
- listDiscovered: (input) => dispatch("device-discovery", "deviceDiscovery", "listDiscovered", "query", input),
15667
- refreshDiscovery: (input) => dispatch("device-discovery", "deviceDiscovery", "refreshDiscovery", "mutation", input),
15668
- adoptDevice: (input) => dispatch("device-discovery", "deviceDiscovery", "adoptDevice", "mutation", input),
15669
- releaseDevice: (input) => dispatch("device-discovery", "deviceDiscovery", "releaseDevice", "mutation", input),
15670
- getStatus: (input) => dispatch("device-discovery", "deviceDiscovery", "getStatus", "query", input)
15671
- };
15672
15653
  const deviceExtensionInterface = {
15673
15654
  listSources: (input) => dispatch("device-extension", "deviceExtension", "listSources", "query", input),
15674
15655
  listSlots: (input) => dispatch("device-extension", "deviceExtension", "listSlots", "query", input),
@@ -16339,7 +16320,6 @@ function createDeviceProxy(api, binding, opts) {
16339
16320
  control: createSliceHandle(stateSource, binding.deviceId, "control"),
16340
16321
  cover: createSliceHandle(stateSource, binding.deviceId, "cover"),
16341
16322
  dayNight: createSliceHandle(stateSource, binding.deviceId, "day-night"),
16342
- deviceDiscovery: createSliceHandle(stateSource, binding.deviceId, "device-discovery"),
16343
16323
  deviceStatus: createSliceHandle(stateSource, binding.deviceId, "device-status"),
16344
16324
  dishwasher: createSliceHandle(stateSource, binding.deviceId, "dishwasher"),
16345
16325
  doNotDisturb: createSliceHandle(stateSource, binding.deviceId, "do-not-disturb"),
@@ -16430,7 +16410,6 @@ function createDeviceProxy(api, binding, opts) {
16430
16410
  ...bound("day-night") ? { dayNight: dayNightInterface } : {},
16431
16411
  ...bound("detection-pipeline") ? { detectionPipeline: detectionPipelineInterface } : {},
16432
16412
  ...bound("device-admin-link") ? { deviceAdminLink: deviceAdminLinkInterface } : {},
16433
- ...bound("device-discovery") ? { deviceDiscovery: deviceDiscoveryInterface } : {},
16434
16413
  ...bound("device-extension") ? { deviceExtension: deviceExtensionInterface } : {},
16435
16414
  ...bound("device-ops") ? { deviceOps: deviceOpsInterface } : {},
16436
16415
  ...bound("device-runs") ? { deviceRuns: deviceRunsInterface } : {},
@@ -16540,7 +16519,7 @@ function createDeviceProxy(api, binding, opts) {
16540
16519
  * can answer "may a rule actuate this?" without importing the schema barrel
16541
16520
  * (~144MB RSS per runner, D28).
16542
16521
  *
16543
- * Coverage: 105 device-scoped capabilities.
16522
+ * Coverage: 104 device-scoped capabilities.
16544
16523
  */
16545
16524
  var DEVICE_SCOPED_CAPS = new Set([
16546
16525
  "accessories",
@@ -16569,7 +16548,6 @@ var DEVICE_SCOPED_CAPS = new Set([
16569
16548
  "day-night",
16570
16549
  "detection-pipeline",
16571
16550
  "device-admin-link",
16572
- "device-discovery",
16573
16551
  "device-extension",
16574
16552
  "device-ops",
16575
16553
  "device-runs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.544",
3
+ "version": "1.2.545",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",
@@ -1,160 +0,0 @@
1
- import { z } from 'zod';
2
- import { type InferProvider, type InferNativeProvider } from './capability-definition.js';
3
- import { DeviceType } from '../device/device-type.js';
4
- import type { SourceInfo } from '../device/source-info.js';
5
- /**
6
- * device-discovery — device-scoped capability for parents that host /
7
- * enumerate child devices (Reolink Hub / NVR, ONVIF gateway, future
8
- * integrations). The parent advertises a list of discoverable children,
9
- * and the operator promotes a subset to real devices via `adoptDevice`.
10
- * Child lifecycle (kernel device create/remove, parent reference) is
11
- * owned by the framework so a single shared `<DiscoveryPanel />` can
12
- * drive any integration.
13
- *
14
- * Boundaries:
15
- * - The cap exposes ENUMERATION + ADOPT/RELEASE only. The protocol
16
- * used to discover children (CGI poll, mDNS, push from hub, ...)
17
- * is the integration's business; results land in `runtimeState`
18
- * so the panel can render without a fresh round-trip.
19
- * - `childNativeId` is integration-defined and must be stable across
20
- * reboots so re-discovery doesn't duplicate adopted children.
21
- * - `adoptDevice` returns the new `deviceId` so the UI can navigate
22
- * directly to the freshly-created child's settings page.
23
- */
24
- /**
25
- * Status enum for a discovered device. Mirrors the Reolink simpleEvent
26
- * lifecycle (`online` / `sleeping` / `offline`) — generic enough for
27
- * battery cams, awake cams, and unreachable cams alike.
28
- */
29
- export declare const DiscoveredChildStatusSchema: z.ZodEnum<{
30
- offline: "offline";
31
- online: "online";
32
- sleeping: "sleeping";
33
- unknown: "unknown";
34
- }>;
35
- export type DiscoveredChildStatus = z.infer<typeof DiscoveredChildStatusSchema>;
36
- /**
37
- * Explicit type for the (now self-referential) discovered-child entry.
38
- * A `z.lazy` schema cannot cleanly self-infer, so the shape is declared
39
- * here and the schema below is annotated with it. The `children` /
40
- * `sourceInfo` / `capabilities` / `features` fields are optional: Hubs
41
- * (Reolink NVR enumerating flat camera channels) omit them entirely;
42
- * integrations (Home Assistant previewing a device with entity-children)
43
- * populate them so a shared adoption panel can render an accordion.
44
- */
45
- export type DiscoveredChildDevice = {
46
- childNativeId: string;
47
- name: string;
48
- type: DeviceType;
49
- status: DiscoveredChildStatus;
50
- metadata: {
51
- model?: string;
52
- serialNumber?: string;
53
- uid?: string;
54
- rtspChannel?: number;
55
- isBattery?: boolean;
56
- isDoorbell?: boolean;
57
- isMultifocal?: boolean;
58
- externalLocation?: string;
59
- manufacturer?: string;
60
- integration?: string;
61
- };
62
- alreadyAdopted: boolean;
63
- adoptedDeviceId: number | null;
64
- capabilities?: readonly string[];
65
- features?: readonly string[];
66
- sourceInfo?: SourceInfo;
67
- children?: readonly DiscoveredChildDevice[];
68
- /** `childNativeId` of the gateway candidate (in the same list) this device sits behind. */
69
- parentStableId?: string;
70
- };
71
- export declare const DiscoveredChildDeviceSchema: z.ZodType<DiscoveredChildDevice>;
72
- /**
73
- * Status block — populated by the integration after each
74
- * `refreshDiscovery` (or push-driven update). The runtime-state slice
75
- * is what the panel reads via the per-device proxy; `getStatus`
76
- * returns the same payload via the codegen'd auto-injection.
77
- */
78
- export declare const DeviceDiscoveryStatusSchema: z.ZodObject<{
79
- discovered: z.ZodArray<z.ZodType<DiscoveredChildDevice, unknown, z.core.$ZodTypeInternals<DiscoveredChildDevice, unknown>>>;
80
- lastDiscoveryAt: z.ZodNullable<z.ZodNumber>;
81
- lastError: z.ZodNullable<z.ZodString>;
82
- }, z.core.$strip>;
83
- export type DeviceDiscoveryStatus = z.infer<typeof DeviceDiscoveryStatusSchema>;
84
- export declare const deviceDiscoveryCapability: {
85
- readonly name: 'device-discovery';
86
- readonly scope: 'device';
87
- readonly deviceNative: true;
88
- readonly mode: 'singleton';
89
- readonly deviceTypes: readonly [DeviceType.Hub];
90
- readonly status: {
91
- readonly schema: z.ZodObject<{
92
- discovered: z.ZodArray<z.ZodType<DiscoveredChildDevice, unknown, z.core.$ZodTypeInternals<DiscoveredChildDevice, unknown>>>;
93
- lastDiscoveryAt: z.ZodNullable<z.ZodNumber>;
94
- lastError: z.ZodNullable<z.ZodString>;
95
- }, z.core.$strip>;
96
- readonly kind: 'poll';
97
- };
98
- readonly runtimeState: z.ZodObject<{
99
- discovered: z.ZodArray<z.ZodType<DiscoveredChildDevice, unknown, z.core.$ZodTypeInternals<DiscoveredChildDevice, unknown>>>;
100
- lastDiscoveryAt: z.ZodNullable<z.ZodNumber>;
101
- lastError: z.ZodNullable<z.ZodString>;
102
- lastFetchedAt: z.ZodNumber;
103
- }, z.core.$strip>;
104
- /**
105
- * Runtime-state durability: **session** — 5.7 KB of scan output on the largest device, fully re-derivable by re-scanning.
106
- *
107
- * See `RuntimeStateDurability`. Enforced by
108
- * `scripts/check-runtime-state-durability.ts`.
109
- */
110
- readonly durability: 'session';
111
- /**
112
- * History (D850): none — inventory.
113
- */
114
- readonly history: 'none';
115
- readonly methods: {
116
- /**
117
- * Snapshot of the current `discovered` list. Returns the
118
- * runtime-state cache — call `refreshDiscovery` first if a
119
- * fresh round-trip to the source is required.
120
- */
121
- readonly listDiscovered: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
122
- deviceId: z.ZodNumber;
123
- }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodType<DiscoveredChildDevice, unknown, z.core.$ZodTypeInternals<DiscoveredChildDevice, unknown>>>>, import("./capability-definition.js").CapabilityMethodKind>;
124
- /**
125
- * Force the integration to re-enumerate and update the
126
- * runtime-state slice. Returns the freshly-enumerated list (also
127
- * available via `listDiscovered` post-call).
128
- */
129
- readonly refreshDiscovery: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
130
- deviceId: z.ZodNumber;
131
- }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodType<DiscoveredChildDevice, unknown, z.core.$ZodTypeInternals<DiscoveredChildDevice, unknown>>>>, "mutation">;
132
- /**
133
- * Promote a discovered entry to a real child device. The framework
134
- * creates the child via `kernel.devices.create()` with
135
- * `parentDeviceId = parent.id` and seeds the child's config from
136
- * `childInitialConfig` (driver-defined; usually carries channel +
137
- * uid + parent reference). Returns the kernel-assigned numeric id.
138
- */
139
- readonly adoptDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
140
- deviceId: z.ZodNumber;
141
- childNativeId: z.ZodString;
142
- name: z.ZodOptional<z.ZodString>;
143
- }, z.core.$strip>, z.ZodObject<{
144
- deviceId: z.ZodNumber;
145
- stableId: z.ZodString;
146
- }, z.core.$strip>, "mutation">;
147
- /**
148
- * Inverse of `adoptDevice`: removes the child device from the
149
- * kernel registry. The discovered entry remains in the
150
- * enumeration (status updates resume) so the operator can re-adopt
151
- * it later without a fresh refresh.
152
- */
153
- readonly releaseDevice: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
154
- deviceId: z.ZodNumber;
155
- childDeviceId: z.ZodNumber;
156
- }, z.core.$strip>, z.ZodVoid, "mutation">;
157
- };
158
- };
159
- export type IDeviceDiscoveryProvider = InferProvider<typeof deviceDiscoveryCapability>;
160
- export type IDeviceDiscoveryNativeProvider = InferNativeProvider<typeof deviceDiscoveryCapability>;