@camstack/types 1.1.52 → 1.1.54
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/capabilities/climate-control.cap.d.ts +8 -8
- package/dist/capabilities/custom-model-registry.cap.d.ts +2 -0
- package/dist/capabilities/day-night.cap.d.ts +8 -8
- package/dist/capabilities/device-manager.cap.d.ts +2 -2
- package/dist/capabilities/face-gallery.cap.d.ts +1 -1
- package/dist/capabilities/image-settings.cap.d.ts +16 -16
- package/dist/capabilities/media-player.cap.d.ts +5 -5
- package/dist/capabilities/model-convert.cap.d.ts +1 -0
- package/dist/capabilities/model-distributor.cap.d.ts +2 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +3 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
- package/dist/capabilities/platform-probe.cap.d.ts +19 -1
- package/dist/device/device-control-resolution.d.ts +118 -0
- package/dist/generated/addon-api.d.ts +36 -10
- package/dist/index.d.ts +4 -2
- package/dist/index.js +276 -5
- package/dist/index.mjs +267 -6
- package/dist/inference/runtime-capabilities.d.ts +17 -0
- package/dist/inference/runtime-capabilities.test.d.ts +1 -0
- package/dist/interfaces/platform.d.ts +4 -1
- package/dist/types/models.d.ts +2 -0
- package/dist/types/pipeline-step.d.ts +27 -0
- package/dist/types/tracked.d.ts +13 -0
- package/package.json +1 -1
|
@@ -33,8 +33,8 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
33
33
|
* — any climate device (not just Gree) can advertise either / both axes.
|
|
34
34
|
*/
|
|
35
35
|
export declare const HvacModeSchema: z.ZodEnum<{
|
|
36
|
-
off: "off";
|
|
37
36
|
auto: "auto";
|
|
37
|
+
off: "off";
|
|
38
38
|
heat: "heat";
|
|
39
39
|
cool: "cool";
|
|
40
40
|
heat_cool: "heat_cool";
|
|
@@ -44,8 +44,8 @@ export declare const HvacModeSchema: z.ZodEnum<{
|
|
|
44
44
|
export type HvacMode = z.infer<typeof HvacModeSchema>;
|
|
45
45
|
export declare const ClimateControlStatusSchema: z.ZodObject<{
|
|
46
46
|
mode: z.ZodEnum<{
|
|
47
|
-
off: "off";
|
|
48
47
|
auto: "auto";
|
|
48
|
+
off: "off";
|
|
49
49
|
heat: "heat";
|
|
50
50
|
cool: "cool";
|
|
51
51
|
heat_cool: "heat_cool";
|
|
@@ -53,8 +53,8 @@ export declare const ClimateControlStatusSchema: z.ZodObject<{
|
|
|
53
53
|
dry: "dry";
|
|
54
54
|
}>;
|
|
55
55
|
availableModes: z.ZodArray<z.ZodEnum<{
|
|
56
|
-
off: "off";
|
|
57
56
|
auto: "auto";
|
|
57
|
+
off: "off";
|
|
58
58
|
heat: "heat";
|
|
59
59
|
cool: "cool";
|
|
60
60
|
heat_cool: "heat_cool";
|
|
@@ -86,8 +86,8 @@ export declare const climateControlCapability: {
|
|
|
86
86
|
readonly setMode: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
87
87
|
deviceId: z.ZodNumber;
|
|
88
88
|
mode: z.ZodEnum<{
|
|
89
|
-
off: "off";
|
|
90
89
|
auto: "auto";
|
|
90
|
+
off: "off";
|
|
91
91
|
heat: "heat";
|
|
92
92
|
cool: "cool";
|
|
93
93
|
heat_cool: "heat_cool";
|
|
@@ -128,8 +128,8 @@ export declare const climateControlCapability: {
|
|
|
128
128
|
readonly status: {
|
|
129
129
|
readonly schema: z.ZodObject<{
|
|
130
130
|
mode: z.ZodEnum<{
|
|
131
|
-
off: "off";
|
|
132
131
|
auto: "auto";
|
|
132
|
+
off: "off";
|
|
133
133
|
heat: "heat";
|
|
134
134
|
cool: "cool";
|
|
135
135
|
heat_cool: "heat_cool";
|
|
@@ -137,8 +137,8 @@ export declare const climateControlCapability: {
|
|
|
137
137
|
dry: "dry";
|
|
138
138
|
}>;
|
|
139
139
|
availableModes: z.ZodArray<z.ZodEnum<{
|
|
140
|
-
off: "off";
|
|
141
140
|
auto: "auto";
|
|
141
|
+
off: "off";
|
|
142
142
|
heat: "heat";
|
|
143
143
|
cool: "cool";
|
|
144
144
|
heat_cool: "heat_cool";
|
|
@@ -168,8 +168,8 @@ export declare const climateControlCapability: {
|
|
|
168
168
|
*/
|
|
169
169
|
readonly runtimeState: z.ZodObject<{
|
|
170
170
|
mode: z.ZodEnum<{
|
|
171
|
-
off: "off";
|
|
172
171
|
auto: "auto";
|
|
172
|
+
off: "off";
|
|
173
173
|
heat: "heat";
|
|
174
174
|
cool: "cool";
|
|
175
175
|
heat_cool: "heat_cool";
|
|
@@ -177,8 +177,8 @@ export declare const climateControlCapability: {
|
|
|
177
177
|
dry: "dry";
|
|
178
178
|
}>;
|
|
179
179
|
availableModes: z.ZodArray<z.ZodEnum<{
|
|
180
|
-
off: "off";
|
|
181
180
|
auto: "auto";
|
|
181
|
+
off: "off";
|
|
182
182
|
heat: "heat";
|
|
183
183
|
cool: "cool";
|
|
184
184
|
heat_cool: "heat_cool";
|
|
@@ -106,6 +106,7 @@ export declare const CustomModelDescriptorSchema: z.ZodObject<{
|
|
|
106
106
|
imagenet: "imagenet";
|
|
107
107
|
none: "none";
|
|
108
108
|
}>>;
|
|
109
|
+
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
109
110
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
110
111
|
letterbox: "letterbox";
|
|
111
112
|
resize: "resize";
|
|
@@ -234,6 +235,7 @@ export declare const customModelRegistryCapability: {
|
|
|
234
235
|
imagenet: "imagenet";
|
|
235
236
|
none: "none";
|
|
236
237
|
}>>;
|
|
238
|
+
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
237
239
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
238
240
|
letterbox: "letterbox";
|
|
239
241
|
resize: "resize";
|
|
@@ -18,9 +18,9 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
18
18
|
*/
|
|
19
19
|
/** IR-cut switching mode. `schedule` = time-of-day table configured on the camera. */
|
|
20
20
|
export declare const DayNightModeSchema: z.ZodEnum<{
|
|
21
|
+
auto: "auto";
|
|
21
22
|
schedule: "schedule";
|
|
22
23
|
night: "night";
|
|
23
|
-
auto: "auto";
|
|
24
24
|
day: "day";
|
|
25
25
|
}>;
|
|
26
26
|
/**
|
|
@@ -30,9 +30,9 @@ export declare const DayNightModeSchema: z.ZodEnum<{
|
|
|
30
30
|
*/
|
|
31
31
|
export declare const DayNightStatusSchema: z.ZodObject<{
|
|
32
32
|
mode: z.ZodEnum<{
|
|
33
|
+
auto: "auto";
|
|
33
34
|
schedule: "schedule";
|
|
34
35
|
night: "night";
|
|
35
|
-
auto: "auto";
|
|
36
36
|
day: "day";
|
|
37
37
|
}>;
|
|
38
38
|
sensitivity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -47,9 +47,9 @@ export declare const DayNightStatusSchema: z.ZodObject<{
|
|
|
47
47
|
*/
|
|
48
48
|
export declare const DayNightOptionsSchema: z.ZodObject<{
|
|
49
49
|
modes: z.ZodArray<z.ZodEnum<{
|
|
50
|
+
auto: "auto";
|
|
50
51
|
schedule: "schedule";
|
|
51
52
|
night: "night";
|
|
52
|
-
auto: "auto";
|
|
53
53
|
day: "day";
|
|
54
54
|
}>>;
|
|
55
55
|
supportsSensitivity: z.ZodBoolean;
|
|
@@ -71,9 +71,9 @@ export declare const DayNightOptionsSchema: z.ZodObject<{
|
|
|
71
71
|
*/
|
|
72
72
|
export declare const DayNightSettingsPatchSchema: z.ZodObject<{
|
|
73
73
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
auto: "auto";
|
|
74
75
|
schedule: "schedule";
|
|
75
76
|
night: "night";
|
|
76
|
-
auto: "auto";
|
|
77
77
|
day: "day";
|
|
78
78
|
}>>;
|
|
79
79
|
sensitivity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -101,9 +101,9 @@ export declare const dayNightCapability: {
|
|
|
101
101
|
deviceId: z.ZodNumber;
|
|
102
102
|
}, z.core.$strip>, z.ZodObject<{
|
|
103
103
|
modes: z.ZodArray<z.ZodEnum<{
|
|
104
|
+
auto: "auto";
|
|
104
105
|
schedule: "schedule";
|
|
105
106
|
night: "night";
|
|
106
|
-
auto: "auto";
|
|
107
107
|
day: "day";
|
|
108
108
|
}>>;
|
|
109
109
|
supportsSensitivity: z.ZodBoolean;
|
|
@@ -123,9 +123,9 @@ export declare const dayNightCapability: {
|
|
|
123
123
|
deviceId: z.ZodNumber;
|
|
124
124
|
settings: z.ZodObject<{
|
|
125
125
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
auto: "auto";
|
|
126
127
|
schedule: "schedule";
|
|
127
128
|
night: "night";
|
|
128
|
-
auto: "auto";
|
|
129
129
|
day: "day";
|
|
130
130
|
}>>;
|
|
131
131
|
sensitivity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -136,9 +136,9 @@ export declare const dayNightCapability: {
|
|
|
136
136
|
readonly status: {
|
|
137
137
|
readonly schema: z.ZodObject<{
|
|
138
138
|
mode: z.ZodEnum<{
|
|
139
|
+
auto: "auto";
|
|
139
140
|
schedule: "schedule";
|
|
140
141
|
night: "night";
|
|
141
|
-
auto: "auto";
|
|
142
142
|
day: "day";
|
|
143
143
|
}>;
|
|
144
144
|
sensitivity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -149,9 +149,9 @@ export declare const dayNightCapability: {
|
|
|
149
149
|
};
|
|
150
150
|
readonly runtimeState: z.ZodObject<{
|
|
151
151
|
mode: z.ZodEnum<{
|
|
152
|
+
auto: "auto";
|
|
152
153
|
schedule: "schedule";
|
|
153
154
|
night: "night";
|
|
154
|
-
auto: "auto";
|
|
155
155
|
day: "day";
|
|
156
156
|
}>;
|
|
157
157
|
sensitivity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -203,8 +203,8 @@ export declare const ConfigEntrySchema: z.ZodObject<{
|
|
|
203
203
|
description: z.ZodOptional<z.ZodString>;
|
|
204
204
|
}, z.core.$strip>;
|
|
205
205
|
export declare const DeviceLinkModeSchema: z.ZodEnum<{
|
|
206
|
-
manual: "manual";
|
|
207
206
|
auto: "auto";
|
|
207
|
+
manual: "manual";
|
|
208
208
|
}>;
|
|
209
209
|
export type DeviceLinkMode = z.infer<typeof DeviceLinkModeSchema>;
|
|
210
210
|
/** One resolved linked device — the compact projection consumers need. */
|
|
@@ -1051,8 +1051,8 @@ export declare const deviceManagerCapability: {
|
|
|
1051
1051
|
deviceId: z.ZodNumber;
|
|
1052
1052
|
}, z.core.$strip>, z.ZodObject<{
|
|
1053
1053
|
mode: z.ZodEnum<{
|
|
1054
|
-
manual: "manual";
|
|
1055
1054
|
auto: "auto";
|
|
1055
|
+
manual: "manual";
|
|
1056
1056
|
}>;
|
|
1057
1057
|
devices: z.ZodArray<z.ZodObject<{
|
|
1058
1058
|
deviceId: z.ZodNumber;
|
|
@@ -85,8 +85,8 @@ export declare const faceGalleryCapability: {
|
|
|
85
85
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
86
86
|
filter: z.ZodOptional<z.ZodEnum<{
|
|
87
87
|
unassigned: "unassigned";
|
|
88
|
-
recognized: "recognized";
|
|
89
88
|
all: "all";
|
|
89
|
+
recognized: "recognized";
|
|
90
90
|
}>>;
|
|
91
91
|
}, z.core.$strip>>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
92
92
|
faceId: z.ZodString;
|
|
@@ -30,13 +30,13 @@ export declare const ImageRotateSchema: z.ZodEnum<{
|
|
|
30
30
|
}>;
|
|
31
31
|
/** White-balance mode. `manual` unlocks the normalized `warmth` knob. */
|
|
32
32
|
export declare const WhiteBalanceModeSchema: z.ZodEnum<{
|
|
33
|
-
manual: "manual";
|
|
34
33
|
auto: "auto";
|
|
34
|
+
manual: "manual";
|
|
35
35
|
}>;
|
|
36
36
|
/** Exposure mode. */
|
|
37
37
|
export declare const ExposureModeSchema: z.ZodEnum<{
|
|
38
|
-
manual: "manual";
|
|
39
38
|
auto: "auto";
|
|
39
|
+
manual: "manual";
|
|
40
40
|
}>;
|
|
41
41
|
/**
|
|
42
42
|
* Backlight-compensation mode:
|
|
@@ -70,13 +70,13 @@ export declare const ImageSettingsStatusSchema: z.ZodObject<{
|
|
|
70
70
|
270: "270";
|
|
71
71
|
}>>;
|
|
72
72
|
whiteBalance: z.ZodOptional<z.ZodEnum<{
|
|
73
|
-
manual: "manual";
|
|
74
73
|
auto: "auto";
|
|
74
|
+
manual: "manual";
|
|
75
75
|
}>>;
|
|
76
76
|
warmth: z.ZodOptional<z.ZodNumber>;
|
|
77
77
|
exposureMode: z.ZodOptional<z.ZodEnum<{
|
|
78
|
-
manual: "manual";
|
|
79
78
|
auto: "auto";
|
|
79
|
+
manual: "manual";
|
|
80
80
|
}>>;
|
|
81
81
|
backlightMode: z.ZodOptional<z.ZodEnum<{
|
|
82
82
|
off: "off";
|
|
@@ -127,8 +127,8 @@ export declare const ImageSettingsOptionsSchema: z.ZodObject<{
|
|
|
127
127
|
270: "270";
|
|
128
128
|
}>>;
|
|
129
129
|
whiteBalanceModes: z.ZodArray<z.ZodEnum<{
|
|
130
|
-
manual: "manual";
|
|
131
130
|
auto: "auto";
|
|
131
|
+
manual: "manual";
|
|
132
132
|
}>>;
|
|
133
133
|
supportsWarmth: z.ZodBoolean;
|
|
134
134
|
warmth: z.ZodOptional<z.ZodObject<{
|
|
@@ -137,8 +137,8 @@ export declare const ImageSettingsOptionsSchema: z.ZodObject<{
|
|
|
137
137
|
step: z.ZodNumber;
|
|
138
138
|
}, z.core.$strip>>;
|
|
139
139
|
exposureModes: z.ZodArray<z.ZodEnum<{
|
|
140
|
-
manual: "manual";
|
|
141
140
|
auto: "auto";
|
|
141
|
+
manual: "manual";
|
|
142
142
|
}>>;
|
|
143
143
|
backlightModes: z.ZodArray<z.ZodEnum<{
|
|
144
144
|
off: "off";
|
|
@@ -165,13 +165,13 @@ export declare const ImageSettingsPatchSchema: z.ZodObject<{
|
|
|
165
165
|
270: "270";
|
|
166
166
|
}>>;
|
|
167
167
|
whiteBalance: z.ZodOptional<z.ZodEnum<{
|
|
168
|
-
manual: "manual";
|
|
169
168
|
auto: "auto";
|
|
169
|
+
manual: "manual";
|
|
170
170
|
}>>;
|
|
171
171
|
warmth: z.ZodOptional<z.ZodNumber>;
|
|
172
172
|
exposureMode: z.ZodOptional<z.ZodEnum<{
|
|
173
|
-
manual: "manual";
|
|
174
173
|
auto: "auto";
|
|
174
|
+
manual: "manual";
|
|
175
175
|
}>>;
|
|
176
176
|
backlightMode: z.ZodOptional<z.ZodEnum<{
|
|
177
177
|
off: "off";
|
|
@@ -237,8 +237,8 @@ export declare const imageSettingsCapability: {
|
|
|
237
237
|
270: "270";
|
|
238
238
|
}>>;
|
|
239
239
|
whiteBalanceModes: z.ZodArray<z.ZodEnum<{
|
|
240
|
-
manual: "manual";
|
|
241
240
|
auto: "auto";
|
|
241
|
+
manual: "manual";
|
|
242
242
|
}>>;
|
|
243
243
|
supportsWarmth: z.ZodBoolean;
|
|
244
244
|
warmth: z.ZodOptional<z.ZodObject<{
|
|
@@ -247,8 +247,8 @@ export declare const imageSettingsCapability: {
|
|
|
247
247
|
step: z.ZodNumber;
|
|
248
248
|
}, z.core.$strip>>;
|
|
249
249
|
exposureModes: z.ZodArray<z.ZodEnum<{
|
|
250
|
-
manual: "manual";
|
|
251
250
|
auto: "auto";
|
|
251
|
+
manual: "manual";
|
|
252
252
|
}>>;
|
|
253
253
|
backlightModes: z.ZodArray<z.ZodEnum<{
|
|
254
254
|
off: "off";
|
|
@@ -273,13 +273,13 @@ export declare const imageSettingsCapability: {
|
|
|
273
273
|
270: "270";
|
|
274
274
|
}>>;
|
|
275
275
|
whiteBalance: z.ZodOptional<z.ZodEnum<{
|
|
276
|
-
manual: "manual";
|
|
277
276
|
auto: "auto";
|
|
277
|
+
manual: "manual";
|
|
278
278
|
}>>;
|
|
279
279
|
warmth: z.ZodOptional<z.ZodNumber>;
|
|
280
280
|
exposureMode: z.ZodOptional<z.ZodEnum<{
|
|
281
|
-
manual: "manual";
|
|
282
281
|
auto: "auto";
|
|
282
|
+
manual: "manual";
|
|
283
283
|
}>>;
|
|
284
284
|
backlightMode: z.ZodOptional<z.ZodEnum<{
|
|
285
285
|
off: "off";
|
|
@@ -305,13 +305,13 @@ export declare const imageSettingsCapability: {
|
|
|
305
305
|
270: "270";
|
|
306
306
|
}>>;
|
|
307
307
|
whiteBalance: z.ZodOptional<z.ZodEnum<{
|
|
308
|
-
manual: "manual";
|
|
309
308
|
auto: "auto";
|
|
309
|
+
manual: "manual";
|
|
310
310
|
}>>;
|
|
311
311
|
warmth: z.ZodOptional<z.ZodNumber>;
|
|
312
312
|
exposureMode: z.ZodOptional<z.ZodEnum<{
|
|
313
|
-
manual: "manual";
|
|
314
313
|
auto: "auto";
|
|
314
|
+
manual: "manual";
|
|
315
315
|
}>>;
|
|
316
316
|
backlightMode: z.ZodOptional<z.ZodEnum<{
|
|
317
317
|
off: "off";
|
|
@@ -337,13 +337,13 @@ export declare const imageSettingsCapability: {
|
|
|
337
337
|
270: "270";
|
|
338
338
|
}>>;
|
|
339
339
|
whiteBalance: z.ZodOptional<z.ZodEnum<{
|
|
340
|
-
manual: "manual";
|
|
341
340
|
auto: "auto";
|
|
341
|
+
manual: "manual";
|
|
342
342
|
}>>;
|
|
343
343
|
warmth: z.ZodOptional<z.ZodNumber>;
|
|
344
344
|
exposureMode: z.ZodOptional<z.ZodEnum<{
|
|
345
|
-
manual: "manual";
|
|
346
345
|
auto: "auto";
|
|
346
|
+
manual: "manual";
|
|
347
347
|
}>>;
|
|
348
348
|
backlightMode: z.ZodOptional<z.ZodEnum<{
|
|
349
349
|
off: "off";
|
|
@@ -24,8 +24,8 @@ export declare const MediaPlayerStateSchema: z.ZodEnum<{
|
|
|
24
24
|
}>;
|
|
25
25
|
export type MediaPlayerState = z.infer<typeof MediaPlayerStateSchema>;
|
|
26
26
|
export declare const MediaPlayerRepeatSchema: z.ZodEnum<{
|
|
27
|
-
off: "off";
|
|
28
27
|
all: "all";
|
|
28
|
+
off: "off";
|
|
29
29
|
one: "one";
|
|
30
30
|
}>;
|
|
31
31
|
export type MediaPlayerRepeat = z.infer<typeof MediaPlayerRepeatSchema>;
|
|
@@ -62,8 +62,8 @@ export declare const MediaPlayerStatusSchema: z.ZodObject<{
|
|
|
62
62
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
63
63
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
64
64
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
65
|
-
off: "off";
|
|
66
65
|
all: "all";
|
|
66
|
+
off: "off";
|
|
67
67
|
one: "one";
|
|
68
68
|
}>>;
|
|
69
69
|
lastChangedAt: z.ZodNumber;
|
|
@@ -110,8 +110,8 @@ export declare const mediaPlayerCapability: {
|
|
|
110
110
|
readonly setRepeat: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
111
111
|
deviceId: z.ZodNumber;
|
|
112
112
|
repeat: z.ZodEnum<{
|
|
113
|
-
off: "off";
|
|
114
113
|
all: "all";
|
|
114
|
+
off: "off";
|
|
115
115
|
one: "one";
|
|
116
116
|
}>;
|
|
117
117
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
@@ -151,8 +151,8 @@ export declare const mediaPlayerCapability: {
|
|
|
151
151
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
152
152
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
153
153
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
154
|
-
off: "off";
|
|
155
154
|
all: "all";
|
|
155
|
+
off: "off";
|
|
156
156
|
one: "one";
|
|
157
157
|
}>>;
|
|
158
158
|
lastChangedAt: z.ZodNumber;
|
|
@@ -189,8 +189,8 @@ export declare const mediaPlayerCapability: {
|
|
|
189
189
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
190
190
|
shuffle: z.ZodNullable<z.ZodBoolean>;
|
|
191
191
|
repeat: z.ZodNullable<z.ZodEnum<{
|
|
192
|
-
off: "off";
|
|
193
192
|
all: "all";
|
|
193
|
+
off: "off";
|
|
194
194
|
one: "one";
|
|
195
195
|
}>>;
|
|
196
196
|
lastChangedAt: z.ZodNumber;
|
|
@@ -108,6 +108,7 @@ export declare const ModelDistributeInputSchema: z.ZodObject<{
|
|
|
108
108
|
imagenet: "imagenet";
|
|
109
109
|
none: "none";
|
|
110
110
|
}>>;
|
|
111
|
+
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
111
112
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
112
113
|
letterbox: "letterbox";
|
|
113
114
|
resize: "resize";
|
|
@@ -250,6 +251,7 @@ export declare const modelDistributorCapability: {
|
|
|
250
251
|
imagenet: "imagenet";
|
|
251
252
|
none: "none";
|
|
252
253
|
}>>;
|
|
254
|
+
outputProbabilities: z.ZodOptional<z.ZodBoolean>;
|
|
253
255
|
preprocessMode: z.ZodOptional<z.ZodEnum<{
|
|
254
256
|
letterbox: "letterbox";
|
|
255
257
|
resize: "resize";
|
|
@@ -915,6 +915,7 @@ export declare const pipelineExecutorCapability: {
|
|
|
915
915
|
frame: "frame";
|
|
916
916
|
full: "full";
|
|
917
917
|
}>>;
|
|
918
|
+
deviceKey: z.ZodOptional<z.ZodString>;
|
|
918
919
|
}, z.core.$strip>, z.ZodCustom<FrameResult, FrameResult>, "mutation">;
|
|
919
920
|
/**
|
|
920
921
|
* Batched run — N raw frames packed into one cap call. The provider
|
|
@@ -960,6 +961,8 @@ export declare const pipelineExecutorCapability: {
|
|
|
960
961
|
}, z.core.$strip>>;
|
|
961
962
|
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
962
963
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
964
|
+
frameId: z.ZodOptional<z.ZodNumber>;
|
|
965
|
+
deviceKey: z.ZodOptional<z.ZodString>;
|
|
963
966
|
}, z.core.$strip>, z.ZodObject<{
|
|
964
967
|
results: z.ZodReadonly<z.ZodArray<z.ZodCustom<FrameResult, FrameResult>>>;
|
|
965
968
|
}, z.core.$strip>, "mutation">;
|
|
@@ -202,6 +202,7 @@ declare const RunnerCameraConfigSchema: z.ZodObject<{
|
|
|
202
202
|
ownerReachableHost: z.ZodOptional<z.ZodString>;
|
|
203
203
|
hubHostnameOverride: z.ZodOptional<z.ZodString>;
|
|
204
204
|
}, z.core.$strip>], "kind">>;
|
|
205
|
+
deviceKey: z.ZodOptional<z.ZodString>;
|
|
205
206
|
}, z.core.$strip>;
|
|
206
207
|
/**
|
|
207
208
|
* Per-device settings UI fields the runner cap owns. Co-located with
|
|
@@ -321,6 +322,7 @@ export declare const pipelineRunnerCapability: {
|
|
|
321
322
|
ownerReachableHost: z.ZodOptional<z.ZodString>;
|
|
322
323
|
hubHostnameOverride: z.ZodOptional<z.ZodString>;
|
|
323
324
|
}, z.core.$strip>], "kind">>;
|
|
325
|
+
deviceKey: z.ZodOptional<z.ZodString>;
|
|
324
326
|
}, z.core.$strip>, z.ZodObject<{
|
|
325
327
|
success: z.ZodLiteral<true>;
|
|
326
328
|
}, z.core.$strip>, "mutation">;
|
|
@@ -172,6 +172,7 @@ export declare const platformProbeCapability: {
|
|
|
172
172
|
onnx: "onnx";
|
|
173
173
|
coreml: "coreml";
|
|
174
174
|
openvino: "openvino";
|
|
175
|
+
tflite: "tflite";
|
|
175
176
|
}>;
|
|
176
177
|
score: z.ZodNumber;
|
|
177
178
|
reason: z.ZodString;
|
|
@@ -187,12 +188,29 @@ export declare const platformProbeCapability: {
|
|
|
187
188
|
onnx: "onnx";
|
|
188
189
|
coreml: "coreml";
|
|
189
190
|
openvino: "openvino";
|
|
191
|
+
tflite: "tflite";
|
|
190
192
|
}>;
|
|
191
193
|
score: z.ZodNumber;
|
|
192
194
|
reason: z.ZodString;
|
|
193
195
|
available: z.ZodBoolean;
|
|
194
196
|
}, z.core.$strip>;
|
|
195
197
|
pythonPath: z.ZodNullable<z.ZodString>;
|
|
198
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
199
|
+
key: z.ZodString;
|
|
200
|
+
backend: z.ZodString;
|
|
201
|
+
device: z.ZodString;
|
|
202
|
+
format: z.ZodEnum<{
|
|
203
|
+
onnx: "onnx";
|
|
204
|
+
coreml: "coreml";
|
|
205
|
+
openvino: "openvino";
|
|
206
|
+
tflite: "tflite";
|
|
207
|
+
pt: "pt";
|
|
208
|
+
gguf: "gguf";
|
|
209
|
+
}>;
|
|
210
|
+
runtime: z.ZodLiteral<"python">;
|
|
211
|
+
score: z.ZodNumber;
|
|
212
|
+
available: z.ZodBoolean;
|
|
213
|
+
}, z.core.$strip>>>;
|
|
196
214
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
197
215
|
readonly getHardware: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
198
216
|
platform: z.ZodEnum<{
|
|
@@ -260,8 +278,8 @@ export declare const platformProbeCapability: {
|
|
|
260
278
|
openvino: "openvino";
|
|
261
279
|
none: "none";
|
|
262
280
|
tensorrt: "tensorrt";
|
|
263
|
-
videotoolbox: "videotoolbox";
|
|
264
281
|
cuda: "cuda";
|
|
282
|
+
videotoolbox: "videotoolbox";
|
|
265
283
|
nvdec: "nvdec";
|
|
266
284
|
vaapi: "vaapi";
|
|
267
285
|
qsv: "qsv";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Device-control RESOLUTION LOGIC — the single, presentation-free source of
|
|
3
|
+
* truth for "given a device's `type` (+ its cap `features`), which control
|
|
4
|
+
* should render?".
|
|
5
|
+
*
|
|
6
|
+
* This module is deliberately framework-free: NO react / react-native / lucide
|
|
7
|
+
* imports, no JSX, no platform widgets. It encodes only the DECISION; each
|
|
8
|
+
* client (admin-ui's `@camstack/ui-library` web registry, the RN viewer's
|
|
9
|
+
* accessory registry) maps the returned control-KIND onto its own
|
|
10
|
+
* platform-specific components. That's the one duplication we remove — the
|
|
11
|
+
* presentational components stay platform-specific by necessity.
|
|
12
|
+
*
|
|
13
|
+
* Two decision surfaces live here, at two granularities:
|
|
14
|
+
*
|
|
15
|
+
* 1. `resolveDeviceControlKind(type)` — the BASE type → control-kind decision
|
|
16
|
+
* used by the admin-ui device list / device-detail hero. Exhaustive over
|
|
17
|
+
* every `DeviceType`; a light is a single `'light'` kind (dim-vs-plain is
|
|
18
|
+
* refined inside the light component).
|
|
19
|
+
*
|
|
20
|
+
* 2. `pickAccessoryControl({ type, features })` — the FINER accessory-row
|
|
21
|
+
* decision used by the viewer's per-camera accessory list. It refines a
|
|
22
|
+
* `light` into `'brightness'` vs `'switch'` and a `sensor`/`presence` into
|
|
23
|
+
* a specific sensor cap, because an accessory row renders ONE compact
|
|
24
|
+
* control chosen by priority.
|
|
25
|
+
*
|
|
26
|
+
* The two agree on every overlapping type EXCEPT `light` (see the notes on
|
|
27
|
+
* `pickAccessoryControl`): the base decision keeps a dedicated `'light'`
|
|
28
|
+
* control; the accessory decision collapses a non-dimmable light onto the
|
|
29
|
+
* generic `'switch'` control. That is a deliberate granularity difference, not
|
|
30
|
+
* a contradiction — the base kind is what the admin-ui renders, the accessory
|
|
31
|
+
* pick is what a compact camera-accessory row renders.
|
|
32
|
+
*/
|
|
33
|
+
import { DeviceType } from './device-type.js';
|
|
34
|
+
/**
|
|
35
|
+
* The abstract control-kind a `DeviceType` resolves to. Each client binds
|
|
36
|
+
* these kinds to its own components (web: `CONTROL_KIND_COMPONENTS`). A single
|
|
37
|
+
* kind can back several device types (`'switch'` ← Switch + Siren, `'sensor'`
|
|
38
|
+
* ← Sensor + Presence, `'dummy'` ← every placeholder/non-controllable type).
|
|
39
|
+
*/
|
|
40
|
+
export type DeviceControlKind = 'cover' | 'valve' | 'humidifier' | 'water-heater' | 'switch' | 'light' | 'fan' | 'sensor' | 'thermostat' | 'climate' | 'button' | 'update' | 'lock' | 'media-player' | 'alarm' | 'control' | 'weather' | 'vacuum' | 'lawn-mower' | 'image' | 'pet-feeder' | 'dummy';
|
|
41
|
+
/**
|
|
42
|
+
* Exhaustive `DeviceType` → `DeviceControlKind` map. Omitting a new enum member
|
|
43
|
+
* fails the build here (the single place the type→kind decision is encoded).
|
|
44
|
+
* `'dummy'` marks types with no interactive control (Camera/Hub/Generic and the
|
|
45
|
+
* placeholder HA types whose inline control renders a dash).
|
|
46
|
+
*/
|
|
47
|
+
export declare const DEVICE_TYPE_CONTROL_KIND: Record<DeviceType, DeviceControlKind>;
|
|
48
|
+
/**
|
|
49
|
+
* Runtime-string-safe base resolver: a device row's `type` crosses the wire as
|
|
50
|
+
* a plain string, so an unrecognised value resolves to `null` instead of
|
|
51
|
+
* indexing the map with an unverified key. `DEVICE_TYPE_VALUES.has(type)`
|
|
52
|
+
* narrows the string to a `DeviceType` before indexing (documented enum-string
|
|
53
|
+
* boundary).
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveDeviceControlKind(type: string): DeviceControlKind | null;
|
|
56
|
+
/** Identifier of the control kind an accessory row should render. `'none'` = no
|
|
57
|
+
* control. A subset of the surfaces the base decision covers, PLUS
|
|
58
|
+
* `'brightness'` (a dimmable light refined at the decision layer). */
|
|
59
|
+
export type AccessoryControlKind = 'cover' | 'lock' | 'alarm' | 'valve' | 'brightness' | 'switch' | 'sensor' | 'none';
|
|
60
|
+
/** Kebab feature flag advertised by an accessory that auto-activates when its
|
|
61
|
+
* parent camera detects motion. The cap's kebab name is `motion-trigger` (see
|
|
62
|
+
* `motion-trigger.cap.ts`). It is INDEPENDENT of the row's primary control: a
|
|
63
|
+
* siren/light/switch can expose BOTH a `switch` on/off AND a `motion-trigger`
|
|
64
|
+
* "activate on motion" toggle. */
|
|
65
|
+
export declare const MOTION_TRIGGER_FEATURE = "motion-trigger";
|
|
66
|
+
/** True when an accessory advertises the `motion-trigger` cap — drives the
|
|
67
|
+
* inline "On motion" toggle rendered alongside its primary control. Pure +
|
|
68
|
+
* testable. */
|
|
69
|
+
export declare function hasMotionTrigger(features: readonly string[]): boolean;
|
|
70
|
+
/** Kebab-case sensor cap names → the read-only sensor-value control. The
|
|
71
|
+
* accessory pick scans these (in order) to choose which sensor cap to read. */
|
|
72
|
+
export declare const SENSOR_FEATURES: readonly string[];
|
|
73
|
+
/** The chosen control plus the sensor feature (when `kind === 'sensor'`) so the
|
|
74
|
+
* renderer knows which sensor cap to read. */
|
|
75
|
+
export interface AccessoryControlPick {
|
|
76
|
+
readonly kind: AccessoryControlKind;
|
|
77
|
+
/** The kebab sensor cap name to read, only set when `kind === 'sensor'`. */
|
|
78
|
+
readonly sensorFeature?: string;
|
|
79
|
+
}
|
|
80
|
+
/** The accessory fields the pick needs: its canonical `DeviceType` (as the
|
|
81
|
+
* wire string) plus the secondary cap `features` (used only to refine a light
|
|
82
|
+
* or sensor). */
|
|
83
|
+
export interface AccessoryControlInput {
|
|
84
|
+
readonly type: string;
|
|
85
|
+
readonly features: readonly string[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Pick the primary control for an accessory. The control is chosen by the
|
|
89
|
+
* device's canonical `type` (the `DeviceType` enum value — the same key
|
|
90
|
+
* `resolveDeviceControlKind` maps on), NOT by the `features` list (which holds
|
|
91
|
+
* secondary flags). For a `light` we consult `features` to choose dim vs plain
|
|
92
|
+
* on/off, and for a `sensor`/`presence` to pick which sensor value to read.
|
|
93
|
+
* Pure: same input → same output. Returns `{ kind: 'none' }` for types with no
|
|
94
|
+
* accessory-row control.
|
|
95
|
+
*/
|
|
96
|
+
export declare function pickAccessoryControl(device: AccessoryControlInput): AccessoryControlPick;
|
|
97
|
+
/** A sensor cap → its `(capKey, field, fallbackUnit)` mapping for the read-only
|
|
98
|
+
* value row. The kebab cap name is the lookup key. The camelCase `capKey` is
|
|
99
|
+
* the tRPC client router key; `field` is the numeric field on that cap's
|
|
100
|
+
* status; `fallbackUnit` is used when the status omits a `unit`. */
|
|
101
|
+
export interface SensorMapping {
|
|
102
|
+
readonly capKey: string;
|
|
103
|
+
readonly field: string;
|
|
104
|
+
readonly fallbackUnit?: string;
|
|
105
|
+
}
|
|
106
|
+
/** Kebab sensor cap → its numeric-value mapping. `enum-sensor` is handled
|
|
107
|
+
* separately by callers (it reads a raw string `value`, not a numeric field),
|
|
108
|
+
* so it intentionally has no entry here. */
|
|
109
|
+
export declare const SENSOR_MAP: Readonly<Record<string, SensorMapping>>;
|
|
110
|
+
/** True when a value is a navigable node: a plain object OR a tRPC v11 client
|
|
111
|
+
* proxy node (a callable `Proxy(noop)` → `typeof === 'function'`, NOT an
|
|
112
|
+
* object). A `typeof === 'object'`-only check REJECTS every real client proxy,
|
|
113
|
+
* so `resolveMutate` would return null and EVERY control becomes a silent
|
|
114
|
+
* no-op. Framework-free: operates on the SDK proxy shape only. */
|
|
115
|
+
export declare function isNode(value: unknown): value is Record<string, unknown>;
|
|
116
|
+
/** Resolve `router.<method>.mutate` to a callable, or `null`. Walks the tRPC
|
|
117
|
+
* client proxy defensively (each hop guarded by `isNode`). */
|
|
118
|
+
export declare function resolveMutate(router: unknown, method: string): ((input: Record<string, unknown>) => Promise<unknown>) | null;
|