@camstack/system 1.1.53 → 1.1.55

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 (54) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.d.ts +1 -0
  4. package/dist/addon-utils.js +2 -0
  5. package/dist/addon-utils.mjs +2 -2
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  10. package/dist/builtins/alerts/alerts.addon.js +1 -1
  11. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  14. package/dist/builtins/console-logging/index.js +1 -1
  15. package/dist/builtins/console-logging/index.mjs +1 -1
  16. package/dist/builtins/device-manager/device-manager.addon.js +46 -37
  17. package/dist/builtins/device-manager/device-manager.addon.mjs +46 -37
  18. package/dist/builtins/device-manager/device-store-sections.d.ts +26 -0
  19. package/dist/builtins/doorbell/doorbell-settings.d.ts +58 -0
  20. package/dist/builtins/doorbell/trigger-engine.d.ts +32 -30
  21. package/dist/builtins/doorbell/virtual-doorbell.addon.d.ts +39 -22
  22. package/dist/builtins/doorbell/virtual-doorbell.addon.js +207 -191
  23. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +207 -191
  24. package/dist/builtins/hub-forwarder/index.js +1 -1
  25. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  26. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  27. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  28. package/dist/builtins/local-network/local-network.addon.js +1 -1
  29. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  31. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  32. package/dist/builtins/platform-probe/index.js +1 -1
  33. package/dist/builtins/platform-probe/index.mjs +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  36. package/dist/builtins/snapshot/index.js +1 -1
  37. package/dist/builtins/snapshot/index.mjs +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  39. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  41. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  44. package/dist/builtins/system-config/system-config.addon.js +1 -1
  45. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  46. package/dist/builtins/winston-logging/index.js +1 -1
  47. package/dist/builtins/winston-logging/index.mjs +1 -1
  48. package/dist/{dist-BNro5CRu.js → dist-CD5HJkAg.js} +384 -9
  49. package/dist/{dist-D7_69kDt.mjs → dist-RlzjLezj.mjs} +384 -9
  50. package/dist/index.js +2 -2
  51. package/dist/index.mjs +2 -2
  52. package/dist/{manifest-python-deps-EM2H-jjS.mjs → manifest-python-deps-BMKlyabv.mjs} +1 -1
  53. package/dist/{manifest-python-deps-DszE7bYn.js → manifest-python-deps-BpDOYWC2.js} +1 -1
  54. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region ../types/dist/event-category-H4AVePnn.mjs
2
+ //#region ../types/dist/event-category-D4HJq7Mw.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -152,6 +152,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
152
152
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
153
153
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
154
154
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
155
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
156
+ * progress bar the client reconciles via `recordingExport.getExport`. */
157
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
158
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
159
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
155
160
  EventCategory["DetectionEvent"] = "detection.event";
156
161
  EventCategory["SessionTrackNew"] = "session.track.new";
157
162
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -441,6 +446,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
441
446
  */
