@camstack/addon-provider-rtsp 1.1.24 → 1.1.26
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 +228 -8
- package/dist/addon.mjs +228 -8
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
//#endregion
|
|
24
24
|
let node_net = require("node:net");
|
|
25
25
|
node_net = __toESM(node_net);
|
|
26
|
-
//#region ../types/dist/event-category-
|
|
26
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
27
27
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
28
28
|
EventCategory["SystemBoot"] = "system.boot";
|
|
29
29
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -176,6 +176,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
176
176
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
177
177
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
178
178
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
179
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
180
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
181
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
182
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
183
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
179
184
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
180
185
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
181
186
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -465,6 +470,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
465
470
|
*/
|
|
466
471
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
467
472
|
/**
|
|
473
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
474
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
475
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
476
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
477
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
478
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
479
|
+
* this bus topic drives notifier rules + live UI. See
|
|
480
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
481
|
+
*/
|
|
482
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
483
|
+
/**
|
|
484
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
485
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
486
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
487
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
488
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
489
|
+
*/
|
|
490
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
491
|
+
/**
|
|
468
492
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
469
493
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
470
494
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5217,6 +5241,25 @@ function preprocess(fn, schema) {
|
|
|
5217
5241
|
out: schema
|
|
5218
5242
|
});
|
|
5219
5243
|
}
|
|
5244
|
+
//#endregion
|
|
5245
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5246
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5247
|
+
var ZodIssueCode = {
|
|
5248
|
+
invalid_type: "invalid_type",
|
|
5249
|
+
too_big: "too_big",
|
|
5250
|
+
too_small: "too_small",
|
|
5251
|
+
invalid_format: "invalid_format",
|
|
5252
|
+
not_multiple_of: "not_multiple_of",
|
|
5253
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5254
|
+
invalid_union: "invalid_union",
|
|
5255
|
+
invalid_key: "invalid_key",
|
|
5256
|
+
invalid_element: "invalid_element",
|
|
5257
|
+
invalid_value: "invalid_value",
|
|
5258
|
+
custom: "custom"
|
|
5259
|
+
};
|
|
5260
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5261
|
+
var ZodFirstPartyTypeKind;
|
|
5262
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5220
5263
|
Object.fromEntries([
|
|
5221
5264
|
{
|
|
5222
5265
|
id: "overview",
|
|
@@ -7263,6 +7306,24 @@ var RecordingRetentionSchema = object({
|
|
|
7263
7306
|
maxSizeGb: number().min(0).optional()
|
|
7264
7307
|
});
|
|
7265
7308
|
/**
|
|
7309
|
+
* Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
|
|
7310
|
+
* sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
|
|
7311
|
+
* previews at. Five graduated steps; absent on a config = `standard` (the
|
|
7312
|
+
* shipped default, matching `sheet-geometry`/`sheet-composer`).
|
|
7313
|
+
*
|
|
7314
|
+
* Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
|
|
7315
|
+
* Each window's index sidecar carries its own tile dims, so a camera whose
|
|
7316
|
+
* preset changed over time renders every historical window at the dims it was
|
|
7317
|
+
* written with.
|
|
7318
|
+
*/
|
|
7319
|
+
var ScrubThumbnailPresetSchema = _enum([
|
|
7320
|
+
"minimal",
|
|
7321
|
+
"low",
|
|
7322
|
+
"standard",
|
|
7323
|
+
"high",
|
|
7324
|
+
"max"
|
|
7325
|
+
]);
|
|
7326
|
+
/**
|
|
7266
7327
|
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
7267
7328
|
*
|
|
7268
7329
|
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
@@ -7299,7 +7360,14 @@ var RecordingConfigSchema = object({
|
|
|
7299
7360
|
* derived into bands once via `migrateConfigToBands`.
|
|
7300
7361
|
*/
|
|
7301
7362
|
bands: array(RecordingBandSchema).optional(),
|
|
7302
|
-
retention: RecordingRetentionSchema.optional()
|
|
7363
|
+
retention: RecordingRetentionSchema.optional(),
|
|
7364
|
+
/**
|
|
7365
|
+
* Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
|
|
7366
|
+
* timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
|
|
7367
|
+
* windows only — existing sheets are immutable, and each window's index
|
|
7368
|
+
* carries its own tile dims so mixed-preset history renders correctly.
|
|
7369
|
+
*/
|
|
7370
|
+
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7303
7371
|
});
|
|
7304
7372
|
/**
|
|
7305
7373
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -14755,7 +14823,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14755
14823
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14756
14824
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14757
14825
|
*/
|
|
14758
|
-
var ZoneRuleStageEnum = _enum([
|
|
14826
|
+
var ZoneRuleStageEnum = _enum([
|
|
14827
|
+
"motion",
|
|
14828
|
+
"detection",
|
|
14829
|
+
"package"
|
|
14830
|
+
]);
|
|
14759
14831
|
/**
|
|
14760
14832
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14761
14833
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14849,16 +14921,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14849
14921
|
})
|
|
14850
14922
|
},
|
|
14851
14923
|
/**
|
|
14852
|
-
* Runtime-state slice —
|
|
14924
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14853
14925
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14854
|
-
* of
|
|
14855
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
14926
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
14927
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14856
14928
|
* complete current set. Consumers that only care about one stage
|
|
14857
14929
|
* just read the matching property.
|
|
14930
|
+
*
|
|
14931
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
14932
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
14933
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
14934
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
14935
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
14936
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
14858
14937
|
*/
|
|
14859
14938
|
runtimeState: object({
|
|
14860
14939
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14861
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
14940
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
14941
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14862
14942
|
})
|
|
14863
14943
|
},
|
|
14864
14944
|
zones: zonesCapability
|
|
@@ -18820,6 +18900,7 @@ var EventKindIconSchema = _enum([
|
|
|
18820
18900
|
"smoke",
|
|
18821
18901
|
"water",
|
|
18822
18902
|
"button",
|
|
18903
|
+
"package",
|
|
18823
18904
|
"generic"
|
|
18824
18905
|
]);
|
|
18825
18906
|
var EventKindCategorySchema = _enum([
|
|
@@ -18827,7 +18908,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18827
18908
|
"audio",
|
|
18828
18909
|
"detection",
|
|
18829
18910
|
"sensor",
|
|
18830
|
-
"custom"
|
|
18911
|
+
"custom",
|
|
18912
|
+
"package"
|
|
18831
18913
|
]);
|
|
18832
18914
|
var EventKindDescriptorSchema = object({
|
|
18833
18915
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22524,6 +22606,108 @@ method(object({
|
|
|
22524
22606
|
auth: "admin"
|
|
22525
22607
|
});
|
|
22526
22608
|
/**
|
|
22609
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22610
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22611
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22612
|
+
* delete-after-download.
|
|
22613
|
+
*
|
|
22614
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22615
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22616
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22617
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22618
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22619
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22620
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22621
|
+
*/
|
|
22622
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22623
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22624
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22625
|
+
var ExportTimelapseSchema = object({
|
|
22626
|
+
everyMs: number().int().positive(),
|
|
22627
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22628
|
+
});
|
|
22629
|
+
/**
|
|
22630
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22631
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22632
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22633
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22634
|
+
*/
|
|
22635
|
+
var ExportOptionsSchema = object({
|
|
22636
|
+
speed: ExportSpeedSchema.optional(),
|
|
22637
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22638
|
+
includeAudio: boolean(),
|
|
22639
|
+
maxLifeMs: number().int().positive(),
|
|
22640
|
+
deleteAfterDownload: boolean(),
|
|
22641
|
+
title: string().max(200).optional()
|
|
22642
|
+
}).superRefine((v, ctx) => {
|
|
22643
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22644
|
+
code: ZodIssueCode.custom,
|
|
22645
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22646
|
+
path: ["timelapse"]
|
|
22647
|
+
});
|
|
22648
|
+
});
|
|
22649
|
+
var ExportStateSchema = _enum([
|
|
22650
|
+
"queued",
|
|
22651
|
+
"rendering",
|
|
22652
|
+
"ready",
|
|
22653
|
+
"failed",
|
|
22654
|
+
"expired",
|
|
22655
|
+
"deleted"
|
|
22656
|
+
]);
|
|
22657
|
+
/** One export job / history row. */
|
|
22658
|
+
var ExportRecordSchema = object({
|
|
22659
|
+
id: string(),
|
|
22660
|
+
deviceId: number(),
|
|
22661
|
+
profile: string(),
|
|
22662
|
+
fromMs: number(),
|
|
22663
|
+
toMs: number(),
|
|
22664
|
+
options: ExportOptionsSchema,
|
|
22665
|
+
state: ExportStateSchema,
|
|
22666
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22667
|
+
progressPct: number().nullable(),
|
|
22668
|
+
/** File size once ready; null before. */
|
|
22669
|
+
fileBytes: number().nullable(),
|
|
22670
|
+
expiresAt: number(),
|
|
22671
|
+
deleteAfterDownload: boolean(),
|
|
22672
|
+
/** Epoch of the first complete download; null until then. */
|
|
22673
|
+
downloadedAt: number().nullable(),
|
|
22674
|
+
createdAt: number(),
|
|
22675
|
+
/** User id/name that requested the export. */
|
|
22676
|
+
createdBy: string(),
|
|
22677
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22678
|
+
error: string().nullable()
|
|
22679
|
+
});
|
|
22680
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22681
|
+
var ExportDownloadSchema = object({
|
|
22682
|
+
url: string(),
|
|
22683
|
+
endpoints: array(string())
|
|
22684
|
+
});
|
|
22685
|
+
method(object({
|
|
22686
|
+
deviceId: number(),
|
|
22687
|
+
profile: string(),
|
|
22688
|
+
fromMs: number(),
|
|
22689
|
+
toMs: number(),
|
|
22690
|
+
options: ExportOptionsSchema
|
|
22691
|
+
}), ExportRecordSchema, {
|
|
22692
|
+
kind: "mutation",
|
|
22693
|
+
auth: "protected"
|
|
22694
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22695
|
+
kind: "query",
|
|
22696
|
+
auth: "protected"
|
|
22697
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22698
|
+
kind: "query",
|
|
22699
|
+
auth: "protected"
|
|
22700
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22701
|
+
kind: "mutation",
|
|
22702
|
+
auth: "protected"
|
|
22703
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22704
|
+
kind: "mutation",
|
|
22705
|
+
auth: "protected"
|
|
22706
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22707
|
+
kind: "query",
|
|
22708
|
+
auth: "protected"
|
|
22709
|
+
});
|
|
22710
|
+
/**
|
|
22527
22711
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22528
22712
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22529
22713
|
* `deviceId`.
|
|
@@ -26460,6 +26644,42 @@ Object.freeze({
|
|
|
26460
26644
|
addonId: null,
|
|
26461
26645
|
access: "create"
|
|
26462
26646
|
},
|
|
26647
|
+
"recordingExport.cancelExport": {
|
|
26648
|
+
capName: "recordingExport",
|
|
26649
|
+
capScope: "system",
|
|
26650
|
+
addonId: null,
|
|
26651
|
+
access: "create"
|
|
26652
|
+
},
|
|
26653
|
+
"recordingExport.createExport": {
|
|
26654
|
+
capName: "recordingExport",
|
|
26655
|
+
capScope: "system",
|
|
26656
|
+
addonId: null,
|
|
26657
|
+
access: "create"
|
|
26658
|
+
},
|
|
26659
|
+
"recordingExport.deleteExport": {
|
|
26660
|
+
capName: "recordingExport",
|
|
26661
|
+
capScope: "system",
|
|
26662
|
+
addonId: null,
|
|
26663
|
+
access: "delete"
|
|
26664
|
+
},
|
|
26665
|
+
"recordingExport.getDownloadUrl": {
|
|
26666
|
+
capName: "recordingExport",
|
|
26667
|
+
capScope: "system",
|
|
26668
|
+
addonId: null,
|
|
26669
|
+
access: "view"
|
|
26670
|
+
},
|
|
26671
|
+
"recordingExport.getExport": {
|
|
26672
|
+
capName: "recordingExport",
|
|
26673
|
+
capScope: "system",
|
|
26674
|
+
addonId: null,
|
|
26675
|
+
access: "view"
|
|
26676
|
+
},
|
|
26677
|
+
"recordingExport.listExports": {
|
|
26678
|
+
capName: "recordingExport",
|
|
26679
|
+
capScope: "system",
|
|
26680
|
+
addonId: null,
|
|
26681
|
+
access: "view"
|
|
26682
|
+
},
|
|
26463
26683
|
"sceneMonitor.captureReference": {
|
|
26464
26684
|
capName: "scene-monitor",
|
|
26465
26685
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import net from "node:net";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -152,6 +152,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
152
152
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
153
153
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
154
154
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
155
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
156
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
157
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
158
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
159
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
155
160
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
156
161
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
157
162
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -441,6 +446,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
441
446
|
*/
|
|
442
447
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
443
448
|
/**
|
|
449
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
450
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
451
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
452
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
453
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
454
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
455
|
+
* this bus topic drives notifier rules + live UI. See
|
|
456
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
457
|
+
*/
|
|
458
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
459
|
+
/**
|
|
460
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
461
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
462
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
463
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
464
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
465
|
+
*/
|
|
466
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
467
|
+
/**
|
|
444
468
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
445
469
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
446
470
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5193,6 +5217,25 @@ function preprocess(fn, schema) {
|
|
|
5193
5217
|
out: schema
|
|
5194
5218
|
});
|
|
5195
5219
|
}
|
|
5220
|
+
//#endregion
|
|
5221
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5222
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5223
|
+
var ZodIssueCode = {
|
|
5224
|
+
invalid_type: "invalid_type",
|
|
5225
|
+
too_big: "too_big",
|
|
5226
|
+
too_small: "too_small",
|
|
5227
|
+
invalid_format: "invalid_format",
|
|
5228
|
+
not_multiple_of: "not_multiple_of",
|
|
5229
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5230
|
+
invalid_union: "invalid_union",
|
|
5231
|
+
invalid_key: "invalid_key",
|
|
5232
|
+
invalid_element: "invalid_element",
|
|
5233
|
+
invalid_value: "invalid_value",
|
|
5234
|
+
custom: "custom"
|
|
5235
|
+
};
|
|
5236
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5237
|
+
var ZodFirstPartyTypeKind;
|
|
5238
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5196
5239
|
Object.fromEntries([
|
|
5197
5240
|
{
|
|
5198
5241
|
id: "overview",
|
|
@@ -7239,6 +7282,24 @@ var RecordingRetentionSchema = object({
|
|
|
7239
7282
|
maxSizeGb: number().min(0).optional()
|
|
7240
7283
|
});
|
|
7241
7284
|
/**
|
|
7285
|
+
* Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
|
|
7286
|
+
* sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
|
|
7287
|
+
* previews at. Five graduated steps; absent on a config = `standard` (the
|
|
7288
|
+
* shipped default, matching `sheet-geometry`/`sheet-composer`).
|
|
7289
|
+
*
|
|
7290
|
+
* Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
|
|
7291
|
+
* Each window's index sidecar carries its own tile dims, so a camera whose
|
|
7292
|
+
* preset changed over time renders every historical window at the dims it was
|
|
7293
|
+
* written with.
|
|
7294
|
+
*/
|
|
7295
|
+
var ScrubThumbnailPresetSchema = _enum([
|
|
7296
|
+
"minimal",
|
|
7297
|
+
"low",
|
|
7298
|
+
"standard",
|
|
7299
|
+
"high",
|
|
7300
|
+
"max"
|
|
7301
|
+
]);
|
|
7302
|
+
/**
|
|
7242
7303
|
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
7243
7304
|
*
|
|
7244
7305
|
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
@@ -7275,7 +7336,14 @@ var RecordingConfigSchema = object({
|
|
|
7275
7336
|
* derived into bands once via `migrateConfigToBands`.
|
|
7276
7337
|
*/
|
|
7277
7338
|
bands: array(RecordingBandSchema).optional(),
|
|
7278
|
-
retention: RecordingRetentionSchema.optional()
|
|
7339
|
+
retention: RecordingRetentionSchema.optional(),
|
|
7340
|
+
/**
|
|
7341
|
+
* Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
|
|
7342
|
+
* timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
|
|
7343
|
+
* windows only — existing sheets are immutable, and each window's index
|
|
7344
|
+
* carries its own tile dims so mixed-preset history renders correctly.
|
|
7345
|
+
*/
|
|
7346
|
+
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7279
7347
|
});
|
|
7280
7348
|
/**
|
|
7281
7349
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -14731,7 +14799,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14731
14799
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14732
14800
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14733
14801
|
*/
|
|
14734
|
-
var ZoneRuleStageEnum = _enum([
|
|
14802
|
+
var ZoneRuleStageEnum = _enum([
|
|
14803
|
+
"motion",
|
|
14804
|
+
"detection",
|
|
14805
|
+
"package"
|
|
14806
|
+
]);
|
|
14735
14807
|
/**
|
|
14736
14808
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14737
14809
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14825,16 +14897,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14825
14897
|
})
|
|
14826
14898
|
},
|
|
14827
14899
|
/**
|
|
14828
|
-
* Runtime-state slice —
|
|
14900
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14829
14901
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14830
|
-
* of
|
|
14831
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
14902
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
14903
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14832
14904
|
* complete current set. Consumers that only care about one stage
|
|
14833
14905
|
* just read the matching property.
|
|
14906
|
+
*
|
|
14907
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
14908
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
14909
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
14910
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
14911
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
14912
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
14834
14913
|
*/
|
|
14835
14914
|
runtimeState: object({
|
|
14836
14915
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14837
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
14916
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
14917
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14838
14918
|
})
|
|
14839
14919
|
},
|
|
14840
14920
|
zones: zonesCapability
|
|
@@ -18796,6 +18876,7 @@ var EventKindIconSchema = _enum([
|
|
|
18796
18876
|
"smoke",
|
|
18797
18877
|
"water",
|
|
18798
18878
|
"button",
|
|
18879
|
+
"package",
|
|
18799
18880
|
"generic"
|
|
18800
18881
|
]);
|
|
18801
18882
|
var EventKindCategorySchema = _enum([
|
|
@@ -18803,7 +18884,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18803
18884
|
"audio",
|
|
18804
18885
|
"detection",
|
|
18805
18886
|
"sensor",
|
|
18806
|
-
"custom"
|
|
18887
|
+
"custom",
|
|
18888
|
+
"package"
|
|
18807
18889
|
]);
|
|
18808
18890
|
var EventKindDescriptorSchema = object({
|
|
18809
18891
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22500,6 +22582,108 @@ method(object({
|
|
|
22500
22582
|
auth: "admin"
|
|
22501
22583
|
});
|
|
22502
22584
|
/**
|
|
22585
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22586
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22587
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22588
|
+
* delete-after-download.
|
|
22589
|
+
*
|
|
22590
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22591
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22592
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22593
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22594
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22595
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22596
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22597
|
+
*/
|
|
22598
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22599
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22600
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22601
|
+
var ExportTimelapseSchema = object({
|
|
22602
|
+
everyMs: number().int().positive(),
|
|
22603
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22604
|
+
});
|
|
22605
|
+
/**
|
|
22606
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22607
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22608
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22609
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22610
|
+
*/
|
|
22611
|
+
var ExportOptionsSchema = object({
|
|
22612
|
+
speed: ExportSpeedSchema.optional(),
|
|
22613
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22614
|
+
includeAudio: boolean(),
|
|
22615
|
+
maxLifeMs: number().int().positive(),
|
|
22616
|
+
deleteAfterDownload: boolean(),
|
|
22617
|
+
title: string().max(200).optional()
|
|
22618
|
+
}).superRefine((v, ctx) => {
|
|
22619
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22620
|
+
code: ZodIssueCode.custom,
|
|
22621
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22622
|
+
path: ["timelapse"]
|
|
22623
|
+
});
|
|
22624
|
+
});
|
|
22625
|
+
var ExportStateSchema = _enum([
|
|
22626
|
+
"queued",
|
|
22627
|
+
"rendering",
|
|
22628
|
+
"ready",
|
|
22629
|
+
"failed",
|
|
22630
|
+
"expired",
|
|
22631
|
+
"deleted"
|
|
22632
|
+
]);
|
|
22633
|
+
/** One export job / history row. */
|
|
22634
|
+
var ExportRecordSchema = object({
|
|
22635
|
+
id: string(),
|
|
22636
|
+
deviceId: number(),
|
|
22637
|
+
profile: string(),
|
|
22638
|
+
fromMs: number(),
|
|
22639
|
+
toMs: number(),
|
|
22640
|
+
options: ExportOptionsSchema,
|
|
22641
|
+
state: ExportStateSchema,
|
|
22642
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22643
|
+
progressPct: number().nullable(),
|
|
22644
|
+
/** File size once ready; null before. */
|
|
22645
|
+
fileBytes: number().nullable(),
|
|
22646
|
+
expiresAt: number(),
|
|
22647
|
+
deleteAfterDownload: boolean(),
|
|
22648
|
+
/** Epoch of the first complete download; null until then. */
|
|
22649
|
+
downloadedAt: number().nullable(),
|
|
22650
|
+
createdAt: number(),
|
|
22651
|
+
/** User id/name that requested the export. */
|
|
22652
|
+
createdBy: string(),
|
|
22653
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22654
|
+
error: string().nullable()
|
|
22655
|
+
});
|
|
22656
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22657
|
+
var ExportDownloadSchema = object({
|
|
22658
|
+
url: string(),
|
|
22659
|
+
endpoints: array(string())
|
|
22660
|
+
});
|
|
22661
|
+
method(object({
|
|
22662
|
+
deviceId: number(),
|
|
22663
|
+
profile: string(),
|
|
22664
|
+
fromMs: number(),
|
|
22665
|
+
toMs: number(),
|
|
22666
|
+
options: ExportOptionsSchema
|
|
22667
|
+
}), ExportRecordSchema, {
|
|
22668
|
+
kind: "mutation",
|
|
22669
|
+
auth: "protected"
|
|
22670
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22671
|
+
kind: "query",
|
|
22672
|
+
auth: "protected"
|
|
22673
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22674
|
+
kind: "query",
|
|
22675
|
+
auth: "protected"
|
|
22676
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22677
|
+
kind: "mutation",
|
|
22678
|
+
auth: "protected"
|
|
22679
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22680
|
+
kind: "mutation",
|
|
22681
|
+
auth: "protected"
|
|
22682
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22683
|
+
kind: "query",
|
|
22684
|
+
auth: "protected"
|
|
22685
|
+
});
|
|
22686
|
+
/**
|
|
22503
22687
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22504
22688
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22505
22689
|
* `deviceId`.
|
|
@@ -26436,6 +26620,42 @@ Object.freeze({
|
|
|
26436
26620
|
addonId: null,
|
|
26437
26621
|
access: "create"
|
|
26438
26622
|
},
|
|
26623
|
+
"recordingExport.cancelExport": {
|
|
26624
|
+
capName: "recordingExport",
|
|
26625
|
+
capScope: "system",
|
|
26626
|
+
addonId: null,
|
|
26627
|
+
access: "create"
|
|
26628
|
+
},
|
|
26629
|
+
"recordingExport.createExport": {
|
|
26630
|
+
capName: "recordingExport",
|
|
26631
|
+
capScope: "system",
|
|
26632
|
+
addonId: null,
|
|
26633
|
+
access: "create"
|
|
26634
|
+
},
|
|
26635
|
+
"recordingExport.deleteExport": {
|
|
26636
|
+
capName: "recordingExport",
|
|
26637
|
+
capScope: "system",
|
|
26638
|
+
addonId: null,
|
|
26639
|
+
access: "delete"
|
|
26640
|
+
},
|
|
26641
|
+
"recordingExport.getDownloadUrl": {
|
|
26642
|
+
capName: "recordingExport",
|
|
26643
|
+
capScope: "system",
|
|
26644
|
+
addonId: null,
|
|
26645
|
+
access: "view"
|
|
26646
|
+
},
|
|
26647
|
+
"recordingExport.getExport": {
|
|
26648
|
+
capName: "recordingExport",
|
|
26649
|
+
capScope: "system",
|
|
26650
|
+
addonId: null,
|
|
26651
|
+
access: "view"
|
|
26652
|
+
},
|
|
26653
|
+
"recordingExport.listExports": {
|
|
26654
|
+
capName: "recordingExport",
|
|
26655
|
+
capScope: "system",
|
|
26656
|
+
addonId: null,
|
|
26657
|
+
access: "view"
|
|
26658
|
+
},
|
|
26439
26659
|
"sceneMonitor.captureReference": {
|
|
26440
26660
|
capName: "scene-monitor",
|
|
26441
26661
|
capScope: "device",
|