@camstack/types 1.2.98 → 1.2.100

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.
Files changed (33) hide show
  1. package/dist/capabilities/alerts.cap.d.ts +5 -5
  2. package/dist/capabilities/custom-model-registry.cap.d.ts +18 -0
  3. package/dist/capabilities/decoder.cap.d.ts +12 -12
  4. package/dist/capabilities/index.d.ts +1 -1
  5. package/dist/capabilities/local-network.cap.d.ts +38 -7
  6. package/dist/capabilities/model-convert.cap.d.ts +27 -0
  7. package/dist/capabilities/model-distributor.cap.d.ts +18 -0
  8. package/dist/capabilities/motion-detection.cap.d.ts +4 -4
  9. package/dist/capabilities/native-object-detection.cap.d.ts +15 -15
  10. package/dist/capabilities/notification-rules.cap.d.ts +35 -8
  11. package/dist/capabilities/osd-manager.cap.d.ts +13 -1
  12. package/dist/capabilities/pipeline-analytics.cap.d.ts +13 -10
  13. package/dist/capabilities/pipeline-executor.cap.d.ts +16 -12
  14. package/dist/capabilities/pipeline-runner.cap.d.ts +182 -5
  15. package/dist/capabilities/schemas/detection-shared.d.ts +4 -4
  16. package/dist/capabilities/schemas/streaming-shared.d.ts +6 -6
  17. package/dist/capabilities/stream-broker.cap.d.ts +3 -3
  18. package/dist/capabilities/zone-rules.cap.d.ts +3 -3
  19. package/dist/generated/addon-api.d.ts +14 -0
  20. package/dist/generated/method-access-map.d.ts +1 -1
  21. package/dist/generated/system-proxy.d.ts +1 -1
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +191 -25
  24. package/dist/index.mjs +182 -26
  25. package/dist/interfaces/pipeline-executor-capability.d.ts +3 -0
  26. package/dist/interfaces/pipeline-runner-capability.d.ts +31 -0
  27. package/dist/interfaces/stream-broker.d.ts +5 -2
  28. package/dist/notification/audio-condition.d.ts +19 -4
  29. package/dist/types/frame-view.d.ts +52 -0
  30. package/dist/types/io.d.ts +3 -0
  31. package/dist/types/labels.d.ts +11 -0
  32. package/dist/types/models.d.ts +27 -0
  33. package/package.json +1 -1
@@ -8,8 +8,8 @@
8
8
  import { z } from 'zod';
9
9
  import { type InferProvider } from './capability-definition.js';
10
10
  export declare const AlertSeveritySchema: z.ZodEnum<{
11
- error: "error";
12
11
  success: "success";
12
+ error: "error";
13
13
  info: "info";
14
14
  warning: "warning";
15
15
  }>;
@@ -28,8 +28,8 @@ export declare const AlertSchema: z.ZodObject<{
28
28
  id: z.ZodString;
29
29
  category: z.ZodString;
30
30
  severity: z.ZodEnum<{
31
- error: "error";
32
31
  success: "success";
32
+ error: "error";
33
33
  info: "info";
34
34
  warning: "warning";
35
35
  }>;
@@ -64,8 +64,8 @@ export declare const alertsCapability: {
64
64
  id: z.ZodString;
65
65
  category: z.ZodString;
66
66
  severity: z.ZodEnum<{
67
- error: "error";
68
67
  success: "success";
68
+ error: "error";
69
69
  info: "info";
70
70
  warning: "warning";
71
71
  }>;
@@ -94,8 +94,8 @@ export declare const alertsCapability: {
94
94
  id: z.ZodOptional<z.ZodString>;
95
95
  category: z.ZodOptional<z.ZodString>;
96
96
  severity: z.ZodOptional<z.ZodEnum<{
97
- error: "error";
98
97
  success: "success";
98
+ error: "error";
99
99
  info: "info";
100
100
  warning: "warning";
101
101
  }>>;
@@ -126,8 +126,8 @@ export declare const alertsCapability: {
126
126
  id: z.ZodString;
127
127
  category: z.ZodString;
128
128
  severity: z.ZodEnum<{
129
- error: "error";
130
129
  success: "success";
130
+ error: "error";
131
131
  info: "info";
132
132
  warning: "warning";
133
133
  }>;
@@ -137,6 +137,15 @@ export declare const CustomModelDescriptorSchema: z.ZodObject<{
137
137
  }>>;
138
138
  resolution: z.ZodOptional<z.ZodNumber>;
139
139
  }, z.core.$strip>>;
140
+ classMap: z.ZodOptional<z.ZodObject<{
141
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
142
+ person: "person";
143
+ vehicle: "vehicle";
144
+ animal: "animal";
145
+ package: "package";
146
+ }>>;
147
+ preserveOriginal: z.ZodBoolean;
148
+ }, z.core.$strip>>;
140
149
  }, z.core.$strip>;
141
150
  }, z.core.$strip>;