442
447
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
443
448
  /**
449
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
450
+ * a package zone — a newly-appeared stationary object of a package class
451
+ * that cleared the class / zone / dwell / size gates. Payload:
452
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
453
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
454
+ * Telemetry (D8): the durable record is the `package-events` store row;
455
+ * this bus topic drives notifier rules + live UI. See
456
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
457
+ */
458
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
459
+ /**
460
+ * Fired by `addon-post-analysis` when a previously-delivered package
461
+ * leaves its zone (the stationary entry departed — moved or swept).
462
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
463
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
464
+ * Telemetry (D8). See package-zones-design §5.2.
465
+ */
466
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
467
+ /**
444
468
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
445
469
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
446
470
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -3319,6 +3343,62 @@ var RecordingConfigSchema = z.object({
3319
3343
  scrubThumbnails: ScrubThumbnailPresetSchema.optional()
3320
3344
  });
3321
3345
  /**
3346
+ * Ops-log — the durable, append-only operations audit shared by the
3347
+ * recordings and events management surfaces.
3348
+ *
3349
+ * ONE row shape is reused for both domains so a single "Activity" view can
3350
+ * merge the recorder's DurableState ring (recordings ops-log) and the
3351
+ * pipeline-analytics SQLite collection (events ops-log). Each row records a
3352
+ * management operation, WHY it ran (reason), and its measurable effect
3353
+ * (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
3354
+ * never fail the operation it records.
3355
+ */
3356
+ /** Which management domain the operation belongs to. */
3357
+ var OpsLogDomainSchema = z.enum(["recording", "events"]);
3358
+ /** The kind of management operation performed. */
3359
+ var OpsLogOpSchema = z.enum([
3360
+ "prune",
3361
+ "manual-delete",
3362
+ "rescan",
3363
+ "retention-run"
3364
+ ]);
3365
+ /** Why the operation ran. */
3366
+ var OpsLogReasonSchema = z.enum([
3367
+ "retention",
3368
+ "quota",
3369
+ "manual",
3370
+ "operator"
3371
+ ]);
3372
+ /** One audit row, shared verbatim by both domains. */
3373
+ var OpsLogEntrySchema = z.object({
3374
+ /** Unique row id. */
3375
+ id: z.string(),
3376
+ /** Epoch ms the operation completed. */
3377
+ at: z.number(),
3378
+ domain: OpsLogDomainSchema,
3379
+ op: OpsLogOpSchema,
3380
+ reason: OpsLogReasonSchema,
3381
+ /** The camera the op targeted; null for a cluster/global op. */
3382
+ deviceId: z.number().nullable(),
3383
+ /** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
3384
+ nodeId: z.string(),
3385
+ /** Buckets / rows deleted (op-specific unit). */
3386
+ itemsAffected: z.number(),
3387
+ /** Bytes reclaimed by the op (0 when not measurable). */
3388
+ bytesReclaimed: z.number(),
3389
+ /** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
3390
+ detail: z.string().nullable(),
3391
+ /** Who/what triggered the op. */
3392
+ actor: z.string()
3393
+ });
3394
+ /** Shared query input for the per-domain `listOpsLog` cap methods. */
3395
+ var OpsLogQueryInputSchema = z.object({
3396
+ /** Restrict to a single camera; omit for every row. */
3397
+ deviceId: z.number().optional(),
3398
+ /** Max rows returned, newest-first. */
3399
+ limit: z.number().int().min(1).max(1e3).optional()
3400
+ });
3401
+ /**
3322
3402
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
3323
3403
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
3324
3404
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -11156,7 +11236,11 @@ z.array(ZoneRuleSchema).readonly();
11156
11236
  * Extend the enum here when a new gating consumer comes online (audio
11157
11237
  * gating, alert filtering, …) — no other surface needs to change.
11158
11238
  */
11159
- var ZoneRuleStageEnum = z.enum(["motion", "detection"]);
11239
+ var ZoneRuleStageEnum = z.enum([
11240
+ "motion",
11241
+ "detection",
11242
+ "package"
11243
+ ]);
11160
11244
  /**
11161
11245
  * Zone rules capability — per-camera CRUD over the {@link ZoneRule}
11162
11246
  * arrays that decide how each pipeline stage uses the polygon zones.
@@ -11200,16 +11284,25 @@ var zoneRulesCapability = {
11200
11284
  })
11201
11285
  },
11202
11286
  /**
11203
- * Runtime-state slice — both stages mirrored together so consumers
11287
+ * Runtime-state slice — every stage mirrored together so consumers
11204
11288
  * see one reactive handle (`device.state.zoneRules.value`) instead
11205
- * of two. Bulk-replace mutations on either stage write the full
11206
- * `{motion, detection}` shape, so subscribers always get the
11289
+ * of one per stage. Bulk-replace mutations on any stage write the full
11290
+ * `{motion, detection, package}` shape, so subscribers always get the
11207
11291
  * complete current set. Consumers that only care about one stage
11208
11292
  * just read the matching property.
11293
+ *
11294
+ * `package` backs the package-drop detector — a package zone is a
11295
+ * `ZoneRule` on the `'package'` stage referencing drawn polygons
11296
+ * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
11297
+ * The orchestrator provider writes this stage as a first-class slice
11298
+ * (Phase 4): every mutation mirrors the full `{motion, detection,
11299
+ * package}` shape, so consumers read the current package rules directly
11300
+ * off `device.state.zoneRules.value.package`.
11209
11301
  */
11210
11302
  runtimeState: z.object({
11211
11303
  motion: z.array(ZoneRuleSchema).readonly(),
11212
- detection: z.array(ZoneRuleSchema).readonly()
11304
+ detection: z.array(ZoneRuleSchema).readonly(),
11305
+ package: z.array(ZoneRuleSchema).readonly()
11213
11306
  })
