@camstack/addon-agent-ui 1.1.25 → 1.1.27
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 +219 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-D4HJq7Mw.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -153,6 +153,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
153
153
|
/** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
|
|
154
154
|
* thumb is a scrub gap the recorder's keyframe backfill covers. */
|
|
155
155
|
EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
|
|
156
|
+
/** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
|
|
157
|
+
* progress bar the client reconciles via `recordingExport.getExport`. */
|
|
158
|
+
EventCategory["RecordingExportProgress"] = "recording.export.progress";
|
|
159
|
+
EventCategory["RecordingExportCompleted"] = "recording.export.completed";
|
|
160
|
+
EventCategory["RecordingExportFailed"] = "recording.export.failed";
|
|
156
161
|
EventCategory["DetectionEvent"] = "detection.event";
|
|
157
162
|
EventCategory["SessionTrackNew"] = "session.track.new";
|
|
158
163
|
EventCategory["SessionTrackExpired"] = "session.track.expired";
|
|
@@ -442,6 +447,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
442
447
|
*/
|
|
443
448
|
EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
|
|
444
449
|
/**
|
|
450
|
+
* Fired by `addon-post-analysis` when a package-drop is confirmed inside
|
|
451
|
+
* a package zone — a newly-appeared stationary object of a package class
|
|
452
|
+
* that cleared the class / zone / dwell / size gates. Payload:
|
|
453
|
+
* `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
|
|
454
|
+
* entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
|
|
455
|
+
* Telemetry (D8): the durable record is the `package-events` store row;
|
|
456
|
+
* this bus topic drives notifier rules + live UI. See
|
|
457
|
+
* docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
|
|
458
|
+
*/
|
|
459
|
+
EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
|
|
460
|
+
/**
|
|
461
|
+
* Fired by `addon-post-analysis` when a previously-delivered package
|
|
462
|
+
* leaves its zone (the stationary entry departed — moved or swept).
|
|
463
|
+
* Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
|
|
464
|
+
* `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
|
|
465
|
+
* Telemetry (D8). See package-zones-design §5.2.
|
|
466
|
+
*/
|
|
467
|
+
EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
|
|
468
|
+
/**
|
|
445
469
|
* Fired by `addon-post-analysis` whenever a gallery face row changes:
|
|
446
470
|
* `kind:'buffered'` a new detected face was persisted, `'assigned'` /
|
|
447
471
|
* `'unassigned'` its identity link changed, `'deleted'` the row was
|
|
@@ -5180,6 +5204,25 @@ function _instanceof(cls, params = {}) {
|
|
|
5180
5204
|
};
|
|
5181
5205
|
return inst;
|
|
5182
5206
|
}
|
|
5207
|
+
//#endregion
|
|
5208
|
+
//#region ../../node_modules/zod/v4/classic/compat.js
|
|
5209
|
+
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
5210
|
+
var ZodIssueCode = {
|
|
5211
|
+
invalid_type: "invalid_type",
|
|
5212
|
+
too_big: "too_big",
|
|
5213
|
+
too_small: "too_small",
|
|
5214
|
+
invalid_format: "invalid_format",
|
|
5215
|
+
not_multiple_of: "not_multiple_of",
|
|
5216
|
+
unrecognized_keys: "unrecognized_keys",
|
|
5217
|
+
invalid_union: "invalid_union",
|
|
5218
|
+
invalid_key: "invalid_key",
|
|
5219
|
+
invalid_element: "invalid_element",
|
|
5220
|
+
invalid_value: "invalid_value",
|
|
5221
|
+
custom: "custom"
|
|
5222
|
+
};
|
|
5223
|
+
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5224
|
+
var ZodFirstPartyTypeKind;
|
|
5225
|
+
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5183
5226
|
Object.fromEntries([
|
|
5184
5227
|
{
|
|
5185
5228
|
id: "overview",
|
|
@@ -7231,6 +7274,24 @@ var RecordingRetentionSchema = object({
|
|
|
7231
7274
|
maxSizeGb: number().min(0).optional()
|
|
7232
7275
|
});
|
|
7233
7276
|
/**
|
|
7277
|
+
* Scrub-thumbnail fidelity preset — the single per-camera selector bundling the
|
|
7278
|
+
* sprite tile RESOLUTION + JPEG QUALITY the recorder packs timeline-scrub
|
|
7279
|
+
* previews at. Five graduated steps; absent on a config = `standard` (the
|
|
7280
|
+
* shipped default, matching `sheet-geometry`/`sheet-composer`).
|
|
7281
|
+
*
|
|
7282
|
+
* Existing sheets are IMMUTABLE — a changed preset applies to NEW windows only.
|
|
7283
|
+
* Each window's index sidecar carries its own tile dims, so a camera whose
|
|
7284
|
+
* preset changed over time renders every historical window at the dims it was
|
|
7285
|
+
* written with.
|
|
7286
|
+
*/
|
|
7287
|
+
var ScrubThumbnailPresetSchema = _enum([
|
|
7288
|
+
"minimal",
|
|
7289
|
+
"low",
|
|
7290
|
+
"standard",
|
|
7291
|
+
"high",
|
|
7292
|
+
"max"
|
|
7293
|
+
]);
|
|
7294
|
+
/**
|
|
7234
7295
|
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
7235
7296
|
*
|
|
7236
7297
|
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
@@ -7267,7 +7328,14 @@ var RecordingConfigSchema = object({
|
|
|
7267
7328
|
* derived into bands once via `migrateConfigToBands`.
|
|
7268
7329
|
*/
|
|
7269
7330
|
bands: array(RecordingBandSchema).optional(),
|
|
7270
|
-
retention: RecordingRetentionSchema.optional()
|
|
7331
|
+
retention: RecordingRetentionSchema.optional(),
|
|
7332
|
+
/**
|
|
7333
|
+
* Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
|
|
7334
|
+
* timeline-scrub sprite previews). Absent = `standard`. Applies to NEW
|
|
7335
|
+
* windows only — existing sheets are immutable, and each window's index
|
|
7336
|
+
* carries its own tile dims so mixed-preset history renders correctly.
|
|
7337
|
+
*/
|
|
7338
|
+
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7271
7339
|
});
|
|
7272
7340
|
/**
|
|
7273
7341
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
@@ -12519,7 +12587,11 @@ array(ZoneRuleSchema).readonly();
|
|
|
12519
12587
|
* Extend the enum here when a new gating consumer comes online (audio
|
|
12520
12588
|
* gating, alert filtering, …) — no other surface needs to change.
|
|
12521
12589
|
*/
|
|
12522
|
-
var ZoneRuleStageEnum = _enum([
|
|
12590
|
+
var ZoneRuleStageEnum = _enum([
|
|
12591
|
+
"motion",
|
|
12592
|
+
"detection",
|
|
12593
|
+
"package"
|
|
12594
|
+
]);
|
|
12523
12595
|
DeviceType.Camera, method(object({
|
|
12524
12596
|
deviceId: number(),
|
|
12525
12597
|
stage: ZoneRuleStageEnum
|
|
@@ -12532,7 +12604,8 @@ DeviceType.Camera, method(object({
|
|
|
12532
12604
|
auth: "admin"
|
|
12533
12605
|
}), object({
|
|
12534
12606
|
motion: array(ZoneRuleSchema).readonly(),
|
|
12535
|
-
detection: array(ZoneRuleSchema).readonly()
|
|
12607
|
+
detection: array(ZoneRuleSchema).readonly(),
|
|
12608
|
+
package: array(ZoneRuleSchema).readonly()
|
|
12536
12609
|
});
|
|
12537
12610
|
var ProviderStatusSchema = object({
|
|
12538
12611
|
connected: boolean(),
|
|
@@ -15715,6 +15788,7 @@ var EventKindIconSchema = _enum([
|
|
|
15715
15788
|
"smoke",
|
|
15716
15789
|
"water",
|
|
15717
15790
|
"button",
|
|
15791
|
+
"package",
|
|
15718
15792
|
"generic"
|
|
15719
15793
|
]);
|
|
15720
15794
|
var EventKindCategorySchema = _enum([
|
|
@@ -15722,7 +15796,8 @@ var EventKindCategorySchema = _enum([
|
|
|
15722
15796
|
"audio",
|
|
15723
15797
|
"detection",
|
|
15724
15798
|
"sensor",
|
|
15725
|
-
"custom"
|
|
15799
|
+
"custom",
|
|
15800
|
+
"package"
|
|
15726
15801
|
]);
|
|
15727
15802
|
var EventKindDescriptorSchema = object({
|
|
15728
15803
|
/** Stable kind id (e.g. 'motion', 'person', 'contact'). */
|
|
@@ -19368,6 +19443,108 @@ method(object({
|
|
|
19368
19443
|
auth: "admin"
|
|
19369
19444
|
});
|
|
19370
19445
|
/**
|
|
19446
|
+
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
19447
|
+
* MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
|
|
19448
|
+
* bounded lifetime with a durable history, auto-expiry, and optional
|
|
19449
|
+
* delete-after-download.
|
|
19450
|
+
*
|
|
19451
|
+
* Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
|
|
19452
|
+
* recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
|
|
19453
|
+
* default `hub`) registers it. Device-scoped methods carry `deviceId` in their
|
|
19454
|
+
* input and dispatch to that single provider; the render runs on the node that
|
|
19455
|
+
* owns the footage (no cross-node segment transfer). Download rides the
|
|
19456
|
+
* framework addon data-plane. State persists in a DurableState blob (NOT
|
|
19457
|
+
* SQLite); history rows survive file deletion for audit.
|
|
19458
|
+
*/
|
|
19459
|
+
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
19460
|
+
var ExportSpeedSchema = number().min(.25).max(32);
|
|
19461
|
+
/** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
|
|
19462
|
+
var ExportTimelapseSchema = object({
|
|
19463
|
+
everyMs: number().int().positive(),
|
|
19464
|
+
outputFps: number().int().min(1).max(60).optional()
|
|
19465
|
+
});
|
|
19466
|
+
/**
|
|
19467
|
+
* Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
|
|
19468
|
+
* is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
|
|
19469
|
+
* silent. `maxLifeMs` bounds how long the finished file is kept;
|
|
19470
|
+
* `deleteAfterDownload` removes it shortly after the first complete download.
|
|
19471
|
+
*/
|
|
19472
|
+
var ExportOptionsSchema = object({
|
|
19473
|
+
speed: ExportSpeedSchema.optional(),
|
|
19474
|
+
timelapse: ExportTimelapseSchema.optional(),
|
|
19475
|
+
includeAudio: boolean(),
|
|
19476
|
+
maxLifeMs: number().int().positive(),
|
|
19477
|
+
deleteAfterDownload: boolean(),
|
|
19478
|
+
title: string().max(200).optional()
|
|
19479
|
+
}).superRefine((v, ctx) => {
|
|
19480
|
+
if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
|
|
19481
|
+
code: ZodIssueCode.custom,
|
|
19482
|
+
message: "speed and timelapse are mutually exclusive",
|
|
19483
|
+
path: ["timelapse"]
|
|
19484
|
+
});
|
|
19485
|
+
});
|
|
19486
|
+
var ExportStateSchema = _enum([
|
|
19487
|
+
"queued",
|
|
19488
|
+
"rendering",
|
|
19489
|
+
"ready",
|
|
19490
|
+
"failed",
|
|
19491
|
+
"expired",
|
|
19492
|
+
"deleted"
|
|
19493
|
+
]);
|
|
19494
|
+
/** One export job / history row. */
|
|
19495
|
+
var ExportRecordSchema = object({
|
|
19496
|
+
id: string(),
|
|
19497
|
+
deviceId: number(),
|
|
19498
|
+
profile: string(),
|
|
19499
|
+
fromMs: number(),
|
|
19500
|
+
toMs: number(),
|
|
19501
|
+
options: ExportOptionsSchema,
|
|
19502
|
+
state: ExportStateSchema,
|
|
19503
|
+
/** 0–100 while rendering; null otherwise. */
|
|
19504
|
+
progressPct: number().nullable(),
|
|
19505
|
+
/** File size once ready; null before. */
|
|
19506
|
+
fileBytes: number().nullable(),
|
|
19507
|
+
expiresAt: number(),
|
|
19508
|
+
deleteAfterDownload: boolean(),
|
|
19509
|
+
/** Epoch of the first complete download; null until then. */
|
|
19510
|
+
downloadedAt: number().nullable(),
|
|
19511
|
+
createdAt: number(),
|
|
19512
|
+
/** User id/name that requested the export. */
|
|
19513
|
+
createdBy: string(),
|
|
19514
|
+
/** Failure reason when state is 'failed'; null otherwise. */
|
|
19515
|
+
error: string().nullable()
|
|
19516
|
+
});
|
|
19517
|
+
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
19518
|
+
var ExportDownloadSchema = object({
|
|
19519
|
+
url: string(),
|
|
19520
|
+
endpoints: array(string())
|
|
19521
|
+
});
|
|
19522
|
+
method(object({
|
|
19523
|
+
deviceId: number(),
|
|
19524
|
+
profile: string(),
|
|
19525
|
+
fromMs: number(),
|
|
19526
|
+
toMs: number(),
|
|
19527
|
+
options: ExportOptionsSchema
|
|
19528
|
+
}), ExportRecordSchema, {
|
|
19529
|
+
kind: "mutation",
|
|
19530
|
+
auth: "protected"
|
|
19531
|
+
}), method(object({ deviceId: number().optional() }), array(ExportRecordSchema), {
|
|
19532
|
+
kind: "query",
|
|
19533
|
+
auth: "protected"
|
|
19534
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19535
|
+
kind: "query",
|
|
19536
|
+
auth: "protected"
|
|
19537
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19538
|
+
kind: "mutation",
|
|
19539
|
+
auth: "protected"
|
|
19540
|
+
}), method(object({ exportId: string() }), ExportRecordSchema, {
|
|
19541
|
+
kind: "mutation",
|
|
19542
|
+
auth: "protected"
|
|
19543
|
+
}), method(object({ exportId: string() }), ExportDownloadSchema, {
|
|
19544
|
+
kind: "query",
|
|
19545
|
+
auth: "protected"
|
|
19546
|
+
});
|
|
19547
|
+
/**
|
|
19371
19548
|
* One publishable camera stream as its OWNING PROVIDER describes it — the same
|
|
19372
19549
|
* payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
|
|
19373
19550
|
* `deviceId`.
|
|
@@ -23291,6 +23468,42 @@ Object.freeze({
|
|
|
23291
23468
|
addonId: null,
|
|
23292
23469
|
access: "create"
|
|
23293
23470
|
},
|
|
23471
|
+
"recordingExport.cancelExport": {
|
|
23472
|
+
capName: "recordingExport",
|
|
23473
|
+
capScope: "system",
|
|
23474
|
+
addonId: null,
|
|
23475
|
+
access: "create"
|
|
23476
|
+
},
|
|
23477
|
+
"recordingExport.createExport": {
|
|
23478
|
+
capName: "recordingExport",
|
|
23479
|
+
capScope: "system",
|
|
23480
|
+
addonId: null,
|
|
23481
|
+
access: "create"
|
|
23482
|
+
},
|
|
23483
|
+
"recordingExport.deleteExport": {
|
|
23484
|
+
capName: "recordingExport",
|
|
23485
|
+
capScope: "system",
|
|
23486
|
+
addonId: null,
|
|
23487
|
+
access: "delete"
|
|
23488
|
+
},
|
|
23489
|
+
"recordingExport.getDownloadUrl": {
|
|
23490
|
+
capName: "recordingExport",
|
|
23491
|
+
capScope: "system",
|
|
23492
|
+
addonId: null,
|
|
23493
|
+
access: "view"
|
|
23494
|
+
},
|
|
23495
|
+
"recordingExport.getExport": {
|
|
23496
|
+
capName: "recordingExport",
|
|
23497
|
+
capScope: "system",
|
|
23498
|
+
addonId: null,
|
|
23499
|
+
access: "view"
|
|
23500
|
+
},
|
|
23501
|
+
"recordingExport.listExports": {
|
|
23502
|
+
capName: "recordingExport",
|
|
23503
|
+
capScope: "system",
|
|
23504
|
+
addonId: null,
|
|
23505
|
+
access: "view"
|
|
23506
|
+
},
|
|
23294
23507
|
"sceneMonitor.captureReference": {
|
|
23295
23508
|
capName: "scene-monitor",
|
|
23296
23509
|
capScope: "device",
|
|
@@ -24470,7 +24683,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
24470
24683
|
capability: adminUiCapability,
|
|
24471
24684
|
provider: {
|
|
24472
24685
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
24473
|
-
getVersion: async () => ({ version: "1.1.
|
|
24686
|
+
getVersion: async () => ({ version: "1.1.27" })
|
|
24474
24687
|
}
|
|
24475
24688
|
}];
|
|
24476
24689
|
}
|