@camstack/types 1.2.193 → 1.2.195

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 (57) hide show
  1. package/dist/addon.d.ts +1 -0
  2. package/dist/addon.js +2 -1
  3. package/dist/addon.mjs +2 -2
  4. package/dist/capabilities/addons.cap.d.ts +23 -23
  5. package/dist/capabilities/backup.cap.d.ts +6 -6
  6. package/dist/capabilities/core-blocks.cap.d.ts +16 -16
  7. package/dist/capabilities/custom-model-registry.cap.d.ts +2 -2
  8. package/dist/capabilities/decoder.cap.d.ts +13 -13
  9. package/dist/capabilities/device-manager.cap.d.ts +6 -6
  10. package/dist/capabilities/image-settings.cap.d.ts +16 -16
  11. package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
  12. package/dist/capabilities/llm.cap.d.ts +4 -4
  13. package/dist/capabilities/load-contribution.cap.d.ts +4 -4
  14. package/dist/capabilities/mask-shape.d.ts +2 -2
  15. package/dist/capabilities/media-player.cap.d.ts +4 -4
  16. package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
  17. package/dist/capabilities/model-convert.cap.d.ts +5 -5
  18. package/dist/capabilities/model-distributor.cap.d.ts +2 -2
  19. package/dist/capabilities/motion-detection.cap.d.ts +4 -4
  20. package/dist/capabilities/motion-zones.cap.d.ts +4 -4
  21. package/dist/capabilities/navigation.cap.d.ts +7 -7
  22. package/dist/capabilities/notification-output.cap.d.ts +13 -13
  23. package/dist/capabilities/notification-rules.cap.d.ts +17 -17
  24. package/dist/capabilities/notifier.cap.d.ts +3 -3
  25. package/dist/capabilities/osd-manager.cap.d.ts +14 -14
  26. package/dist/capabilities/pipeline-analytics.cap.d.ts +73 -73
  27. package/dist/capabilities/pipeline-executor.cap.d.ts +16 -16
  28. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +39 -39
  29. package/dist/capabilities/pipeline-runner.cap.d.ts +6 -6
  30. package/dist/capabilities/privacy-mask.cap.d.ts +4 -4
  31. package/dist/capabilities/recording-export.cap.d.ts +14 -14
  32. package/dist/capabilities/recording.cap.d.ts +12 -12
  33. package/dist/capabilities/schemas/detection-shared.d.ts +4 -4
  34. package/dist/capabilities/schemas/streaming-shared.d.ts +7 -7
  35. package/dist/capabilities/storage-migration.cap.d.ts +13 -13
  36. package/dist/capabilities/storage.cap.d.ts +6 -6
  37. package/dist/capabilities/stream-broker.cap.d.ts +59 -59
  38. package/dist/capabilities/stream-signals.cap.d.ts +15 -0
  39. package/dist/capabilities/system.cap.d.ts +4 -4
  40. package/dist/capabilities/videoclips.cap.d.ts +2 -2
  41. package/dist/capabilities/webrtc-session.cap.d.ts +8 -8
  42. package/dist/index.js +20 -52
  43. package/dist/index.mjs +16 -48
  44. package/dist/interfaces/adoption-job.d.ts +2 -2
  45. package/dist/interfaces/camera-switches.d.ts +3 -3
  46. package/dist/interfaces/event-bus.d.ts +21 -0
  47. package/dist/interfaces/ops-log.d.ts +2 -2
  48. package/dist/interfaces/recording-config.d.ts +2 -2
  49. package/dist/interfaces/relocate.d.ts +18 -18
  50. package/dist/interfaces/storage-location-declaration.d.ts +1 -1
  51. package/dist/interfaces/stream-broker.d.ts +2 -2
  52. package/dist/lifecycle/job.d.ts +24 -24
  53. package/dist/{sleep-B8nfmQ8a.js → sleep-9Ix5MtX4.js} +71 -0
  54. package/dist/{sleep-BEyvfshj.mjs → sleep-B9qx0cEV.mjs} +48 -1
  55. package/dist/types/detection.d.ts +24 -3
  56. package/dist/types/models.d.ts +4 -4
  57. package/package.json +1 -1
