@camstack/types 1.1.43 → 1.1.45
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/advanced-notifier.cap.d.ts +4 -0
- package/dist/capabilities/cap-router-predicates.d.ts +60 -0
- package/dist/capabilities/capability-definition.d.ts +1 -1
- package/dist/capabilities/custom-model-registry.cap.d.ts +24 -0
- package/dist/capabilities/index.d.ts +14 -7
- package/dist/capabilities/llm-runtime.cap.d.ts +286 -0
- package/dist/capabilities/llm-shared.d.ts +104 -0
- package/dist/capabilities/llm.cap.d.ts +596 -0
- package/dist/capabilities/login-method.cap.d.ts +53 -7
- package/dist/capabilities/model-convert.cap.d.ts +13 -0
- package/dist/capabilities/model-distributor.cap.d.ts +26 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts +144 -25
- package/dist/capabilities/pipeline-executor.cap.d.ts +24 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +16 -0
- package/dist/capabilities/plate-gallery.cap.d.ts +114 -0
- package/dist/capabilities/platform-probe.cap.d.ts +9 -0
- package/dist/capabilities/scene-monitor.cap.d.ts +483 -0
- package/dist/capabilities/zone-analytics.cap.d.ts +78 -1
- package/dist/enums/event-category.d.ts +41 -0
- package/dist/generated/addon-api.d.ts +3135 -933
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/capability-router-map.d.ts +13 -4
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +3 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/provider-kind-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +3 -1
- package/dist/index.js +1307 -58
- package/dist/index.mjs +1272 -59
- package/dist/inference/runtime-capabilities.d.ts +1 -1
- package/dist/interfaces/addon.d.ts +5 -1
- package/dist/interfaces/advanced-notifier.d.ts +2 -0
- package/dist/interfaces/event-bus.d.ts +107 -2
- package/dist/interfaces/platform.d.ts +17 -0
- package/dist/{sleep-DmvEGsRg.js → sleep-BdhADtqT.js} +55 -0
- package/dist/{sleep-Baang_XW.mjs → sleep-_sv7WKkq.mjs} +55 -0
- package/dist/types/models.d.ts +38 -1
- package/dist/types/pipeline-step.d.ts +20 -2
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { ModelFormat } from '../types/models.js';
|
|
11
11
|
import type { HardwareInfo, PlatformScore } from '../interfaces/platform.js';
|
|
12
|
-
export type RuntimeId = 'onnx' | 'openvino' | 'coreml';
|
|
12
|
+
export type RuntimeId = 'onnx' | 'openvino' | 'coreml' | 'edgetpu';
|
|
13
13
|
export interface DeviceOption {
|
|
14
14
|
readonly value: string;
|
|
15
15
|
readonly label: string;
|
|
@@ -352,7 +352,7 @@ export interface IKernelHwAccel {
|
|
|
352
352
|
*/
|
|
353
353
|
readonly resolve: (prefer?: HwAccelBackend | 'none' | null) => Promise<HwAccelResolution>;
|
|
354
354
|
}
|
|
355
|
-
/** THIS node's inference accelerators (gpu/npu), probed locally in-process. */
|
|
355
|
+
/** THIS node's inference accelerators (gpu/npu/coral), probed locally in-process. */
|
|
356
356
|
export interface KernelInferenceHardware {
|
|
357
357
|
readonly gpu: {
|
|
358
358
|
readonly type: string;
|
|
@@ -360,6 +360,10 @@ export interface KernelInferenceHardware {
|
|
|
360
360
|
readonly npu: {
|
|
361
361
|
readonly type: string;
|
|
362
362
|
} | null;
|
|
363
|
+
/** Coral USB Edge TPU, when present (gates the `edgetpu` runtime). */
|
|
364
|
+
readonly coral?: {
|
|
365
|
+
readonly type: string;
|
|
366
|
+
} | null;
|
|
363
367
|
}
|
|
364
368
|
export interface IKernelInferenceEngine {
|
|
365
369
|
/**
|
|
@@ -27,6 +27,8 @@ export interface NotificationRule {
|
|
|
27
27
|
readonly text: string;
|
|
28
28
|
readonly minSimilarity: number;
|
|
29
29
|
};
|
|
30
|
+
/** Recognized-entity label match (face identity / plate vehicle name). */
|
|
31
|
+
readonly labels?: readonly string[];
|
|
30
32
|
};
|
|
31
33
|
readonly outputs: readonly string[];
|
|
32
34
|
readonly template?: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FrameResult, AudioResult } from '../types/detection.js';
|
|
1
|
+
import type { FrameResult, AudioResult, ObjectDetection } from '../types/detection.js';
|
|
2
2
|
import type { PipelineExecutionTrace, StepCadence } from '../types/pipeline-step.js';
|
|
3
3
|
import type { MotionRegion } from '../capabilities/motion-detection.cap.js';
|
|
4
4
|
import type { CameraPipelineConfig } from '../types/camera-pipeline.js';
|
|
@@ -120,6 +120,107 @@ export interface DetectionResultPayload {
|
|
|
120
120
|
readonly capturedAt?: number;
|
|
121
121
|
[key: string]: unknown;
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Enriched frame emitted on `pipeline-analytics.frame-tracked` after
|
|
125
|
+
* post-analysis detail synthesis. Carries overlay-ready detections:
|
|
126
|
+
* first-level roots pass through from the inference frame; `kind:'detail'`
|
|
127
|
+
* entries (face/plate) are SYNTHESIZED per frame from per-track detail
|
|
128
|
+
* state (two-plane re-injection).
|
|
129
|
+
*/
|
|
130
|
+
export interface PipelineAnalyticsFrameTrackedPayload {
|
|
131
|
+
readonly deviceId: number;
|
|
132
|
+
readonly timestamp: number;
|
|
133
|
+
readonly frameWidth: number;
|
|
134
|
+
readonly frameHeight: number;
|
|
135
|
+
readonly detections: readonly ObjectDetection[];
|
|
136
|
+
[key: string]: unknown;
|
|
137
|
+
}
|
|
138
|
+
/** Lifecycle phase of a tracked object: it appears (`start`), its best
|
|
139
|
+
* observation materially improves (`update`), then it ends (`end`). */
|
|
140
|
+
export type TrackLifecyclePhase = 'start' | 'update' | 'end';
|
|
141
|
+
/**
|
|
142
|
+
* Emitted on `pipeline-analytics.track-lifecycle` at three moments of a
|
|
143
|
+
* tracked object's life — `phase:'start'` when it first appears,
|
|
144
|
+
* `phase:'update'` when its best observation MATERIALLY improves (a
|
|
145
|
+
* clearer/larger frame, a newly-recognized identity or plate), and
|
|
146
|
+
* `phase:'end'` exactly once when it expires (TTL-gated). One typed
|
|
147
|
+
* payload shape across phases so a consumer subscribes once and branches
|
|
148
|
+
* on `phase`. Supersedes the thin `TrackStarted` / `TrackEnded` pair.
|
|
149
|
+
*
|
|
150
|
+
* Fields carry the BEST-so-far observation (final at `end`). `media`
|
|
151
|
+
* addresses the current representative image over HTTP. Telemetry
|
|
152
|
+
* semantics (D8): a lost event only misses a moment, never a correctness
|
|
153
|
+
* issue — the durable summary lives in the track store + events.
|
|
154
|
+
*/
|
|
155
|
+
export interface PipelineAnalyticsTrackLifecyclePayload {
|
|
156
|
+
readonly deviceId: number;
|
|
157
|
+
readonly trackId: string;
|
|
158
|
+
readonly phase: TrackLifecyclePhase;
|
|
159
|
+
/** Per-track observed-class set (deduplicated accumulator). */
|
|
160
|
+
readonly classes: readonly string[];
|
|
161
|
+
readonly bestClassName: string;
|
|
162
|
+
readonly bestConfidence: number;
|
|
163
|
+
/** Identity name / plate text, when resolved. */
|
|
164
|
+
readonly label?: string;
|
|
165
|
+
readonly identityId?: string;
|
|
166
|
+
readonly plateText?: string;
|
|
167
|
+
readonly firstSeen: number;
|
|
168
|
+
readonly lastSeen: number;
|
|
169
|
+
/** `lastSeen - firstSeen`; ~0 at start, grows over the track's life. */
|
|
170
|
+
readonly durationMs: number;
|
|
171
|
+
readonly zonesVisited?: readonly string[];
|
|
172
|
+
readonly totalDistance?: number;
|
|
173
|
+
readonly positionsCount?: number;
|
|
174
|
+
readonly importance?: number;
|
|
175
|
+
readonly importanceReason?: string;
|
|
176
|
+
/** Audio-classification labels heard on the camera during the track's
|
|
177
|
+
* life (score ≥ device `classificationMinScore`), aggregated per label —
|
|
178
|
+
* best-so-far at `update`, final at `end`. Mirrors `Track.audioLabels`. */
|
|
179
|
+
readonly audioLabels?: ReadonlyArray<{
|
|
180
|
+
readonly label: string;
|
|
181
|
+
readonly peakScore: number;
|
|
182
|
+
readonly count: number;
|
|
183
|
+
readonly firstAt: number;
|
|
184
|
+
readonly lastAt: number;
|
|
185
|
+
}>;
|
|
186
|
+
/** The current best image, addressable over HTTP. */
|
|
187
|
+
readonly media?: {
|
|
188
|
+
readonly keyFrameMediaKey?: string;
|
|
189
|
+
readonly bestCropMediaKey?: string;
|
|
190
|
+
readonly bestEventId?: string;
|
|
191
|
+
};
|
|
192
|
+
readonly embeddingId?: string;
|
|
193
|
+
readonly embeddingModelId?: string;
|
|
194
|
+
readonly [key: string]: unknown;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Emitted on `pipeline-analytics.face-gallery-changed` whenever a gallery
|
|
198
|
+
* face row changes. `kind:'buffered'` — a new face row was persisted
|
|
199
|
+
* (`FaceRecognizer.onTrackEnd`); `'assigned'` / `'unassigned'` — the face's
|
|
200
|
+
* identity link changed (`FaceGalleryProvider.assignFace`/`unassignFace`);
|
|
201
|
+
* `'deleted'` — the row was removed (`FaceGalleryProvider.deleteFace`).
|
|
202
|
+
* Telemetry semantics (D8): a lost event only delays a UI refresh, never a
|
|
203
|
+
* correctness issue. Consumer: `useFaceGalleryLiveRefresh` (admin-ui).
|
|
204
|
+
*/
|
|
205
|
+
export interface PipelineAnalyticsFaceGalleryChangedPayload {
|
|
206
|
+
readonly deviceId: number;
|
|
207
|
+
readonly faceId: string;
|
|
208
|
+
readonly kind: 'buffered' | 'assigned' | 'unassigned' | 'deleted';
|
|
209
|
+
readonly [key: string]: unknown;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Emitted when a plate-gallery row changes: `'buffered'` — a new read was
|
|
213
|
+
* persisted (`PlateRecognizer.onTrackEnd`); `'assigned'`/`'unassigned'` — the
|
|
214
|
+
* vehicle link changed (`PlateGalleryProvider`); `'deleted'` — the row was
|
|
215
|
+
* removed. Telemetry (D8): a lost event only delays a UI refresh. Consumer:
|
|
216
|
+
* `usePlateGalleryLiveRefresh` (admin-ui).
|
|
217
|
+
*/
|
|
218
|
+
export interface PipelineAnalyticsPlateGalleryChangedPayload {
|
|
219
|
+
readonly deviceId: number;
|
|
220
|
+
readonly plateId: string;
|
|
221
|
+
readonly kind: 'buffered' | 'assigned' | 'unassigned' | 'deleted';
|
|
222
|
+
readonly [key: string]: unknown;
|
|
223
|
+
}
|
|
123
224
|
/**
|
|
124
225
|
* Child steps enabled for a camera + their scheduling policy, as read
|
|
125
226
|
* from the pipeline catalog. Announced on `PipelineInferenceResultPayload`
|
|
@@ -602,6 +703,10 @@ export interface EventCatalog {
|
|
|
602
703
|
'detection.motion-analysis': MotionAnalysisPayload;
|
|
603
704
|
'detection.motion-zones-raw': MotionZonesRawPayload;
|
|
604
705
|
'motion.on-motion-changed': MotionOnMotionChangedPayload;
|
|
706
|
+
'pipeline-analytics.frame-tracked': PipelineAnalyticsFrameTrackedPayload;
|
|
707
|
+
'pipeline-analytics.track-lifecycle': PipelineAnalyticsTrackLifecyclePayload;
|
|
708
|
+
'pipeline-analytics.face-gallery-changed': PipelineAnalyticsFaceGalleryChangedPayload;
|
|
709
|
+
'pipeline-analytics.plate-gallery-changed': PipelineAnalyticsPlateGalleryChangedPayload;
|
|
605
710
|
/**
|
|
606
711
|
* On-board detection coming straight from the camera firmware (Reolink
|
|
607
712
|
* AI alarms, ONVIF analytics, etc.) — as opposed to `detection.result`
|
|
@@ -841,7 +946,7 @@ export interface EventCatalog {
|
|
|
841
946
|
* every state change. Phase 2.
|
|
842
947
|
*/
|
|
843
948
|
'pipeline.engine-provisioning': {
|
|
844
|
-
readonly runtimeId: 'onnx' | 'openvino' | 'coreml' | null;
|
|
949
|
+
readonly runtimeId: 'onnx' | 'openvino' | 'coreml' | 'edgetpu' | null;
|
|
845
950
|
readonly device: string | null;
|
|
846
951
|
readonly state: 'idle' | 'installing' | 'verifying' | 'ready' | 'failed';
|
|
847
952
|
readonly progress?: number;
|
|
@@ -8,6 +8,12 @@ export interface HardwareInfo {
|
|
|
8
8
|
readonly availableRAM_MB: number;
|
|
9
9
|
readonly gpu: GpuInfo | null;
|
|
10
10
|
readonly npu: NpuInfo | null;
|
|
11
|
+
/**
|
|
12
|
+
* Coral USB Edge TPU, when present. Optional so existing HardwareInfo
|
|
13
|
+
* construction sites and older cross-node probe reports stay valid; absent /
|
|
14
|
+
* null ⇒ no Coral ⇒ the `edgetpu` runtime is withheld.
|
|
15
|
+
*/
|
|
16
|
+
readonly coral?: CoralInfo | null;
|
|
11
17
|
}
|
|
12
18
|
export interface GpuInfo {
|
|
13
19
|
readonly type: 'nvidia' | 'amd' | 'intel' | 'apple';
|
|
@@ -17,6 +23,17 @@ export interface GpuInfo {
|
|
|
17
23
|
export interface NpuInfo {
|
|
18
24
|
readonly type: 'apple-ane' | 'intel-npu';
|
|
19
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Coral USB Edge TPU (Google Coral). A discrete USB inference accelerator that
|
|
28
|
+
* coexists with the host GPU/NPU (e.g. the Unraid hub carries both an Intel NPU
|
|
29
|
+
* and a Coral). Tracked separately from {@link NpuInfo} so its presence gates
|
|
30
|
+
* the `edgetpu` inference runtime without colliding with the Intel-NPU signal.
|
|
31
|
+
*/
|
|
32
|
+
export interface CoralInfo {
|
|
33
|
+
readonly type: 'coral-edgetpu';
|
|
34
|
+
/** Bus location hint (e.g. `usb`), informational. */
|
|
35
|
+
readonly bus?: string;
|
|
36
|
+
}
|
|
20
37
|
/** A probed backend with availability and score */
|
|
21
38
|
export interface PlatformScore {
|
|
22
39
|
readonly runtime: 'node' | 'python';
|
|
@@ -474,10 +474,51 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
474
474
|
EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
|
|
475
475
|
EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
|
|
476
476
|
EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
|
|
477
|
+
/**
|
|
478
|
+
* Unified track-lifecycle event: ONE category carrying `phase:
|
|
479
|
+
* 'start' | 'update' | 'end'` with a rich, typed
|
|
480
|
+
* `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
|
|
481
|
+
* `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
|
|
482
|
+
* pair — a consumer subscribes once and branches on `phase`.
|
|
483
|
+
*/
|
|
484
|
+
EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
|
|
485
|
+
/**
|
|
486
|
+
* @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
|
|
487
|
+
* (`phase:'start'`). Kept as a soft alias — no known subscribers.
|
|
488
|
+
*/
|
|
477
489
|
EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
|
|
490
|
+
/**
|
|
491
|
+
* @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
|
|
492
|
+
* (`phase:'end'`). Kept as a soft alias — no known subscribers.
|
|
493
|
+
*/
|
|
478
494
|
EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
|
|
479
495
|
EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
|
|
480
496
|
EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
|
|
497
|
+
/**
|
|
498
|
+
* Fired by `addon-post-analysis` when a parked (stationary) object appears
|
|
499
|
+
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
500
|
+
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
501
|
+
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
502
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
503
|
+
*/
|
|
504
|
+
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
505
|
+
/**
|
|
506
|
+
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
507
|
+
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
508
|
+
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
509
|
+
* removed. Telemetry semantics (D8): a lost event only delays a refresh,
|
|
510
|
+
* never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
|
|
511
|
+
*/
|
|
512
|
+
EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
|
|
513
|
+
/**
|
|
514
|
+
* Fired by `addon-post-analysis` whenever a gallery plate row changes:
|
|
515
|
+
* `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
|
|
516
|
+
* `'assigned'` / `'unassigned'` its vehicle link changed
|
|
517
|
+
* (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
|
|
518
|
+
* semantics (D8): a lost event only delays a refresh, never a correctness
|
|
519
|
+
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
520
|
+
*/
|
|
521
|
+
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
481
522
|
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
482
523
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
483
524
|
/**
|
|
@@ -3159,6 +3200,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3159
3200
|
pressureSensor: createSliceHandle(stateSource, binding.deviceId, "pressure-sensor"),
|
|
3160
3201
|
privacyMask: createSliceHandle(stateSource, binding.deviceId, "privacy-mask"),
|
|
3161
3202
|
ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
|
|
3203
|
+
sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
|
|
3162
3204
|
scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
|
|
3163
3205
|
smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
|
|
3164
3206
|
streamParams: createSliceHandle(stateSource, binding.deviceId, "stream-params"),
|
|
@@ -3411,6 +3453,9 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3411
3453
|
getKeyEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getKeyEvents", "query", input),
|
|
3412
3454
|
getEventDensity: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventDensity", "query", input),
|
|
3413
3455
|
pruneEventsBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEventsBefore", "mutation", input),
|
|
3456
|
+
pruneTracksBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneTracksBefore", "mutation", input),
|
|
3457
|
+
wipeAllAnalytics: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "wipeAllAnalytics", "mutation", input),
|
|
3458
|
+
deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
|
|
3414
3459
|
getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
|
|
3415
3460
|
getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
|
|
3416
3461
|
searchObjectEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "searchObjectEvents", "query", input),
|
|
@@ -3447,6 +3492,16 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3447
3492
|
setSettings: (input) => dispatch("ptz-autotrack", "ptzAutotrack", "setSettings", "mutation", input)
|
|
3448
3493
|
},
|
|
3449
3494
|
reboot: { reboot: (input) => dispatch("reboot", "reboot", "reboot", "mutation", input) },
|
|
3495
|
+
sceneMonitor: {
|
|
3496
|
+
listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
|
|
3497
|
+
createScene: (input) => dispatch("scene-monitor", "sceneMonitor", "createScene", "mutation", input),
|
|
3498
|
+
updateScene: (input) => dispatch("scene-monitor", "sceneMonitor", "updateScene", "mutation", input),
|
|
3499
|
+
deleteScene: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteScene", "mutation", input),
|
|
3500
|
+
captureReference: (input) => dispatch("scene-monitor", "sceneMonitor", "captureReference", "mutation", input),
|
|
3501
|
+
deleteReference: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteReference", "mutation", input),
|
|
3502
|
+
recheckNow: (input) => dispatch("scene-monitor", "sceneMonitor", "recheckNow", "mutation", input),
|
|
3503
|
+
getStatus: (input) => dispatch("scene-monitor", "sceneMonitor", "getStatus", "query", input)
|
|
3504
|
+
},
|
|
3450
3505
|
scriptRunner: {
|
|
3451
3506
|
run: (input) => dispatch("script-runner", "scriptRunner", "run", "mutation", input),
|
|
3452
3507
|
stop: (input) => dispatch("script-runner", "scriptRunner", "stop", "mutation", input),
|
|
@@ -474,10 +474,51 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
474
474
|
EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
|
|
475
475
|
EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
|
|
476
476
|
EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
|
|
477
|
+
/**
|
|
478
|
+
* Unified track-lifecycle event: ONE category carrying `phase:
|
|
479
|
+
* 'start' | 'update' | 'end'` with a rich, typed
|
|
480
|
+
* `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
|
|
481
|
+
* `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
|
|
482
|
+
* pair — a consumer subscribes once and branches on `phase`.
|
|
483
|
+
*/
|
|
484
|
+
EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
|
|
485
|
+
/**
|
|
486
|
+
* @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
|
|
487
|
+
* (`phase:'start'`). Kept as a soft alias — no known subscribers.
|
|
488
|
+
*/
|
|
477
489
|
EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
|
|
490
|
+
/**
|
|
491
|
+
* @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
|
|
492
|
+
* (`phase:'end'`). Kept as a soft alias — no known subscribers.
|
|
493
|
+
*/
|
|
478
494
|
EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
|
|
479
495
|
EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
|
|
480
496
|
EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
|
|
497
|
+
/**
|
|
498
|
+
* Fired by `addon-post-analysis` when a parked (stationary) object appears
|
|
499
|
+
* (a track was promoted to a stationary-registry entry) or departs (the
|
|
500
|
+
* object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
|
|
501
|
+
* the dedicated "Stationary" section — never the live event feed. Payload:
|
|
502
|
+
* `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
|
|
503
|
+
*/
|
|
504
|
+
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
505
|
+
/**
|
|
506
|
+
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
507
|
+
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
508
|
+
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
509
|
+
* removed. Telemetry semantics (D8): a lost event only delays a refresh,
|
|
510
|
+
* never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
|
|
511
|
+
*/
|
|
512
|
+
EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
|
|
513
|
+
/**
|
|
514
|
+
* Fired by `addon-post-analysis` whenever a gallery plate row changes:
|
|
515
|
+
* `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
|
|
516
|
+
* `'assigned'` / `'unassigned'` its vehicle link changed
|
|
517
|
+
* (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
|
|
518
|
+
* semantics (D8): a lost event only delays a refresh, never a correctness
|
|
519
|
+
* issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
|
|
520
|
+
*/
|
|
521
|
+
EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
|
|
481
522
|
EventCategory["FrigateLiveEvent"] = "frigate.live-event";
|
|
482
523
|
EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
|
|
483
524
|
/**
|
|
@@ -3159,6 +3200,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3159
3200
|
pressureSensor: createSliceHandle(stateSource, binding.deviceId, "pressure-sensor"),
|
|
3160
3201
|
privacyMask: createSliceHandle(stateSource, binding.deviceId, "privacy-mask"),
|
|
3161
3202
|
ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
|
|
3203
|
+
sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
|
|
3162
3204
|
scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
|
|
3163
3205
|
smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
|
|
3164
3206
|
streamParams: createSliceHandle(stateSource, binding.deviceId, "stream-params"),
|
|
@@ -3411,6 +3453,9 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3411
3453
|
getKeyEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getKeyEvents", "query", input),
|
|
3412
3454
|
getEventDensity: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventDensity", "query", input),
|
|
3413
3455
|
pruneEventsBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEventsBefore", "mutation", input),
|
|
3456
|
+
pruneTracksBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneTracksBefore", "mutation", input),
|
|
3457
|
+
wipeAllAnalytics: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "wipeAllAnalytics", "mutation", input),
|
|
3458
|
+
deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
|
|
3414
3459
|
getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
|
|
3415
3460
|
getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
|
|
3416
3461
|
searchObjectEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "searchObjectEvents", "query", input),
|
|
@@ -3447,6 +3492,16 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3447
3492
|
setSettings: (input) => dispatch("ptz-autotrack", "ptzAutotrack", "setSettings", "mutation", input)
|
|
3448
3493
|
},
|
|
3449
3494
|
reboot: { reboot: (input) => dispatch("reboot", "reboot", "reboot", "mutation", input) },
|
|
3495
|
+
sceneMonitor: {
|
|
3496
|
+
listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
|
|
3497
|
+
createScene: (input) => dispatch("scene-monitor", "sceneMonitor", "createScene", "mutation", input),
|
|
3498
|
+
updateScene: (input) => dispatch("scene-monitor", "sceneMonitor", "updateScene", "mutation", input),
|
|
3499
|
+
deleteScene: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteScene", "mutation", input),
|
|
3500
|
+
captureReference: (input) => dispatch("scene-monitor", "sceneMonitor", "captureReference", "mutation", input),
|
|
3501
|
+
deleteReference: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteReference", "mutation", input),
|
|
3502
|
+
recheckNow: (input) => dispatch("scene-monitor", "sceneMonitor", "recheckNow", "mutation", input),
|
|
3503
|
+
getStatus: (input) => dispatch("scene-monitor", "sceneMonitor", "getStatus", "query", input)
|
|
3504
|
+
},
|
|
3450
3505
|
scriptRunner: {
|
|
3451
3506
|
run: (input) => dispatch("script-runner", "scriptRunner", "run", "mutation", input),
|
|
3452
3507
|
stop: (input) => dispatch("script-runner", "scriptRunner", "stop", "mutation", input),
|
package/dist/types/models.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ClassMapDefinition, LabelDefinition } from './labels.js';
|
|
3
|
-
|
|
3
|
+
import type { PostprocessorType } from './pipeline-step.js';
|
|
4
|
+
export declare const MODEL_FORMATS: readonly ["onnx", "coreml", "openvino", "tflite", "pt", "gguf"];
|
|
4
5
|
export type ModelFormat = (typeof MODEL_FORMATS)[number];
|
|
5
6
|
export type ModelOutputFormat = 'yolo' | 'ssd' | 'embedding' | 'classification' | 'ocr' | 'segmentation';
|
|
6
7
|
/**
|
|
@@ -93,6 +94,16 @@ export declare const ModelFormatsSchema: z.ZodObject<{
|
|
|
93
94
|
python: "python";
|
|
94
95
|
}>>>>;
|
|
95
96
|
}, z.core.$strip>>;
|
|
97
|
+
gguf: z.ZodOptional<z.ZodObject<{
|
|
98
|
+
url: z.ZodString;
|
|
99
|
+
sizeMB: z.ZodNumber;
|
|
100
|
+
isDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
102
|
+
runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
103
|
+
node: "node";
|
|
104
|
+
python: "python";
|
|
105
|
+
}>>>>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
96
107
|
}, z.core.$strip>;
|
|
97
108
|
/**
|
|
98
109
|
* Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
|
|
@@ -171,11 +182,22 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
171
182
|
python: "python";
|
|
172
183
|
}>>>>;
|
|
173
184
|
}, z.core.$strip>>;
|
|
185
|
+
gguf: z.ZodOptional<z.ZodObject<{
|
|
186
|
+
url: z.ZodString;
|
|
187
|
+
sizeMB: z.ZodNumber;
|
|
188
|
+
isDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
+
files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
190
|
+
runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
191
|
+
node: "node";
|
|
192
|
+
python: "python";
|
|
193
|
+
}>>>>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
174
195
|
}, z.core.$strip>;
|
|
175
196
|
inputSize: z.ZodObject<{
|
|
176
197
|
width: z.ZodNumber;
|
|
177
198
|
height: z.ZodNumber;
|
|
178
199
|
}, z.core.$strip>;
|
|
200
|
+
inputChannels: z.ZodOptional<z.ZodNumber>;
|
|
179
201
|
labels: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
180
202
|
id: z.ZodString;
|
|
181
203
|
name: z.ZodString;
|
|
@@ -196,6 +218,7 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
196
218
|
letterbox: "letterbox";
|
|
197
219
|
resize: "resize";
|
|
198
220
|
}>>;
|
|
221
|
+
postprocessor: z.ZodOptional<z.ZodCustom<PostprocessorType, PostprocessorType>>;
|
|
199
222
|
faceAlignment: z.ZodOptional<z.ZodBoolean>;
|
|
200
223
|
extraFiles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
201
224
|
url: z.ZodString;
|
|
@@ -312,6 +335,7 @@ export declare const ConvertArtifactSchema: z.ZodObject<{
|
|
|
312
335
|
openvino: "openvino";
|
|
313
336
|
tflite: "tflite";
|
|
314
337
|
pt: "pt";
|
|
338
|
+
gguf: "gguf";
|
|
315
339
|
}>;
|
|
316
340
|
precision: z.ZodOptional<z.ZodEnum<{
|
|
317
341
|
int8: "int8";
|
|
@@ -378,11 +402,22 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
378
402
|
python: "python";
|
|
379
403
|
}>>>>;
|
|
380
404
|
}, z.core.$strip>>;
|
|
405
|
+
gguf: z.ZodOptional<z.ZodObject<{
|
|
406
|
+
url: z.ZodString;
|
|
407
|
+
sizeMB: z.ZodNumber;
|
|
408
|
+
isDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
410
|
+
runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
411
|
+
node: "node";
|
|
412
|
+
python: "python";
|
|
413
|
+
}>>>>;
|
|
414
|
+
}, z.core.$strip>>;
|
|
381
415
|
}, z.core.$strip>;
|
|
382
416
|
inputSize: z.ZodObject<{
|
|
383
417
|
width: z.ZodNumber;
|
|
384
418
|
height: z.ZodNumber;
|
|
385
419
|
}, z.core.$strip>;
|
|
420
|
+
inputChannels: z.ZodOptional<z.ZodNumber>;
|
|
386
421
|
labels: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
387
422
|
id: z.ZodString;
|
|
388
423
|
name: z.ZodString;
|
|
@@ -403,6 +438,7 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
403
438
|
letterbox: "letterbox";
|
|
404
439
|
resize: "resize";
|
|
405
440
|
}>>;
|
|
441
|
+
postprocessor: z.ZodOptional<z.ZodCustom<PostprocessorType, PostprocessorType>>;
|
|
406
442
|
faceAlignment: z.ZodOptional<z.ZodBoolean>;
|
|
407
443
|
extraFiles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
408
444
|
url: z.ZodString;
|
|
@@ -436,6 +472,7 @@ export declare const ConvertResultSchema: z.ZodObject<{
|
|
|
436
472
|
openvino: "openvino";
|
|
437
473
|
tflite: "tflite";
|
|
438
474
|
pt: "pt";
|
|
475
|
+
gguf: "gguf";
|
|
439
476
|
}>;
|
|
440
477
|
precision: z.ZodOptional<z.ZodEnum<{
|
|
441
478
|
int8: "int8";
|
|
@@ -12,7 +12,7 @@ export interface IPipelineStep {
|
|
|
12
12
|
readonly definition: StepDefinition;
|
|
13
13
|
getConfigSchema(): readonly ConfigField[];
|
|
14
14
|
}
|
|
15
|
-
export type PostprocessorType = 'yolo' | 'yolo-seg' | 'scrfd' | 'arcface' | 'clip' | 'softmax' | 'ctc' | 'saliency' | 'yamnet';
|
|
15
|
+
export type PostprocessorType = 'yolo' | 'ssd' | 'yolo-seg' | 'scrfd' | 'arcface' | 'clip' | 'softmax' | 'ctc' | 'saliency' | 'yamnet';
|
|
16
16
|
export interface StepDefinition {
|
|
17
17
|
/** Unique step identifier (e.g., 'object-detection', 'face-detection') */
|
|
18
18
|
readonly id: string;
|
|
@@ -108,8 +108,26 @@ export interface StepCadence {
|
|
|
108
108
|
export interface PoolModelConfig {
|
|
109
109
|
/** Absolute path to the model file (.mlpackage, .xml, .onnx) */
|
|
110
110
|
readonly path: string;
|
|
111
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Largest dimension of model input (e.g., 640 for 640×640). Retained for
|
|
113
|
+
* backward compatibility and as the fallback when the explicit
|
|
114
|
+
* `inputWidth`/`inputHeight` are absent (square models).
|
|
115
|
+
*/
|
|
112
116
|
readonly inputSize: number;
|
|
117
|
+
/**
|
|
118
|
+
* Explicit input WIDTH in px. Present for every model; equals `inputSize`
|
|
119
|
+
* for square inputs. Non-square recognizers (plate-OCR VGG `384×64`) rely on
|
|
120
|
+
* this so the Python preprocess resizes to the real aspect instead of
|
|
121
|
+
* squaring the crop.
|
|
122
|
+
*/
|
|
123
|
+
readonly inputWidth?: number;
|
|
124
|
+
/** Explicit input HEIGHT in px (see {@link inputWidth}). */
|
|
125
|
+
readonly inputHeight?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Channel count of the model input tensor. Omit ⇒ 3 (RGB). `1` selects the
|
|
128
|
+
* grayscale CTC recognizer path (EasyOCR-normalized `[N,1,H,W]`).
|
|
129
|
+
*/
|
|
130
|
+
readonly inputChannels?: number;
|
|
113
131
|
/** How to preprocess the image before inference */
|
|
114
132
|
readonly preprocessMode: 'letterbox' | 'resize';
|
|
115
133
|
/** Postprocessor to apply to raw output in Python */
|