142
151
  export type CustomModelDescriptor = z.infer<typeof CustomModelDescriptorSchema>;
@@ -266,6 +275,15 @@ export declare const customModelRegistryCapability: {
266
275
  }>>;
267
276
  resolution: z.ZodOptional<z.ZodNumber>;
268
277
  }, z.core.$strip>>;
278
+ classMap: z.ZodOptional<z.ZodObject<{
279
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
280
+ person: "person";
281
+ vehicle: "vehicle";
282
+ animal: "animal";
283
+ package: "package";
284
+ }>>;
285
+ preserveOriginal: z.ZodBoolean;
286
+ }, z.core.$strip>>;
269
287
  }, z.core.$strip>;
270
288
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
271
289
  };
@@ -68,11 +68,11 @@ export declare const decoderCapability: {
68
68
  codec: z.ZodString;
69
69
  maxFps: z.ZodDefault<z.ZodNumber>;
70
70
  outputFormat: z.ZodDefault<z.ZodEnum<{
71
- jpeg: "jpeg";
72
71
  rgb: "rgb";
72
+ gray: "gray";
73
+ jpeg: "jpeg";
73
74
  bgr: "bgr";
74
75
  yuv420: "yuv420";
75
- gray: "gray";
76
76
  }>>;
77
77
  scale: z.ZodDefault<z.ZodNumber>;
78
78
  width: z.ZodOptional<z.ZodNumber>;
@@ -118,11 +118,11 @@ export declare const decoderCapability: {
118
118
  width: z.ZodNumber;
119
119
  height: z.ZodNumber;
120
120
  format: z.ZodEnum<{
121
- jpeg: "jpeg";
122
121
  rgb: "rgb";
122
+ gray: "gray";
123
+ jpeg: "jpeg";
123
124
  bgr: "bgr";
124
125
  yuv420: "yuv420";
125
- gray: "gray";
126
126
  }>;
127
127
  timestamp: z.ZodNumber;
128
128
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -137,11 +137,11 @@ export declare const decoderCapability: {
137
137
  width: z.ZodNumber;
138
138
  height: z.ZodNumber;
139
139
  format: z.ZodEnum<{
140
- jpeg: "jpeg";
141
140
  rgb: "rgb";
141
+ gray: "gray";
142
+ jpeg: "jpeg";
142
143
  bgr: "bgr";
143
144
  yuv420: "yuv420";
144
- gray: "gray";
145
145
  }>;
146
146
  pts: z.ZodNumber;
147
147
  byteLength: z.ZodNumber;
@@ -156,11 +156,11 @@ export declare const decoderCapability: {
156
156
  width: z.ZodNumber;
157
157
  height: z.ZodNumber;
158
158
  format: z.ZodEnum<{
159
- jpeg: "jpeg";
160
159
  rgb: "rgb";
160
+ gray: "gray";
161
+ jpeg: "jpeg";
161
162
  bgr: "bgr";
162
163
  yuv420: "yuv420";
163
- gray: "gray";
164
164
  }>;
165
165
  pts: z.ZodNumber;
166
166
  byteLength: z.ZodNumber;
@@ -172,11 +172,11 @@ export declare const decoderCapability: {
172
172
  width: z.ZodNumber;
173
173
  height: z.ZodNumber;
174
174
  format: z.ZodEnum<{
175
- jpeg: "jpeg";
176
175
  rgb: "rgb";
176
+ gray: "gray";
177
+ jpeg: "jpeg";
177
178
  bgr: "bgr";
178
179
  yuv420: "yuv420";
179
- gray: "gray";
180
180
  }>;
181
181
  timestamp: z.ZodNumber;
182
182
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -198,11 +198,11 @@ export declare const decoderCapability: {
198
198
  codec: z.ZodOptional<z.ZodString>;
199
199
  maxFps: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
200
200
  outputFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
201
- jpeg: "jpeg";
202
201
  rgb: "rgb";
202
+ gray: "gray";
203
+ jpeg: "jpeg";
203
204
  bgr: "bgr";
204
205
  yuv420: "yuv420";
205
- gray: "gray";
206
206
  }>>>;
207
207
  scale: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
208
208
  width: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -82,7 +82,7 @@ export { ModelSubstitutionSchema, NativeCropRefSchema, PipelineDefaultStepSchema
82
82
  export type { CameraAssignmentStatus, CameraAudioStatus, CameraBrokerProfile, CameraBrokerStatus, CameraDecoderShm, CameraDecoderStatus, CameraDetectionPhase, CameraDetectionProvisioning, CameraDetectionProvisioningState, CameraDetectionStatus, CameraMotionStatus, CameraRecordingMode, CameraRecordingStatus, CameraSourceStatus, CameraSourceStream, CameraStatus, CameraStatusDegradation, CameraStatusDegradationReason, CameraStatusStage, DiskReconcileJob, InferenceDeviceExclusionReason, IngestOwner, NodeInferenceDevice, NodeInferenceDevices, } from './pipeline-orchestrator.cap.js';
83
83
  export { AgentLoadSummarySchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusDegradationReasonSchema, CameraStatusDegradationSchema, CameraStatusSchema, CameraStatusStageSchema, CapabilityBindingsSchema, DiskReconcileJobSchema, GlobalMetricsSchema, INFERENCE_DEVICE_EXCLUSION_REASONS, InferenceDeviceExclusionReasonSchema, IngestOwnerSchema, PipelineAssignmentSchema, pipelineOrchestratorCapability, } from './pipeline-orchestrator.cap.js';
84
84
  export type { DetailParent, DetailResult, MotionSource, MotionSources, ReportMotionInput, RunDetailSubtreeInput, RunDetailSubtreeResult, RunnerFrameSource, RunnerInferenceDevice, RunStatelessStepInput, RunStatelessStepResult, StatelessStepRefusal, } from './pipeline-runner.cap.js';
85
- export { MotionSourceEnum, MotionSourcesSchema, type NativeCropBbox, NativeCropBboxSchema, NativeCropResultSchema, pipelineRunnerCapability, ReportMotionInputSchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, } from './pipeline-runner.cap.js';
85
+ export { MotionSourceEnum, MotionSourcesSchema, type NativeCropBbox, NativeCropBboxSchema, NativeCropResultSchema, pipelineRunnerCapability, ReportMotionInputSchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, FrameLazyCountersSchema, FrameLazyMetricsSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, } from './pipeline-runner.cap.js';
86
86
  export { AudioChunkInputSchema, AudioClassificationLabelSchema, AudioLevelSchema, BoundingBoxSchema, FrameInputSchema, SpatialDetectionSchema, } from './schemas/detection-shared.js';
87
87
  export { CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, OrchestratorMetricsSchema, } from './schemas/orchestrator-metrics.js';
88
88
  export type { CameraStream, CamProfile, CamStreamKind, DecodedAudioChunkWire, FrameHandleFormat, ProfileRtspEntry, ProfileSlot, ProfileSlotStatus, SubscribeAudioChunksInput, SubscribeAudioChunksResult, SubscribeFramesInput, SubscribeFramesResult, } from './schemas/streaming-shared.js';
@@ -95,6 +95,16 @@ declare const NotificationEndpointSchema: z.ZodObject<{
95
95
  resolved: z.ZodNullable<z.ZodString>;
96
96
  }, z.core.$strip>;
97
97
  export type NotificationEndpoint = z.infer<typeof NotificationEndpointSchema>;
98
+ /**
99
+ * The URLs the SDK / viewer should race for API access. `baseUrls` empty =
100
+ * AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
101
+ * currently expands to, so the UI can show the effective set either way.
102
+ */
103
+ declare const ViewerEndpointsSchema: z.ZodObject<{
104
+ baseUrls: z.ZodReadonly<z.ZodArray<z.ZodString>>;
105
+ resolved: z.ZodReadonly<z.ZodArray<z.ZodString>>;
106
+ }, z.core.$strip>;
107
+ export type ViewerEndpoints = z.infer<typeof ViewerEndpointsSchema>;
98
108
  export declare const localNetworkCapability: {
99
109
  readonly name: "local-network";
100
110
  readonly scope: "system";
@@ -161,13 +171,13 @@ export declare const localNetworkCapability: {
161
171
  plausibleReason: z.ZodString;
162
172
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
163
173
  /**
164
- * Ordered candidate base URLs the SDK should try on connect.
165
- * Includes LAN IPs (one per non-internal interface), the public
166
- * tunnel hostname (when active), and loopback as a last-resort
167
- * fallback. Filterable by `includeLoopback` / `ipv4Only`.
168
- * Honours `getAllowedAddresses()` when set addresses outside
169
- * the allowlist are dropped (the public tunnel + loopback are
170
- * always included as escape hatches).
174
+ * Ordered candidate base URLs (the palette the Network tab shows).
175
+ * Includes LAN IPv4, stable LAN IPv6, the public tunnel, and mesh when
176
+ * joined. Loopback is off by default. The SDK races the subset from
177
+ * `getViewerEndpoints`, not this full list — IPv6 stays here because
178
+ * WebRTC ICE gathers dual-stack regardless of the HTTP race. Honours
179
+ * `getAllowedAddresses()` when set addresses outside the allowlist
180
+ * are dropped (the public tunnel is still included as an escape hatch).
171
181
  *
172
182
  * **The port is the hub's, not the caller's** (D62 — a function's fact
173
183
  * belongs to whoever already owns it). This method used to take a `port`
@@ -258,6 +268,27 @@ export declare const localNetworkCapability: {
258
268
  baseUrl: z.ZodNullable<z.ZodString>;
259
269
  resolved: z.ZodNullable<z.ZodString>;
260
270
  }, z.core.$strip>, "mutation">;
271
+ /**
272
+ * The endpoints the SDK / viewer races for API access. Empty `baseUrls`
273
+ * means AUTO: every LAN IPv4 address plus the public tunnel, never IPv6,
274
+ * never mesh, never loopback. `resolved` is that set (or the operator's
275
+ * explicit subset) as it stands right now.
276
+ */
277
+ readonly getViewerEndpoints: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
278
+ baseUrls: z.ZodReadonly<z.ZodArray<z.ZodString>>;
279
+ resolved: z.ZodReadonly<z.ZodArray<z.ZodString>>;
280
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
281
+ /**
282
+ * Replace the viewer race set. Empty `baseUrls` restores AUTO. Stored
283
+ * verbatim (not indices) so a temporarily-down tunnel is not silently
284
+ * dropped from the operator's choice.
285
+ */
286
+ readonly setViewerEndpoints: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
287
+ baseUrls: z.ZodReadonly<z.ZodArray<z.ZodString>>;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ baseUrls: z.ZodReadonly<z.ZodArray<z.ZodString>>;
290
+ resolved: z.ZodReadonly<z.ZodArray<z.ZodString>>;
291
+ }, z.core.$strip>, "mutation">;
261
292
  /**
262
293
  * Read the operator's allowlist. Empty = "auto" (no filter). Used
263
294
  * by the admin UI's address selector to seed its checkbox state.
@@ -38,6 +38,15 @@ export declare const ModelConvertInputSchema: z.ZodObject<{
38
38
  segmentation: "segmentation";
39
39
  }>;
40
40
  faceAlignment: z.ZodOptional<z.ZodBoolean>;
41
+ classMap: z.ZodOptional<z.ZodObject<{
42
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
43
+ person: "person";
44
+ vehicle: "vehicle";
45
+ animal: "animal";
46
+ package: "package";
47
+ }>>;
48
+ preserveOriginal: z.ZodBoolean;
49
+ }, z.core.$strip>>;
41
50
  }, z.core.$strip>;
42
51
  targets: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
43
52
  format: z.ZodLiteral<"openvino">;
@@ -96,6 +105,15 @@ export declare const modelConvertCapability: {
96
105
  segmentation: "segmentation";
97
106
  }>;
98
107
  faceAlignment: z.ZodOptional<z.ZodBoolean>;
108
+ classMap: z.ZodOptional<z.ZodObject<{
109
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
110
+ person: "person";
111
+ vehicle: "vehicle";
112
+ animal: "animal";
113
+ package: "package";
114
+ }>>;
115
+ preserveOriginal: z.ZodBoolean;
116
+ }, z.core.$strip>>;
99
117
  }, z.core.$strip>;
100
118
  targets: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
101
119
  format: z.ZodLiteral<"openvino">;
@@ -227,6 +245,15 @@ export declare const modelConvertCapability: {
227
245
  }>>;
228
246
  resolution: z.ZodOptional<z.ZodNumber>;
229
247
  }, z.core.$strip>>;
248
+ classMap: z.ZodOptional<z.ZodObject<{
249
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
250
+ person: "person";
251
+ vehicle: "vehicle";
252
+ animal: "animal";
253
+ package: "package";
254
+ }>>;
255
+ preserveOriginal: z.ZodBoolean;
256
+ }, z.core.$strip>>;
230
257
  }, z.core.$strip>;
231
258
  artifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
232
259
  format: z.ZodEnum<{
@@ -139,6 +139,15 @@ export declare const ModelDistributeInputSchema: z.ZodObject<{
139
139
  }>>;
140
140
  resolution: z.ZodOptional<z.ZodNumber>;
141
141
  }, z.core.$strip>>;
142
+ classMap: z.ZodOptional<z.ZodObject<{
143
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
144
+ person: "person";
145
+ vehicle: "vehicle";
146
+ animal: "animal";
147
+ package: "package";
148
+ }>>;
149
+ preserveOriginal: z.ZodBoolean;
150
+ }, z.core.$strip>>;
142
151
  }, z.core.$strip>;
143
152
  }, z.core.$strip>;
144
153
  export declare const ModelDistributeResultSchema: z.ZodObject<{
@@ -282,6 +291,15 @@ export declare const modelDistributorCapability: {
282
291
  }>>;
283
292
  resolution: z.ZodOptional<z.ZodNumber>;
284
293
  }, z.core.$strip>>;
294
+ classMap: z.ZodOptional<z.ZodObject<{
295
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
296
+ person: "person";
297
+ vehicle: "vehicle";
298
+ animal: "animal";
299
+ package: "package";
300
+ }>>;
301
+ preserveOriginal: z.ZodBoolean;
302
+ }, z.core.$strip>>;
285
303
  }, z.core.$strip>;
286
304
  }, z.core.$strip>, z.ZodObject<{
287
305
  ok: z.ZodBoolean;
@@ -55,11 +55,11 @@ export declare const motionDetectionCapability: {
55
55
  frame: z.ZodOptional<z.ZodObject<{
56
56
  data: z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
57
57
  format: z.ZodEnum<{
58
- jpeg: "jpeg";
59
58
  rgb: "rgb";
59
+ gray: "gray";
60
+ jpeg: "jpeg";
60
61
  bgr: "bgr";
61
62
  yuv420: "yuv420";
62
- gray: "gray";
63
63
  }>;
64
64
  width: z.ZodNumber;
65
65
  height: z.ZodNumber;
@@ -72,11 +72,11 @@ export declare const motionDetectionCapability: {
72
72
  width: z.ZodNumber;
73
73
  height: z.ZodNumber;
74
74
  format: z.ZodEnum<{
75
- jpeg: "jpeg";
76
75
  rgb: "rgb";
76
+ gray: "gray";
77
+ jpeg: "jpeg";
77
78
  bgr: "bgr";
78
79
  yuv420: "yuv420";
79
- gray: "gray";
80
80
  }>;
81
81
  pts: z.ZodNumber;
82
82
  byteLength: z.ZodNumber;
@@ -18,8 +18,8 @@ export declare const NativeObjectClassEnum: z.ZodEnum<{
18
18
  vehicle: "vehicle";
19
19
  animal: "animal";
20
20
  face: "face";
21
- other: "other";
22
21
  package: "package";
22
+ other: "other";
23
23
  }>;
24
24
  export type NativeObjectClass = z.infer<typeof NativeObjectClassEnum>;
25
25
  export declare const NativeDetectionSchema: z.ZodObject<{
@@ -28,8 +28,8 @@ export declare const NativeDetectionSchema: z.ZodObject<{
28
28
  vehicle: "vehicle";
29
29
  animal: "animal";
30
30
  face: "face";
31
- other: "other";
32
31
  package: "package";
32
+ other: "other";
33
33
  }>;
34
34
  timestamp: z.ZodNumber;
35
35
  confidence: z.ZodOptional<z.ZodNumber>;
@@ -41,16 +41,16 @@ export declare const NativeObjectDetectionStatusSchema: z.ZodObject<{
41
41
  vehicle: "vehicle";
42
42
  animal: "animal";
43
43
  face: "face";
44
- other: "other";
45
44
  package: "package";
45
+ other: "other";
46
46
  }> & z.core.$partial, z.ZodNullable<z.ZodObject<{
47
47
  class: z.ZodEnum<{
48
48
  person: "person";
49
49
  vehicle: "vehicle";
50
50
  animal: "animal";
51
51
  face: "face";
52
- other: "other";
53
52
  package: "package";
53
+ other: "other";
54
54
  }>;
55
55
  timestamp: z.ZodNumber;
56
56
  confidence: z.ZodOptional<z.ZodNumber>;
@@ -60,8 +60,8 @@ export declare const NativeObjectDetectionStatusSchema: z.ZodObject<{
60
60
  vehicle: "vehicle";
61
61
  animal: "animal";
62
62
  face: "face";
63
- other: "other";
64
63
  package: "package";
64
+ other: "other";
65
65
  }>>>;
66
66
  enabled: z.ZodBoolean;
67
67
  }, z.core.$strip>;
@@ -72,16 +72,16 @@ export declare const NativeObjectDetectionRuntimeStateSchema: z.ZodObject<{
72
72
  vehicle: "vehicle";
73
73
  animal: "animal";
74
74
  face: "face";
75
- other: "other";
76
75
  package: "package";
76
+ other: "other";
77
77
  }> & z.core.$partial, z.ZodNullable<z.ZodObject<{
78
78
  class: z.ZodEnum<{
79
79
  person: "person";
80
80
  vehicle: "vehicle";
81
81
  animal: "animal";
82
82
  face: "face";
83
- other: "other";
84
83
  package: "package";
84
+ other: "other";
85
85
  }>;
86
86
  timestamp: z.ZodNumber;
87
87
  confidence: z.ZodOptional<z.ZodNumber>;
@@ -91,8 +91,8 @@ export declare const NativeObjectDetectionRuntimeStateSchema: z.ZodObject<{
91
91
  vehicle: "vehicle";
92
92
  animal: "animal";
93
93
  face: "face";
94
- other: "other";
95
94
  package: "package";
95
+ other: "other";
96
96
  }>>>;
97
97
  enabled: z.ZodBoolean;
98
98
  lastFetchedAt: z.ZodNumber;
@@ -120,8 +120,8 @@ export declare const nativeObjectDetectionCapability: {
120
120
  vehicle: "vehicle";
121
121
  animal: "animal";
122
122
  face: "face";
123
- other: "other";
124
123
  package: "package";
124
+ other: "other";
125
125
  }>;
126
126
  timestamp: z.ZodNumber;
127
127
  confidence: z.ZodOptional<z.ZodNumber>;
@@ -136,16 +136,16 @@ export declare const nativeObjectDetectionCapability: {
136
136
  vehicle: "vehicle";
137
137
  animal: "animal";
138
138
  face: "face";
139
- other: "other";
140
139
  package: "package";
140
+ other: "other";
141
141
  }> & z.core.$partial, z.ZodNullable<z.ZodObject<{
142
142
  class: z.ZodEnum<{
143
143
  person: "person";
144
144
  vehicle: "vehicle";
145
145
  animal: "animal";
146
146
  face: "face";
147
- other: "other";
148
147
  package: "package";
148
+ other: "other";
149
149
  }>;
150
150
  timestamp: z.ZodNumber;
151
151
  confidence: z.ZodOptional<z.ZodNumber>;
@@ -155,8 +155,8 @@ export declare const nativeObjectDetectionCapability: {
155
155
  vehicle: "vehicle";
156
156
  animal: "animal";
157
157
  face: "face";
158
- other: "other";
159
158
  package: "package";
159
+ other: "other";
160
160
  }>>>;
161
161
  enabled: z.ZodBoolean;
162
162
  }, z.core.$strip>;
@@ -168,16 +168,16 @@ export declare const nativeObjectDetectionCapability: {
168
168
  vehicle: "vehicle";
169
169
  animal: "animal";
170
170
  face: "face";
171
- other: "other";
172
171
  package: "package";
172
+ other: "other";
173
173
  }> & z.core.$partial, z.ZodNullable<z.ZodObject<{
174
174
  class: z.ZodEnum<{
175
175
  person: "person";
176
176
  vehicle: "vehicle";
177
177
  animal: "animal";
178
178
  face: "face";
179
- other: "other";
180
179
  package: "package";
180
+ other: "other";
181
181
  }>;
182
182
  timestamp: z.ZodNumber;
183
183
  confidence: z.ZodOptional<z.ZodNumber>;
@@ -187,8 +187,8 @@ export declare const nativeObjectDetectionCapability: {
187
187
  vehicle: "vehicle";
188
188
  animal: "animal";
189
189
  face: "face";
190
- other: "other";
191
190
  package: "package";
191
+ other: "other";
192
192
  }>>>;
193
193
  enabled: z.ZodBoolean;
194
194
  lastFetchedAt: z.ZodNumber;
@@ -243,12 +243,15 @@ export declare const NC_AUDIO_DBFS_FLOOR = -96;
243
243
  * there is no second switch that can disagree with the first and every rule
244
244
  * authored before the decision migrates for free (`audioModeOf`):
245
245
  *
246
- * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
247
- * classifier labels with one of them. No window, no percentage:
248
- * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
249
- * `throttle` cooldown is the only brake. The per-label confidence floor is
250
- * the analyzer's (`classificationMinScore`, per device) a label only
251
- * reaches this condition if the classifier was already confident enough.
246
+ * - **LABEL mode — `labels` present.** The rule fires when `confirmHits`
247
+ * labelled frames land inside `confirmWindowSec` (default 2 in 5 s).
248
+ * `hitPercent` and `samplingSeconds` are still ignored a percentage of
249
+ * frames is the wrong question for a classifier that labels 1–3 frames
250
+ * per episode. The count window is the brake that drops a single-frame
251
+ * false positive; the rule's own `throttle` cooldown is the other. The
252
+ * per-label confidence floor is the analyzer's (`classificationMinScore`,
253
+ * per device) — a label only reaches this condition if the classifier was
254
+ * already confident enough. `confirmHits: 1` restores first-frame fire.
252
255
  * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
253
256
  * the condition: at least `hitPercent`% of the samples over
254
257
  * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
@@ -279,6 +282,8 @@ export declare const NcAudioConditionSchema: z.ZodObject<{
279
282
  dbThreshold: z.ZodOptional<z.ZodNumber>;
280
283
  hitPercent: z.ZodDefault<z.ZodNumber>;
281
284
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
285
+ confirmHits: z.ZodOptional<z.ZodNumber>;
286
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
282
287
  }, z.core.$strip>;
283
288
  export type NcAudioCondition = z.infer<typeof NcAudioConditionSchema>;
284
289
  /**
@@ -643,6 +648,8 @@ export declare const NcConditionsSchema: z.ZodObject<{
643
648
  dbThreshold: z.ZodOptional<z.ZodNumber>;
644
649
  hitPercent: z.ZodDefault<z.ZodNumber>;
645
650
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
651
+ confirmHits: z.ZodOptional<z.ZodNumber>;
652
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
646
653
  }, z.core.$strip>>;
647
654
  }, z.core.$strip>;
648
655
  export type NcConditions = z.infer<typeof NcConditionsSchema>;
@@ -925,6 +932,8 @@ export declare const NcRuleInputSchema: z.ZodObject<{
925
932
  dbThreshold: z.ZodOptional<z.ZodNumber>;
926
933
  hitPercent: z.ZodDefault<z.ZodNumber>;
927
934
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
935
+ confirmHits: z.ZodOptional<z.ZodNumber>;
936
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
928
937
  }, z.core.$strip>>;
929
938
  }, z.core.$strip>>;
930
939
  schedule: z.ZodOptional<z.ZodObject<{
@@ -1271,6 +1280,8 @@ export declare const NcRulePatchSchema: z.ZodObject<{
1271
1280
  dbThreshold: z.ZodOptional<z.ZodNumber>;
1272
1281
  hitPercent: z.ZodDefault<z.ZodNumber>;
1273
1282
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
1283
+ confirmHits: z.ZodOptional<z.ZodNumber>;
1284
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
1274
1285
  }, z.core.$strip>>;
1275
1286
  }, z.core.$strip>>;
1276
1287
  media: z.ZodOptional<z.ZodObject<{
@@ -1434,6 +1445,8 @@ export declare const NcRuleSchema: z.ZodObject<{
1434
1445
  dbThreshold: z.ZodOptional<z.ZodNumber>;
1435
1446
  hitPercent: z.ZodDefault<z.ZodNumber>;
1436
1447
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
1448
+ confirmHits: z.ZodOptional<z.ZodNumber>;
1449
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
1437
1450
  }, z.core.$strip>>;
1438
1451
  }, z.core.$strip>>;
1439
1452
  schedule: z.ZodOptional<z.ZodObject<{
@@ -1587,6 +1600,7 @@ export declare const NcConditionDescriptorSchema: z.ZodObject<{
1587
1600
  id: z.ZodString;
1588
1601
  group: z.ZodEnum<{
1589
1602
  audio: "audio";
1603
+ package: "package";
1590
1604
  system: "system";
1591
1605
  device: "device";
1592
1606
  label: "label";
@@ -1594,7 +1608,6 @@ export declare const NcConditionDescriptorSchema: z.ZodObject<{
1594
1608
  class: "class";
1595
1609
  zones: "zones";
1596
1610
  schedule: "schedule";
1597
- package: "package";
1598
1611
  occupancy: "occupancy";
1599
1612
  quality: "quality";
1600
1613
  }>;
@@ -2121,6 +2134,8 @@ export declare const notificationRulesCapability: {
2121
2134
  dbThreshold: z.ZodOptional<z.ZodNumber>;
2122
2135
  hitPercent: z.ZodDefault<z.ZodNumber>;
2123
2136
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
2137
+ confirmHits: z.ZodOptional<z.ZodNumber>;
2138
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
2124
2139
  }, z.core.$strip>>;
2125
2140
  }, z.core.$strip>>;
2126
2141
  schedule: z.ZodOptional<z.ZodObject<{
@@ -2378,6 +2393,8 @@ export declare const notificationRulesCapability: {
2378
2393
  dbThreshold: z.ZodOptional<z.ZodNumber>;
2379
2394
  hitPercent: z.ZodDefault<z.ZodNumber>;
2380
2395
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
2396
+ confirmHits: z.ZodOptional<z.ZodNumber>;
2397
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
2381
2398
  }, z.core.$strip>>;
2382
2399
  }, z.core.$strip>>;
2383
2400
  schedule: z.ZodOptional<z.ZodObject<{
@@ -2633,6 +2650,8 @@ export declare const notificationRulesCapability: {
2633
2650
  dbThreshold: z.ZodOptional<z.ZodNumber>;
2634
2651
  hitPercent: z.ZodDefault<z.ZodNumber>;
2635
2652
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
2653
+ confirmHits: z.ZodOptional<z.ZodNumber>;
2654
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
2636
2655
  }, z.core.$strip>>;
2637
2656
  }, z.core.$strip>>;
2638
2657
  schedule: z.ZodOptional<z.ZodObject<{
@@ -2882,6 +2901,8 @@ export declare const notificationRulesCapability: {
2882
2901
  dbThreshold: z.ZodOptional<z.ZodNumber>;
2883
2902
  hitPercent: z.ZodDefault<z.ZodNumber>;
2884
2903
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
2904
+ confirmHits: z.ZodOptional<z.ZodNumber>;
2905
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
2885
2906
  }, z.core.$strip>>;
2886
2907
  }, z.core.$strip>>;
2887
2908
  schedule: z.ZodOptional<z.ZodObject<{
@@ -3228,6 +3249,8 @@ export declare const notificationRulesCapability: {
3228
3249
  dbThreshold: z.ZodOptional<z.ZodNumber>;
3229
3250
  hitPercent: z.ZodDefault<z.ZodNumber>;
3230
3251
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
3252
+ confirmHits: z.ZodOptional<z.ZodNumber>;
3253
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
3231
3254
  }, z.core.$strip>>;
3232
3255
  }, z.core.$strip>>;
3233
3256
  media: z.ZodOptional<z.ZodObject<{
@@ -3390,6 +3413,8 @@ export declare const notificationRulesCapability: {
3390
3413
  dbThreshold: z.ZodOptional<z.ZodNumber>;
3391
3414
  hitPercent: z.ZodDefault<z.ZodNumber>;
3392
3415
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
3416
+ confirmHits: z.ZodOptional<z.ZodNumber>;
3417
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
3393
3418
  }, z.core.$strip>>;
3394
3419
  }, z.core.$strip>>;
3395
3420
  schedule: z.ZodOptional<z.ZodObject<{
@@ -3693,6 +3718,8 @@ export declare const notificationRulesCapability: {
3693
3718
  dbThreshold: z.ZodOptional<z.ZodNumber>;
3694
3719
  hitPercent: z.ZodDefault<z.ZodNumber>;
3695
3720
  samplingSeconds: z.ZodDefault<z.ZodNumber>;
3721
+ confirmHits: z.ZodOptional<z.ZodNumber>;
3722
+ confirmWindowSec: z.ZodOptional<z.ZodNumber>;
3696
3723
  }, z.core.$strip>>;
3697
3724
  }, z.core.$strip>>;
3698
3725
  schedule: z.ZodOptional<z.ZodObject<{
@@ -3853,6 +3880,7 @@ export declare const notificationRulesCapability: {
3853
3880
  id: z.ZodString;
3854
3881
  group: z.ZodEnum<{
3855
3882
  audio: "audio";
3883
+ package: "package";
3856
3884
  system: "system";
3857
3885
  device: "device";
3858
3886
  label: "label";
@@ -3860,7 +3888,6 @@ export declare const notificationRulesCapability: {
3860
3888
  class: "class";
3861
3889
  zones: "zones";
3862
3890
  schedule: "schedule";
3863
- package: "package";
3864
3891
  occupancy: "occupancy";
3865
3892
  quality: "quality";
3866
3893
  }>;