@camstack/types 1.2.4 → 1.2.6
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/pipeline-analytics.cap.d.ts +18 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
- package/dist/generated/addon-api.d.ts +4 -0
- package/dist/index.js +42 -1
- package/dist/index.mjs +42 -1
- package/dist/interfaces/event-bus.d.ts +12 -0
- package/dist/interfaces/stream-broker.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1285,8 +1285,26 @@ export declare const pipelineAnalyticsCapability: {
|
|
|
1285
1285
|
sizeBytes: z.ZodNumber;
|
|
1286
1286
|
timestamp: z.ZodNumber;
|
|
1287
1287
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
1288
|
+
/** All media rows owned by a track. `kinds` narrows to a kind subset so a
|
|
1289
|
+
* client can fetch the SMALL display variants on open and pull the
|
|
1290
|
+
* multi-MB native variants only on demand (mirrors `getEventMedia.kind`).
|
|
1291
|
+
* Absent ⇒ every kind (back-compat). */
|
|
1288
1292
|
readonly getTrackMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1289
1293
|
trackId: z.ZodString;
|
|
1294
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1295
|
+
snapshot: "snapshot";
|
|
1296
|
+
crop: "crop";
|
|
1297
|
+
thumbnail: "thumbnail";
|
|
1298
|
+
firstFrame: "firstFrame";
|
|
1299
|
+
lastFrame: "lastFrame";
|
|
1300
|
+
fullFrame: "fullFrame";
|
|
1301
|
+
fullFrameBoxed: "fullFrameBoxed";
|
|
1302
|
+
faceCrop: "faceCrop";
|
|
1303
|
+
plateCrop: "plateCrop";
|
|
1304
|
+
keyFrame: "keyFrame";
|
|
1305
|
+
keyFrameSmall: "keyFrameSmall";
|
|
1306
|
+
thumbnailSmall: "thumbnailSmall";
|
|
1307
|
+
}>>>;
|
|
1290
1308
|
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1291
1309
|
key: z.ZodString;
|
|
1292
1310
|
kind: z.ZodEnum<{
|
|
@@ -183,6 +183,7 @@ declare const RunnerCameraConfigSchema: z.ZodObject<{
|
|
|
183
183
|
"on-motion": "on-motion";
|
|
184
184
|
}>>;
|
|
185
185
|
motionCooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
186
|
+
maxSessionHoldMs: z.ZodOptional<z.ZodNumber>;
|
|
186
187
|
motionFps: z.ZodDefault<z.ZodNumber>;
|
|
187
188
|
detectionFps: z.ZodDefault<z.ZodNumber>;
|
|
188
189
|
motionStreamId: z.ZodString;
|
|
@@ -314,6 +315,7 @@ export declare const pipelineRunnerCapability: {
|
|
|
314
315
|
"on-motion": "on-motion";
|
|
315
316
|
}>>;
|
|
316
317
|
motionCooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
318
|
+
maxSessionHoldMs: z.ZodOptional<z.ZodNumber>;
|
|
317
319
|
motionFps: z.ZodDefault<z.ZodNumber>;
|
|
318
320
|
detectionFps: z.ZodDefault<z.ZodNumber>;
|
|
319
321
|
motionStreamId: z.ZodString;
|
|
@@ -10217,6 +10217,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
10217
10217
|
input: {
|
|
10218
10218
|
[x: string]: unknown;
|
|
10219
10219
|
trackId: string;
|
|
10220
|
+
kinds?: ("snapshot" | "crop" | "thumbnail" | "firstFrame" | "lastFrame" | "fullFrame" | "fullFrameBoxed" | "faceCrop" | "plateCrop" | "keyFrame" | "keyFrameSmall" | "thumbnailSmall")[] | undefined;
|
|
10220
10221
|
};
|
|
10221
10222
|
output: readonly {
|
|
10222
10223
|
key: string;
|
|
@@ -11757,6 +11758,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
11757
11758
|
detectionMode?: "disabled" | "always-on" | "on-motion" | undefined;
|
|
11758
11759
|
audioMode?: "disabled" | "always-on" | "on-motion" | undefined;
|
|
11759
11760
|
motionCooldownMs?: number | undefined;
|
|
11761
|
+
maxSessionHoldMs?: number | undefined;
|
|
11760
11762
|
motionFps?: number | undefined;
|
|
11761
11763
|
detectionFps?: number | undefined;
|
|
11762
11764
|
motionSources?: ("onboard" | "analyzer")[] | undefined;
|
|
@@ -27038,6 +27040,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
27038
27040
|
input: {
|
|
27039
27041
|
[x: string]: unknown;
|
|
27040
27042
|
trackId: string;
|
|
27043
|
+
kinds?: ("snapshot" | "crop" | "thumbnail" | "firstFrame" | "lastFrame" | "fullFrame" | "fullFrameBoxed" | "faceCrop" | "plateCrop" | "keyFrame" | "keyFrameSmall" | "thumbnailSmall")[] | undefined;
|
|
27041
27044
|
};
|
|
27042
27045
|
output: readonly {
|
|
27043
27046
|
key: string;
|
|
@@ -28578,6 +28581,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
28578
28581
|
detectionMode?: "disabled" | "always-on" | "on-motion" | undefined;
|
|
28579
28582
|
audioMode?: "disabled" | "always-on" | "on-motion" | undefined;
|
|
28580
28583
|
motionCooldownMs?: number | undefined;
|
|
28584
|
+
maxSessionHoldMs?: number | undefined;
|
|
28581
28585
|
motionFps?: number | undefined;
|
|
28582
28586
|
detectionFps?: number | undefined;
|
|
28583
28587
|
motionSources?: ("onboard" | "analyzer")[] | undefined;
|
package/dist/index.js
CHANGED
|
@@ -8563,6 +8563,12 @@ var motionCooldownMsField = {
|
|
|
8563
8563
|
default: 3e4,
|
|
8564
8564
|
step: 500
|
|
8565
8565
|
};
|
|
8566
|
+
var maxSessionHoldMsField = {
|
|
8567
|
+
min: 0,
|
|
8568
|
+
max: 6e5,
|
|
8569
|
+
default: 12e4,
|
|
8570
|
+
step: 5e3
|
|
8571
|
+
};
|
|
8566
8572
|
var motionFpsField = {
|
|
8567
8573
|
min: 1,
|
|
8568
8574
|
max: 30,
|
|
@@ -8710,6 +8716,19 @@ var RunnerCameraConfigSchema = zod.z.object({
|
|
|
8710
8716
|
"on-motion"
|
|
8711
8717
|
]).default("always-on"),
|
|
8712
8718
|
motionCooldownMs: zod.z.number().min(motionCooldownMsField.min).default(motionCooldownMsField.default),
|
|
8719
|
+
/**
|
|
8720
|
+
* Orchestrator-side on-motion session-hold cap (ms). While an on-motion
|
|
8721
|
+
* detection session is active and ≥1 confirmed non-stationary track is
|
|
8722
|
+
* still live, the orchestrator keeps the session open past
|
|
8723
|
+
* `motionCooldownMs` (a slowly-moving subject can stop re-triggering the
|
|
8724
|
+
* camera's VMD yet is still being tracked frame-to-frame) — up to this many
|
|
8725
|
+
* ms since the session opened, after which it closes regardless. `0`
|
|
8726
|
+
* disables the hold (legacy cooldown-only teardown). Not consumed by the
|
|
8727
|
+
* runner itself — carried here so it shares the per-camera device-settings
|
|
8728
|
+
* surface with `motionCooldownMs`; the orchestrator reads it off the
|
|
8729
|
+
* resolved `CameraDetectionConfig`.
|
|
8730
|
+
*/
|
|
8731
|
+
maxSessionHoldMs: zod.z.number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
|
|
8713
8732
|
motionFps: zod.z.number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
|
|
8714
8733
|
detectionFps: zod.z.number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
|
|
8715
8734
|
motionStreamId: zod.z.string(),
|
|
@@ -8873,6 +8892,21 @@ var RunnerCameraDeviceUIFields = [
|
|
|
8873
8892
|
nullable: true,
|
|
8874
8893
|
nullLabel: "Default"
|
|
8875
8894
|
},
|
|
8895
|
+
{
|
|
8896
|
+
key: "maxSessionHoldMs",
|
|
8897
|
+
type: "slider",
|
|
8898
|
+
label: "Max session hold",
|
|
8899
|
+
description: "Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.",
|
|
8900
|
+
min: maxSessionHoldMsField.min,
|
|
8901
|
+
max: maxSessionHoldMsField.max,
|
|
8902
|
+
step: maxSessionHoldMsField.step,
|
|
8903
|
+
default: maxSessionHoldMsField.default,
|
|
8904
|
+
showValue: true,
|
|
8905
|
+
unit: "s",
|
|
8906
|
+
displayScale: 1e3,
|
|
8907
|
+
nullable: true,
|
|
8908
|
+
nullLabel: "Default"
|
|
8909
|
+
},
|
|
8876
8910
|
{
|
|
8877
8911
|
key: "onboardMotionDrivesAnalyzer",
|
|
8878
8912
|
type: "boolean",
|
|
@@ -19468,7 +19502,14 @@ var pipelineAnalyticsCapability = {
|
|
|
19468
19502
|
eventId: zod.z.string(),
|
|
19469
19503
|
kind: MediaFileKindEnum.optional()
|
|
19470
19504
|
}), zod.z.array(MediaFileSchema).readonly()),
|
|
19471
|
-
|
|
19505
|
+
/** All media rows owned by a track. `kinds` narrows to a kind subset so a
|
|
19506
|
+
* client can fetch the SMALL display variants on open and pull the
|
|
19507
|
+
* multi-MB native variants only on demand (mirrors `getEventMedia.kind`).
|
|
19508
|
+
* Absent ⇒ every kind (back-compat). */
|
|
19509
|
+
getTrackMedia: require_sleep.method(zod.z.object({
|
|
19510
|
+
trackId: zod.z.string(),
|
|
19511
|
+
kinds: zod.z.array(MediaFileKindEnum).optional()
|
|
19512
|
+
}), zod.z.array(MediaFileSchema).readonly()),
|
|
19472
19513
|
/**
|
|
19473
19514
|
* Search object events by text query using CLIP cosine similarity.
|
|
19474
19515
|
* Encodes `text` via the `embedding-encoder` cap, queries the
|
package/dist/index.mjs
CHANGED
|
@@ -8562,6 +8562,12 @@ var motionCooldownMsField = {
|
|
|
8562
8562
|
default: 3e4,
|
|
8563
8563
|
step: 500
|
|
8564
8564
|
};
|
|
8565
|
+
var maxSessionHoldMsField = {
|
|
8566
|
+
min: 0,
|
|
8567
|
+
max: 6e5,
|
|
8568
|
+
default: 12e4,
|
|
8569
|
+
step: 5e3
|
|
8570
|
+
};
|
|
8565
8571
|
var motionFpsField = {
|
|
8566
8572
|
min: 1,
|
|
8567
8573
|
max: 30,
|
|
@@ -8709,6 +8715,19 @@ var RunnerCameraConfigSchema = z.object({
|
|
|
8709
8715
|
"on-motion"
|
|
8710
8716
|
]).default("always-on"),
|
|
8711
8717
|
motionCooldownMs: z.number().min(motionCooldownMsField.min).default(motionCooldownMsField.default),
|
|
8718
|
+
/**
|
|
8719
|
+
* Orchestrator-side on-motion session-hold cap (ms). While an on-motion
|
|
8720
|
+
* detection session is active and ≥1 confirmed non-stationary track is
|
|
8721
|
+
* still live, the orchestrator keeps the session open past
|
|
8722
|
+
* `motionCooldownMs` (a slowly-moving subject can stop re-triggering the
|
|
8723
|
+
* camera's VMD yet is still being tracked frame-to-frame) — up to this many
|
|
8724
|
+
* ms since the session opened, after which it closes regardless. `0`
|
|
8725
|
+
* disables the hold (legacy cooldown-only teardown). Not consumed by the
|
|
8726
|
+
* runner itself — carried here so it shares the per-camera device-settings
|
|
8727
|
+
* surface with `motionCooldownMs`; the orchestrator reads it off the
|
|
8728
|
+
* resolved `CameraDetectionConfig`.
|
|
8729
|
+
*/
|
|
8730
|
+
maxSessionHoldMs: z.number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
|
|
8712
8731
|
motionFps: z.number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
|
|
8713
8732
|
detectionFps: z.number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
|
|
8714
8733
|
motionStreamId: z.string(),
|
|
@@ -8872,6 +8891,21 @@ var RunnerCameraDeviceUIFields = [
|
|
|
8872
8891
|
nullable: true,
|
|
8873
8892
|
nullLabel: "Default"
|
|
8874
8893
|
},
|
|
8894
|
+
{
|
|
8895
|
+
key: "maxSessionHoldMs",
|
|
8896
|
+
type: "slider",
|
|
8897
|
+
label: "Max session hold",
|
|
8898
|
+
description: "Upper bound on how long detection keeps running past the motion cooldown while a subject is still moving in-frame but no longer triggering motion. Prevents the detection box from stopping on a slow-moving subject. Set to 0 to disable.",
|
|
8899
|
+
min: maxSessionHoldMsField.min,
|
|
8900
|
+
max: maxSessionHoldMsField.max,
|
|
8901
|
+
step: maxSessionHoldMsField.step,
|
|
8902
|
+
default: maxSessionHoldMsField.default,
|
|
8903
|
+
showValue: true,
|
|
8904
|
+
unit: "s",
|
|
8905
|
+
displayScale: 1e3,
|
|
8906
|
+
nullable: true,
|
|
8907
|
+
nullLabel: "Default"
|
|
8908
|
+
},
|
|
8875
8909
|
{
|
|
8876
8910
|
key: "onboardMotionDrivesAnalyzer",
|
|
8877
8911
|
type: "boolean",
|
|
@@ -19467,7 +19501,14 @@ var pipelineAnalyticsCapability = {
|
|
|
19467
19501
|
eventId: z.string(),
|
|
19468
19502
|
kind: MediaFileKindEnum.optional()
|
|
19469
19503
|
}), z.array(MediaFileSchema).readonly()),
|
|
19470
|
-
|
|
19504
|
+
/** All media rows owned by a track. `kinds` narrows to a kind subset so a
|
|
19505
|
+
* client can fetch the SMALL display variants on open and pull the
|
|
19506
|
+
* multi-MB native variants only on demand (mirrors `getEventMedia.kind`).
|
|
19507
|
+
* Absent ⇒ every kind (back-compat). */
|
|
19508
|
+
getTrackMedia: method(z.object({
|
|
19509
|
+
trackId: z.string(),
|
|
19510
|
+
kinds: z.array(MediaFileKindEnum).optional()
|
|
19511
|
+
}), z.array(MediaFileSchema).readonly()),
|
|
19471
19512
|
/**
|
|
19472
19513
|
* Search object events by text query using CLIP cosine similarity.
|
|
19473
19514
|
* Encodes `text` via the `embedding-encoder` cap, queries the
|
|
@@ -133,6 +133,18 @@ export interface PipelineAnalyticsFrameTrackedPayload {
|
|
|
133
133
|
readonly frameWidth: number;
|
|
134
134
|
readonly frameHeight: number;
|
|
135
135
|
readonly detections: readonly ObjectDetection[];
|
|
136
|
+
/**
|
|
137
|
+
* True when ≥1 tracked object on this frame is NON-stationary (track state
|
|
138
|
+
* `moving` / `entered` / `left`) — i.e. a real subject is actively moving
|
|
139
|
+
* through the scene, as opposed to a parked/idle object. Consumed by the
|
|
140
|
+
* orchestrator's on-motion session-hold: while a moving track is live the
|
|
141
|
+
* detection session is kept open past the motion cooldown (a slowly-moving
|
|
142
|
+
* subject can evade the camera's VMD yet still be tracked frame-to-frame),
|
|
143
|
+
* so the box never stops following it mid-session. Absent ⇒ treat as
|
|
144
|
+
* `false` (no hold). Telemetry-lossy (D8) — a dropped frame just lets the
|
|
145
|
+
* session close slightly earlier, never a correctness bug.
|
|
146
|
+
*/
|
|
147
|
+
readonly hasMovingTrack?: boolean;
|
|
136
148
|
[key: string]: unknown;
|
|
137
149
|
}
|
|
138
150
|
/** Lifecycle phase of a tracked object: it appears (`start`), its best
|
|
@@ -409,6 +409,14 @@ export interface CameraDetectionConfig {
|
|
|
409
409
|
readonly motionFps: number;
|
|
410
410
|
readonly detectionFps: number;
|
|
411
411
|
readonly motionCooldownMs: number;
|
|
412
|
+
/**
|
|
413
|
+
* Orchestrator on-motion session-hold cap (ms). While the session is active
|
|
414
|
+
* and a confirmed non-stationary track is still live, the orchestrator holds
|
|
415
|
+
* the session open past `motionCooldownMs` — up to this many ms since it
|
|
416
|
+
* opened — so a slow subject that stops re-triggering VMD is still tracked.
|
|
417
|
+
* Absent ⇒ the orchestrator's built-in default; `0` disables the hold.
|
|
418
|
+
*/
|
|
419
|
+
readonly maxSessionHoldMs?: number;
|
|
412
420
|
readonly audioStreamId?: string;
|
|
413
421
|
/**
|
|
414
422
|
* Operator-facing scheduling modes. Forwarded to `RunnerCameraConfig`;
|