@camstack/addon-provider-dreo 0.1.20 → 0.1.21
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
|
@@ -35,7 +35,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
|
|
|
35
35
|
//#endregion
|
|
36
36
|
let crypto$1 = require("crypto");
|
|
37
37
|
let events = require("events");
|
|
38
|
-
//#region ../types/dist/event-category-
|
|
38
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
39
39
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
40
40
|
EventCategory["SystemBoot"] = "system.boot";
|
|
41
41
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -188,6 +188,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
188
188
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
189
189
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
190
190
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
191
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
192
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
193
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
194
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
195
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
191
196
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
192
197
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
193
198
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -477,6 +482,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
477
482
|
*/
|
|
478
483
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
479
484
|
/**
|
|
485
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
486
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
487
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
488
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
489
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
490
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
491
|
+
* this bus topic drives notifier rules + live UI. See
|
|
492
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
493
|
+
*/
|
|
494
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
495
|
+
/**
|
|
496
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
497
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
498
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
499
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
500
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
501
|
+
*/
|
|
502
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
503
|
+
/**
|
|
480
504
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
481
505
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
482
506
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5215,6 +5239,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5215
5239
|
};
|
|
5216
5240
|
return inst;
|
|
5217
5241
|
}
|
|
5242
|
+
//#endregion
|
|
5243
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5244
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5245
|
+
var ZodIssueCode = {
|
|
5246
|
+
invalid_type: "invalid_type",
|
|
5247
|
+
too_big: "too_big",
|
|
5248
|
+
too_small: "too_small",
|
|
5249
|
+
invalid_format: "invalid_format",
|
|
5250
|
+
not_multiple_of: "not_multiple_of",
|
|
5251
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5252
|
+
invalid_union: "invalid_union",
|
|
5253
|
+
invalid_key: "invalid_key",
|
|
5254
|
+
invalid_element: "invalid_element",
|
|
5255
|
+
invalid_value: "invalid_value",
|
|
5256
|
+
custom: "custom"
|
|
5257
|
+
};
|
|
5258
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5259
|
+
var ZodFirstPartyTypeKind;
|
|
5260
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5218
5261
|
Object.fromEntries([
|
|
5219
5262
|
{
|
|
5220
5263
|
id: "overview",
|
|
@@ -14692,7 +14735,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14692
14735
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14693
14736
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14694
14737
|
*/
|
|
14695
|
-
var ZoneRuleStageEnum = _enum([
|
|
14738
|
+
var ZoneRuleStageEnum = _enum([
|
|
14739
|
+
"motion",
|
|
14740
|
+
"detection",
|
|
14741
|
+
"package"
|
|
14742
|
+
]);
|
|
14696
14743
|
/**
|
|
14697
14744
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14698
14745
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14786,16 +14833,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14786
14833
|
})
|
|
14787
14834
|
},
|
|
14788
14835
|
/**
|
|
14789
|
-
* Runtime-state slice —
|
|
14836
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14790
14837
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14791
|
-
* of
|
|
14792
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
14838
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
14839
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14793
14840
|
* complete current set. Consumers that only care about one stage
|
|
14794
14841
|
* just read the matching property.
|
|
14842
|
+
*
|
|
14843
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
14844
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
14845
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
14846
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
14847
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
14848
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
14795
14849
|
*/
|
|
14796
14850
|
runtimeState: object({
|
|
14797
14851
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14798
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
14852
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
14853
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14799
14854
|
})
|
|
14800
14855
|
},
|
|
14801
14856
|
zones: zonesCapability
|
|
@@ -18774,6 +18829,7 @@ var EventKindIconSchema = _enum([
|
|
|
18774
18829
|
"smoke",
|
|
18775
18830
|
"water",
|
|
18776
18831
|
"button",
|
|
18832
|
+
"package",
|
|
18777
18833
|
"generic"
|
|
18778
18834
|
]);
|
|
18779
18835
|
var EventKindCategorySchema = _enum([
|
|
@@ -18781,7 +18837,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18781
18837
|
"audio",
|
|
18782
18838
|
"detection",
|
|
18783
18839
|
"sensor",
|
|
18784
|
-
"custom"
|
|
18840
|
+
"custom",
|
|
18841
|
+
"package"
|
|
18785
18842
|
]);
|
|
18786
18843
|
var EventKindDescriptorSchema = object({
|
|
18787
18844
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22427,6 +22484,108 @@ method(object({
|
|
|
22427
22484
|
auth: "admin"
|
|
22428
22485
|
});
|
|
22429
22486
|
/**
|
|
22487
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22488
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22489
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22490
|
+
* delete-after-download.
|
|
22491
|
+
*
|
|
22492
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22493
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22494
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22495
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22496
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22497
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22498
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22499
|
+
*/
|
|
22500
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22501
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22502
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22503
|
+
var ExportTimelapseSchema = object({
|
|
22504
|
+
everyMs: number().int().positive(),
|
|
22505
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22506
|
+
});
|
|
22507
|
+
/**
|
|
22508
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22509
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22510
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22511
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22512
|
+
*/
|
|
22513
|
+
var ExportOptionsSchema = object({
|
|
22514
|
+
speed: ExportSpeedSchema.optional(),
|
|
22515
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22516
|
+
includeAudio: boolean(),
|
|
22517
|
+
maxLifeMs: number().int().positive(),
|
|
22518
|
+
deleteAfterDownload: boolean(),
|
|
22519
|
+
title: string().max(200).optional()
|
|
22520
|
+
}).superRefine((v, ctx) => {
|
|
22521
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22522
|
+
code: ZodIssueCode.custom,
|
|
22523
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22524
|
+
path: ["timelapse"]
|
|
22525
|
+
});
|
|
22526
|
+
});
|
|
22527
|
+
var ExportStateSchema = _enum([
|
|
22528
|
+
"queued",
|
|
22529
|
+
"rendering",
|
|
22530
|
+
"ready",
|
|
22531
|
+
"failed",
|
|
22532
|
+
"expired",
|
|
22533
|
+
"deleted"
|
|
22534
|
+
]);
|
|
22535
|
+
/** One export job / history row. */
|
|
22536
|
+
var ExportRecordSchema = object({
|
|
22537
|
+
id: string(),
|
|
22538
|
+
deviceId: number(),
|
|
22539
|
+
profile: string(),
|
|
22540
|
+
fromMs: number(),
|
|
22541
|
+
toMs: number(),
|
|
22542
|
+
options: ExportOptionsSchema,
|
|
22543
|
+
state: ExportStateSchema,
|
|
22544
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22545
|
+
progressPct: number().nullable(),
|
|
22546
|
+
/** File size once ready; null before. */
|
|
22547
|
+
fileBytes: number().nullable(),
|
|
22548
|
+
expiresAt: number(),
|
|
22549
|
+
deleteAfterDownload: boolean(),
|
|
22550
|
+
/** Epoch of the first complete download; null until then. */
|
|
22551
|
+
downloadedAt: number().nullable(),
|
|
22552
|
+
createdAt: number(),
|
|
22553
|
+
/** User id/name that requested the export. */
|
|
22554
|
+
createdBy: string(),
|
|
22555
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22556
|
+
error: string().nullable()
|
|
22557
|
+
});
|
|
22558
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22559
|
+
var ExportDownloadSchema = object({
|
|
22560
|
+
url: string(),
|
|
22561
|
+
endpoints: array(string())
|
|
22562
|
+
});
|
|
22563
|
+
method(object({
|
|
22564
|
+
deviceId: number(),
|
|
22565
|
+
profile: string(),
|
|
22566
|
+
fromMs: number(),
|
|
22567
|
+
toMs: number(),
|
|
22568
|
+
options: ExportOptionsSchema
|
|
22569
|
+
}), ExportRecordSchema, {
|
|
22570
|
+
kind: "mutation",
|
|
22571
|
+
auth: "protected"
|
|
22572
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22573
|
+
kind: "query",
|
|
22574
|
+
auth: "protected"
|
|
22575
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22576
|
+
kind: "query",
|
|
22577
|
+
auth: "protected"
|
|
22578
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22579
|
+
kind: "mutation",
|
|
22580
|
+
auth: "protected"
|
|
22581
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22582
|
+
kind: "mutation",
|
|
22583
|
+
auth: "protected"
|
|
22584
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22585
|
+
kind: "query",
|
|
22586
|
+
auth: "protected"
|
|
22587
|
+
});
|
|
22588
|
+
/**
|
|
22430
22589
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22431
22590
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22432
22591
|
* `deviceId`.
|
|
@@ -26350,6 +26509,42 @@ Object.freeze({
|
|
|
26350
26509
|
addonId: null,
|
|
26351
26510
|
access: "create"
|
|
26352
26511
|
},
|
|
26512
|
+
"recordingExport.cancelExport": {
|
|
26513
|
+
capName: "recordingExport",
|
|
26514
|
+
capScope: "system",
|
|
26515
|
+
addonId: null,
|
|
26516
|
+
access: "create"
|
|
26517
|
+
},
|
|
26518
|
+
"recordingExport.createExport": {
|
|
26519
|
+
capName: "recordingExport",
|
|
26520
|
+
capScope: "system",
|
|
26521
|
+
addonId: null,
|
|
26522
|
+
access: "create"
|
|
26523
|
+
},
|
|
26524
|
+
"recordingExport.deleteExport": {
|
|
26525
|
+
capName: "recordingExport",
|
|
26526
|
+
capScope: "system",
|
|
26527
|
+
addonId: null,
|
|
26528
|
+
access: "delete"
|
|
26529
|
+
},
|
|
26530
|
+
"recordingExport.getDownloadUrl": {
|
|
26531
|
+
capName: "recordingExport",
|
|
26532
|
+
capScope: "system",
|
|
26533
|
+
addonId: null,
|
|
26534
|
+
access: "view"
|
|
26535
|
+
},
|
|
26536
|
+
"recordingExport.getExport": {
|
|
26537
|
+
capName: "recordingExport",
|
|
26538
|
+
capScope: "system",
|
|
26539
|
+
addonId: null,
|
|
26540
|
+
access: "view"
|
|
26541
|
+
},
|
|
26542
|
+
"recordingExport.listExports": {
|
|
26543
|
+
capName: "recordingExport",
|
|
26544
|
+
capScope: "system",
|
|
26545
|
+
addonId: null,
|
|
26546
|
+
access: "view"
|
|
26547
|
+
},
|
|
26353
26548
|
"sceneMonitor.captureReference": {
|
|
26354
26549
|
capName: "scene-monitor",
|
|
26355
26550
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
36
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
37
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region ../types/dist/event-category-
|
|
39
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
40
40
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
41
41
|
EventCategory["SystemBoot"] = "system.boot";
|
|
42
42
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -189,6 +189,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
189
189
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
190
190
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
191
191
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
192
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
193
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
194
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
195
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
196
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
192
197
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
193
198
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
194
199
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -478,6 +483,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
478
483
|
*/
|
|
479
484
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
480
485
|
/**
|
|
486
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
487
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
488
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
489
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
490
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
491
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
492
|
+
* this bus topic drives notifier rules + live UI. See
|
|
493
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
494
|
+
*/
|
|
495
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
496
|
+
/**
|
|
497
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
498
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
499
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
500
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
501
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
502
|
+
*/
|
|
503
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
504
|
+
/**
|
|
481
505
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
482
506
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
483
507
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5216,6 +5240,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5216
5240
|
};
|
|
5217
5241
|
return inst;
|
|
5218
5242
|
}
|
|
5243
|
+
//#endregion
|
|
5244
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5245
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5246
|
+
var ZodIssueCode = {
|
|
5247
|
+
invalid_type: "invalid_type",
|
|
5248
|
+
too_big: "too_big",
|
|
5249
|
+
too_small: "too_small",
|
|
5250
|
+
invalid_format: "invalid_format",
|
|
5251
|
+
not_multiple_of: "not_multiple_of",
|
|
5252
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5253
|
+
invalid_union: "invalid_union",
|
|
5254
|
+
invalid_key: "invalid_key",
|
|
5255
|
+
invalid_element: "invalid_element",
|
|
5256
|
+
invalid_value: "invalid_value",
|
|
5257
|
+
custom: "custom"
|
|
5258
|
+
};
|
|
5259
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5260
|
+
var ZodFirstPartyTypeKind;
|
|
5261
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5219
5262
|
Object.fromEntries([
|
|
5220
5263
|
{
|
|
5221
5264
|
id: "overview",
|
|
@@ -14693,7 +14736,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14693
14736
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14694
14737
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14695
14738
|
*/
|
|
14696
|
-
var ZoneRuleStageEnum = _enum([
|
|
14739
|
+
var ZoneRuleStageEnum = _enum([
|
|
14740
|
+
"motion",
|
|
14741
|
+
"detection",
|
|
14742
|
+
"package"
|
|
14743
|
+
]);
|
|
14697
14744
|
/**
|
|
14698
14745
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14699
14746
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14787,16 +14834,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14787
14834
|
})
|
|
14788
14835
|
},
|
|
14789
14836
|
/**
|
|
14790
|
-
* Runtime-state slice —
|
|
14837
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14791
14838
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14792
|
-
* of
|
|
14793
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
14839
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
14840
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14794
14841
|
* complete current set. Consumers that only care about one stage
|
|
14795
14842
|
* just read the matching property.
|
|
14843
|
+
*
|
|
14844
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
14845
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
14846
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
14847
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
14848
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
14849
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
14796
14850
|
*/
|
|
14797
14851
|
runtimeState: object({
|
|
14798
14852
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14799
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
14853
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
14854
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14800
14855
|
})
|
|
14801
14856
|
},
|
|
14802
14857
|
zones: zonesCapability
|
|
@@ -18775,6 +18830,7 @@ var EventKindIconSchema = _enum([
|
|
|
18775
18830
|
"smoke",
|
|
18776
18831
|
"water",
|
|
18777
18832
|
"button",
|
|
18833
|
+
"package",
|
|
18778
18834
|
"generic"
|
|
18779
18835
|
]);
|
|
18780
18836
|
var EventKindCategorySchema = _enum([
|
|
@@ -18782,7 +18838,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18782
18838
|
"audio",
|
|
18783
18839
|
"detection",
|
|
18784
18840
|
"sensor",
|
|
18785
|
-
"custom"
|
|
18841
|
+
"custom",
|
|
18842
|
+
"package"
|
|
18786
18843
|
]);
|
|
18787
18844
|
var EventKindDescriptorSchema = object({
|
|
18788
18845
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22428,6 +22485,108 @@ method(object({
|
|
|
22428
22485
|
auth: "admin"
|
|
22429
22486
|
});
|
|
22430
22487
|
/**
|
|
22488
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22489
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22490
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22491
|
+
* delete-after-download.
|
|
22492
|
+
*
|
|
22493
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22494
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22495
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22496
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22497
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22498
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22499
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22500
|
+
*/
|
|
22501
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22502
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22503
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22504
|
+
var ExportTimelapseSchema = object({
|
|
22505
|
+
everyMs: number().int().positive(),
|
|
22506
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22507
|
+
});
|
|
22508
|
+
/**
|
|
22509
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22510
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22511
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22512
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22513
|
+
*/
|
|
22514
|
+
var ExportOptionsSchema = object({
|
|
22515
|
+
speed: ExportSpeedSchema.optional(),
|
|
22516
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22517
|
+
includeAudio: boolean(),
|
|
22518
|
+
maxLifeMs: number().int().positive(),
|
|
22519
|
+
deleteAfterDownload: boolean(),
|
|
22520
|
+
title: string().max(200).optional()
|
|
22521
|
+
}).superRefine((v, ctx) => {
|
|
22522
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22523
|
+
code: ZodIssueCode.custom,
|
|
22524
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22525
|
+
path: ["timelapse"]
|
|
22526
|
+
});
|
|
22527
|
+
});
|
|
22528
|
+
var ExportStateSchema = _enum([
|
|
22529
|
+
"queued",
|
|
22530
|
+
"rendering",
|
|
22531
|
+
"ready",
|
|
22532
|
+
"failed",
|
|
22533
|
+
"expired",
|
|
22534
|
+
"deleted"
|
|
22535
|
+
]);
|
|
22536
|
+
/** One export job / history row. */
|
|
22537
|
+
var ExportRecordSchema = object({
|
|
22538
|
+
id: string(),
|
|
22539
|
+
deviceId: number(),
|
|
22540
|
+
profile: string(),
|
|
22541
|
+
fromMs: number(),
|
|
22542
|
+
toMs: number(),
|
|
22543
|
+
options: ExportOptionsSchema,
|
|
22544
|
+
state: ExportStateSchema,
|
|
22545
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22546
|
+
progressPct: number().nullable(),
|
|
22547
|
+
/** File size once ready; null before. */
|
|
22548
|
+
fileBytes: number().nullable(),
|
|
22549
|
+
expiresAt: number(),
|
|
22550
|
+
deleteAfterDownload: boolean(),
|
|
22551
|
+
/** Epoch of the first complete download; null until then. */
|
|
22552
|
+
downloadedAt: number().nullable(),
|
|
22553
|
+
createdAt: number(),
|
|
22554
|
+
/** User id/name that requested the export. */
|
|
22555
|
+
createdBy: string(),
|
|
22556
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22557
|
+
error: string().nullable()
|
|
22558
|
+
});
|
|
22559
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22560
|
+
var ExportDownloadSchema = object({
|
|
22561
|
+
url: string(),
|
|
22562
|
+
endpoints: array(string())
|
|
22563
|
+
});
|
|
22564
|
+
method(object({
|
|
22565
|
+
deviceId: number(),
|
|
22566
|
+
profile: string(),
|
|
22567
|
+
fromMs: number(),
|
|
22568
|
+
toMs: number(),
|
|
22569
|
+
options: ExportOptionsSchema
|
|
22570
|
+
}), ExportRecordSchema, {
|
|
22571
|
+
kind: "mutation",
|
|
22572
|
+
auth: "protected"
|
|
22573
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22574
|
+
kind: "query",
|
|
22575
|
+
auth: "protected"
|
|
22576
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22577
|
+
kind: "query",
|
|
22578
|
+
auth: "protected"
|
|
22579
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22580
|
+
kind: "mutation",
|
|
22581
|
+
auth: "protected"
|
|
22582
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22583
|
+
kind: "mutation",
|
|
22584
|
+
auth: "protected"
|
|
22585
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22586
|
+
kind: "query",
|
|
22587
|
+
auth: "protected"
|
|
22588
|
+
});
|
|
22589
|
+
/**
|
|
22431
22590
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22432
22591
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22433
22592
|
* `deviceId`.
|
|
@@ -26351,6 +26510,42 @@ Object.freeze({
|
|
|
26351
26510
|
addonId: null,
|
|
26352
26511
|
access: "create"
|
|
26353
26512
|
},
|
|
26513
|
+
"recordingExport.cancelExport": {
|
|
26514
|
+
capName: "recordingExport",
|
|
26515
|
+
capScope: "system",
|
|
26516
|
+
addonId: null,
|
|
26517
|
+
access: "create"
|
|
26518
|
+
},
|
|
26519
|
+
"recordingExport.createExport": {
|
|
26520
|
+
capName: "recordingExport",
|
|
26521
|
+
capScope: "system",
|
|
26522
|
+
addonId: null,
|
|
26523
|
+
access: "create"
|
|
26524
|
+
},
|
|
26525
|
+
"recordingExport.deleteExport": {
|
|
26526
|
+
capName: "recordingExport",
|
|
26527
|
+
capScope: "system",
|
|
26528
|
+
addonId: null,
|
|
26529
|
+
access: "delete"
|
|
26530
|
+
},
|
|
26531
|
+
"recordingExport.getDownloadUrl": {
|
|
26532
|
+
capName: "recordingExport",
|
|
26533
|
+
capScope: "system",
|
|
26534
|
+
addonId: null,
|
|
26535
|
+
access: "view"
|
|
26536
|
+
},
|
|
26537
|
+
"recordingExport.getExport": {
|
|
26538
|
+
capName: "recordingExport",
|
|
26539
|
+
capScope: "system",
|
|
26540
|
+
addonId: null,
|
|
26541
|
+
access: "view"
|
|
26542
|
+
},
|
|
26543
|
+
"recordingExport.listExports": {
|
|
26544
|
+
capName: "recordingExport",
|
|
26545
|
+
capScope: "system",
|
|
26546
|
+
addonId: null,
|
|
26547
|
+
access: "view"
|
|
26548
|
+
},
|
|
26354
26549
|
"sceneMonitor.captureReference": {
|
|
26355
26550
|
capName: "scene-monitor",
|
|
26356
26551
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|