@camstack/addon-provider-reolink 1.1.27 → 1.1.28
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 +202 -7
- package/dist/addon.mjs +202 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -26,7 +26,7 @@ let fs_promises = require("fs/promises");
|
|
|
26
26
|
fs_promises = require_chunk.__toESM(fs_promises, 1);
|
|
27
27
|
let node_os = require("node:os");
|
|
28
28
|
node_os = require_chunk.__toESM(node_os);
|
|
29
|
-
//#region ../types/dist/event-category-
|
|
29
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
30
30
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
31
31
|
EventCategory["SystemBoot"] = "system.boot";
|
|
32
32
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -179,6 +179,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
179
179
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
180
180
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
181
181
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
182
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
183
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
184
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
185
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
186
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
182
187
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
183
188
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
184
189
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -468,6 +473,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
468
473
|
*/
|
|
469
474
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
470
475
|
/**
|
|
476
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
477
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
478
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
479
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
480
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
481
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
482
|
+
* this bus topic drives notifier rules + live UI. See
|
|
483
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
484
|
+
*/
|
|
485
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
486
|
+
/**
|
|
487
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
488
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
489
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
490
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
491
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
492
|
+
*/
|
|
493
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
494
|
+
/**
|
|
471
495
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
472
496
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
473
497
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5206,6 +5230,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5206
5230
|
};
|
|
5207
5231
|
return inst;
|
|
5208
5232
|
}
|
|
5233
|
+
//#endregion
|
|
5234
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5235
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5236
|
+
var ZodIssueCode$16 = {
|
|
5237
|
+
invalid_type: "invalid_type",
|
|
5238
|
+
too_big: "too_big",
|
|
5239
|
+
too_small: "too_small",
|
|
5240
|
+
invalid_format: "invalid_format",
|
|
5241
|
+
not_multiple_of: "not_multiple_of",
|
|
5242
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5243
|
+
invalid_union: "invalid_union",
|
|
5244
|
+
invalid_key: "invalid_key",
|
|
5245
|
+
invalid_element: "invalid_element",
|
|
5246
|
+
invalid_value: "invalid_value",
|
|
5247
|
+
custom: "custom"
|
|
5248
|
+
};
|
|
5249
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5250
|
+
var ZodFirstPartyTypeKind$16;
|
|
5251
|
+
ZodFirstPartyTypeKind$16 || (ZodFirstPartyTypeKind$16 = {});
|
|
5209
5252
|
Object.fromEntries([
|
|
5210
5253
|
{
|
|
5211
5254
|
id: "overview",
|
|
@@ -14909,7 +14952,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14909
14952
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14910
14953
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14911
14954
|
*/
|
|
14912
|
-
var ZoneRuleStageEnum = _enum([
|
|
14955
|
+
var ZoneRuleStageEnum = _enum([
|
|
14956
|
+
"motion",
|
|
14957
|
+
"detection",
|
|
14958
|
+
"package"
|
|
14959
|
+
]);
|
|
14913
14960
|
/**
|
|
14914
14961
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14915
14962
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -15003,16 +15050,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
15003
15050
|
})
|
|
15004
15051
|
},
|
|
15005
15052
|
/**
|
|
15006
|
-
* Runtime-state slice —
|
|
15053
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
15007
15054
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
15008
|
-
* of
|
|
15009
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
15055
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
15056
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
15010
15057
|
* complete current set. Consumers that only care about one stage
|
|
15011
15058
|
* just read the matching property.
|
|
15059
|
+
*
|
|
15060
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
15061
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
15062
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
15063
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
15064
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
15065
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
15012
15066
|
*/
|
|
15013
15067
|
runtimeState: object({
|
|
15014
15068
|
motion: array(ZoneRuleSchema).readonly(),
|
|
15015
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
15069
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
15070
|
+
package: array(ZoneRuleSchema).readonly()
|
|
15016
15071
|
})
|
|
15017
15072
|
},
|
|
15018
15073
|
zones: zonesCapability
|
|
@@ -18986,6 +19041,7 @@ var EventKindIconSchema = _enum([
|
|
|
18986
19041
|
"smoke",
|
|
18987
19042
|
"water",
|
|
18988
19043
|
"button",
|
|
19044
|
+
"package",
|
|
18989
19045
|
"generic"
|
|
18990
19046
|
]);
|
|
18991
19047
|
var EventKindCategorySchema = _enum([
|
|
@@ -18993,7 +19049,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18993
19049
|
"audio",
|
|
18994
19050
|
"detection",
|
|
18995
19051
|
"sensor",
|
|
18996
|
-
"custom"
|
|
19052
|
+
"custom",
|
|
19053
|
+
"package"
|
|
18997
19054
|
]);
|
|
18998
19055
|
var EventKindDescriptorSchema = object({
|
|
18999
19056
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22808,6 +22865,108 @@ method(object({
|
|
|
22808
22865
|
auth: "admin"
|
|
22809
22866
|
});
|
|
22810
22867
|
/**
|
|
22868
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22869
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22870
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22871
|
+
* delete-after-download.
|
|
22872
|
+
*
|
|
22873
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22874
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22875
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22876
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22877
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22878
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22879
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22880
|
+
*/
|
|
22881
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22882
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22883
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22884
|
+
var ExportTimelapseSchema = object({
|
|
22885
|
+
everyMs: number().int().positive(),
|
|
22886
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22887
|
+
});
|
|
22888
|
+
/**
|
|
22889
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22890
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22891
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22892
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22893
|
+
*/
|
|
22894
|
+
var ExportOptionsSchema = object({
|
|
22895
|
+
speed: ExportSpeedSchema.optional(),
|
|
22896
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22897
|
+
includeAudio: boolean(),
|
|
22898
|
+
maxLifeMs: number().int().positive(),
|
|
22899
|
+
deleteAfterDownload: boolean(),
|
|
22900
|
+
title: string().max(200).optional()
|
|
22901
|
+
}).superRefine((v, ctx) => {
|
|
22902
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22903
|
+
code: ZodIssueCode$16.custom,
|
|
22904
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22905
|
+
path: ["timelapse"]
|
|
22906
|
+
});
|
|
22907
|
+
});
|
|
22908
|
+
var ExportStateSchema = _enum([
|
|
22909
|
+
"queued",
|
|
22910
|
+
"rendering",
|
|
22911
|
+
"ready",
|
|
22912
|
+
"failed",
|
|
22913
|
+
"expired",
|
|
22914
|
+
"deleted"
|
|
22915
|
+
]);
|
|
22916
|
+
/** One export job / history row. */
|
|
22917
|
+
var ExportRecordSchema = object({
|
|
22918
|
+
id: string(),
|
|
22919
|
+
deviceId: number(),
|
|
22920
|
+
profile: string(),
|
|
22921
|
+
fromMs: number(),
|
|
22922
|
+
toMs: number(),
|
|
22923
|
+
options: ExportOptionsSchema,
|
|
22924
|
+
state: ExportStateSchema,
|
|
22925
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22926
|
+
progressPct: number().nullable(),
|
|
22927
|
+
/** File size once ready; null before. */
|
|
22928
|
+
fileBytes: number().nullable(),
|
|
22929
|
+
expiresAt: number(),
|
|
22930
|
+
deleteAfterDownload: boolean(),
|
|
22931
|
+
/** Epoch of the first complete download; null until then. */
|
|
22932
|
+
downloadedAt: number().nullable(),
|
|
22933
|
+
createdAt: number(),
|
|
22934
|
+
/** User id/name that requested the export. */
|
|
22935
|
+
createdBy: string(),
|
|
22936
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22937
|
+
error: string().nullable()
|
|
22938
|
+
});
|
|
22939
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22940
|
+
var ExportDownloadSchema = object({
|
|
22941
|
+
url: string(),
|
|
22942
|
+
endpoints: array(string())
|
|
22943
|
+
});
|
|
22944
|
+
method(object({
|
|
22945
|
+
deviceId: number(),
|
|
22946
|
+
profile: string(),
|
|
22947
|
+
fromMs: number(),
|
|
22948
|
+
toMs: number(),
|
|
22949
|
+
options: ExportOptionsSchema
|
|
22950
|
+
}), ExportRecordSchema, {
|
|
22951
|
+
kind: "mutation",
|
|
22952
|
+
auth: "protected"
|
|
22953
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22954
|
+
kind: "query",
|
|
22955
|
+
auth: "protected"
|
|
22956
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22957
|
+
kind: "query",
|
|
22958
|
+
auth: "protected"
|
|
22959
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22960
|
+
kind: "mutation",
|
|
22961
|
+
auth: "protected"
|
|
22962
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22963
|
+
kind: "mutation",
|
|
22964
|
+
auth: "protected"
|
|
22965
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22966
|
+
kind: "query",
|
|
22967
|
+
auth: "protected"
|
|
22968
|
+
});
|
|
22969
|
+
/**
|
|
22811
22970
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22812
22971
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22813
22972
|
* `deviceId`.
|
|
@@ -26942,6 +27101,42 @@ Object.freeze({
|
|
|
26942
27101
|
addonId: null,
|
|
26943
27102
|
access: "create"
|
|
26944
27103
|
},
|
|
27104
|
+
"recordingExport.cancelExport": {
|
|
27105
|
+
capName: "recordingExport",
|
|
27106
|
+
capScope: "system",
|
|
27107
|
+
addonId: null,
|
|
27108
|
+
access: "create"
|
|
27109
|
+
},
|
|
27110
|
+
"recordingExport.createExport": {
|
|
27111
|
+
capName: "recordingExport",
|
|
27112
|
+
capScope: "system",
|
|
27113
|
+
addonId: null,
|
|
27114
|
+
access: "create"
|
|
27115
|
+
},
|
|
27116
|
+
"recordingExport.deleteExport": {
|
|
27117
|
+
capName: "recordingExport",
|
|
27118
|
+
capScope: "system",
|
|
27119
|
+
addonId: null,
|
|
27120
|
+
access: "delete"
|
|
27121
|
+
},
|
|
27122
|
+
"recordingExport.getDownloadUrl": {
|
|
27123
|
+
capName: "recordingExport",
|
|
27124
|
+
capScope: "system",
|
|
27125
|
+
addonId: null,
|
|
27126
|
+
access: "view"
|
|
27127
|
+
},
|
|
27128
|
+
"recordingExport.getExport": {
|
|
27129
|
+
capName: "recordingExport",
|
|
27130
|
+
capScope: "system",
|
|
27131
|
+
addonId: null,
|
|
27132
|
+
access: "view"
|
|
27133
|
+
},
|
|
27134
|
+
"recordingExport.listExports": {
|
|
27135
|
+
capName: "recordingExport",
|
|
27136
|
+
capScope: "system",
|
|
27137
|
+
addonId: null,
|
|
27138
|
+
access: "view"
|
|
27139
|
+
},
|
|
26945
27140
|
"sceneMonitor.captureReference": {
|
|
26946
27141
|
capName: "scene-monitor",
|
|
26947
27142
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import netImpl from "net";
|
|
|
21
21
|
import { fileURLToPath } from "url";
|
|
22
22
|
import { mkdir } from "fs/promises";
|
|
23
23
|
import os from "node:os";
|
|
24
|
-
//#region ../types/dist/event-category-
|
|
24
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
25
25
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
26
26
|
EventCategory["SystemBoot"] = "system.boot";
|
|
27
27
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -174,6 +174,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
174
174
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
175
175
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
176
176
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
177
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
178
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
179
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
180
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
181
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
177
182
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
178
183
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
179
184
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -463,6 +468,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
463
468
|
*/
|
|
464
469
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
465
470
|
/**
|
|
471
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
472
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
473
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
474
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
475
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
476
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
477
|
+
* this bus topic drives notifier rules + live UI. See
|
|
478
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
479
|
+
*/
|
|
480
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
481
|
+
/**
|
|
482
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
483
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
484
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
485
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
486
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
487
|
+
*/
|
|
488
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
489
|
+
/**
|
|
466
490
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
467
491
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
468
492
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5201,6 +5225,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5201
5225
|
};
|
|
5202
5226
|
return inst;
|
|
5203
5227
|
}
|
|
5228
|
+
//#endregion
|
|
5229
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5230
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5231
|
+
var ZodIssueCode$16 = {
|
|
5232
|
+
invalid_type: "invalid_type",
|
|
5233
|
+
too_big: "too_big",
|
|
5234
|
+
too_small: "too_small",
|
|
5235
|
+
invalid_format: "invalid_format",
|
|
5236
|
+
not_multiple_of: "not_multiple_of",
|
|
5237
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5238
|
+
invalid_union: "invalid_union",
|
|
5239
|
+
invalid_key: "invalid_key",
|
|
5240
|
+
invalid_element: "invalid_element",
|
|
5241
|
+
invalid_value: "invalid_value",
|
|
5242
|
+
custom: "custom"
|
|
5243
|
+
};
|
|
5244
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5245
|
+
var ZodFirstPartyTypeKind$16;
|
|
5246
|
+
ZodFirstPartyTypeKind$16 || (ZodFirstPartyTypeKind$16 = {});
|
|
5204
5247
|
Object.fromEntries([
|
|
5205
5248
|
{
|
|
5206
5249
|
id: "overview",
|
|
@@ -14904,7 +14947,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14904
14947
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14905
14948
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14906
14949
|
*/
|
|
14907
|
-
var ZoneRuleStageEnum = _enum([
|
|
14950
|
+
var ZoneRuleStageEnum = _enum([
|
|
14951
|
+
"motion",
|
|
14952
|
+
"detection",
|
|
14953
|
+
"package"
|
|
14954
|
+
]);
|
|
14908
14955
|
/**
|
|
14909
14956
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14910
14957
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14998,16 +15045,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14998
15045
|
})
|
|
14999
15046
|
},
|
|
15000
15047
|
/**
|
|
15001
|
-
* Runtime-state slice —
|
|
15048
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
15002
15049
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
15003
|
-
* of
|
|
15004
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
15050
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
15051
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
15005
15052
|
* complete current set. Consumers that only care about one stage
|
|
15006
15053
|
* just read the matching property.
|
|
15054
|
+
*
|
|
15055
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
15056
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
15057
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
15058
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
15059
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
15060
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
15007
15061
|
*/
|
|
15008
15062
|
runtimeState: object({
|
|
15009
15063
|
motion: array(ZoneRuleSchema).readonly(),
|
|
15010
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
15064
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
15065
|
+
package: array(ZoneRuleSchema).readonly()
|
|
15011
15066
|
})
|
|
15012
15067
|
},
|
|
15013
15068
|
zones: zonesCapability
|
|
@@ -18981,6 +19036,7 @@ var EventKindIconSchema = _enum([
|
|
|
18981
19036
|
"smoke",
|
|
18982
19037
|
"water",
|
|
18983
19038
|
"button",
|
|
19039
|
+
"package",
|
|
18984
19040
|
"generic"
|
|
18985
19041
|
]);
|
|
18986
19042
|
var EventKindCategorySchema = _enum([
|
|
@@ -18988,7 +19044,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18988
19044
|
"audio",
|
|
18989
19045
|
"detection",
|
|
18990
19046
|
"sensor",
|
|
18991
|
-
"custom"
|
|
19047
|
+
"custom",
|
|
19048
|
+
"package"
|
|
18992
19049
|
]);
|
|
18993
19050
|
var EventKindDescriptorSchema = object({
|
|
18994
19051
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22803,6 +22860,108 @@ method(object({
|
|
|
22803
22860
|
auth: "admin"
|
|
22804
22861
|
});
|
|
22805
22862
|
/**
|
|
22863
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22864
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22865
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22866
|
+
* delete-after-download.
|
|
22867
|
+
*
|
|
22868
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22869
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22870
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22871
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22872
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22873
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22874
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22875
|
+
*/
|
|
22876
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22877
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22878
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22879
|
+
var ExportTimelapseSchema = object({
|
|
22880
|
+
everyMs: number().int().positive(),
|
|
22881
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22882
|
+
});
|
|
22883
|
+
/**
|
|
22884
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22885
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22886
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22887
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22888
|
+
*/
|
|
22889
|
+
var ExportOptionsSchema = object({
|
|
22890
|
+
speed: ExportSpeedSchema.optional(),
|
|
22891
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22892
|
+
includeAudio: boolean(),
|
|
22893
|
+
maxLifeMs: number().int().positive(),
|
|
22894
|
+
deleteAfterDownload: boolean(),
|
|
22895
|
+
title: string().max(200).optional()
|
|
22896
|
+
}).superRefine((v, ctx) => {
|
|
22897
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22898
|
+
code: ZodIssueCode$16.custom,
|
|
22899
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22900
|
+
path: ["timelapse"]
|
|
22901
|
+
});
|
|
22902
|
+
});
|
|
22903
|
+
var ExportStateSchema = _enum([
|
|
22904
|
+
"queued",
|
|
22905
|
+
"rendering",
|
|
22906
|
+
"ready",
|
|
22907
|
+
"failed",
|
|
22908
|
+
"expired",
|
|
22909
|
+
"deleted"
|
|
22910
|
+
]);
|
|
22911
|
+
/** One export job / history row. */
|
|
22912
|
+
var ExportRecordSchema = object({
|
|
22913
|
+
id: string(),
|
|
22914
|
+
deviceId: number(),
|
|
22915
|
+
profile: string(),
|
|
22916
|
+
fromMs: number(),
|
|
22917
|
+
toMs: number(),
|
|
22918
|
+
options: ExportOptionsSchema,
|
|
22919
|
+
state: ExportStateSchema,
|
|
22920
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22921
|
+
progressPct: number().nullable(),
|
|
22922
|
+
/** File size once ready; null before. */
|
|
22923
|
+
fileBytes: number().nullable(),
|
|
22924
|
+
expiresAt: number(),
|
|
22925
|
+
deleteAfterDownload: boolean(),
|
|
22926
|
+
/** Epoch of the first complete download; null until then. */
|
|
22927
|
+
downloadedAt: number().nullable(),
|
|
22928
|
+
createdAt: number(),
|
|
22929
|
+
/** User id/name that requested the export. */
|
|
22930
|
+
createdBy: string(),
|
|
22931
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22932
|
+
error: string().nullable()
|
|
22933
|
+
});
|
|
22934
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22935
|
+
var ExportDownloadSchema = object({
|
|
22936
|
+
url: string(),
|
|
22937
|
+
endpoints: array(string())
|
|
22938
|
+
});
|
|
22939
|
+
method(object({
|
|
22940
|
+
deviceId: number(),
|
|
22941
|
+
profile: string(),
|
|
22942
|
+
fromMs: number(),
|
|
22943
|
+
toMs: number(),
|
|
22944
|
+
options: ExportOptionsSchema
|
|
22945
|
+
}), ExportRecordSchema, {
|
|
22946
|
+
kind: "mutation",
|
|
22947
|
+
auth: "protected"
|
|
22948
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22949
|
+
kind: "query",
|
|
22950
|
+
auth: "protected"
|
|
22951
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22952
|
+
kind: "query",
|
|
22953
|
+
auth: "protected"
|
|
22954
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22955
|
+
kind: "mutation",
|
|
22956
|
+
auth: "protected"
|
|
22957
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22958
|
+
kind: "mutation",
|
|
22959
|
+
auth: "protected"
|
|
22960
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22961
|
+
kind: "query",
|
|
22962
|
+
auth: "protected"
|
|
22963
|
+
});
|
|
22964
|
+
/**
|
|
22806
22965
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22807
22966
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22808
22967
|
* `deviceId`.
|
|
@@ -26937,6 +27096,42 @@ Object.freeze({
|
|
|
26937
27096
|
addonId: null,
|
|
26938
27097
|
access: "create"
|
|
26939
27098
|
},
|
|
27099
|
+
"recordingExport.cancelExport": {
|
|
27100
|
+
capName: "recordingExport",
|
|
27101
|
+
capScope: "system",
|
|
27102
|
+
addonId: null,
|
|
27103
|
+
access: "create"
|
|
27104
|
+
},
|
|
27105
|
+
"recordingExport.createExport": {
|
|
27106
|
+
capName: "recordingExport",
|
|
27107
|
+
capScope: "system",
|
|
27108
|
+
addonId: null,
|
|
27109
|
+
access: "create"
|
|
27110
|
+
},
|
|
27111
|
+
"recordingExport.deleteExport": {
|
|
27112
|
+
capName: "recordingExport",
|
|
27113
|
+
capScope: "system",
|
|
27114
|
+
addonId: null,
|
|
27115
|
+
access: "delete"
|
|
27116
|
+
},
|
|
27117
|
+
"recordingExport.getDownloadUrl": {
|
|
27118
|
+
capName: "recordingExport",
|
|
27119
|
+
capScope: "system",
|
|
27120
|
+
addonId: null,
|
|
27121
|
+
access: "view"
|
|
27122
|
+
},
|
|
27123
|
+
"recordingExport.getExport": {
|
|
27124
|
+
capName: "recordingExport",
|
|
27125
|
+
capScope: "system",
|
|
27126
|
+
addonId: null,
|
|
27127
|
+
access: "view"
|
|
27128
|
+
},
|
|
27129
|
+
"recordingExport.listExports": {
|
|
27130
|
+
capName: "recordingExport",
|
|
27131
|
+
capScope: "system",
|
|
27132
|
+
addonId: null,
|
|
27133
|
+
access: "view"
|
|
27134
|
+
},
|
|
26940
27135
|
"sceneMonitor.captureReference": {
|
|
26941
27136
|
capName: "scene-monitor",
|
|
26942
27137
|
capScope: "device",
|