@@ -2792,6 +2792,53 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
2792
2792
  return DeviceRole;
2793
2793
  }({});
2794
2794
  //#endregion
2795
+ //#region src/capabilities/custom-actions.ts
2796
+ /**
2797
+ * Identity — preserves literal types for downstream inference.
2798
+ *
2799
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
2800
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
2801
+ * the broader unions declared on `CustomActionSpec`'s default generics.
2802
+ * Shape validity is enforced separately by the `customAction(...)` helper
2803
+ * whose return type is already a `CustomActionSpec<...>`.
2804
+ */
2805
+ function defineCustomActions(spec) {
2806
+ return spec;
2807
+ }
2808
+ function customAction(input, output, options) {
2809
+ return {
2810
+ input,
2811
+ output,
2812
+ kind: options?.kind ?? "query",
2813
+ auth: options?.auth ?? "protected",
2814
+ scope: options?.scope ?? { kind: "system" },
2815
+ ...options?.caller ? { caller: "required" } : {}
2816
+ };
2817
+ }
2818
+ function deviceCustomAction(input, output, options) {
2819
+ return {
2820
+ input,
2821
+ output,
2822
+ kind: options?.kind ?? "query",
2823
+ auth: options?.auth ?? "protected",
2824
+ scope: {
2825
+ kind: "device",
2826
+ ...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
2827
+ }
2828
+ };
2829
+ }
2830
+ /** Strip a catalog to what crosses the wire. Pure; the schemas are not touched. */
2831
+ function describeCustomActions(catalog) {
2832
+ const out = {};
2833
+ for (const [name, spec] of Object.entries(catalog)) out[name] = {
2834
+ kind: spec.kind,
2835
+ auth: spec.auth,
2836
+ scope: spec.scope,
2837
+ ...spec.caller === "required" ? { caller: "required" } : {}
2838
+ };
2839
+ return out;
2840
+ }
2841
+ //#endregion
2795
2842
  //#region src/device/children-batch-max.ts
2796
2843
  /**
2797
2844
  * Most parents one `getChildrenBatch` may name.
@@ -4611,6 +4658,30 @@ Object.defineProperty(exports, "createSliceHandle", {
4611
4658
  return createSliceHandle;
4612
4659
  }
4613
4660
  });
4661
+ Object.defineProperty(exports, "customAction", {
4662
+ enumerable: true,
4663
+ get: function() {
4664
+ return customAction;
4665
+ }
4666
+ });
4667
+ Object.defineProperty(exports, "defineCustomActions", {
4668
+ enumerable: true,
4669
+ get: function() {
4670
+ return defineCustomActions;
4671
+ }
4672
+ });
4673
+ Object.defineProperty(exports, "describeCustomActions", {
4674
+ enumerable: true,
4675
+ get: function() {
4676
+ return describeCustomActions;
4677
+ }
4678
+ });
4679
+ Object.defineProperty(exports, "deviceCustomAction", {
4680
+ enumerable: true,
4681
+ get: function() {
4682
+ return deviceCustomAction;
4683
+ }
4684
+ });
4614
4685
  Object.defineProperty(exports, "deviceOpsCapability", {
4615
4686
  enumerable: true,
4616
4687
  get: function() {
@@ -2792,6 +2792,53 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
2792
2792
  return DeviceRole;
2793
2793
  }({});
2794
2794
  //#endregion
2795
+ //#region src/capabilities/custom-actions.ts
2796
+ /**
2797
+ * Identity — preserves literal types for downstream inference.
2798
+ *
2799
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
2800
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
2801
+ * the broader unions declared on `CustomActionSpec`'s default generics.
2802
+ * Shape validity is enforced separately by the `customAction(...)` helper
2803
+ * whose return type is already a `CustomActionSpec<...>`.
2804
+ */
2805
+ function defineCustomActions(spec) {
2806
+ return spec;
2807
+ }
2808
+ function customAction(input, output, options) {
2809
+ return {
2810
+ input,
2811
+ output,
2812
+ kind: options?.kind ?? "query",
2813
+ auth: options?.auth ?? "protected",
2814
+ scope: options?.scope ?? { kind: "system" },
2815
+ ...options?.caller ? { caller: "required" } : {}
2816
+ };
2817
+ }
2818
+ function deviceCustomAction(input, output, options) {
2819
+ return {
2820
+ input,
2821
+ output,
2822
+ kind: options?.kind ?? "query",
2823
+ auth: options?.auth ?? "protected",
2824
+ scope: {
2825
+ kind: "device",
2826
+ ...options?.deviceTypes ? { deviceTypes: options.deviceTypes } : {}
2827
+ }
2828
+ };
2829
+ }
2830
+ /** Strip a catalog to what crosses the wire. Pure; the schemas are not touched. */
2831
+ function describeCustomActions(catalog) {
2832
+ const out = {};
2833
+ for (const [name, spec] of Object.entries(catalog)) out[name] = {
2834
+ kind: spec.kind,
2835
+ auth: spec.auth,
2836
+ scope: spec.scope,
2837
+ ...spec.caller === "required" ? { caller: "required" } : {}
2838
+ };
2839
+ return out;
2840
+ }
2841
+ //#endregion
2795
2842
  //#region src/device/children-batch-max.ts
