@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
@@ -0,0 +1,52 @@
1
+ import type { FrameFormat } from './io.js';
2
+ export interface FrameViewCrop {
3
+ readonly left: number;
4
+ readonly top: number;
5
+ readonly width: number;
6
+ readonly height: number;
7
+ }
8
+ export interface FrameViewSpec {
9
+ readonly crop?: FrameViewCrop;
10
+ readonly content: {
11
+ readonly width: number;
12
+ readonly height: number;
13
+ };
14
+ readonly fit: 'stretch' | 'contain';
15
+ readonly format: 'rgb' | 'gray' | 'jpeg';
16
+ }
17
+ export interface FrameViewGeometry {
18
+ readonly source: {
19
+ readonly width: number;
20
+ readonly height: number;
21
+ };
22
+ readonly sourceCrop: FrameViewCrop;
23
+ readonly output: {
24
+ readonly width: number;
25
+ readonly height: number;
26
+ };
27
+ readonly scale: {
28
+ readonly x: number;
29
+ readonly y: number;
30
+ };
31
+ }
32
+ /**
33
+ * Process-local frame identity. It is serializable so it can ride an in-process
34
+ * capability call, but `registryId` deliberately prevents resolution in any
35
+ * other process or execution group.
36
+ */
37
+ export interface FrameRef {
38
+ readonly registryId: string;
39
+ readonly id: string;
40
+ readonly width: number;
41
+ readonly height: number;
42
+ readonly format: Extract<FrameFormat, 'rgb' | 'gray'>;
43
+ readonly timestamp: number;
44
+ readonly capturedAt?: number;
45
+ }
46
+ export interface MaterializedFrameView {
47
+ readonly data: Uint8Array;
48
+ readonly width: number;
49
+ readonly height: number;
50
+ readonly format: FrameViewSpec['format'];
51
+ readonly geometry: FrameViewGeometry;
52
+ }
@@ -1,3 +1,4 @@
1
+ import type { FrameRef } from './frame-view.js';
1
2
  export interface BoundingBox {
2
3
  readonly x: number;
3
4
  readonly y: number;
@@ -31,6 +32,8 @@ export interface FrameInput {
31
32
  readonly width: number;
32
33
  readonly height: number;
33
34
  readonly timestamp: number;
35
+ /** Local lazy source; `data` is empty until an inline fallback is selected. */
36
+ readonly frameRef?: FrameRef;
34
37
  }
35
38
  /**
36
39
  * Wire-safe audio chunk passed to the audio-analyzer and detection-pipeline
@@ -11,3 +11,14 @@ export interface ClassMapDefinition {
11
11
  readonly mapping: Readonly<Record<string, string>>;
12
12
  readonly preserveOriginal: boolean;
13
13
  }
14
+ /** Detection-macro targets a catalog `classMap` may resolve to. */
15
+ export declare const CLASS_MAP_MACRO_TARGETS: readonly ["person", "vehicle", "animal", "package"];
16
+ export declare const ClassMapDefinitionSchema: z.ZodObject<{
17
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
18
+ person: "person";
19
+ vehicle: "vehicle";
20
+ animal: "animal";
21
+ package: "package";
22
+ }>>;
23
+ preserveOriginal: z.ZodBoolean;
24
+ }, z.core.$strip>;
@@ -245,6 +245,15 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
245
245
  }>>;
246
246
  resolution: z.ZodOptional<z.ZodNumber>;
247
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>>;
248
257
  }, z.core.$strip>;
249
258
  export type ModelCatalogEntry = z.infer<typeof ModelCatalogEntrySchema>;
250
259
  export interface DetectionModel {
@@ -327,6 +336,15 @@ export declare const ModelConvertMetadataSchema: z.ZodObject<{
327
336
  segmentation: "segmentation";
328
337
  }>;
329
338
  faceAlignment: z.ZodOptional<z.ZodBoolean>;
339
+ classMap: z.ZodOptional<z.ZodObject<{
340
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
341
+ person: "person";
342
+ vehicle: "vehicle";
343
+ animal: "animal";
344
+ package: "package";
345
+ }>>;
346
+ preserveOriginal: z.ZodBoolean;
347
+ }, z.core.$strip>>;
330
348
  }, z.core.$strip>;
331
349
  export type ModelConvertMetadata = z.infer<typeof ModelConvertMetadataSchema>;
332
350
  export declare const ConvertArtifactSchema: z.ZodObject<{
@@ -466,6 +484,15 @@ export declare const ConvertResultSchema: z.ZodObject<{
466
484
  }>>;
467
485
  resolution: z.ZodOptional<z.ZodNumber>;
468
486
  }, z.core.$strip>>;
487
+ classMap: z.ZodOptional<z.ZodObject<{
488
+ mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
489
+ person: "person";
490
+ vehicle: "vehicle";
491
+ animal: "animal";
492
+ package: "package";
493
+ }>>;
494
+ preserveOriginal: z.ZodBoolean;
495
+ }, z.core.$strip>>;
469
496
  }, z.core.$strip>;
470
497
  artifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
471
498
  format: z.ZodEnum<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.98",
3
+ "version": "1.2.100",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",