@camstack/types 1.2.172 → 1.2.175

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 (39) hide show
  1. package/dist/addon/mint-once.d.ts +73 -0
  2. package/dist/addon.js +2 -2
  3. package/dist/addon.mjs +2 -2
  4. package/dist/capabilities/battery.cap.d.ts +2 -2
  5. package/dist/capabilities/camera-credentials.cap.d.ts +1 -1
  6. package/dist/capabilities/capability-definition.d.ts +2 -2
  7. package/dist/capabilities/device-manager.cap.d.ts +1 -1
  8. package/dist/capabilities/index.d.ts +2 -2
  9. package/dist/capabilities/notification-rules.cap.d.ts +11 -11
  10. package/dist/capabilities/pipeline-analytics.cap.d.ts +31 -0
  11. package/dist/capabilities/pipeline-runner.cap.d.ts +162 -0
  12. package/dist/capabilities/recording.cap.d.ts +35 -2
  13. package/dist/device/base-device-provider.d.ts +1 -1
  14. package/dist/device/device-runtime-state.d.ts +2 -2
  15. package/dist/device/device.d.ts +1 -1
  16. package/dist/device/source-info.d.ts +1 -1
  17. package/dist/enums/event-category.d.ts +0 -1
  18. package/dist/enums.js +1 -1
  19. package/dist/enums.mjs +1 -1
  20. package/dist/{event-category-BVo6ta6_.js → event-category-BNJ9EE5B.js} +0 -1
  21. package/dist/{event-category-CnLqLOKs.mjs → event-category-DAXzJeTX.mjs} +0 -1
  22. package/dist/generated/addon-api.d.ts +21 -0
  23. package/dist/generated/device-proxy.d.ts +1 -1
  24. package/dist/generated/method-access-map.d.ts +1 -1
  25. package/dist/generated/method-device-selectors.d.ts +2 -2
  26. package/dist/index.js +247 -18
  27. package/dist/index.mjs +244 -19
  28. package/dist/interfaces/addon.d.ts +1 -1
  29. package/dist/interfaces/config-ui.d.ts +1 -1
  30. package/dist/interfaces/context.d.ts +2 -2
  31. package/dist/interfaces/device-provider.d.ts +1 -1
  32. package/dist/interfaces/event-bus.d.ts +16 -1
  33. package/dist/interfaces/pipeline-runner-capability.d.ts +28 -0
  34. package/dist/interfaces/stream-broker.d.ts +7 -7
  35. package/dist/notification/timelapse-rule.d.ts +1 -1
  36. package/dist/{sleep-Bo9cUOXp.js → sleep-CTHjJilA.js} +5 -2
  37. package/dist/{sleep-DMghvp8F.mjs → sleep-ox21Ig4I.mjs} +5 -2
  38. package/dist/types/detection.d.ts +3 -5
  39. package/package.json +1 -1