2796
2843
  /**
2797
2844
  * Most parents one `getChildrenBatch` may name.
@@ -4257,4 +4304,4 @@ function sleepCancellable(ms, signal) {
4257
4304
  });
4258
4305
  }
4259
4306
  //#endregion
4260
- export { CameraStreamSchema as $, DEVICE_STATUS_METHOD as A, collectHydratedFieldValues as At, toNodeId as B, ChargingStatus as C, createDurableState as Ct, adminUiCapability as D, WELL_KNOWN_TABS as Dt, DeviceType as E, isEvent as Et, resolveCapMount as F, expandAudioChunkToF32le as Ft, scopeKey as G, ReadinessTimeoutError as H, systemMethod as I, isAudioChunkFormat as It, BrokerStatusSchema as J, AudioChunkFormatSchema as K, CAP_NODE_PIN_CONTEXT_KEY as L, expandCapMethods as M, resolveHydratedFieldValue as Mt, isDeviceConfigCap as N, AUDIO_CHUNK_FORMATS as Nt, DEFAULT_RUNTIME_STATE_DURABILITY as O, WELL_KNOWN_TAB_MAP as Ot, method as P, audioChunkBytesPerSample as Pt, CamStreamResolutionSchema as Q, nodePin as R, DEVICE_CHILDREN_BATCH_MAX as S, normalizeAddonInitResult as St, DeviceRole as T, emitReadiness as Tt, emitDownForOwnedCaps as U, ReadinessRegistry as V, readinessKey as W, CamProfileSchema as X, CAM_PROFILE_ORDER as Y, CamStreamKindSchema as Z, createMirrorSource as _, selectAssignedProfileSlots as _t, asJsonObject as a, ProfileRtspEntrySchema as at, deviceOpsCapability as b, DisposerChain as bt, parseJsonArray as c, StreamSourceEntrySchema$1 as ct, BOOT_RECOVERY_BACKOFF_MS as d, SubscribeAudioChunksResultSchema as dt, DecodedAudioChunkSchema as et, DEVICE_SCOPED_CAPS as f, SubscribeFramesInputSchema as ft, createLazyTrpcSource as g, parseProfileBrokerId as gt, createEventBusSliceSource as h, makeSourceBrokerId as ht, asJsonArray as i, FrameHandleSchema as it, event as j, hydrateSchema as jt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as k, collectHydratedFieldEntries as kt, parseJsonObject as l, StreamSourceSchema as lt, createDeviceProxy as m, makeProfileBrokerId as mt, sleepCancellable as n, EncodedPacketSchema as nt, asNumber as o, ProfileSlotSchema as ot, isDeviceScopedCap as p, SubscribeFramesResultSchema as pt, BrokerStatsSchema as q, asBoolean as r, FrameHandleFormatSchema as rt, asString as s, ProfileSlotStatusSchema as st, sleep as t, DecodedFrameSchema as tt, parseJsonUnknown as u, SubscribeAudioChunksInputSchema as ut, createSliceHandle as v, DATAPLANE_SECRET_HEADER as vt, DeviceFeature as w, createEvent as wt, viewerUiCapability as x, BaseAddon as xt, RawStateResultSchema as y, SHARE_VIEW_KINDS as yt, readNodePin as z };
4307
+ export { CAM_PROFILE_ORDER as $, DeviceType as A, isEvent as At, systemMethod as B, isAudioChunkFormat as Bt, customAction as C, SHARE_VIEW_KINDS as Ct, ChargingStatus as D, createDurableState as Dt, deviceCustomAction as E, normalizeAddonInitResult as Et, event as F, hydrateSchema as Ft, ReadinessRegistry as G, nodePin as H, expandCapMethods as I, resolveHydratedFieldValue as It, readinessKey as J, ReadinessTimeoutError as K, isDeviceConfigCap as L, AUDIO_CHUNK_FORMATS as Lt, DEFAULT_RUNTIME_STATE_DURABILITY as M, WELL_KNOWN_TAB_MAP as Mt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as N, collectHydratedFieldEntries as Nt, DeviceFeature as O, createEvent as Ot, DEVICE_STATUS_METHOD as P, collectHydratedFieldValues as Pt, BrokerStatusSchema as Q, method as R, audioChunkBytesPerSample as Rt, DEVICE_CHILDREN_BATCH_MAX as S, DATAPLANE_SECRET_HEADER as St, describeCustomActions as T, BaseAddon as Tt, readNodePin as U, CAP_NODE_PIN_CONTEXT_KEY as V, toNodeId as W, AudioChunkFormatSchema as X, scopeKey as Y, BrokerStatsSchema as Z, createMirrorSource as _, SubscribeFramesResultSchema as _t, asJsonObject as a, DecodedFrameSchema as at, deviceOpsCapability as b, parseProfileBrokerId as bt, parseJsonArray as c, FrameHandleSchema as ct, BOOT_RECOVERY_BACKOFF_MS as d, ProfileSlotStatusSchema as dt, CamProfileSchema as et, DEVICE_SCOPED_CAPS as f, StreamSourceEntrySchema$1 as ft, createLazyTrpcSource as g, SubscribeFramesInputSchema as gt, createEventBusSliceSource as h, SubscribeAudioChunksResultSchema as ht, asJsonArray as i, DecodedAudioChunkSchema as it, adminUiCapability as j, WELL_KNOWN_TABS as jt, DeviceRole as k, emitReadiness as kt, parseJsonObject as l, ProfileRtspEntrySchema as lt, createDeviceProxy as m, SubscribeAudioChunksInputSchema as mt, sleepCancellable as n, CamStreamResolutionSchema as nt, asNumber as o, EncodedPacketSchema as ot, isDeviceScopedCap as p, StreamSourceSchema as pt, emitDownForOwnedCaps as q, asBoolean as r, CameraStreamSchema as rt, asString as s, FrameHandleFormatSchema as st, sleep as t, CamStreamKindSchema as tt, parseJsonUnknown as u, ProfileSlotSchema as ut, createSliceHandle as v, makeProfileBrokerId as vt, defineCustomActions as w, DisposerChain as wt, viewerUiCapability as x, selectAssignedProfileSlots as xt, RawStateResultSchema as y, makeSourceBrokerId as yt, resolveCapMount as z, expandAudioChunkToF32le as zt };
@@ -1,4 +1,5 @@
1
1
  import type { FirstLevelMacroClass } from './labels.js';
2
+ import type { TrackState } from '../capabilities/pipeline-analytics.cap.js';
2
3
  import type { BoundingBox as EngineBoundingBox, FrameInput, Landmark } from './io.js';
3
4
  export interface SpatialDetection {
4
5
  readonly class: string;
@@ -126,9 +127,29 @@ export type MacroClass = FirstLevelMacro | DetailMacro | 'audio' | string;
126
127
  /** Tracker-enriched info attached to first-level detections only. */
