@camstack/addon-provider-dreame 0.1.31 → 0.1.32
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
|
@@ -37,7 +37,7 @@ let crypto$1 = require("crypto");
|
|
|
37
37
|
let events = require("events");
|
|
38
38
|
let zlib = require("zlib");
|
|
39
39
|
zlib = __toESM(zlib, 1);
|
|
40
|
-
//#region ../types/dist/event-category-
|
|
40
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
41
41
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
42
42
|
EventCategory["SystemBoot"] = "system.boot";
|
|
43
43
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -190,6 +190,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
190
190
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
191
191
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
192
192
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
193
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
194
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
195
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
196
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
197
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
193
198
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
194
199
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
195
200
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -479,6 +484,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
479
484
|
*/
|
|
480
485
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
481
486
|
/**
|
|
487
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
488
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
489
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
490
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
491
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
492
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
493
|
+
* this bus topic drives notifier rules + live UI. See
|
|
494
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
495
|
+
*/
|
|
496
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
497
|
+
/**
|
|
498
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
499
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
500
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
501
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
502
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
503
|
+
*/
|
|
504
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
505
|
+
/**
|
|
482
506
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
483
507
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
484
508
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5231,6 +5255,25 @@ function preprocess(fn, schema) {
|
|
|
5231
5255
|
out: schema
|
|
5232
5256
|
});
|
|
5233
5257
|
}
|
|
5258
|
+
//#endregion
|
|
5259
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5260
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5261
|
+
var ZodIssueCode$1 = {
|
|
5262
|
+
invalid_type: "invalid_type",
|
|
5263
|
+
too_big: "too_big",
|
|
5264
|
+
too_small: "too_small",
|
|
5265
|
+
invalid_format: "invalid_format",
|
|
5266
|
+
not_multiple_of: "not_multiple_of",
|
|
5267
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5268
|
+
invalid_union: "invalid_union",
|
|
5269
|
+
invalid_key: "invalid_key",
|
|
5270
|
+
invalid_element: "invalid_element",
|
|
5271
|
+
invalid_value: "invalid_value",
|
|
5272
|
+
custom: "custom"
|
|
5273
|
+
};
|
|
5274
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5275
|
+
var ZodFirstPartyTypeKind$1;
|
|
5276
|
+
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5234
5277
|
Object.fromEntries([
|
|
5235
5278
|
{
|
|
5236
5279
|
id: "overview",
|
|
@@ -14708,7 +14751,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14708
14751
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14709
14752
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14710
14753
|
*/
|
|
14711
|
-
var ZoneRuleStageEnum = _enum([
|
|
14754
|
+
var ZoneRuleStageEnum = _enum([
|
|
14755
|
+
"motion",
|
|
14756
|
+
"detection",
|
|
14757
|
+
"package"
|
|
14758
|
+
]);
|
|
14712
14759
|
/**
|
|
14713
14760
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14714
14761
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14802,16 +14849,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14802
14849
|
})
|
|
14803
14850
|
},
|
|
14804
14851
|
/**
|
|
14805
|
-
* Runtime-state slice —
|
|
14852
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14806
14853
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14807
|
-
* of
|
|
14808
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
14854
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
14855
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14809
14856
|
* complete current set. Consumers that only care about one stage
|
|
14810
14857
|
* just read the matching property.
|
|
14858
|
+
*
|
|
14859
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
14860
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
14861
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
14862
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
14863
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
14864
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
14811
14865
|
*/
|
|
14812
14866
|
runtimeState: object({
|
|
14813
14867
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14814
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
14868
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
14869
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14815
14870
|
})
|
|
14816
14871
|
},
|
|
14817
14872
|
zones: zonesCapability
|
|
@@ -18790,6 +18845,7 @@ var EventKindIconSchema = _enum([
|
|
|
18790
18845
|
"smoke",
|
|
18791
18846
|
"water",
|
|
18792
18847
|
"button",
|
|
18848
|
+
"package",
|
|
18793
18849
|
"generic"
|
|
18794
18850
|
]);
|
|
18795
18851
|
var EventKindCategorySchema = _enum([
|
|
@@ -18797,7 +18853,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18797
18853
|
"audio",
|
|
18798
18854
|
"detection",
|
|
18799
18855
|
"sensor",
|
|
18800
|
-
"custom"
|
|
18856
|
+
"custom",
|
|
18857
|
+
"package"
|
|
18801
18858
|
]);
|
|
18802
18859
|
var EventKindDescriptorSchema = object({
|
|
18803
18860
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22460,6 +22517,108 @@ method(object({
|
|
|
22460
22517
|
auth: "admin"
|
|
22461
22518
|
});
|
|
22462
22519
|
/**
|
|
22520
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22521
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22522
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22523
|
+
* delete-after-download.
|
|
22524
|
+
*
|
|
22525
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22526
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22527
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22528
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22529
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22530
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22531
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22532
|
+
*/
|
|
22533
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22534
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22535
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22536
|
+
var ExportTimelapseSchema = object({
|
|
22537
|
+
everyMs: number().int().positive(),
|
|
22538
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22539
|
+
});
|
|
22540
|
+
/**
|
|
22541
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22542
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22543
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22544
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22545
|
+
*/
|
|
22546
|
+
var ExportOptionsSchema = object({
|
|
22547
|
+
speed: ExportSpeedSchema.optional(),
|
|
22548
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22549
|
+
includeAudio: boolean(),
|
|
22550
|
+
maxLifeMs: number().int().positive(),
|
|
22551
|
+
deleteAfterDownload: boolean(),
|
|
22552
|
+
title: string().max(200).optional()
|
|
22553
|
+
}).superRefine((v, ctx) => {
|
|
22554
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22555
|
+
code: ZodIssueCode$1.custom,
|
|
22556
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22557
|
+
path: ["timelapse"]
|
|
22558
|
+
});
|
|
22559
|
+
});
|
|
22560
|
+
var ExportStateSchema = _enum([
|
|
22561
|
+
"queued",
|
|
22562
|
+
"rendering",
|
|
22563
|
+
"ready",
|
|
22564
|
+
"failed",
|
|
22565
|
+
"expired",
|
|
22566
|
+
"deleted"
|
|
22567
|
+
]);
|
|
22568
|
+
/** One export job / history row. */
|
|
22569
|
+
var ExportRecordSchema = object({
|
|
22570
|
+
id: string(),
|
|
22571
|
+
deviceId: number(),
|
|
22572
|
+
profile: string(),
|
|
22573
|
+
fromMs: number(),
|
|
22574
|
+
toMs: number(),
|
|
22575
|
+
options: ExportOptionsSchema,
|
|
22576
|
+
state: ExportStateSchema,
|
|
22577
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22578
|
+
progressPct: number().nullable(),
|
|
22579
|
+
/** File size once ready; null before. */
|
|
22580
|
+
fileBytes: number().nullable(),
|
|
22581
|
+
expiresAt: number(),
|
|
22582
|
+
deleteAfterDownload: boolean(),
|
|
22583
|
+
/** Epoch of the first complete download; null until then. */
|
|
22584
|
+
downloadedAt: number().nullable(),
|
|
22585
|
+
createdAt: number(),
|
|
22586
|
+
/** User id/name that requested the export. */
|
|
22587
|
+
createdBy: string(),
|
|
22588
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22589
|
+
error: string().nullable()
|
|
22590
|
+
});
|
|
22591
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22592
|
+
var ExportDownloadSchema = object({
|
|
22593
|
+
url: string(),
|
|
22594
|
+
endpoints: array(string())
|
|
22595
|
+
});
|
|
22596
|
+
method(object({
|
|
22597
|
+
deviceId: number(),
|
|
22598
|
+
profile: string(),
|
|
22599
|
+
fromMs: number(),
|
|
22600
|
+
toMs: number(),
|
|
22601
|
+
options: ExportOptionsSchema
|
|
22602
|
+
}), ExportRecordSchema, {
|
|
22603
|
+
kind: "mutation",
|
|
22604
|
+
auth: "protected"
|
|
22605
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22606
|
+
kind: "query",
|
|
22607
|
+
auth: "protected"
|
|
22608
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22609
|
+
kind: "query",
|
|
22610
|
+
auth: "protected"
|
|
22611
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22612
|
+
kind: "mutation",
|
|
22613
|
+
auth: "protected"
|
|
22614
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22615
|
+
kind: "mutation",
|
|
22616
|
+
auth: "protected"
|
|
22617
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22618
|
+
kind: "query",
|
|
22619
|
+
auth: "protected"
|
|
22620
|
+
});
|
|
22621
|
+
/**
|
|
22463
22622
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22464
22623
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22465
22624
|
* `deviceId`.
|
|
@@ -26383,6 +26542,42 @@ Object.freeze({
|
|
|
26383
26542
|
addonId: null,
|
|
26384
26543
|
access: "create"
|
|
26385
26544
|
},
|
|
26545
|
+
"recordingExport.cancelExport": {
|
|
26546
|
+
capName: "recordingExport",
|
|
26547
|
+
capScope: "system",
|
|
26548
|
+
addonId: null,
|
|
26549
|
+
access: "create"
|
|
26550
|
+
},
|
|
26551
|
+
"recordingExport.createExport": {
|
|
26552
|
+
capName: "recordingExport",
|
|
26553
|
+
capScope: "system",
|
|
26554
|
+
addonId: null,
|
|
26555
|
+
access: "create"
|
|
26556
|
+
},
|
|
26557
|
+
"recordingExport.deleteExport": {
|
|
26558
|
+
capName: "recordingExport",
|
|
26559
|
+
capScope: "system",
|
|
26560
|
+
addonId: null,
|
|
26561
|
+
access: "delete"
|
|
26562
|
+
},
|
|
26563
|
+
"recordingExport.getDownloadUrl": {
|
|
26564
|
+
capName: "recordingExport",
|
|
26565
|
+
capScope: "system",
|
|
26566
|
+
addonId: null,
|
|
26567
|
+
access: "view"
|
|
26568
|
+
},
|
|
26569
|
+
"recordingExport.getExport": {
|
|
26570
|
+
capName: "recordingExport",
|
|
26571
|
+
capScope: "system",
|
|
26572
|
+
addonId: null,
|
|
26573
|
+
access: "view"
|
|
26574
|
+
},
|
|
26575
|
+
"recordingExport.listExports": {
|
|
26576
|
+
capName: "recordingExport",
|
|
26577
|
+
capScope: "system",
|
|
26578
|
+
addonId: null,
|
|
26579
|
+
access: "view"
|
|
26580
|
+
},
|
|
26386
26581
|
"sceneMonitor.captureReference": {
|
|
26387
26582
|
capName: "scene-monitor",
|
|
26388
26583
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -37,7 +37,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
37
37
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
38
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
39
39
|
//#endregion
|
|
40
|
-
//#region ../types/dist/event-category-
|
|
40
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
41
41
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
42
42
|
EventCategory["SystemBoot"] = "system.boot";
|
|
43
43
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -190,6 +190,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
190
190
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
191
191
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
192
192
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
193
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
194
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
195
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
196
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
197
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
193
198
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
194
199
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
195
200
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -479,6 +484,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
479
484
|
*/
|
|
480
485
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
481
486
|
/**
|
|
487
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
488
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
489
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
490
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
491
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
492
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
493
|
+
* this bus topic drives notifier rules + live UI. See
|
|
494
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
495
|
+
*/
|
|
496
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
497
|
+
/**
|
|
498
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
499
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
500
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
501
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
502
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
503
|
+
*/
|
|
504
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
505
|
+
/**
|
|
482
506
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
483
507
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
484
508
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5231,6 +5255,25 @@ function preprocess(fn, schema) {
|
|
|
5231
5255
|
out: schema
|
|
5232
5256
|
});
|
|
5233
5257
|
}
|
|
5258
|
+
//#endregion
|
|
5259
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5260
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5261
|
+
var ZodIssueCode$1 = {
|
|
5262
|
+
invalid_type: "invalid_type",
|
|
5263
|
+
too_big: "too_big",
|
|
5264
|
+
too_small: "too_small",
|
|
5265
|
+
invalid_format: "invalid_format",
|
|
5266
|
+
not_multiple_of: "not_multiple_of",
|
|
5267
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5268
|
+
invalid_union: "invalid_union",
|
|
5269
|
+
invalid_key: "invalid_key",
|
|
5270
|
+
invalid_element: "invalid_element",
|
|
5271
|
+
invalid_value: "invalid_value",
|
|
5272
|
+
custom: "custom"
|
|
5273
|
+
};
|
|
5274
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5275
|
+
var ZodFirstPartyTypeKind$1;
|
|
5276
|
+
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5234
5277
|
Object.fromEntries([
|
|
5235
5278
|
{
|
|
5236
5279
|
id: "overview",
|
|
@@ -14708,7 +14751,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14708
14751
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14709
14752
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14710
14753
|
*/
|
|
14711
|
-
var ZoneRuleStageEnum = _enum([
|
|
14754
|
+
var ZoneRuleStageEnum = _enum([
|
|
14755
|
+
"motion",
|
|
14756
|
+
"detection",
|
|
14757
|
+
"package"
|
|
14758
|
+
]);
|
|
14712
14759
|
/**
|
|
14713
14760
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14714
14761
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14802,16 +14849,24 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14802
14849
|
})
|
|
14803
14850
|
},
|
|
14804
14851
|
/**
|
|
14805
|
-
* Runtime-state slice —
|
|
14852
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14806
14853
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14807
|
-
* of
|
|
14808
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
14854
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
14855
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14809
14856
|
* complete current set. Consumers that only care about one stage
|
|
14810
14857
|
* just read the matching property.
|
|
14858
|
+
*
|
|
14859
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
14860
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
14861
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
14862
|
+
* The orchestrator provider that writes this stage lands in a later
|
|
14863
|
+
* slice; until then the mirror carries only `{motion, detection}` and
|
|
14864
|
+
* consumers read `package` as absent (treat as `[]`).
|
|
14811
14865
|
*/
|
|
14812
14866
|
runtimeState: object({
|
|
14813
14867
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14814
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
14868
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
14869
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14815
14870
|
})
|
|
14816
14871
|
},
|
|
14817
14872
|
zones: zonesCapability
|
|
@@ -18790,6 +18845,7 @@ var EventKindIconSchema = _enum([
|
|
|
18790
18845
|
"smoke",
|
|
18791
18846
|
"water",
|
|
18792
18847
|
"button",
|
|
18848
|
+
"package",
|
|
18793
18849
|
"generic"
|
|
18794
18850
|
]);
|
|
18795
18851
|
var EventKindCategorySchema = _enum([
|
|
@@ -18797,7 +18853,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18797
18853
|
"audio",
|
|
18798
18854
|
"detection",
|
|
18799
18855
|
"sensor",
|
|
18800
|
-
"custom"
|
|
18856
|
+
"custom",
|
|
18857
|
+
"package"
|
|
18801
18858
|
]);
|
|
18802
18859
|
var EventKindDescriptorSchema = object({
|
|
18803
18860
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -22460,6 +22517,108 @@ method(object({
|
|
|
22460
22517
|
auth: "admin"
|
|
22461
22518
|
});
|
|
22462
22519
|
/**
|
|
22520
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22521
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22522
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22523
|
+
* delete-after-download.
|
|
22524
|
+
*
|
|
22525
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22526
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22527
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22528
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22529
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22530
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22531
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22532
|
+
*/
|
|
22533
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22534
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22535
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22536
|
+
var ExportTimelapseSchema = object({
|
|
22537
|
+
everyMs: number().int().positive(),
|
|
22538
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22539
|
+
});
|
|
22540
|
+
/**
|
|
22541
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22542
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22543
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22544
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22545
|
+
*/
|
|
22546
|
+
var ExportOptionsSchema = object({
|
|
22547
|
+
speed: ExportSpeedSchema.optional(),
|
|
22548
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22549
|
+
includeAudio: boolean(),
|
|
22550
|
+
maxLifeMs: number().int().positive(),
|
|
22551
|
+
deleteAfterDownload: boolean(),
|
|
22552
|
+
title: string().max(200).optional()
|
|
22553
|
+
}).superRefine((v, ctx) => {
|
|
22554
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22555
|
+
code: ZodIssueCode$1.custom,
|
|
22556
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22557
|
+
path: ["timelapse"]
|
|
22558
|
+
});
|
|
22559
|
+
});
|
|
22560
|
+
var ExportStateSchema = _enum([
|
|
22561
|
+
"queued",
|
|
22562
|
+
"rendering",
|
|
22563
|
+
"ready",
|
|
22564
|
+
"failed",
|
|
22565
|
+
"expired",
|
|
22566
|
+
"deleted"
|
|
22567
|
+
]);
|
|
22568
|
+
/** One export job / history row. */
|
|
22569
|
+
var ExportRecordSchema = object({
|
|
22570
|
+
id: string(),
|
|
22571
|
+
deviceId: number(),
|
|
22572
|
+
profile: string(),
|
|
22573
|
+
fromMs: number(),
|
|
22574
|
+
toMs: number(),
|
|
22575
|
+
options: ExportOptionsSchema,
|
|
22576
|
+
state: ExportStateSchema,
|
|
22577
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22578
|
+
progressPct: number().nullable(),
|
|
22579
|
+
/** File size once ready; null before. */
|
|
22580
|
+
fileBytes: number().nullable(),
|
|
22581
|
+
expiresAt: number(),
|
|
22582
|
+
deleteAfterDownload: boolean(),
|
|
22583
|
+
/** Epoch of the first complete download; null until then. */
|
|
22584
|
+
downloadedAt: number().nullable(),
|
|
22585
|
+
createdAt: number(),
|
|
22586
|
+
/** User id/name that requested the export. */
|
|
22587
|
+
createdBy: string(),
|
|
22588
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22589
|
+
error: string().nullable()
|
|
22590
|
+
});
|
|
22591
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22592
|
+
var ExportDownloadSchema = object({
|
|
22593
|
+
url: string(),
|
|
22594
|
+
endpoints: array(string())
|
|
22595
|
+
});
|
|
22596
|
+
method(object({
|
|
22597
|
+
deviceId: number(),
|
|
22598
|
+
profile: string(),
|
|
22599
|
+
fromMs: number(),
|
|
22600
|
+
toMs: number(),
|
|
22601
|
+
options: ExportOptionsSchema
|
|
22602
|
+
}), ExportRecordSchema, {
|
|
22603
|
+
kind: "mutation",
|
|
22604
|
+
auth: "protected"
|
|
22605
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22606
|
+
kind: "query",
|
|
22607
|
+
auth: "protected"
|
|
22608
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22609
|
+
kind: "query",
|
|
22610
|
+
auth: "protected"
|
|
22611
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22612
|
+
kind: "mutation",
|
|
22613
|
+
auth: "protected"
|
|
22614
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22615
|
+
kind: "mutation",
|
|
22616
|
+
auth: "protected"
|
|
22617
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22618
|
+
kind: "query",
|
|
22619
|
+
auth: "protected"
|
|
22620
|
+
});
|
|
22621
|
+
/**
|
|
22463
22622
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
22464
22623
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
22465
22624
|
* `deviceId`.
|
|
@@ -26383,6 +26542,42 @@ Object.freeze({
|
|
|
26383
26542
|
addonId: null,
|
|
26384
26543
|
access: "create"
|
|
26385
26544
|
},
|
|
26545
|
+
"recordingExport.cancelExport": {
|
|
26546
|
+
capName: "recordingExport",
|
|
26547
|
+
capScope: "system",
|
|
26548
|
+
addonId: null,
|
|
26549
|
+
access: "create"
|
|
26550
|
+
},
|
|
26551
|
+
"recordingExport.createExport": {
|
|
26552
|
+
capName: "recordingExport",
|
|
26553
|
+
capScope: "system",
|
|
26554
|
+
addonId: null,
|
|
26555
|
+
access: "create"
|
|
26556
|
+
},
|
|
26557
|
+
"recordingExport.deleteExport": {
|
|
26558
|
+
capName: "recordingExport",
|
|
26559
|
+
capScope: "system",
|
|
26560
|
+
addonId: null,
|
|
26561
|
+
access: "delete"
|
|
26562
|
+
},
|
|
26563
|
+
"recordingExport.getDownloadUrl": {
|
|
26564
|
+
capName: "recordingExport",
|
|
26565
|
+
capScope: "system",
|
|
26566
|
+
addonId: null,
|
|
26567
|
+
access: "view"
|
|
26568
|
+
},
|
|
26569
|
+
"recordingExport.getExport": {
|
|
26570
|
+
capName: "recordingExport",
|
|
26571
|
+
capScope: "system",
|
|
26572
|
+
addonId: null,
|
|
26573
|
+
access: "view"
|
|
26574
|
+
},
|
|
26575
|
+
"recordingExport.listExports": {
|
|
26576
|
+
capName: "recordingExport",
|
|
26577
|
+
capScope: "system",
|
|
26578
|
+
addonId: null,
|
|
26579
|
+
access: "view"
|
|
26580
|
+
},
|
|
26386
26581
|
"sceneMonitor.captureReference": {
|
|
26387
26582
|
capName: "scene-monitor",
|
|
26388
26583
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreame",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|