@@ -345,6 +345,21 @@ export interface PipelineInferenceResultPayload {
345
345
  * → delivery latency. Undefined when the frame carried no capture stamp.
346
346
  */
347
347
  readonly capturedAt?: number;
348
+ /**
349
+ * Wall-clock (ms) read on the RUNNER's node at the instant this payload was
350
+ * handed to the bus. A consumer's `now - emittedAt` is the delivery lag —
351
+ * the one number that tells a late DELIVERY apart from a slow CONSUMER when
352
+ * both produce the same signature (a silence, then a burst-drain). See
353
+ * `addon-post-analysis/src/pipeline-analytics/frame-lag-observer.ts` for how
354
+ * it is read and why the absolute value is not a latency.
355
+ *
356
+ * Optional, and undefined is UNKNOWN, never 0 (D8): the bus is telemetry,
357
+ * and during a rolling deploy a runner older than this field emits payloads
358
+ * without it as the normal case. A consumer that folds an absent stamp in as
359
+ * 0 reports "delivered instantly" and fabricates exactly the verdict the
360
+ * field exists to establish.
361
+ */
362
+ readonly emittedAt?: number;
348
363
  /** Child steps enabled for this camera + their scheduling policy (from the catalog). */
349
364
  readonly detailSteps?: readonly DetailStepAnnounce[];
350
365
  readonly [key: string]: unknown;
@@ -783,7 +798,7 @@ export interface EventCatalog {
783
798
  };
784
799
  /**
785
800
  * Device online/offline aggregate. Emitted by the device's owning
786
- * provider (rtsp / reolink / onvif / frigate) when the union of its
801
+ * provider (rtsp / reolink / onvif) when the union of its
787
802
  * stream-broker profile health flips. `online` fires when at least
788
803
  * one profile becomes healthy after all were offline; `offline` fires
789
804
  * when the last healthy profile goes stale (no packets for
@@ -252,4 +252,32 @@ export interface IPipelineRunnerProvider {
252
252
  * why the model pin is refused rather than substituted.
253
253
  */
254
254
  runStatelessStep(input: import('../capabilities/pipeline-runner.cap.js').RunStatelessStepInput): Promise<import('../capabilities/pipeline-runner.cap.js').RunStatelessStepResult>;
255
+ /**
256
+ * PARK a frame for a track at the instant the hub judged it relevant
257
+ * (D422). See `pipelineRunnerCapability.parkTrackFrame`
258
+ * (`capabilities/pipeline-runner.cap.ts`) for the contract; a refusal is
259
+ * an answer, never a retry.
260
+ */
261
+ parkTrackFrame(input: {
262
+ readonly deviceId: number;
263
+ readonly trackId: string;
264
+ readonly kind: import('../capabilities/pipeline-runner.cap.js').ParkedFrameKind;
265
+ readonly handle: import('./frame-handle.js').FrameHandle;
266
+ readonly bbox: import('../capabilities/pipeline-runner.cap.js').NativeCropBbox;
267
+ readonly maxWidth?: number;
268
+ readonly timestamp: number;
269
+ }): Promise<import('../capabilities/pipeline-runner.cap.js').ParkTrackFrameResult>;
270
+ /** A parked parcel by `(deviceId, trackId, kind)`; `null` = nothing parked here. */
271
+ getParkedTrackFrame(input: {
272
+ readonly deviceId: number;
273
+ readonly trackId: string;
274
+ readonly kind: import('../capabilities/pipeline-runner.cap.js').ParkedFrameKind;
275
+ }): Promise<import('../capabilities/pipeline-runner.cap.js').ParkedTrackFrame | null>;
276
+ /** Drop every parcel of a closed track. Idempotent. */
277
+ releaseParkedTrackFrames(input: {
278
+ readonly deviceId: number;
279
+ readonly trackId: string;
280
+ }): Promise<{
281
+ released: number;
282
+ }>;
255
283
  }
@@ -47,8 +47,8 @@ export type Unsubscribe = () => void;
47
47
  * path falls back to AnnexB → writeVideoNals.
48
48
  * Reserved — implementation pending.
49
49
  * - `'push'` — push mode. Provider addon delivers AnnexB packets
50
- * via `pushEncodedPacket()` (Reolink Baichuan,
51
- * Frigate event streams, etc.).
50
+ * via `pushEncodedPacket()` (Reolink Baichuan and
51
+ * other event-stream sources).
52
52
  * - `'push-rtp'` — push mode with raw RTP packets. Provider addon
53
53
  * delivers source RTP via `pushVideoRtp()` AND
54
54
  * AnnexB-equivalents via `pushEncodedPacket()` so
@@ -204,7 +204,7 @@ export interface IStreamBroker {
204
204
  * Push an encoded packet into the broker from an external source.
205
205
  *
206
206
  * Used by camera provider addons that deliver media data directly
207
- * (e.g. Reolink Baichuan protocol, Frigate event streams) instead
207
+ * (e.g. the Reolink Baichuan protocol) instead
208
208
  * of exposing an RTSP URL for the broker to pull from.
209
209
  *
210
210
  * The broker fans out the packet to all consumers: pre-buffer, RTSP
@@ -212,8 +212,8 @@ export interface IStreamBroker {
212
212
  */
213
213
  pushEncodedPacket(packet: EncodedPacket): void;
214
214
  /**
215
- * Push-source audio metadata. Push providers (Reolink Baichuan,
216
- * Frigate, etc.) call this BEFORE the first audio EncodedPacket so
215
+ * Push-source audio metadata. Push providers (Reolink Baichuan and
216
+ * the like) call this BEFORE the first audio EncodedPacket so
217
217
  * the broker can wire the audio-codec capability — RTSP sources get
218
218
  * the same data from the SDP audio track. Repeat calls update the
219
219
  * declared codec; calling with `null` retracts (broker tears down
@@ -250,8 +250,8 @@ export interface IStreamBroker {
250
250
  * a packet-level repacketizer that preserves the original RTP header
251
251
  * layout — Chrome's HEVC depacketizer is sensitive to it.
252
252
  *
253
- * Sources that don't have an underlying RTP wire (e.g. Frigate event
254
- * streams that call `pushEncodedPacket`) MAY register zero callbacks
253
+ * Sources that don't have an underlying RTP wire (e.g. event streams
254
+ * that call `pushEncodedPacket`) MAY register zero callbacks
255
255
  * and emit nothing. `attribution` works the same as `onEncodedData`.
256
256
  */
257
257
  onVideoRtp(callback: (rtpData: Buffer) => void, attribution?: BrokerConsumerAttribution): Unsubscribe;
@@ -39,7 +39,7 @@ export declare const TIMELAPSE_DENSE_FLOOR_SEC = 0.1;
39
39
  * Whether the notification's preview is a STILL or a short animation.
40
40
  *
41
41
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
42
- * rule)"* — his Scrypted advanced-notifier has a `gifRule`, and a ten-hour
42
+ * rule)"* — the other rules already offer an animated preview, and a ten-hour
43
43
  * night reads better as three seconds of motion than as one frame of it. Both