127
128
  export interface TrackInfo {
128
129
  readonly trackId: string;
129
- readonly moving?: boolean;
130
- /** Pixels per second in frame coordinates. */
131
- readonly speedPx?: number;
130
+ /**
131
+ * What the tracker says this subject is DOING, as of this frame.
132
+ *
133
+ * Computed for every track on every frame by `StateAnalyzer` (10 s to
134
+ * `stationary`) and carried here so a consumer can draw a parked car
135
+ * differently from one that is moving — which is the whole reason the
136
+ * verdict is computed.
137
+ *
138
+ * It replaces an unused `moving?: boolean` (and a `speedPx?: number`) that
139
+ * sat here declared and NEVER assigned anywhere in the repo, while the live
140
+ * overlay drew a person standing still exactly like one walking. A boolean
141
+ * would also have been lossy: `stationary` and `loitering` are different
142
+ * things to show.
143
+ *
144
+ * ABSENT means the tracker has not classified this track yet — not "moving".
145
+ * A fresh track must not flash as stationary for its first frames.
146
+ *
147
+ * The CANONICAL `TrackState`, the same enum tracks and events already carry
148
+ * (`idle` is the still one — `stationary` and `loitering` both map into it).
149
+ * Deliberately not `ObjectState`, the analyzer's internal spelling: one fact
150
+ * with two vocabularies on the wire is how two readers start disagreeing.
151
+ */
152
+ readonly movementState?: TrackState;
132
153
  /** IDs of zones the bbox overlaps at this frame. */
133
154
  readonly zones?: readonly string[];
134
155
  /** Wall-clock timestamp (ms) when the track was first seen. */
@@ -236,9 +236,9 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
236
236
  nhwc: "nhwc";
237
237
  }>>;
