@camstack/addon-agent-ui 1.1.26 → 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.
Files changed (2) hide show
  1. package/dist/addon.js +193 -5
  2. 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-H4AVePnn.mjs
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",
@@ -12544,7 +12587,11 @@ array(ZoneRuleSchema).readonly();
12544
12587
  * Extend the enum here when a new gating consumer comes online (audio
12545
12588
  * gating, alert filtering, …) — no other surface needs to change.
12546
12589
  */
12547
- var ZoneRuleStageEnum = _enum(["motion", "detection"]);
12590
+ var ZoneRuleStageEnum = _enum([
12591
+ "motion",
12592
+ "detection",
12593
+ "package"
12594
+ ]);
12548
12595
  DeviceType.Camera, method(object({
12549
12596
  deviceId: number(),
12550
12597
  stage: ZoneRuleStageEnum
@@ -12557,7 +12604,8 @@ DeviceType.Camera, method(object({
12557
12604
  auth: "admin"
12558
12605
  }), object({
12559
12606
  motion: array(ZoneRuleSchema).readonly(),
12560
- detection: array(ZoneRuleSchema).readonly()
12607
+ detection: array(ZoneRuleSchema).readonly(),
12608
+ package: array(ZoneRuleSchema).readonly()
12561
12609
  });
12562
12610
  var ProviderStatusSchema = object({
12563
12611
  connected: boolean(),
@@ -15740,6 +15788,7 @@ var EventKindIconSchema = _enum([
15740
15788
  "smoke",
15741
15789
  "water",
15742
15790
  "button",
15791
+ "package",
15743
15792
  "generic"
15744
15793
  ]);
15745
15794
  var EventKindCategorySchema = _enum([
@@ -15747,7 +15796,8 @@ var EventKindCategorySchema = _enum([
15747
15796
  "audio",
15748
15797
  "detection",
15749
15798
  "sensor",
15750
- "custom"
15799
+ "custom",
15800
+ "package"
15751
15801
  ]);
15752
15802
  var EventKindDescriptorSchema = object({
15753
15803
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -19393,6 +19443,108 @@ method(object({
19393
19443
  auth: "admin"
19394
19444
  });
19395
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
+ /**
19396
19548
  * One publishable camera stream as its OWNING PROVIDER describes it — the same
19397
19549
  * payload the (legacy) push `streamBroker.publishCameraStream` carried, minus
19398
19550
  * `deviceId`.
@@ -23316,6 +23468,42 @@ Object.freeze({
23316
23468
  addonId: null,
23317
23469
  access: "create"
23318
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
+ },
23319
23507
  "sceneMonitor.captureReference": {
23320
23508
  capName: "scene-monitor",
23321
23509
  capScope: "device",
@@ -24495,7 +24683,7 @@ var AgentUIAddon = class extends BaseAddon {
24495
24683
  capability: adminUiCapability,
24496
24684
  provider: {
24497
24685
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
24498
- getVersion: async () => ({ version: "1.1.26" })
24686
+ getVersion: async () => ({ version: "1.1.27" })
24499
24687
  }
24500
24688
  }];
24501
24689
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "CamStack Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",