11214
11307
  };
11215
11308
  var ProviderStatusSchema = z.object({
@@ -15775,6 +15868,7 @@ var EventKindIconSchema = z.enum([
15775
15868
  "smoke",
15776
15869
  "water",
15777
15870
  "button",
15871
+ "package",
15778
15872
  "generic"
15779
15873
  ]);
15780
15874
  var EventKindCategorySchema = z.enum([
@@ -15782,7 +15876,8 @@ var EventKindCategorySchema = z.enum([
15782
15876
  "audio",
15783
15877
  "detection",
15784
15878
  "sensor",
15785
- "custom"
15879
+ "custom",
15880
+ "package"
15786
15881
  ]);
15787
15882
  var EventKindDescriptorSchema = z.object({
15788
15883
  /** Stable kind id (e.g. 'motion', 'person', 'contact'). */
@@ -16123,6 +16218,26 @@ var TrackCascadeCountsSchema = z.object({
16123
16218
  /** Per-track CLIP search vectors removed (best-effort). */
16124
16219
  embeddings: z.number().int()
16125
16220
  });
16221
+ /** Event-store footprint for one camera. */
16222
+ var EventStoreDeviceFootprintSchema = z.object({
16223
+ deviceId: z.number(),
16224
+ /** Persisted event rows (motion + object + audio) for the camera. */
16225
+ rows: z.number().int(),
16226
+ /** Event-owned media bytes on disk for the camera. */
16227
+ bytes: z.number().int()
16228
+ });
16229
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
16230
+ var EventStoreFootprintSchema = z.object({
16231
+ totalRows: z.number().int(),
16232
+ totalBytes: z.number().int(),
16233
+ devices: z.array(EventStoreDeviceFootprintSchema).readonly()
16234
+ });
16235
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
16236
+ var EventPruneCountsSchema = z.object({
16237
+ motion: z.number().int(),
16238
+ object: z.number().int(),
16239
+ audio: z.number().int()
16240
+ });
16126
16241
  var pipelineAnalyticsCapability = {
16127
16242
  name: "pipeline-analytics",
16128
16243
  scope: "device",
@@ -16284,6 +16399,45 @@ var pipelineAnalyticsCapability = {
16284
16399
  kind: "mutation",
16285
16400
  auth: "admin"
16286
16401
  }),
16402
+ /**
16403
+ * Durable event-store footprint for the management UI: event rows
16404
+ * (motion + object + audio) counted per camera + total, plus the
16405
+ * event-owned media bytes on disk per camera + total. Stat/count-based,
16406
+ * computed on demand.
16407
+ */
16408
+ getEventStoreFootprint: method(z.object({}), EventStoreFootprintSchema, {
16409
+ kind: "query",
16410
+ auth: "admin"
16411
+ }),
16412
+ /**
16413
+ * Cluster-wide prune of events older than `olderThanMs` (exclusive) across
16414
+ * every camera, deleting each event's media in lockstep. Logged to the
16415
+ * events ops-log with `reason` (default `'retention'`). Returns the summed
16416
+ * per-kind deleted counts.
16417
+ */
16418
+ pruneEvents: method(z.object({
16419
+ olderThanMs: z.number(),
16420
+ reason: OpsLogReasonSchema.optional()
16421
+ }), EventPruneCountsSchema, {
16422
+ kind: "mutation",
16423
+ auth: "admin"
16424
+ }),
16425
+ /**
16426
+ * Manually delete EVERY event (motion + object + audio) for one camera and
16427
+ * its event-owned media in lockstep. Logged to the events ops-log as
16428
+ * `op:'manual-delete', reason:'manual'`. Destructive — the admin UI guards
16429
+ * it behind a confirm.
16430
+ */
16431
+ deleteDeviceEvents: method(z.object({ deviceId: z.number() }), EventPruneCountsSchema, {
16432
+ kind: "mutation",
16433
+ auth: "admin"
16434
+ }),
16435
+ /** The events ops-log rows (newest-first), optionally scoped to one camera.
16436
+ * Backed by a declared pipeline-analytics SQLite collection. */
16437
+ listOpsLog: method(OpsLogQueryInputSchema, z.array(OpsLogEntrySchema).readonly(), {
16438
+ kind: "query",
16439
+ auth: "admin"
16440
+ }),
16287
16441
  getEventMedia: method(z.object({
16288
16442
  eventId: z.string(),
16289
16443
  kind: MediaFileKindEnum.optional()
@@ -20907,14 +21061,162 @@ var recordingCapability = {
20907
21061
  auth: "admin"
20908
21062
  }),
20909
21063
  /** Apply this device's retention policy to footage now; returns the oldest
20910
- * surviving footage start (the retention floor) or null if no footage. */
20911
- pruneFootage: method(z.object({ deviceId: z.number() }), z.object({
21064
+ * surviving footage start (the retention floor) or null if no footage. The
21065
+ * prune is logged to the recordings ops-log with `reason` (default
21066
+ * `'retention'` — the policy-driven prune; `'quota'` when disk-pressure
21067
+ * triggered). */
21068
+ pruneFootage: method(z.object({
21069
+ deviceId: z.number(),
21070
+ reason: OpsLogReasonSchema.optional()
21071
+ }), z.object({
20912
21072
  floorMs: z.number().nullable(),
20913
21073
  deletedBuckets: z.number().int(),
20914
21074
  reclaimedBytes: z.number().int()
20915
21075
  }), {
20916
21076
  kind: "mutation",
20917
21077
  auth: "admin"
21078
+ }),
21079
+ /**
21080
+ * Manually delete a camera's footage — the whole footprint, or a
21081
+ * `[fromMs, toMs)` window when either bound is given. Logged to the
21082
+ * recordings ops-log as `op:'manual-delete', reason:'manual'`. Destructive:
21083
+ * the admin UI guards it behind a confirm.
21084
+ */
21085
+ deleteFootprint: method(z.object({
21086
+ deviceId: z.number(),
21087
+ fromMs: z.number().optional(),
21088
+ toMs: z.number().optional()
21089
+ }), z.object({
21090
+ deletedBuckets: z.number().int(),
21091
+ reclaimedBytes: z.number().int()
21092
+ }), {
21093
+ kind: "mutation",
21094
+ auth: "admin"
21095
+ }),
21096
+ /** The recordings ops-log rows (newest-first), optionally scoped to one
21097
+ * camera. Backed by the recorder's bounded DurableState ring. */
21098
+ listOpsLog: method(OpsLogQueryInputSchema, z.array(OpsLogEntrySchema).readonly(), {
21099
+ kind: "query",
21100
+ auth: "admin"
21101
+ })
21102
+ }
21103
+ };
21104
+ /**
21105
+ * `recordingExport` cap — render a footage time range into a single downloadable
21106
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
21107
+ * bounded lifetime with a durable history, auto-expiry, and optional
21108
+ * delete-after-download.
21109
+ *
21110
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
21111
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
21112
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
21113
+ * input and dispatch to that single provider; the render runs on the node that
21114
+ * owns the footage (no cross-node segment transfer). Download rides the
21115
+ * framework addon data-plane. State persists in a DurableState blob (NOT
21116
+ * SQLite); history rows survive file deletion for audit.
21117
+ */
21118
+ /** Playback-speed multiplier for the render (1 = realtime). */
21119
+ var ExportSpeedSchema = z.number().min(.25).max(32);
21120
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
21121
+ var ExportTimelapseSchema = z.object({
21122
+ everyMs: z.number().int().positive(),
21123
+ outputFps: z.number().int().min(1).max(60).optional()
21124
+ });
21125
+ /**
21126
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
21127
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
21128
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
21129
+ * `deleteAfterDownload` removes it shortly after the first complete download.
21130
+ */
21131
+ var ExportOptionsSchema = z.object({
21132
+ speed: ExportSpeedSchema.optional(),
21133
+ timelapse: ExportTimelapseSchema.optional(),
21134
+ includeAudio: z.boolean(),
21135
+ maxLifeMs: z.number().int().positive(),
21136
+ deleteAfterDownload: z.boolean(),
21137
+ title: z.string().max(200).optional()
21138
+ }).superRefine((v, ctx) => {
21139
+ if (v.speed !== void 0 && v.timelapse !== void 0) ctx.addIssue({
21140
+ code: z.ZodIssueCode.custom,
21141
+ message: "speed and timelapse are mutually exclusive",
21142
+ path: ["timelapse"]
21143
+ });
21144
+ });
21145
+ var ExportStateSchema = z.enum([
21146
+ "queued",
21147
+ "rendering",
21148
+ "ready",
21149
+ "failed",
21150
+ "expired",
21151
+ "deleted"
21152
+ ]);
21153
+ /** One export job / history row. */
21154
+ var ExportRecordSchema = z.object({
21155
+ id: z.string(),
21156
+ deviceId: z.number(),
21157
+ profile: z.string(),
21158
+ fromMs: z.number(),
21159
+ toMs: z.number(),
21160
+ options: ExportOptionsSchema,
21161
+ state: ExportStateSchema,
21162
+ /** 0–100 while rendering; null otherwise. */
21163
+ progressPct: z.number().nullable(),
21164
+ /** File size once ready; null before. */
21165
+ fileBytes: z.number().nullable(),
21166
+ expiresAt: z.number(),
21167
+ deleteAfterDownload: z.boolean(),
21168
+ /** Epoch of the first complete download; null until then. */
21169
+ downloadedAt: z.number().nullable(),
21170
+ createdAt: z.number(),
21171
+ /** User id/name that requested the export. */
21172
+ createdBy: z.string(),
21173
+ /** Failure reason when state is 'failed'; null otherwise. */
21174
+ error: z.string().nullable()
21175
+ });
21176
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
21177
+ var ExportDownloadSchema = z.object({
21178
+ url: z.string(),
21179
+ endpoints: z.array(z.string())
21180
+ });
21181
+ var recordingExportCapability = {
21182
+ name: "recordingExport",
21183
+ scope: "system",
21184
+ mode: "singleton",
21185
+ methods: {
21186
+ /** Queue a render of `[fromMs,toMs)` for `deviceId`/`profile`. Fails fast
21187
+ * when no footage covers the range. Returns the queued record. */
21188
+ createExport: method(z.object({
21189
+ deviceId: z.number(),
21190
+ profile: z.string(),
21191
+ fromMs: z.number(),
21192
+ toMs: z.number(),
21193
+ options: ExportOptionsSchema
21194
+ }), ExportRecordSchema, {
21195
+ kind: "mutation",
21196
+ auth: "protected"
21197
+ }),
21198
+ /** All export rows (history included), optionally scoped to one device. */
21199
+ listExports: method(z.object({ deviceId: z.number().optional() }), z.array(ExportRecordSchema), {
21200
+ kind: "query",
21201
+ auth: "protected"
21202
+ }),
21203
+ getExport: method(z.object({ exportId: z.string() }), ExportRecordSchema, {
21204
+ kind: "query",
21205
+ auth: "protected"
21206
+ }),
21207
+ /** Abort a queued/rendering export; the partial file is removed. */
21208
+ cancelExport: method(z.object({ exportId: z.string() }), ExportRecordSchema, {
21209
+ kind: "mutation",
21210
+ auth: "protected"
21211
+ }),
21212
+ /** Remove the file but keep the history row (state → 'deleted'). */
21213
+ deleteExport: method(z.object({ exportId: z.string() }), ExportRecordSchema, {
21214
+ kind: "mutation",
21215
+ auth: "protected"
21216
+ }),
21217
+ getDownloadUrl: method(z.object({ exportId: z.string() }), ExportDownloadSchema, {
21218
+ kind: "query",
21219
+ auth: "protected"
20918
21220
  })
20919
21221
  }
20920
21222
  };
@@ -21680,6 +21982,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
21680
21982
  ptzAutotrackCapability,
21681
21983
  rebootCapability,
21682
21984
  recordingCapability,
21985
+ recordingExportCapability,
21683
21986
  sceneMonitorCapability,
21684
21987
  scriptRunnerCapability,
21685
21988
  serverManagementCapability,
@@ -24497,6 +24800,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
24497
24800
  addonId: null,
24498
24801
  access: "delete"
24499
24802
  },
24803
+ "pipelineAnalytics.deleteDeviceEvents": {
24804
+ capName: "pipeline-analytics",
24805
+ capScope: "device",
24806
+ addonId: null,
24807
+ access: "delete"
24808
+ },
24500
24809
  "pipelineAnalytics.deleteTracks": {
24501
24810
  capName: "pipeline-analytics",
24502
24811
  capScope: "device",
@@ -24527,6 +24836,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
24527
24836
  addonId: null,
24528
24837
  access: "view"
24529
24838
  },
24839
+ "pipelineAnalytics.getEventStoreFootprint": {
24840
+ capName: "pipeline-analytics",
24841
+ capScope: "device",
24842
+ addonId: null,
24843
+ access: "view"
24844
+ },
24530
24845
  "pipelineAnalytics.getKeyEvents": {
24531
24846
  capName: "pipeline-analytics",
24532
24847
  capScope: "device",
@@ -24569,6 +24884,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
24569
24884
  addonId: null,
24570
24885
  access: "view"
24571
24886
  },
24887
+ "pipelineAnalytics.listOpsLog": {
24888
+ capName: "pipeline-analytics",
24889
+ capScope: "device",
24890
+ addonId: null,
24891
+ access: "view"
24892
+ },
24572
24893
  "pipelineAnalytics.listRecentTracks": {
24573
24894
  capName: "pipeline-analytics",
24574
24895
  capScope: "device",
@@ -24581,6 +24902,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
24581
24902
  addonId: null,
24582
24903
  access: "view"
24583
24904
  },
24905
+ "pipelineAnalytics.pruneEvents": {
24906
+ capName: "pipeline-analytics",
24907
+ capScope: "device",
24908
+ addonId: null,
24909
+ access: "create"
24910
+ },
24584
24911
  "pipelineAnalytics.pruneEventsBefore": {
24585
24912
  capName: "pipeline-analytics",
24586
24913
  capScope: "device",
@@ -25343,6 +25670,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
25343
25670
  addonId: null,
25344
25671
  access: "create"
25345
25672
  },
25673
+ "recording.deleteFootprint": {
25674
+ capName: "recording",
25675
+ capScope: "system",
25676
+ addonId: null,
25677
+ access: "delete"
25678
+ },
25346
25679
  "recording.getAvailability": {
25347
25680
  capName: "recording",
25348
25681
  capScope: "system",
@@ -25373,6 +25706,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
25373
25706
  addonId: null,
25374
25707
  access: "view"
25375
25708
  },
25709
+ "recording.listOpsLog": {
25710
+ capName: "recording",
25711
+ capScope: "system",
25712
+ addonId: null,
25713
+ access: "view"
25714
+ },
25376
25715
  "recording.locateSegment": {
25377
25716
  capName: "recording",
25378
25717
  capScope: "system",
@@ -25403,6 +25742,42 @@ var METHOD_ACCESS_MAP = Object.freeze({
25403
25742
  addonId: null,
25404
25743
  access: "create"
25405
25744
  },
25745
+ "recordingExport.cancelExport": {
25746
+ capName: "recordingExport",
25747
+ capScope: "system",
25748
+ addonId: null,
25749
+ access: "create"
25750
+ },
25751
+ "recordingExport.createExport": {
25752
+ capName: "recordingExport",
25753
+ capScope: "system",
25754
+ addonId: null,
25755
+ access: "create"
25756
+ },
25757
+ "recordingExport.deleteExport": {
25758
+ capName: "recordingExport",
25759
+ capScope: "system",
25760
+ addonId: null,
25761
+ access: "delete"
25762
+ },
25763
+ "recordingExport.getDownloadUrl": {
25764
+ capName: "recordingExport",
25765
+ capScope: "system",
25766
+ addonId: null,
25767
+ access: "view"
25768
+ },
25769
+ "recordingExport.getExport": {
25770
+ capName: "recordingExport",
25771
+ capScope: "system",
25772
+ addonId: null,
25773
+ access: "view"
25774
+ },
25775
+ "recordingExport.listExports": {
25776
+ capName: "recordingExport",
25777
+ capScope: "system",
25778
+ addonId: null,
25779
+ access: "view"
25780
+ },
25406
25781
  "sceneMonitor.captureReference": {
25407
25782
  capName: "scene-monitor",
25408
25783
  capScope: "device",
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-BNro5CRu.js");
3
+ const require_dist = require("./dist-CD5HJkAg.js");
4
4
  const require_model_download_service = require("./model-download-service-hf0ookyy.js");
5
- const require_manifest_python_deps = require("./manifest-python-deps-DszE7bYn.js");
5
+ const require_manifest_python_deps = require("./manifest-python-deps-BpDOYWC2.js");
6
6
  const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
7
7
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
8
8
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { A as isArrayOutputSchema, Ct as parseJsonObject, D as extractNestedAddonId, Dt as scopeKey, Et as resolveCapMount, F as lifecycleJobSchema, G as procedureAuthKey, H as objectInputDeclaresAddonId, M as isObjectInput, N as isVoidInput, P as kebabToCamel, R as looseSchema, Tt as readinessKey, _t as createEvent, at as DATAPLANE_SECRET_HEADER$1, bt as expandCapMethods, dt as ReadinessRegistry, ft as ReadinessTimeoutError, gt as asString$1, ht as asNumber, j as isCollectionArrayMethod, kt as EventCategory$1, mt as asJsonObject$1, o as METHOD_ACCESS_MAP, ot as DEVICE_SETTINGS_CONTRIBUTION_METHODS, p as addonSettingsCapability, rt as errMsg$1, s as RUNTIME_DEFAULTS, st as DEVICE_STATUS_METHOD, t as ALL_CAPABILITY_DEFINITIONS, vt as emitDownForOwnedCaps, wt as parseJsonUnknown$1 } from "./dist-D7_69kDt.mjs";
1
+ import { A as isArrayOutputSchema, Ct as parseJsonObject, D as extractNestedAddonId, Dt as scopeKey, Et as resolveCapMount, F as lifecycleJobSchema, G as procedureAuthKey, H as objectInputDeclaresAddonId, M as isObjectInput, N as isVoidInput, P as kebabToCamel, R as looseSchema, Tt as readinessKey, _t as createEvent, at as DATAPLANE_SECRET_HEADER$1, bt as expandCapMethods, dt as ReadinessRegistry, ft as ReadinessTimeoutError, gt as asString$1, ht as asNumber, j as isCollectionArrayMethod, kt as EventCategory$1, mt as asJsonObject$1, o as METHOD_ACCESS_MAP, ot as DEVICE_SETTINGS_CONTRIBUTION_METHODS, p as addonSettingsCapability, rt as errMsg$1, s as RUNTIME_DEFAULTS, st as DEVICE_STATUS_METHOD, t as ALL_CAPABILITY_DEFINITIONS, vt as emitDownForOwnedCaps, wt as parseJsonUnknown$1 } from "./dist-RlzjLezj.mjs";
2
2
  import { a as downloadModel, c as getModelFilePath, d as contentTypeFor, f as createAuthenticatedFileServer, h as resolveFilePath, i as downloadFile, l as isModelDownloaded, m as parseTokenizedUrl, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, s as fetchJson, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-Cp9f4dk6.mjs";
3
- import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, bt as resolveAddonClass, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, xt as createAddonDataPlaneFacility, y as __resetCapUsageRegistryForTests, yt as runNpm, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-EM2H-jjS.mjs";
3
+ import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, bt as resolveAddonClass, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, xt as createAddonDataPlaneFacility, y as __resetCapUsageRegistryForTests, yt as runNpm, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-BMKlyabv.mjs";
4
4
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Le3l0qS2.mjs";
5
5
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
6
6
  import { SqliteSettingsAddon, t as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
@@ -1,4 +1,4 @@
1
- import { K as readNodePin } from "./dist-D7_69kDt.mjs";
1
+ import { K as readNodePin } from "./dist-RlzjLezj.mjs";
2
2
  import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
3
3
  import { createServer } from "node:http";
4
4
  import * as fs from "node:fs";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BNro5CRu.js");
2
+ const require_dist = require("./dist-CD5HJkAg.js");
3
3
  let _camstack_types_node = require("@camstack/types/node");
4
4
  let node_http = require("node:http");
5
5
  let node_fs = require("node:fs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.1.53",
3
+ "version": "1.1.55",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -156,7 +156,7 @@
156
156
  "id": "virtual-doorbell",
157
157
  "category": "system",
158
158
  "name": "Virtual Doorbell",
159
- "description": "Wrapper over the `doorbell` cap — turns any binary-ish device (contact sensor, switch, event emitter, flood/gas/CO sensor) into a per-camera doorbell. Operator binds it per camera and picks the source device + trigger in the camera's settings.",
159
+ "description": "Wrapper over the `doorbell` cap — turns any binary sensor or switch (contact, motion, flood/gas/CO/smoke, vibration, tamper, or a switch) into a per-camera doorbell. Operator binds it per camera and picks the trigger devices from a searchable list in the camera's general settings; the reaction is automatic (sensor active / switch on).",
160
160
  "entry": "./dist/builtins/doorbell/index.js",
161
161
  "capabilities": [
162
162
  {