238
238
  inputNormalization: z.ZodOptional<z.ZodEnum<{
239
+ none: "none";
239
240
  "zero-one": "zero-one";
240
241
  imagenet: "imagenet";
241
- none: "none";
242
242
  }>>;
243
243
  outputProbabilities: z.ZodOptional<z.ZodBoolean>;
244
244
  preprocessMode: z.ZodOptional<z.ZodEnum<{
@@ -351,19 +351,19 @@ export declare const ModelConvertMetadataSchema: z.ZodObject<{
351
351
  nhwc: "nhwc";
352
352
  }>>;
353
353
  inputNormalization: z.ZodOptional<z.ZodEnum<{
354
+ none: "none";
354
355
  "zero-one": "zero-one";
355
356
  imagenet: "imagenet";
356
- none: "none";
357
357
  }>>;
358
358
  preprocessMode: z.ZodOptional<z.ZodEnum<{
359
359
  letterbox: "letterbox";
360
360
  resize: "resize";
361
361
  }>>;
362
362
  outputFormat: z.ZodEnum<{
363
+ classification: "classification";
363
364
  yolo: "yolo";
364
365
  ssd: "ssd";
365
366
  embedding: "embedding";
366
- classification: "classification";
367
367
  ocr: "ocr";
368
368
  segmentation: "segmentation";
369
369
  }>;
@@ -481,9 +481,9 @@ export declare const ConvertResultSchema: z.ZodObject<{
481
481
  nhwc: "nhwc";
482
482
  }>>;
483
483
  inputNormalization: z.ZodOptional<z.ZodEnum<{
484
+ none: "none";
484
485
  "zero-one": "zero-one";
485
486
  imagenet: "imagenet";
486
- none: "none";
487
487
  }>>;
488
488
  outputProbabilities: z.ZodOptional<z.ZodBoolean>;
489
489
  preprocessMode: z.ZodOptional<z.ZodEnum<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.193",
3
+ "version": "1.2.195",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",