@camstack/types 1.2.581 → 1.2.583
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/CHANGELOG.md +12 -0
- package/dist/addon.js +3 -2
- package/dist/addon.mjs +3 -2
- package/dist/capabilities/device-history.cap.d.ts +80 -0
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +120 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -0
- package/dist/client.js +3 -1
- package/dist/client.mjs +3 -1
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +196 -1
- package/dist/index.mjs +185 -2
- package/dist/interfaces/api-shared.d.ts +2 -0
- package/dist/pipeline/health-digest/schemas.d.ts +258 -0
- package/dist/{sleep-BURDyp_n.js → sleep-Coq9CYAH.js} +2 -1
- package/dist/{sleep-C9EWTQr9.mjs → sleep-DnhxKL99.mjs} +2 -1
- package/package.json +1 -1
|
@@ -65,6 +65,8 @@ export interface CameraMetrics {
|
|
|
65
65
|
readonly avgInferenceTimeMs: number;
|
|
66
66
|
readonly droppedFrames: number;
|
|
67
67
|
readonly phase: CameraPhase;
|
|
68
|
+
/** Native crops the runner could not serve (a miss, an expired handle or no registry), since the runner started. */
|
|
69
|
+
readonly nativeCropMisses?: number;
|
|
68
70
|
}
|
|
69
71
|
export interface PackageUpdate {
|
|
70
72
|
readonly name: string;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Health digest (planning#572) — findings an operator can act on, built every
|
|
3
|
+
* few minutes from state the orchestrator already holds in memory. A finding is
|
|
4
|
+
* `{ severity, subject, what, evidence, action }`; a number that could not be
|
|
5
|
+
* read is `null`, never `0` (D393).
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const HEALTH_FINDING_KINDS: readonly ['motion-without-detections', 'detections-under-floor', 'inference-too-slow', 'frames-shed', 'inference-device-unusable'];
|
|
9
|
+
export declare const HealthFindingKindSchema: z.ZodEnum<{
|
|
10
|
+
"detections-under-floor": "detections-under-floor";
|
|
11
|
+
"frames-shed": "frames-shed";
|
|
12
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
13
|
+
"inference-too-slow": "inference-too-slow";
|
|
14
|
+
"motion-without-detections": "motion-without-detections";
|
|
15
|
+
}>;
|
|
16
|
+
export type HealthFindingKind = z.infer<typeof HealthFindingKindSchema>;
|
|
17
|
+
export declare const HealthSeveritySchema: z.ZodEnum<{
|
|
18
|
+
critical: "critical";
|
|
19
|
+
info: "info";
|
|
20
|
+
warning: "warning";
|
|
21
|
+
}>;
|
|
22
|
+
export type HealthSeverity = z.infer<typeof HealthSeveritySchema>;
|
|
23
|
+
export declare const HealthSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"camera">;
|
|
25
|
+
deviceId: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"node">;
|
|
28
|
+
nodeId: z.ZodString;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"inference-device">;
|
|
31
|
+
nodeId: z.ZodString;
|
|
32
|
+
deviceKey: z.ZodString;
|
|
33
|
+
}, z.core.$strip>], "type">;
|
|
34
|
+
export type HealthSubject = z.infer<typeof HealthSubjectSchema>;
|
|
35
|
+
export declare const HealthFindingSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
kind: z.ZodEnum<{
|
|
38
|
+
"detections-under-floor": "detections-under-floor";
|
|
39
|
+
"frames-shed": "frames-shed";
|
|
40
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
41
|
+
"inference-too-slow": "inference-too-slow";
|
|
42
|
+
"motion-without-detections": "motion-without-detections";
|
|
43
|
+
}>;
|
|
44
|
+
severity: z.ZodEnum<{
|
|
45
|
+
critical: "critical";
|
|
46
|
+
info: "info";
|
|
47
|
+
warning: "warning";
|
|
48
|
+
}>;
|
|
49
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"camera">;
|
|
51
|
+
deviceId: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"node">;
|
|
54
|
+
nodeId: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"inference-device">;
|
|
57
|
+
nodeId: z.ZodString;
|
|
58
|
+
deviceKey: z.ZodString;
|
|
59
|
+
}, z.core.$strip>], "type">;
|
|
60
|
+
what: z.ZodString;
|
|
61
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
62
|
+
action: z.ZodString;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type HealthFinding = z.infer<typeof HealthFindingSchema>;
|
|
65
|
+
/** One in-memory source the tick read, and whether it answered. */
|
|
66
|
+
export declare const HealthSourceStatusSchema: z.ZodObject<{
|
|
67
|
+
source: z.ZodString;
|
|
68
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type HealthSourceStatus = z.infer<typeof HealthSourceStatusSchema>;
|
|
71
|
+
export declare const HealthNodeSummarySchema: z.ZodObject<{
|
|
72
|
+
nodeId: z.ZodString;
|
|
73
|
+
sessionsNow: z.ZodNumber;
|
|
74
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
75
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
76
|
+
deviceKey: z.ZodString;
|
|
77
|
+
sessionsNow: z.ZodNumber;
|
|
78
|
+
usable: z.ZodBoolean;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type HealthNodeSummary = z.infer<typeof HealthNodeSummarySchema>;
|
|
82
|
+
/**
|
|
83
|
+
* Per-camera runner-side signals, as per-tick deltas of the runner's cumulative
|
|
84
|
+
* counters. A camera is listed only when at least one signal is known and
|
|
85
|
+
* non-zero; `null` = the runner did not report it (unknown, never zero).
|
|
86
|
+
*/
|
|
87
|
+
export declare const HealthCameraRunnerSignalsSchema: z.ZodObject<{
|
|
88
|
+
deviceId: z.ZodNumber;
|
|
89
|
+
nativeCropMissesSincePreviousTick: z.ZodNullable<z.ZodNumber>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type HealthCameraRunnerSignals = z.infer<typeof HealthCameraRunnerSignalsSchema>;
|
|
92
|
+
export declare const HealthDigestSchema: z.ZodObject<{
|
|
93
|
+
generatedAt: z.ZodNumber;
|
|
94
|
+
tickMs: z.ZodNumber;
|
|
95
|
+
camerasSeen: z.ZodNullable<z.ZodNumber>;
|
|
96
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
kind: z.ZodEnum<{
|
|
99
|
+
"detections-under-floor": "detections-under-floor";
|
|
100
|
+
"frames-shed": "frames-shed";
|
|
101
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
102
|
+
"inference-too-slow": "inference-too-slow";
|
|
103
|
+
"motion-without-detections": "motion-without-detections";
|
|
104
|
+
}>;
|
|
105
|
+
severity: z.ZodEnum<{
|
|
106
|
+
critical: "critical";
|
|
107
|
+
info: "info";
|
|
108
|
+
warning: "warning";
|
|
109
|
+
}>;
|
|
110
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
111
|
+
type: z.ZodLiteral<"camera">;
|
|
112
|
+
deviceId: z.ZodNumber;
|
|
113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"node">;
|
|
115
|
+
nodeId: z.ZodString;
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<"inference-device">;
|
|
118
|
+
nodeId: z.ZodString;
|
|
119
|
+
deviceKey: z.ZodString;
|
|
120
|
+
}, z.core.$strip>], "type">;
|
|
121
|
+
what: z.ZodString;
|
|
122
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
123
|
+
action: z.ZodString;
|
|
124
|
+
}, z.core.$strip>>>;
|
|
125
|
+
cameraSignals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
126
|
+
deviceId: z.ZodNumber;
|
|
127
|
+
nativeCropMissesSincePreviousTick: z.ZodNullable<z.ZodNumber>;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
130
|
+
nodeId: z.ZodString;
|
|
131
|
+
sessionsNow: z.ZodNumber;
|
|
132
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
133
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
134
|
+
deviceKey: z.ZodString;
|
|
135
|
+
sessionsNow: z.ZodNumber;
|
|
136
|
+
usable: z.ZodBoolean;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
}, z.core.$strip>>>;
|
|
139
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
140
|
+
source: z.ZodString;
|
|
141
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
143
|
+
notCovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type HealthDigest = z.infer<typeof HealthDigestSchema>;
|
|
146
|
+
export declare const HealthDigestInputSchema: z.ZodObject<{
|
|
147
|
+
history: z.ZodDefault<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
export type HealthDigestInput = z.infer<typeof HealthDigestInputSchema>;
|
|
150
|
+
export declare const HealthDigestAnswerSchema: z.ZodObject<{
|
|
151
|
+
latest: z.ZodNullable<z.ZodObject<{
|
|
152
|
+
generatedAt: z.ZodNumber;
|
|
153
|
+
tickMs: z.ZodNumber;
|
|
154
|
+
camerasSeen: z.ZodNullable<z.ZodNumber>;
|
|
155
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
156
|
+
id: z.ZodString;
|
|
157
|
+
kind: z.ZodEnum<{
|
|
158
|
+
"detections-under-floor": "detections-under-floor";
|
|
159
|
+
"frames-shed": "frames-shed";
|
|
160
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
161
|
+
"inference-too-slow": "inference-too-slow";
|
|
162
|
+
"motion-without-detections": "motion-without-detections";
|
|
163
|
+
}>;
|
|
164
|
+
severity: z.ZodEnum<{
|
|
165
|
+
critical: "critical";
|
|
166
|
+
info: "info";
|
|
167
|
+
warning: "warning";
|
|
168
|
+
}>;
|
|
169
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"camera">;
|
|
171
|
+
deviceId: z.ZodNumber;
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
type: z.ZodLiteral<"node">;
|
|
174
|
+
nodeId: z.ZodString;
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
type: z.ZodLiteral<"inference-device">;
|
|
177
|
+
nodeId: z.ZodString;
|
|
178
|
+
deviceKey: z.ZodString;
|
|
179
|
+
}, z.core.$strip>], "type">;
|
|
180
|
+
what: z.ZodString;
|
|
181
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
182
|
+
action: z.ZodString;
|
|
183
|
+
}, z.core.$strip>>>;
|
|
184
|
+
cameraSignals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
185
|
+
deviceId: z.ZodNumber;
|
|
186
|
+
nativeCropMissesSincePreviousTick: z.ZodNullable<z.ZodNumber>;
|
|
187
|
+
}, z.core.$strip>>>;
|
|
188
|
+
nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
189
|
+
nodeId: z.ZodString;
|
|
190
|
+
sessionsNow: z.ZodNumber;
|
|
191
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
192
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
193
|
+
deviceKey: z.ZodString;
|
|
194
|
+
sessionsNow: z.ZodNumber;
|
|
195
|
+
usable: z.ZodBoolean;
|
|
196
|
+
}, z.core.$strip>>>;
|
|
197
|
+
}, z.core.$strip>>>;
|
|
198
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
199
|
+
source: z.ZodString;
|
|
200
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strip>>>;
|
|
202
|
+
notCovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
previous: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
205
|
+
generatedAt: z.ZodNumber;
|
|
206
|
+
tickMs: z.ZodNumber;
|
|
207
|
+
camerasSeen: z.ZodNullable<z.ZodNumber>;
|
|
208
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
kind: z.ZodEnum<{
|
|
211
|
+
"detections-under-floor": "detections-under-floor";
|
|
212
|
+
"frames-shed": "frames-shed";
|
|
213
|
+
"inference-device-unusable": "inference-device-unusable";
|
|
214
|
+
"inference-too-slow": "inference-too-slow";
|
|
215
|
+
"motion-without-detections": "motion-without-detections";
|
|
216
|
+
}>;
|
|
217
|
+
severity: z.ZodEnum<{
|
|
218
|
+
critical: "critical";
|
|
219
|
+
info: "info";
|
|
220
|
+
warning: "warning";
|
|
221
|
+
}>;
|
|
222
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
223
|
+
type: z.ZodLiteral<"camera">;
|
|
224
|
+
deviceId: z.ZodNumber;
|
|
225
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
226
|
+
type: z.ZodLiteral<"node">;
|
|
227
|
+
nodeId: z.ZodString;
|
|
228
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
229
|
+
type: z.ZodLiteral<"inference-device">;
|
|
230
|
+
nodeId: z.ZodString;
|
|
231
|
+
deviceKey: z.ZodString;
|
|
232
|
+
}, z.core.$strip>], "type">;
|
|
233
|
+
what: z.ZodString;
|
|
234
|
+
evidence: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
235
|
+
action: z.ZodString;
|
|
236
|
+
}, z.core.$strip>>>;
|
|
237
|
+
cameraSignals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
238
|
+
deviceId: z.ZodNumber;
|
|
239
|
+
nativeCropMissesSincePreviousTick: z.ZodNullable<z.ZodNumber>;
|
|
240
|
+
}, z.core.$strip>>>;
|
|
241
|
+
nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
242
|
+
nodeId: z.ZodString;
|
|
243
|
+
sessionsNow: z.ZodNumber;
|
|
244
|
+
unusableDevices: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
245
|
+
devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
246
|
+
deviceKey: z.ZodString;
|
|
247
|
+
sessionsNow: z.ZodNumber;
|
|
248
|
+
usable: z.ZodBoolean;
|
|
249
|
+
}, z.core.$strip>>>;
|
|
250
|
+
}, z.core.$strip>>>;
|
|
251
|
+
sources: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
252
|
+
source: z.ZodString;
|
|
253
|
+
entries: z.ZodNullable<z.ZodNumber>;
|
|
254
|
+
}, z.core.$strip>>>;
|
|
255
|
+
notCovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
256
|
+
}, z.core.$strip>>>;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
export type HealthDigestAnswer = z.infer<typeof HealthDigestAnswerSchema>;
|
|
@@ -20926,7 +20926,8 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
20926
20926
|
listSeries: (input) => dispatchSystem("deviceHistory", "listSeries", "query", input),
|
|
20927
20927
|
query: (input) => dispatchSystem("deviceHistory", "query", "query", input),
|
|
20928
20928
|
getDeviceEnabled: (input) => dispatchSystem("deviceHistory", "getDeviceEnabled", "query", input),
|
|
20929
|
-
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input)
|
|
20929
|
+
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input),
|
|
20930
|
+
deleteSeriesRange: (input) => dispatchSystem("deviceHistory", "deleteSeriesRange", "mutation", input)
|
|
20930
20931
|
};
|
|
20931
20932
|
const deviceManagerInterface = {
|
|
20932
20933
|
loadConfig: (input) => dispatchSystem("deviceManager", "loadConfig", "query", input),
|
|
@@ -20926,7 +20926,8 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
20926
20926
|
listSeries: (input) => dispatchSystem("deviceHistory", "listSeries", "query", input),
|
|
20927
20927
|
query: (input) => dispatchSystem("deviceHistory", "query", "query", input),
|
|
20928
20928
|
getDeviceEnabled: (input) => dispatchSystem("deviceHistory", "getDeviceEnabled", "query", input),
|
|
20929
|
-
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input)
|
|
20929
|
+
setDeviceEnabled: (input) => dispatchSystem("deviceHistory", "setDeviceEnabled", "mutation", input),
|
|
20930
|
+
deleteSeriesRange: (input) => dispatchSystem("deviceHistory", "deleteSeriesRange", "mutation", input)
|
|
20930
20931
|
};
|
|
20931
20932
|
const deviceManagerInterface = {
|
|
20932
20933
|
loadConfig: (input) => dispatchSystem("deviceManager", "loadConfig", "query", input),
|