44
44
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
45
45
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -1,4 +1,4 @@
1
- const require_event_category = require("./event-category-BVo6ta6_.js");
1
+ const require_event_category = require("./event-category-BNJ9EE5B.js");
2
2
  let zod = require("zod");
3
3
  //#region src/interfaces/config-ui.ts
4
4
  /** Predefined tabs with standard label, icon, and sort order.
@@ -3808,7 +3808,10 @@ function createDeviceProxy(api, binding, opts) {
3808
3808
  pipelineRunner: {
3809
3809
  detachCamera: (input) => dispatchSystem("pipelineRunner", "detachCamera", "mutation", input),
3810
3810
  getCameraMetrics: (input) => dispatchSystem("pipelineRunner", "getCameraMetrics", "query", input),
3811
- runDetailSubtree: (input) => dispatchSystem("pipelineRunner", "runDetailSubtree", "mutation", input)
3811
+ runDetailSubtree: (input) => dispatchSystem("pipelineRunner", "runDetailSubtree", "mutation", input),
3812
+ parkTrackFrame: (input) => dispatchSystem("pipelineRunner", "parkTrackFrame", "mutation", input),
3813
+ getParkedTrackFrame: (input) => dispatchSystem("pipelineRunner", "getParkedTrackFrame", "query", input),
3814
+ releaseParkedTrackFrames: (input) => dispatchSystem("pipelineRunner", "releaseParkedTrackFrames", "mutation", input)
3812
3815
  },
3813
3816
  plateGallery: {
3814
3817
  listPlates: (input) => dispatchSystem("plateGallery", "listPlates", "query", input),
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-CnLqLOKs.mjs";
1
+ import { t as EventCategory } from "./event-category-DAXzJeTX.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/interfaces/config-ui.ts
4
4
  /** Predefined tabs with standard label, icon, and sort order.
@@ -3808,7 +3808,10 @@ function createDeviceProxy(api, binding, opts) {
3808
3808
  pipelineRunner: {
3809
3809
  detachCamera: (input) => dispatchSystem("pipelineRunner", "detachCamera", "mutation", input),
3810
3810
  getCameraMetrics: (input) => dispatchSystem("pipelineRunner", "getCameraMetrics", "query", input),
3811
- runDetailSubtree: (input) => dispatchSystem("pipelineRunner", "runDetailSubtree", "mutation", input)
3811
+ runDetailSubtree: (input) => dispatchSystem("pipelineRunner", "runDetailSubtree", "mutation", input),
3812
+ parkTrackFrame: (input) => dispatchSystem("pipelineRunner", "parkTrackFrame", "mutation", input),
3813
+ getParkedTrackFrame: (input) => dispatchSystem("pipelineRunner", "getParkedTrackFrame", "query", input),
3814
+ releaseParkedTrackFrames: (input) => dispatchSystem("pipelineRunner", "releaseParkedTrackFrames", "mutation", input)
3812
3815
  },
3813
3816
  plateGallery: {
3814
3817
  listPlates: (input) => dispatchSystem("plateGallery", "listPlates", "query", input),
@@ -288,11 +288,9 @@ export interface NativeRecoveryEvidence {
288
288
  * that has moved is not in a later frame, and its absence there is not evidence
289
289
  * it was never here.
290
290
  *
291
- * This is the same discipline Scrypted enforces structurally: its decoded frame
292
- * is invalidated the moment the `for await` body returns
293
- * (`plugins/python-codecs/src/libav.py:105-112`), so every second look — face
294
- * crop, embedding, retained detection image — is taken IN BAND
295
- * (`plugins/objectdetector/src/main.ts:512-520`).
291
+ * The discipline is structural: a decoded frame is invalidated the moment the
292
+ * `for await` body returns, so every second look — face crop, embedding,
293
+ * retained detection image — is taken IN BAND.
296
294
  *
297
295
  * ## What it is NOT
298
296
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.172",
3
+ "version": "1.2.175",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",