@camstack/addon-import-alexa 0.1.22 → 0.1.24
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 +347 -8
- package/dist/addon.mjs +347 -8
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -38,7 +38,7 @@ let node_crypto = require("node:crypto");
|
|
|
38
38
|
let node_fs = require("node:fs");
|
|
39
39
|
let node_path = require("node:path");
|
|
40
40
|
node_path = __toESM(node_path);
|
|
41
|
-
//#region ../types/dist/event-category-
|
|
41
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
42
42
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
43
43
|
EventCategory["SystemBoot"] = "system.boot";
|
|
44
44
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -191,6 +191,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
191
191
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
192
192
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
193
193
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
194
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
195
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
196
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
197
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
198
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
194
199
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
195
200
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
196
201
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -480,6 +485,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
480
485
|
*/
|
|
481
486
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
482
487
|
/**
|
|
488
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
489
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
490
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
491
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
492
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
493
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
494
|
+
* this bus topic drives notifier rules + live UI. See
|
|
495
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
496
|
+
*/
|
|
497
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
498
|
+
/**
|
|
499
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
500
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
501
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
502
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
503
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
504
|
+
*/
|
|
505
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
506
|
+
/**
|
|
483
507
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
484
508
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
485
509
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5232,6 +5256,25 @@ function preprocess(fn, schema) {
|
|
|
5232
5256
|
out: schema
|
|
5233
5257
|
});
|
|
5234
5258
|
}
|
|
5259
|
+
//#endregion
|
|
5260
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5261
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5262
|
+
var ZodIssueCode = {
|
|
5263
|
+
invalid_type: "invalid_type",
|
|
5264
|
+
too_big: "too_big",
|
|
5265
|
+
too_small: "too_small",
|
|
5266
|
+
invalid_format: "invalid_format",
|
|
5267
|
+
not_multiple_of: "not_multiple_of",
|
|
5268
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5269
|
+
invalid_union: "invalid_union",
|
|
5270
|
+
invalid_key: "invalid_key",
|
|
5271
|
+
invalid_element: "invalid_element",
|
|
5272
|
+
invalid_value: "invalid_value",
|
|
5273
|
+
custom: "custom"
|
|
5274
|
+
};
|
|
5275
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5276
|
+
var ZodFirstPartyTypeKind;
|
|
5277
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5235
5278
|
Object.fromEntries([
|
|
5236
5279
|
{
|
|
5237
5280
|
id: "overview",
|
|
@@ -7471,6 +7514,62 @@ var RecordingConfigSchema = object({
|
|
|
7471
7514
|
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7472
7515
|
});
|
|
7473
7516
|
/**
|
|
7517
|
+
* Ops-log — the durable, append-only operations audit shared by the
|
|
7518
|
+
* recordings and events management surfaces.
|
|
7519
|
+
*
|
|
7520
|
+
* ONE row shape is reused for both domains so a single "Activity" view can
|
|
7521
|
+
* merge the recorder's DurableState ring (recordings ops-log) and the
|
|
7522
|
+
* pipeline-analytics SQLite collection (events ops-log). Each row records a
|
|
7523
|
+
* management operation, WHY it ran (reason), and its measurable effect
|
|
7524
|
+
* (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
|
|
7525
|
+
* never fail the operation it records.
|
|
7526
|
+
*/
|
|
7527
|
+
/** Which management domain the operation belongs to. */
|
|
7528
|
+
var OpsLogDomainSchema = _enum(["recording", "events"]);
|
|
7529
|
+
/** The kind of management operation performed. */
|
|
7530
|
+
var OpsLogOpSchema = _enum([
|
|
7531
|
+
"prune",
|
|
7532
|
+
"manual-delete",
|
|
7533
|
+
"rescan",
|
|
7534
|
+
"retention-run"
|
|
7535
|
+
]);
|
|
7536
|
+
/** Why the operation ran. */
|
|
7537
|
+
var OpsLogReasonSchema = _enum([
|
|
7538
|
+
"retention",
|
|
7539
|
+
"quota",
|
|
7540
|
+
"manual",
|
|
7541
|
+
"operator"
|
|
7542
|
+
]);
|
|
7543
|
+
/** One audit row, shared verbatim by both domains. */
|
|
7544
|
+
var OpsLogEntrySchema = object({
|
|
7545
|
+
/** Unique row id. */
|
|
7546
|
+
id: string(),
|
|
7547
|
+
/** Epoch ms the operation completed. */
|
|
7548
|
+
at: number(),
|
|
7549
|
+
domain: OpsLogDomainSchema,
|
|
7550
|
+
op: OpsLogOpSchema,
|
|
7551
|
+
reason: OpsLogReasonSchema,
|
|
7552
|
+
/** The camera the op targeted; null for a cluster/global op. */
|
|
7553
|
+
deviceId: number().nullable(),
|
|
7554
|
+
/** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
|
|
7555
|
+
nodeId: string(),
|
|
7556
|
+
/** Buckets / rows deleted (op-specific unit). */
|
|
7557
|
+
itemsAffected: number(),
|
|
7558
|
+
/** Bytes reclaimed by the op (0 when not measurable). */
|
|
7559
|
+
bytesReclaimed: number(),
|
|
7560
|
+
/** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
|
|
7561
|
+
detail: string().nullable(),
|
|
7562
|
+
/** Who/what triggered the op. */
|
|
7563
|
+
actor: string()
|
|
7564
|
+
});
|
|
7565
|
+
/** Shared query input for the per-domain `listOpsLog` cap methods. */
|
|
7566
|
+
var OpsLogQueryInputSchema = object({
|
|
7567
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7568
|
+
deviceId: number().optional(),
|
|
7569
|
+
/** Max rows returned, newest-first. */
|
|
7570
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
7571
|
+
});
|
|
7572
|
+
/**
|
|
7474
7573
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
7475
7574
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
7476
7575
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -14826,7 +14925,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14826
14925
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14827
14926
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14828
14927
|
*/
|
|
14829
|
-
var ZoneRuleStageEnum = _enum([
|
|
14928
|
+
var ZoneRuleStageEnum = _enum([
|
|
14929
|
+
"motion",
|
|
14930
|
+
"detection",
|
|
14931
|
+
"package"
|
|
14932
|
+
]);
|
|
14830
14933
|
/**
|
|
14831
14934
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14832
14935
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14920,16 +15023,25 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14920
15023
|
})
|
|
14921
15024
|
},
|
|
14922
15025
|
/**
|
|
14923
|
-
* Runtime-state slice —
|
|
15026
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14924
15027
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14925
|
-
* of
|
|
14926
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
15028
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
15029
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14927
15030
|
* complete current set. Consumers that only care about one stage
|
|
14928
15031
|
* just read the matching property.
|
|
15032
|
+
*
|
|
15033
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
15034
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
15035
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
15036
|
+
* The orchestrator provider writes this stage as a first-class slice
|
|
15037
|
+
* (Phase 4): every mutation mirrors the full `{motion, detection,
|
|
15038
|
+
* package}` shape, so consumers read the current package rules directly
|
|
15039
|
+
* off `device.state.zoneRules.value.package`.
|
|
14929
15040
|
*/
|
|
14930
15041
|
runtimeState: object({
|
|
14931
15042
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14932
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
15043
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
15044
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14933
15045
|
})
|
|
14934
15046
|
},
|
|
14935
15047
|
zones: zonesCapability
|
|
@@ -18976,6 +19088,7 @@ var EventKindIconSchema = _enum([
|
|
|
18976
19088
|
"smoke",
|
|
18977
19089
|
"water",
|
|
18978
19090
|
"button",
|
|
19091
|
+
"package",
|
|
18979
19092
|
"generic"
|
|
18980
19093
|
]);
|
|
18981
19094
|
var EventKindCategorySchema = _enum([
|
|
@@ -18983,7 +19096,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18983
19096
|
"audio",
|
|
18984
19097
|
"detection",
|
|
18985
19098
|
"sensor",
|
|
18986
|
-
"custom"
|
|
19099
|
+
"custom",
|
|
19100
|
+
"package"
|
|
18987
19101
|
]);
|
|
18988
19102
|
var EventKindDescriptorSchema = object({
|
|
18989
19103
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19324,6 +19438,26 @@ var TrackCascadeCountsSchema = object({
|
|
|
19324
19438
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
19325
19439
|
embeddings: number().int()
|
|
19326
19440
|
});
|
|
19441
|
+
/** Event-store footprint for one camera. */
|
|
19442
|
+
var EventStoreDeviceFootprintSchema = object({
|
|
19443
|
+
deviceId: number(),
|
|
19444
|
+
/** Persisted event rows (motion + object + audio) for the camera. */
|
|
19445
|
+
rows: number().int(),
|
|
19446
|
+
/** Event-owned media bytes on disk for the camera. */
|
|
19447
|
+
bytes: number().int()
|
|
19448
|
+
});
|
|
19449
|
+
/** Aggregate event-store footprint: global totals + per-camera breakdown. */
|
|
19450
|
+
var EventStoreFootprintSchema = object({
|
|
19451
|
+
totalRows: number().int(),
|
|
19452
|
+
totalBytes: number().int(),
|
|
19453
|
+
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19454
|
+
});
|
|
19455
|
+
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19456
|
+
var EventPruneCountsSchema = object({
|
|
19457
|
+
motion: number().int(),
|
|
19458
|
+
object: number().int(),
|
|
19459
|
+
audio: number().int()
|
|
19460
|
+
});
|
|
19327
19461
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
19328
19462
|
deviceId: number(),
|
|
19329
19463
|
trackId: string()
|
|
@@ -19387,6 +19521,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19387
19521
|
}), {
|
|
19388
19522
|
kind: "mutation",
|
|
19389
19523
|
auth: "admin"
|
|
19524
|
+
}), method(object({}), EventStoreFootprintSchema, {
|
|
19525
|
+
kind: "query",
|
|
19526
|
+
auth: "admin"
|
|
19527
|
+
}), method(object({
|
|
19528
|
+
olderThanMs: number(),
|
|
19529
|
+
reason: OpsLogReasonSchema.optional()
|
|
19530
|
+
}), EventPruneCountsSchema, {
|
|
19531
|
+
kind: "mutation",
|
|
19532
|
+
auth: "admin"
|
|
19533
|
+
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
19534
|
+
kind: "mutation",
|
|
19535
|
+
auth: "admin"
|
|
19536
|
+
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
19537
|
+
kind: "query",
|
|
19538
|
+
auth: "admin"
|
|
19390
19539
|
}), method(object({
|
|
19391
19540
|
eventId: string(),
|
|
19392
19541
|
kind: MediaFileKindEnum.optional()
|
|
@@ -22637,13 +22786,131 @@ method(object({
|
|
|
22637
22786
|
}), method(object({ deviceId: number() }), RecordingStatusSchema, {
|
|
22638
22787
|
kind: "mutation",
|
|
22639
22788
|
auth: "admin"
|
|
22640
|
-
}), method(object({
|
|
22789
|
+
}), method(object({
|
|
22790
|
+
deviceId: number(),
|
|
22791
|
+
reason: OpsLogReasonSchema.optional()
|
|
22792
|
+
}), object({
|
|
22641
22793
|
floorMs: number().nullable(),
|
|
22642
22794
|
deletedBuckets: number().int(),
|
|
22643
22795
|
reclaimedBytes: number().int()
|
|
22644
22796
|
}), {
|
|
22645
22797
|
kind: "mutation",
|
|
22646
22798
|
auth: "admin"
|
|
22799
|
+
}), method(object({
|
|
22800
|
+
deviceId: number(),
|
|
22801
|
+
fromMs: number().optional(),
|
|
22802
|
+
toMs: number().optional()
|
|
22803
|
+
}), object({
|
|
22804
|
+
deletedBuckets: number().int(),
|
|
22805
|
+
reclaimedBytes: number().int()
|
|
22806
|
+
}), {
|
|
22807
|
+
kind: "mutation",
|
|
22808
|
+
auth: "admin"
|
|
22809
|
+
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
22810
|
+
kind: "query",
|
|
22811
|
+
auth: "admin"
|
|
22812
|
+
});
|
|
22813
|
+
/**
|
|
22814
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22815
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22816
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22817
|
+
* delete-after-download.
|
|
22818
|
+
*
|
|
22819
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22820
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22821
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22822
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22823
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22824
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22825
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22826
|
+
*/
|
|
22827
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22828
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22829
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22830
|
+
var ExportTimelapseSchema = object({
|
|
22831
|
+
everyMs: number().int().positive(),
|
|
22832
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22833
|
+
});
|
|
22834
|
+
/**
|
|
22835
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22836
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22837
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22838
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22839
|
+
*/
|
|
22840
|
+
var ExportOptionsSchema = object({
|
|
22841
|
+
speed: ExportSpeedSchema.optional(),
|
|
22842
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22843
|
+
includeAudio: boolean(),
|
|
22844
|
+
maxLifeMs: number().int().positive(),
|
|
22845
|
+
deleteAfterDownload: boolean(),
|
|
22846
|
+
title: string().max(200).optional()
|
|
22847
|
+
}).superRefine((v, ctx) => {
|
|
22848
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22849
|
+
code: ZodIssueCode.custom,
|
|
22850
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22851
|
+
path: ["timelapse"]
|
|
22852
|
+
});
|
|
22853
|
+
});
|
|
22854
|
+
var ExportStateSchema = _enum([
|
|
22855
|
+
"queued",
|
|
22856
|
+
"rendering",
|
|
22857
|
+
"ready",
|
|
22858
|
+
"failed",
|
|
22859
|
+
"expired",
|
|
22860
|
+
"deleted"
|
|
22861
|
+
]);
|
|
22862
|
+
/** One export job / history row. */
|
|
22863
|
+
var ExportRecordSchema = object({
|
|
22864
|
+
id: string(),
|
|
22865
|
+
deviceId: number(),
|
|
22866
|
+
profile: string(),
|
|
22867
|
+
fromMs: number(),
|
|
22868
|
+
toMs: number(),
|
|
22869
|
+
options: ExportOptionsSchema,
|
|
22870
|
+
state: ExportStateSchema,
|
|
22871
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22872
|
+
progressPct: number().nullable(),
|
|
22873
|
+
/** File size once ready; null before. */
|
|
22874
|
+
fileBytes: number().nullable(),
|
|
22875
|
+
expiresAt: number(),
|
|
22876
|
+
deleteAfterDownload: boolean(),
|
|
22877
|
+
/** Epoch of the first complete download; null until then. */
|
|
22878
|
+
downloadedAt: number().nullable(),
|
|
22879
|
+
createdAt: number(),
|
|
22880
|
+
/** User id/name that requested the export. */
|
|
22881
|
+
createdBy: string(),
|
|
22882
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22883
|
+
error: string().nullable()
|
|
22884
|
+
});
|
|
22885
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22886
|
+
var ExportDownloadSchema = object({
|
|
22887
|
+
url: string(),
|
|
22888
|
+
endpoints: array(string())
|
|
22889
|
+
});
|
|
22890
|
+
method(object({
|
|
22891
|
+
deviceId: number(),
|
|
22892
|
+
profile: string(),
|
|
22893
|
+
fromMs: number(),
|
|
22894
|
+
toMs: number(),
|
|
22895
|
+
options: ExportOptionsSchema
|
|
22896
|
+
}), ExportRecordSchema, {
|
|
22897
|
+
kind: "mutation",
|
|
22898
|
+
auth: "protected"
|
|
22899
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22900
|
+
kind: "query",
|
|
22901
|
+
auth: "protected"
|
|
22902
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22903
|
+
kind: "query",
|
|
22904
|
+
auth: "protected"
|
|
22905
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22906
|
+
kind: "mutation",
|
|
22907
|
+
auth: "protected"
|
|
22908
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22909
|
+
kind: "mutation",
|
|
22910
|
+
auth: "protected"
|
|
22911
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22912
|
+
kind: "query",
|
|
22913
|
+
auth: "protected"
|
|
22647
22914
|
});
|
|
22648
22915
|
/**
|
|
22649
22916
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
@@ -25663,6 +25930,12 @@ Object.freeze({
|
|
|
25663
25930
|
addonId: null,
|
|
25664
25931
|
access: "delete"
|
|
25665
25932
|
},
|
|
25933
|
+
"pipelineAnalytics.deleteDeviceEvents": {
|
|
25934
|
+
capName: "pipeline-analytics",
|
|
25935
|
+
capScope: "device",
|
|
25936
|
+
addonId: null,
|
|
25937
|
+
access: "delete"
|
|
25938
|
+
},
|
|
25666
25939
|
"pipelineAnalytics.deleteTracks": {
|
|
25667
25940
|
capName: "pipeline-analytics",
|
|
25668
25941
|
capScope: "device",
|
|
@@ -25693,6 +25966,12 @@ Object.freeze({
|
|
|
25693
25966
|
addonId: null,
|
|
25694
25967
|
access: "view"
|
|
25695
25968
|
},
|
|
25969
|
+
"pipelineAnalytics.getEventStoreFootprint": {
|
|
25970
|
+
capName: "pipeline-analytics",
|
|
25971
|
+
capScope: "device",
|
|
25972
|
+
addonId: null,
|
|
25973
|
+
access: "view"
|
|
25974
|
+
},
|
|
25696
25975
|
"pipelineAnalytics.getKeyEvents": {
|
|
25697
25976
|
capName: "pipeline-analytics",
|
|
25698
25977
|
capScope: "device",
|
|
@@ -25735,6 +26014,12 @@ Object.freeze({
|
|
|
25735
26014
|
addonId: null,
|
|
25736
26015
|
access: "view"
|
|
25737
26016
|
},
|
|
26017
|
+
"pipelineAnalytics.listOpsLog": {
|
|
26018
|
+
capName: "pipeline-analytics",
|
|
26019
|
+
capScope: "device",
|
|
26020
|
+
addonId: null,
|
|
26021
|
+
access: "view"
|
|
26022
|
+
},
|
|
25738
26023
|
"pipelineAnalytics.listRecentTracks": {
|
|
25739
26024
|
capName: "pipeline-analytics",
|
|
25740
26025
|
capScope: "device",
|
|
@@ -25747,6 +26032,12 @@ Object.freeze({
|
|
|
25747
26032
|
addonId: null,
|
|
25748
26033
|
access: "view"
|
|
25749
26034
|
},
|
|
26035
|
+
"pipelineAnalytics.pruneEvents": {
|
|
26036
|
+
capName: "pipeline-analytics",
|
|
26037
|
+
capScope: "device",
|
|
26038
|
+
addonId: null,
|
|
26039
|
+
access: "create"
|
|
26040
|
+
},
|
|
25750
26041
|
"pipelineAnalytics.pruneEventsBefore": {
|
|
25751
26042
|
capName: "pipeline-analytics",
|
|
25752
26043
|
capScope: "device",
|
|
@@ -26509,6 +26800,12 @@ Object.freeze({
|
|
|
26509
26800
|
addonId: null,
|
|
26510
26801
|
access: "create"
|
|
26511
26802
|
},
|
|
26803
|
+
"recording.deleteFootprint": {
|
|
26804
|
+
capName: "recording",
|
|
26805
|
+
capScope: "system",
|
|
26806
|
+
addonId: null,
|
|
26807
|
+
access: "delete"
|
|
26808
|
+
},
|
|
26512
26809
|
"recording.getAvailability": {
|
|
26513
26810
|
capName: "recording",
|
|
26514
26811
|
capScope: "system",
|
|
@@ -26539,6 +26836,12 @@ Object.freeze({
|
|
|
26539
26836
|
addonId: null,
|
|
26540
26837
|
access: "view"
|
|
26541
26838
|
},
|
|
26839
|
+
"recording.listOpsLog": {
|
|
26840
|
+
capName: "recording",
|
|
26841
|
+
capScope: "system",
|
|
26842
|
+
addonId: null,
|
|
26843
|
+
access: "view"
|
|
26844
|
+
},
|
|
26542
26845
|
"recording.locateSegment": {
|
|
26543
26846
|
capName: "recording",
|
|
26544
26847
|
capScope: "system",
|
|
@@ -26569,6 +26872,42 @@ Object.freeze({
|
|
|
26569
26872
|
addonId: null,
|
|
26570
26873
|
access: "create"
|
|
26571
26874
|
},
|
|
26875
|
+
"recordingExport.cancelExport": {
|
|
26876
|
+
capName: "recordingExport",
|
|
26877
|
+
capScope: "system",
|
|
26878
|
+
addonId: null,
|
|
26879
|
+
access: "create"
|
|
26880
|
+
},
|
|
26881
|
+
"recordingExport.createExport": {
|
|
26882
|
+
capName: "recordingExport",
|
|
26883
|
+
capScope: "system",
|
|
26884
|
+
addonId: null,
|
|
26885
|
+
access: "create"
|
|
26886
|
+
},
|
|
26887
|
+
"recordingExport.deleteExport": {
|
|
26888
|
+
capName: "recordingExport",
|
|
26889
|
+
capScope: "system",
|
|
26890
|
+
addonId: null,
|
|
26891
|
+
access: "delete"
|
|
26892
|
+
},
|
|
26893
|
+
"recordingExport.getDownloadUrl": {
|
|
26894
|
+
capName: "recordingExport",
|
|
26895
|
+
capScope: "system",
|
|
26896
|
+
addonId: null,
|
|
26897
|
+
access: "view"
|
|
26898
|
+
},
|
|
26899
|
+
"recordingExport.getExport": {
|
|
26900
|
+
capName: "recordingExport",
|
|
26901
|
+
capScope: "system",
|
|
26902
|
+
addonId: null,
|
|
26903
|
+
access: "view"
|
|
26904
|
+
},
|
|
26905
|
+
"recordingExport.listExports": {
|
|
26906
|
+
capName: "recordingExport",
|
|
26907
|
+
capScope: "system",
|
|
26908
|
+
addonId: null,
|
|
26909
|
+
access: "view"
|
|
26910
|
+
},
|
|
26572
26911
|
"sceneMonitor.captureReference": {
|
|
26573
26912
|
capName: "scene-monitor",
|
|
26574
26913
|
capScope: "device",
|
package/dist/addon.mjs
CHANGED
|
@@ -38,7 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
39
39
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
40
40
|
//#endregion
|
|
41
|
-
//#region ../types/dist/event-category-
|
|
41
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
42
42
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
43
43
|
EventCategory["SystemBoot"] = "system.boot";
|
|
44
44
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -191,6 +191,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
191
191
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
192
192
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
193
193
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
194
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
195
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
196
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
197
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
198
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
194
199
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
195
200
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
196
201
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -480,6 +485,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
480
485
|
*/
|
|
481
486
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
482
487
|
/**
|
|
488
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
489
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
490
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
491
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
492
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
493
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
494
|
+
* this bus topic drives notifier rules + live UI. See
|
|
495
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
496
|
+
*/
|
|
497
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
498
|
+
/**
|
|
499
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
500
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
501
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
502
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
503
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
504
|
+
*/
|
|
505
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
506
|
+
/**
|
|
483
507
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
484
508
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
485
509
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5232,6 +5256,25 @@ function preprocess(fn, schema) {
|
|
|
5232
5256
|
out: schema
|
|
5233
5257
|
});
|
|
5234
5258
|
}
|
|
5259
|
+
//#endregion
|
|
5260
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5261
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5262
|
+
var ZodIssueCode = {
|
|
5263
|
+
invalid_type: "invalid_type",
|
|
5264
|
+
too_big: "too_big",
|
|
5265
|
+
too_small: "too_small",
|
|
5266
|
+
invalid_format: "invalid_format",
|
|
5267
|
+
not_multiple_of: "not_multiple_of",
|
|
5268
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5269
|
+
invalid_union: "invalid_union",
|
|
5270
|
+
invalid_key: "invalid_key",
|
|
5271
|
+
invalid_element: "invalid_element",
|
|
5272
|
+
invalid_value: "invalid_value",
|
|
5273
|
+
custom: "custom"
|
|
5274
|
+
};
|
|
5275
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5276
|
+
var ZodFirstPartyTypeKind;
|
|
5277
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5235
5278
|
Object.fromEntries([
|
|
5236
5279
|
{
|
|
5237
5280
|
id: "overview",
|
|
@@ -7471,6 +7514,62 @@ var RecordingConfigSchema = object({
|
|
|
7471
7514
|
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7472
7515
|
});
|
|
7473
7516
|
/**
|
|
7517
|
+
* Ops-log — the durable, append-only operations audit shared by the
|
|
7518
|
+
* recordings and events management surfaces.
|
|
7519
|
+
*
|
|
7520
|
+
* ONE row shape is reused for both domains so a single "Activity" view can
|
|
7521
|
+
* merge the recorder's DurableState ring (recordings ops-log) and the
|
|
7522
|
+
* pipeline-analytics SQLite collection (events ops-log). Each row records a
|
|
7523
|
+
* management operation, WHY it ran (reason), and its measurable effect
|
|
7524
|
+
* (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
|
|
7525
|
+
* never fail the operation it records.
|
|
7526
|
+
*/
|
|
7527
|
+
/** Which management domain the operation belongs to. */
|
|
7528
|
+
var OpsLogDomainSchema = _enum(["recording", "events"]);
|
|
7529
|
+
/** The kind of management operation performed. */
|
|
7530
|
+
var OpsLogOpSchema = _enum([
|
|
7531
|
+
"prune",
|
|
7532
|
+
"manual-delete",
|
|
7533
|
+
"rescan",
|
|
7534
|
+
"retention-run"
|
|
7535
|
+
]);
|
|
7536
|
+
/** Why the operation ran. */
|
|
7537
|
+
var OpsLogReasonSchema = _enum([
|
|
7538
|
+
"retention",
|
|
7539
|
+
"quota",
|
|
7540
|
+
"manual",
|
|
7541
|
+
"operator"
|
|
7542
|
+
]);
|
|
7543
|
+
/** One audit row, shared verbatim by both domains. */
|
|
7544
|
+
var OpsLogEntrySchema = object({
|
|
7545
|
+
/** Unique row id. */
|
|
7546
|
+
id: string(),
|
|
7547
|
+
/** Epoch ms the operation completed. */
|
|
7548
|
+
at: number(),
|
|
7549
|
+
domain: OpsLogDomainSchema,
|
|
7550
|
+
op: OpsLogOpSchema,
|
|
7551
|
+
reason: OpsLogReasonSchema,
|
|
7552
|
+
/** The camera the op targeted; null for a cluster/global op. */
|
|
7553
|
+
deviceId: number().nullable(),
|
|
7554
|
+
/** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
|
|
7555
|
+
nodeId: string(),
|
|
7556
|
+
/** Buckets / rows deleted (op-specific unit). */
|
|
7557
|
+
itemsAffected: number(),
|
|
7558
|
+
/** Bytes reclaimed by the op (0 when not measurable). */
|
|
7559
|
+
bytesReclaimed: number(),
|
|
7560
|
+
/** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
|
|
7561
|
+
detail: string().nullable(),
|
|
7562
|
+
/** Who/what triggered the op. */
|
|
7563
|
+
actor: string()
|
|
7564
|
+
});
|
|
7565
|
+
/** Shared query input for the per-domain `listOpsLog` cap methods. */
|
|
7566
|
+
var OpsLogQueryInputSchema = object({
|
|
7567
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7568
|
+
deviceId: number().optional(),
|
|
7569
|
+
/** Max rows returned, newest-first. */
|
|
7570
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
7571
|
+
});
|
|
7572
|
+
/**
|
|
7474
7573
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
7475
7574
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
7476
7575
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -14826,7 +14925,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
14826
14925
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
14827
14926
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
14828
14927
|
*/
|
|
14829
|
-
var ZoneRuleStageEnum = _enum([
|
|
14928
|
+
var ZoneRuleStageEnum = _enum([
|
|
14929
|
+
"motion",
|
|
14930
|
+
"detection",
|
|
14931
|
+
"package"
|
|
14932
|
+
]);
|
|
14830
14933
|
/**
|
|
14831
14934
|
* Runtime registry: cap-property-name → cap definition. `BaseDevice`'s
|
|
14832
14935
|
* `state` getter looks up the cap definition here to construct a
|
|
@@ -14920,16 +15023,25 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
14920
15023
|
})
|
|
14921
15024
|
},
|
|
14922
15025
|
/**
|
|
14923
|
-
* Runtime-state slice —
|
|
15026
|
+
* Runtime-state slice — every stage mirrored together so consumers
|
|
14924
15027
|
* see one reactive handle (`device.state.zoneRules.value`) instead
|
|
14925
|
-
* of
|
|
14926
|
-
* `{motion, detection}` shape, so subscribers always get the
|
|
15028
|
+
* of one per stage. Bulk-replace mutations on any stage write the full
|
|
15029
|
+
* `{motion, detection, package}` shape, so subscribers always get the
|
|
14927
15030
|
* complete current set. Consumers that only care about one stage
|
|
14928
15031
|
* just read the matching property.
|
|
15032
|
+
*
|
|
15033
|
+
* `package` backs the package-drop detector — a package zone is a
|
|
15034
|
+
* `ZoneRule` on the `'package'` stage referencing drawn polygons
|
|
15035
|
+
* (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
|
|
15036
|
+
* The orchestrator provider writes this stage as a first-class slice
|
|
15037
|
+
* (Phase 4): every mutation mirrors the full `{motion, detection,
|
|
15038
|
+
* package}` shape, so consumers read the current package rules directly
|
|
15039
|
+
* off `device.state.zoneRules.value.package`.
|
|
14929
15040
|
*/
|
|
14930
15041
|
runtimeState: object({
|
|
14931
15042
|
motion: array(ZoneRuleSchema).readonly(),
|
|
14932
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
15043
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
15044
|
+
package: array(ZoneRuleSchema).readonly()
|
|
14933
15045
|
})
|
|
14934
15046
|
},
|
|
14935
15047
|
zones: zonesCapability
|
|
@@ -18976,6 +19088,7 @@ var EventKindIconSchema = _enum([
|
|
|
18976
19088
|
"smoke",
|
|
18977
19089
|
"water",
|
|
18978
19090
|
"button",
|
|
19091
|
+
"package",
|
|
18979
19092
|
"generic"
|
|
18980
19093
|
]);
|
|
18981
19094
|
var EventKindCategorySchema = _enum([
|
|
@@ -18983,7 +19096,8 @@ var EventKindCategorySchema = _enum([
|
|
|
18983
19096
|
"audio",
|
|
18984
19097
|
"detection",
|
|
18985
19098
|
"sensor",
|
|
18986
|
-
"custom"
|
|
19099
|
+
"custom",
|
|
19100
|
+
"package"
|
|
18987
19101
|
]);
|
|
18988
19102
|
var EventKindDescriptorSchema = object({
|
|
18989
19103
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19324,6 +19438,26 @@ var TrackCascadeCountsSchema = object({
|
|
|
19324
19438
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
19325
19439
|
embeddings: number().int()
|
|
19326
19440
|
});
|
|
19441
|
+
/** Event-store footprint for one camera. */
|
|
19442
|
+
var EventStoreDeviceFootprintSchema = object({
|
|
19443
|
+
deviceId: number(),
|
|
19444
|
+
/** Persisted event rows (motion + object + audio) for the camera. */
|
|
19445
|
+
rows: number().int(),
|
|
19446
|
+
/** Event-owned media bytes on disk for the camera. */
|
|
19447
|
+
bytes: number().int()
|
|
19448
|
+
});
|
|
19449
|
+
/** Aggregate event-store footprint: global totals + per-camera breakdown. */
|
|
19450
|
+
var EventStoreFootprintSchema = object({
|
|
19451
|
+
totalRows: number().int(),
|
|
19452
|
+
totalBytes: number().int(),
|
|
19453
|
+
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19454
|
+
});
|
|
19455
|
+
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19456
|
+
var EventPruneCountsSchema = object({
|
|
19457
|
+
motion: number().int(),
|
|
19458
|
+
object: number().int(),
|
|
19459
|
+
audio: number().int()
|
|
19460
|
+
});
|
|
19327
19461
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
19328
19462
|
deviceId: number(),
|
|
19329
19463
|
trackId: string()
|
|
@@ -19387,6 +19521,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19387
19521
|
}), {
|
|
19388
19522
|
kind: "mutation",
|
|
19389
19523
|
auth: "admin"
|
|
19524
|
+
}), method(object({}), EventStoreFootprintSchema, {
|
|
19525
|
+
kind: "query",
|
|
19526
|
+
auth: "admin"
|
|
19527
|
+
}), method(object({
|
|
19528
|
+
olderThanMs: number(),
|
|
19529
|
+
reason: OpsLogReasonSchema.optional()
|
|
19530
|
+
}), EventPruneCountsSchema, {
|
|
19531
|
+
kind: "mutation",
|
|
19532
|
+
auth: "admin"
|
|
19533
|
+
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
19534
|
+
kind: "mutation",
|
|
19535
|
+
auth: "admin"
|
|
19536
|
+
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
19537
|
+
kind: "query",
|
|
19538
|
+
auth: "admin"
|
|
19390
19539
|
}), method(object({
|
|
19391
19540
|
eventId: string(),
|
|
19392
19541
|
kind: MediaFileKindEnum.optional()
|
|
@@ -22637,13 +22786,131 @@ method(object({
|
|
|
22637
22786
|
}), method(object({ deviceId: number() }), RecordingStatusSchema, {
|
|
22638
22787
|
kind: "mutation",
|
|
22639
22788
|
auth: "admin"
|
|
22640
|
-
}), method(object({
|
|
22789
|
+
}), method(object({
|
|
22790
|
+
deviceId: number(),
|
|
22791
|
+
reason: OpsLogReasonSchema.optional()
|
|
22792
|
+
}), object({
|
|
22641
22793
|
floorMs: number().nullable(),
|
|
22642
22794
|
deletedBuckets: number().int(),
|
|
22643
22795
|
reclaimedBytes: number().int()
|
|
22644
22796
|
}), {
|
|
22645
22797
|
kind: "mutation",
|
|
22646
22798
|
auth: "admin"
|
|
22799
|
+
}), method(object({
|
|
22800
|
+
deviceId: number(),
|
|
22801
|
+
fromMs: number().optional(),
|
|
22802
|
+
toMs: number().optional()
|
|
22803
|
+
}), object({
|
|
22804
|
+
deletedBuckets: number().int(),
|
|
22805
|
+
reclaimedBytes: number().int()
|
|
22806
|
+
}), {
|
|
22807
|
+
kind: "mutation",
|
|
22808
|
+
auth: "admin"
|
|
22809
|
+
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
22810
|
+
kind: "query",
|
|
22811
|
+
auth: "admin"
|
|
22812
|
+
});
|
|
22813
|
+
/**
|
|
22814
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
22815
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
22816
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
22817
|
+
* delete-after-download.
|
|
22818
|
+
*
|
|
22819
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
22820
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
22821
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
22822
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
22823
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
22824
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
22825
|
+
* SQLite); history rows survive file deletion for audit.
|
|
22826
|
+
*/
|
|
22827
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
22828
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
22829
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
22830
|
+
var ExportTimelapseSchema = object({
|
|
22831
|
+
everyMs: number().int().positive(),
|
|
22832
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
22833
|
+
});
|
|
22834
|
+
/**
|
|
22835
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
22836
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
22837
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
22838
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
22839
|
+
*/
|
|
22840
|
+
var ExportOptionsSchema = object({
|
|
22841
|
+
speed: ExportSpeedSchema.optional(),
|
|
22842
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
22843
|
+
includeAudio: boolean(),
|
|
22844
|
+
maxLifeMs: number().int().positive(),
|
|
22845
|
+
deleteAfterDownload: boolean(),
|
|
22846
|
+
title: string().max(200).optional()
|
|
22847
|
+
}).superRefine((v, ctx) => {
|
|
22848
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
22849
|
+
code: ZodIssueCode.custom,
|
|
22850
|
+
message: "speed and timelapse are mutually exclusive",
|
|
22851
|
+
path: ["timelapse"]
|
|
22852
|
+
});
|
|
22853
|
+
});
|
|
22854
|
+
var ExportStateSchema = _enum([
|
|
22855
|
+
"queued",
|
|
22856
|
+
"rendering",
|
|
22857
|
+
"ready",
|
|
22858
|
+
"failed",
|
|
22859
|
+
"expired",
|
|
22860
|
+
"deleted"
|
|
22861
|
+
]);
|
|
22862
|
+
/** One export job / history row. */
|
|
22863
|
+
var ExportRecordSchema = object({
|
|
22864
|
+
id: string(),
|
|
22865
|
+
deviceId: number(),
|
|
22866
|
+
profile: string(),
|
|
22867
|
+
fromMs: number(),
|
|
22868
|
+
toMs: number(),
|
|
22869
|
+
options: ExportOptionsSchema,
|
|
22870
|
+
state: ExportStateSchema,
|
|
22871
|
+
/** 0–100 while rendering; null otherwise. */
|
|
22872
|
+
progressPct: number().nullable(),
|
|
22873
|
+
/** File size once ready; null before. */
|
|
22874
|
+
fileBytes: number().nullable(),
|
|
22875
|
+
expiresAt: number(),
|
|
22876
|
+
deleteAfterDownload: boolean(),
|
|
22877
|
+
/** Epoch of the first complete download; null until then. */
|
|
22878
|
+
downloadedAt: number().nullable(),
|
|
22879
|
+
createdAt: number(),
|
|
22880
|
+
/** User id/name that requested the export. */
|
|
22881
|
+
createdBy: string(),
|
|
22882
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
22883
|
+
error: string().nullable()
|
|
22884
|
+
});
|
|
22885
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
22886
|
+
var ExportDownloadSchema = object({
|
|
22887
|
+
url: string(),
|
|
22888
|
+
endpoints: array(string())
|
|
22889
|
+
});
|
|
22890
|
+
method(object({
|
|
22891
|
+
deviceId: number(),
|
|
22892
|
+
profile: string(),
|
|
22893
|
+
fromMs: number(),
|
|
22894
|
+
toMs: number(),
|
|
22895
|
+
options: ExportOptionsSchema
|
|
22896
|
+
}), ExportRecordSchema, {
|
|
22897
|
+
kind: "mutation",
|
|
22898
|
+
auth: "protected"
|
|
22899
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
22900
|
+
kind: "query",
|
|
22901
|
+
auth: "protected"
|
|
22902
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22903
|
+
kind: "query",
|
|
22904
|
+
auth: "protected"
|
|
22905
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22906
|
+
kind: "mutation",
|
|
22907
|
+
auth: "protected"
|
|
22908
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
22909
|
+
kind: "mutation",
|
|
22910
|
+
auth: "protected"
|
|
22911
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
22912
|
+
kind: "query",
|
|
22913
|
+
auth: "protected"
|
|
22647
22914
|
});
|
|
22648
22915
|
/**
|
|
22649
22916
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
@@ -25663,6 +25930,12 @@ Object.freeze({
|
|
|
25663
25930
|
addonId: null,
|
|
25664
25931
|
access: "delete"
|
|
25665
25932
|
},
|
|
25933
|
+
"pipelineAnalytics.deleteDeviceEvents": {
|
|
25934
|
+
capName: "pipeline-analytics",
|
|
25935
|
+
capScope: "device",
|
|
25936
|
+
addonId: null,
|
|
25937
|
+
access: "delete"
|
|
25938
|
+
},
|
|
25666
25939
|
"pipelineAnalytics.deleteTracks": {
|
|
25667
25940
|
capName: "pipeline-analytics",
|
|
25668
25941
|
capScope: "device",
|
|
@@ -25693,6 +25966,12 @@ Object.freeze({
|
|
|
25693
25966
|
addonId: null,
|
|
25694
25967
|
access: "view"
|
|
25695
25968
|
},
|
|
25969
|
+
"pipelineAnalytics.getEventStoreFootprint": {
|
|
25970
|
+
capName: "pipeline-analytics",
|
|
25971
|
+
capScope: "device",
|
|
25972
|
+
addonId: null,
|
|
25973
|
+
access: "view"
|
|
25974
|
+
},
|
|
25696
25975
|
"pipelineAnalytics.getKeyEvents": {
|
|
25697
25976
|
capName: "pipeline-analytics",
|
|
25698
25977
|
capScope: "device",
|
|
@@ -25735,6 +26014,12 @@ Object.freeze({
|
|
|
25735
26014
|
addonId: null,
|
|
25736
26015
|
access: "view"
|
|
25737
26016
|
},
|
|
26017
|
+
"pipelineAnalytics.listOpsLog": {
|
|
26018
|
+
capName: "pipeline-analytics",
|
|
26019
|
+
capScope: "device",
|
|
26020
|
+
addonId: null,
|
|
26021
|
+
access: "view"
|
|
26022
|
+
},
|
|
25738
26023
|
"pipelineAnalytics.listRecentTracks": {
|
|
25739
26024
|
capName: "pipeline-analytics",
|
|
25740
26025
|
capScope: "device",
|
|
@@ -25747,6 +26032,12 @@ Object.freeze({
|
|
|
25747
26032
|
addonId: null,
|
|
25748
26033
|
access: "view"
|
|
25749
26034
|
},
|
|
26035
|
+
"pipelineAnalytics.pruneEvents": {
|
|
26036
|
+
capName: "pipeline-analytics",
|
|
26037
|
+
capScope: "device",
|
|
26038
|
+
addonId: null,
|
|
26039
|
+
access: "create"
|
|
26040
|
+
},
|
|
25750
26041
|
"pipelineAnalytics.pruneEventsBefore": {
|
|
25751
26042
|
capName: "pipeline-analytics",
|
|
25752
26043
|
capScope: "device",
|
|
@@ -26509,6 +26800,12 @@ Object.freeze({
|
|
|
26509
26800
|
addonId: null,
|
|
26510
26801
|
access: "create"
|
|
26511
26802
|
},
|
|
26803
|
+
"recording.deleteFootprint": {
|
|
26804
|
+
capName: "recording",
|
|
26805
|
+
capScope: "system",
|
|
26806
|
+
addonId: null,
|
|
26807
|
+
access: "delete"
|
|
26808
|
+
},
|
|
26512
26809
|
"recording.getAvailability": {
|
|
26513
26810
|
capName: "recording",
|
|
26514
26811
|
capScope: "system",
|
|
@@ -26539,6 +26836,12 @@ Object.freeze({
|
|
|
26539
26836
|
addonId: null,
|
|
26540
26837
|
access: "view"
|
|
26541
26838
|
},
|
|
26839
|
+
"recording.listOpsLog": {
|
|
26840
|
+
capName: "recording",
|
|
26841
|
+
capScope: "system",
|
|
26842
|
+
addonId: null,
|
|
26843
|
+
access: "view"
|
|
26844
|
+
},
|
|
26542
26845
|
"recording.locateSegment": {
|
|
26543
26846
|
capName: "recording",
|
|
26544
26847
|
capScope: "system",
|
|
@@ -26569,6 +26872,42 @@ Object.freeze({
|
|
|
26569
26872
|
addonId: null,
|
|
26570
26873
|
access: "create"
|
|
26571
26874
|
},
|
|
26875
|
+
"recordingExport.cancelExport": {
|
|
26876
|
+
capName: "recordingExport",
|
|
26877
|
+
capScope: "system",
|
|
26878
|
+
addonId: null,
|
|
26879
|
+
access: "create"
|
|
26880
|
+
},
|
|
26881
|
+
"recordingExport.createExport": {
|
|
26882
|
+
capName: "recordingExport",
|
|
26883
|
+
capScope: "system",
|
|
26884
|
+
addonId: null,
|
|
26885
|
+
access: "create"
|
|
26886
|
+
},
|
|
26887
|
+
"recordingExport.deleteExport": {
|
|
26888
|
+
capName: "recordingExport",
|
|
26889
|
+
capScope: "system",
|
|
26890
|
+
addonId: null,
|
|
26891
|
+
access: "delete"
|
|
26892
|
+
},
|
|
26893
|
+
"recordingExport.getDownloadUrl": {
|
|
26894
|
+
capName: "recordingExport",
|
|
26895
|
+
capScope: "system",
|
|
26896
|
+
addonId: null,
|
|
26897
|
+
access: "view"
|
|
26898
|
+
},
|
|
26899
|
+
"recordingExport.getExport": {
|
|
26900
|
+
capName: "recordingExport",
|
|
26901
|
+
capScope: "system",
|
|
26902
|
+
addonId: null,
|
|
26903
|
+
access: "view"
|
|
26904
|
+
},
|
|
26905
|
+
"recordingExport.listExports": {
|
|
26906
|
+
capName: "recordingExport",
|
|
26907
|
+
capScope: "system",
|
|
26908
|
+
addonId: null,
|
|
26909
|
+
access: "view"
|
|
26910
|
+
},
|
|
26572
26911
|
"sceneMonitor.captureReference": {
|
|
26573
26912
|
capName: "scene-monitor",
|
|
26574
26913
|
capScope: "device",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-import-alexa",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|