@camstack/addon-provider-rtsp 1.2.6 → 1.2.7

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 (3) hide show
  1. package/dist/addon.js +451 -76
  2. package/dist/addon.mjs +451 -76
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import net from "node:net";
2
- //#region ../types/dist/event-category-BLcNejAE.mjs
2
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -270,6 +270,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
270
270
  */
271
271
  EventCategory["DeviceStateChanged"] = "device.state-changed";
272
272
  /**
273
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
274
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
275
+ *
276
+ * Emitted only on a change, so a steady scene is silent. It exists so a
277
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
278
+ * one live badge with no push signal at all, and it cost a request every
279
+ * four seconds per visible camera.
280
+ *
281
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
282
+ * keeps a slow reconcile rather than trusting it alone.
283
+ */
284
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
285
+ /**
273
286
  * Cap event fired by every device that registers the `battery`
274
287
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
275
288
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7201,35 +7214,22 @@ var ConvertResultSchema = object({
7201
7214
  */
7202
7215
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7203
7216
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7204
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7205
- kind: literal("timeOfDay"),
7206
- start: string().regex(HHMM),
7207
- end: string().regex(HHMM),
7208
- /** Restrict to these weekdays; omit = every day. */
7209
- days: array(RecordingWeekdaySchema).optional()
7210
- })]);
7211
- var RecordingModeSchema = _enum([
7212
- "continuous",
7213
- "onMotion",
7214
- "onAudioThreshold"
7215
- ]);
7216
7217
  /**
7217
- * First-class, authoritative per-camera storage mode — the explicit choice the
7218
- * UI reads directly (never inferred from `rules`):
7219
- * - `off` — not recording.
7220
- * - `events` — record only around triggers (motion / audio threshold),
7221
- * with pre/post-buffer.
7222
- * - `continuous` — record 24/7 within the schedule.
7218
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7219
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7220
+ * - `off` — no band covers the camera (or it is disabled).
7221
+ * - `events` — every band records around triggers only.
7222
+ * - `continuous` — at least one band records continuously.
7223
7223
  *
7224
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7225
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7224
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7225
+ * every save (`activeModeForConfig`). Writing it has no effect.
7226
7226
  */
7227
7227
  var RecordingStorageModeSchema = _enum([
7228
7228
  "off",
7229
7229
  "events",
7230
7230
  "continuous"
7231
7231
  ]);
7232
- /** Which detectors trigger an `events`-mode recording. */
7232
+ /** Which detectors trigger an `events`-mode band. */
7233
7233
  var RecordingTriggersSchema = object({
7234
7234
  motion: boolean().optional(),
7235
7235
  audioThresholdDbfs: number().optional()
@@ -7265,18 +7265,6 @@ var RecordingBandSchema = object({
7265
7265
  preBufferSec: number().min(0).optional(),
7266
7266
  postBufferSec: number().min(0).optional()
7267
7267
  });
7268
- var RecordingRuleSchema = object({
7269
- schedule: RecordingScheduleSchema,
7270
- mode: RecordingModeSchema,
7271
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7272
- preBufferSec: number().min(0).default(0),
7273
- /** Keep recording until this many seconds after the last trigger. */
7274
- postBufferSec: number().min(0).default(0),
7275
- /** Each new trigger restarts the post-buffer window. */
7276
- resetTimeoutOnNewEvent: boolean().default(true),
7277
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7278
- thresholdDbfs: number().optional()
7279
- });
7280
7268
  /**
7281
7269
  * Per-device retention overrides. Every field is optional; an unset or `0`
7282
7270
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7310,40 +7298,28 @@ var ScrubThumbnailPresetSchema = _enum([
7310
7298
  /**
7311
7299
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7312
7300
  *
7313
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7314
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7315
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7316
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7301
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7302
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7303
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7304
+ *
7305
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7306
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7307
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7308
+ * persist a band-less config, i.e. silently stop recording the camera.
7317
7309
  */
7318
7310
  var RecordingConfigSchema = object({
7319
7311
  enabled: boolean(),
7320
- /** Authoritative storage mode. Absent on legacy targets derived once via
7321
- * `migrateRulesToMode`, then persisted. */
7312
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7313
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7322
7314
  mode: RecordingStorageModeSchema.optional(),
7323
7315
  profiles: array(CamProfileSchema).optional(),
7324
7316
  segmentSeconds: number().int().positive().optional(),
7325
- /** Shared recording time-bands for `events` & `continuous` — record only when
7326
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7327
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7328
- schedules: array(RecordingScheduleSchema).optional(),
7329
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7330
- * normalized into `schedules` on read and never written going forward. (Not
7331
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7332
- schedule: RecordingScheduleSchema.optional(),
7333
- /** `events`-mode only — which detectors trigger a recording. */
7334
- triggers: RecordingTriggersSchema.optional(),
7335
- /** `events`-mode only — seconds retained before / after a trigger. */
7336
- preBufferSec: number().min(0).optional(),
7337
- postBufferSec: number().min(0).optional(),
7338
- /** DEPRECATED authoring input; retained for migration/transition. */
7339
- rules: array(RecordingRuleSchema).optional(),
7340
7317
  /**
7341
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7342
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7343
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7344
- * derived into bands once via `migrateConfigToBands`.
7318
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7319
+ * the recorder's band engine consumes. An empty array = record nothing;
7320
+ * "off" is the absence of a covering band, never a band value.
7345
7321
  */
7346
- bands: array(RecordingBandSchema).optional(),
7322
+ bands: array(RecordingBandSchema).default([]),
7347
7323
  retention: RecordingRetentionSchema.optional(),
7348
7324
  /**
7349
7325
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7351,8 +7327,15 @@ var RecordingConfigSchema = object({
7351
7327
  * windows only — existing sheets are immutable, and each window's index
7352
7328
  * carries its own tile dims so mixed-preset history renders correctly.
7353
7329
  */
7354
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7355
- });
7330
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7331
+ /**
7332
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7333
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7334
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7335
+ * are written and scrub reads exact keyframes at every velocity.
7336
+ */
7337
+ stripsEnabled: boolean().optional()
7338
+ }).strict();
7356
7339
  /**
7357
7340
  * Ops-log — the durable, append-only operations audit shared by the
7358
7341
  * recordings and events management surfaces.
@@ -7371,7 +7354,8 @@ var OpsLogOpSchema = _enum([
7371
7354
  "prune",
7372
7355
  "manual-delete",
7373
7356
  "rescan",
7374
- "retention-run"
7357
+ "retention-run",
7358
+ "relocate"
7375
7359
  ]);
7376
7360
  /** Why the operation ran. */
7377
7361
  var OpsLogReasonSchema = _enum([
@@ -7410,6 +7394,55 @@ var OpsLogQueryInputSchema = object({
7410
7394
  limit: number().int().min(1).max(1e3).optional()
7411
7395
  });
7412
7396
  /**
7397
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7398
+ *
7399
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7400
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7401
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7402
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7403
+ * after verify) and each completed/failed run also lands one durable ops-log
7404
+ * row on the owning addon's surface.
7405
+ */
7406
+ var RelocateJobStateSchema = _enum([
7407
+ "running",
7408
+ "done",
7409
+ "failed",
7410
+ "cancelled"
7411
+ ]);
7412
+ var RelocateJobSchema = object({
7413
+ jobId: string(),
7414
+ state: RelocateJobStateSchema,
7415
+ /** Source location — for media relocation this is informational ('*': rows
7416
+ * move from wherever they are to the target). */
7417
+ fromLocationId: string(),
7418
+ toLocationId: string(),
7419
+ /** Scoped device, or null = every device. */
7420
+ deviceId: number().nullable(),
7421
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7422
+ entities: array(string()),
7423
+ filesMoved: number().int(),
7424
+ bytesMoved: number().int(),
7425
+ /** Total files discovered up front; null while (or when) unknown. */
7426
+ filesTotal: number().int().nullable(),
7427
+ startedAt: number(),
7428
+ finishedAt: number().nullable(),
7429
+ error: string().nullable()
7430
+ });
7431
+ var RelocateFootageInputSchema = object({
7432
+ deviceId: number().optional(),
7433
+ fromLocationId: string(),
7434
+ toLocationId: string(),
7435
+ entities: array(_enum(["segments", "strips"])).optional(),
7436
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7437
+ * never allowed to starve live writers. */
7438
+ throttleMbps: number().min(1).max(1e3).optional()
7439
+ });
7440
+ var RelocateMediaInputSchema = object({
7441
+ deviceId: number().optional(),
7442
+ toLocationId: string(),
7443
+ throttleMbps: number().min(1).max(1e3).optional()
7444
+ });
7445
+ /**
7413
7446
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7414
7447
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7415
7448
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7459,6 +7492,13 @@ var StorageLocationSchema = object({
7459
7492
  nodeId: string().optional(),
7460
7493
  isDefault: boolean().default(false),
7461
7494
  isSystem: boolean().default(false),
7495
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7496
+ * for node-local locations it can reach) — never persisted, absent when the
7497
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7498
+ capacity: object({
7499
+ totalBytes: number(),
7500
+ availableBytes: number()
7501
+ }).nullable().optional(),
7462
7502
  createdAt: number(),
7463
7503
  updatedAt: number()
7464
7504
  });
@@ -8258,7 +8298,8 @@ var NcTaxonomyEntrySchema = object({
8258
8298
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8259
8299
  parentKind: string().nullable()
8260
8300
  });
8261
- object({
8301
+ /** The complete NC picker taxonomy — three grouped buckets. */
8302
+ var NcTaxonomySchema = object({
8262
8303
  videoClasses: array(NcTaxonomyEntrySchema),
8263
8304
  audioKinds: array(NcTaxonomyEntrySchema),
8264
8305
  labels: array(NcTaxonomyEntrySchema)
@@ -9227,6 +9268,7 @@ function startReachabilityPoll(options) {
9227
9268
  timer = void 0;
9228
9269
  } };
9229
9270
  }
9271
+ new Set(["devices", "classes"]);
9230
9272
  /**
9231
9273
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9232
9274
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9385,6 +9427,29 @@ var NcOccupancyConditionSchema = object({
9385
9427
  count: number().int().min(0).default(1),
9386
9428
  sustainSeconds: number().int().min(0).max(3600).default(15)
9387
9429
  });
9430
+ /**
9431
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9432
+ *
9433
+ * The values are not symmetric, and deliberately so — the absent value has to
9434
+ * mean exactly what every rule authored before this condition existed already
9435
+ * does:
9436
+ * - `enter` — entries and every NON-crossing record (movement state,
9437
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9438
+ * an operator who never asked for exits must not start receiving them.
9439
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9440
+ * fails closed, because "the car left the drive" is a question about a
9441
+ * boundary, not about a detection.
9442
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9443
+ *
9444
+ * A rule asking for a direction should normally also scope `zones`, which the
9445
+ * engine evaluates against the crossed zone as well as the current membership
9446
+ * (an exit's membership no longer contains the zone it just left).
9447
+ */
9448
+ var NcCrossingSchema = _enum([
9449
+ "enter",
9450
+ "exit",
9451
+ "any"
9452
+ ]);
9388
9453
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9389
9454
  var NcZoneConditionSchema = object({
9390
9455
  ids: array(string().min(1)).min(1),
@@ -9409,6 +9474,13 @@ var NcConditionsSchema = object({
9409
9474
  /** Veto zones — any hit fails the rule. */
9410
9475
  zonesExclude: array(string().min(1)).optional(),
9411
9476
  /**
9477
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9478
+ * and a closed track carries none, so a `track-end` rule asking for one
9479
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9480
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9481
+ */
9482
+ crossing: NcCrossingSchema.optional(),
9483
+ /**
9412
9484
  * Exact (case-insensitive) match on the record's collapsed `label`
9413
9485
  * (identity name / plate text / subclass).
9414
9486
  */
@@ -9543,17 +9615,85 @@ var NcRuleTargetSchema = object({
9543
9615
  * - `keyFrame` — the clean scene frame (no subject box).
9544
9616
  * - `none` — no attachment.
9545
9617
  */
9546
- var NcMediaPolicySchema = object({ attach: _enum([
9547
- "best",
9548
- "best-matching",
9549
- "keyFrame",
9550
- "none"
9551
- ]).default("best") });
9618
+ /**
9619
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9620
+ * conflate it with the selection strategy and betray the request: asking for
9621
+ * the clean scene frame on an object-event owner used to start at
9622
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9623
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9624
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9625
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9626
+ * the pipeline actually saw.
9627
+ */
9628
+ var NcMediaFrameSchema = _enum([
9629
+ "cropped",
9630
+ "full",
9631
+ "boxed"
9632
+ ]);
9633
+ var NcMediaPolicySchema = object({
9634
+ attach: _enum([
9635
+ "best",
9636
+ "best-matching",
9637
+ "keyFrame",
9638
+ "none"
9639
+ ]).default("best"),
9640
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9641
+ frame: NcMediaFrameSchema.optional(),
9642
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9643
+ * "show me the ZONE", not the whole scene or the subject crop. */
9644
+ zoneCrop: boolean().optional(),
9645
+ /**
9646
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9647
+ * event — NOT from the recording, so the camera does not have to be
9648
+ * recording, and the window sits AROUND the moment instead of a segment
9649
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9650
+ * gif, never a failed notification.
9651
+ */
9652
+ gif: boolean().optional(),
9653
+ /**
9654
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9655
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9656
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9657
+ * the degrade engine, which drops the video and keeps the still.
9658
+ */
9659
+ clip: boolean().optional(),
9660
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9661
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9662
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9663
+ /**
9664
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9665
+ * assigned profile: a notification is watched on a phone, so the 4K
9666
+ * rendition would burn CPU to produce a file the client downscales anyway.
9667
+ * A profile that is not assigned falls back to the cheapest, and the render
9668
+ * reports which one actually ran.
9669
+ */
9670
+ profile: CamProfileSchema.optional()
9671
+ });
9672
+ /**
9673
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9674
+ * notification suppresses.
9675
+ * - `shared` (default, and the absent value) — one window for the whole
9676
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9677
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9678
+ * at once and cat→cat still waits.
9679
+ *
9680
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9681
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9682
+ * see `cooldownKey` in the rule engine).
9683
+ */
9684
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9552
9685
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9553
9686
  var NcThrottleSchema = object({
9554
9687
  cooldownSec: number().int().min(0).max(86400).default(60),
9555
9688
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9556
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9689
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9690
+ /**
9691
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9692
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9693
+ * rule authored before this field simply carries none — and the engine
9694
+ * reads absent as `shared`, the pre-existing behaviour.
9695
+ */
9696
+ granularity: NcThrottleGranularitySchema.optional()
9557
9697
  });
9558
9698
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9559
9699
  var NcRuleInputSchema = object({
@@ -9562,7 +9702,19 @@ var NcRuleInputSchema = object({
9562
9702
  delivery: NcDeliverySchema,
9563
9703
  conditions: NcConditionsSchema.default({}),
9564
9704
  schedule: NcScheduleSchema.optional(),
9565
- targets: array(NcRuleTargetSchema).min(1),
9705
+ /** May be empty when `targetUsers` addresses at least one user — the
9706
+ * "at least one addressee" invariant is enforced by the provider, because
9707
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9708
+ targets: array(NcRuleTargetSchema),
9709
+ /**
9710
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9711
+ * time each user fans out to the personal targets they own
9712
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9713
+ * firing camera — a user is never notified about a device they cannot open.
9714
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9715
+ * targets.
9716
+ */
9717
+ targetUsers: array(string()).optional(),
9566
9718
  media: NcMediaPolicySchema.default({ attach: "best" }),
9567
9719
  throttle: NcThrottleSchema.default({
9568
9720
  cooldownSec: 60,
@@ -9649,6 +9801,7 @@ var NcConditionDescriptorSchema = object({
9649
9801
  "schedule",
9650
9802
  "plateMatcher",
9651
9803
  "packagePhase",
9804
+ "crossingSelect",
9652
9805
  "polygonDraw",
9653
9806
  "occupancy"
9654
9807
  ]),
@@ -9775,7 +9928,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9775
9928
  }), object({ results: array(NcTestResultSchema) }), {
9776
9929
  kind: "mutation",
9777
9930
  auth: "admin"
9778
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9931
+ }), method(object({}), object({
9932
+ catalog: array(NcConditionDescriptorSchema),
9933
+ taxonomy: NcTaxonomySchema.optional()
9934
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9779
9935
  /**
9780
9936
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9781
9937
  *
@@ -10784,6 +10940,28 @@ method(object({
10784
10940
  }), object({ success: literal(true) }), {
10785
10941
  kind: "mutation",
10786
10942
  auth: "admin"
10943
+ }), method(object({
10944
+ deviceId: number(),
10945
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10946
+ * watched on a phone, and the cheap rendition is the right default. */
10947
+ profile: CamProfileSchema.optional(),
10948
+ aroundMs: number(),
10949
+ preRollSec: number().min(0).max(20).default(3),
10950
+ postRollSec: number().min(0).max(20).default(5),
10951
+ format: _enum(["gif", "mp4"]).default("gif"),
10952
+ maxWidth: number().int().min(120).max(1920).default(480),
10953
+ /** GIF only — MP4 keeps the source cadence. */
10954
+ fps: number().int().min(1).max(15).default(5)
10955
+ }), object({
10956
+ base64: string(),
10957
+ mime: string(),
10958
+ bytes: number().int(),
10959
+ /** The profile actually rendered (what the default resolved to). */
10960
+ profile: CamProfileSchema,
10961
+ durationMs: number()
10962
+ }), {
10963
+ kind: "mutation",
10964
+ auth: "admin"
10787
10965
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10788
10966
  probed: boolean(),
10789
10967
  summary: string()
@@ -18846,7 +19024,10 @@ method(object({
18846
19024
  }), method(object({
18847
19025
  deviceId: number(),
18848
19026
  caps: array(string()).readonly().optional()
18849
- }), record(string(), unknown().nullable()));
19027
+ }), record(string(), unknown().nullable())), method(object({
19028
+ deviceIds: array(number()).readonly(),
19029
+ caps: array(string()).readonly().optional()
19030
+ }), record(string(), record(string(), unknown().nullable())));
18850
19031
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
18851
19032
  deviceId: number(),
18852
19033
  capName: string()
@@ -19777,6 +19958,36 @@ var TargetKindSchema = object({
19777
19958
  icon: string(),
19778
19959
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19779
19960
  addonId: string(),
19961
+ /**
19962
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
19963
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
19964
+ * when the addon bundles no icon for that kind — the client then falls back
19965
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
19966
+ *
19967
+ * Root-relative on purpose: it resolves against whatever origin serves a web
19968
+ * client, and a native client joins it onto its own hub base.
19969
+ *
19970
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
19971
+ * field that survived only because the runtime cap-router forwards provider
19972
+ * output verbatim — so every consumer had to re-declare it by hand to stop
19973
+ * its own Zod parse from stripping it, and the whole arrangement would have
19974
+ * broken silently the moment output validation was tightened anywhere.
19975
+ */
19976
+ iconUrl: string().optional(),
19977
+ /**
19978
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
19979
+ *
19980
+ * The server knows this and therefore says it, because the client cannot
19981
+ * safely guess: a React-Native client renders SVG and raster through two
19982
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
19983
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
19984
+ * placeholder glyph for every vector icon while the web build looked fine.
19985
+ *
19986
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
19987
+ * not been updated — a client that cannot determine the type should prefer
19988
+ * its raster path, which is the safe default for an unknown image.
19989
+ */
19990
+ iconMediaType: string().optional(),
19780
19991
  configSchema: ConfigSchemaPassthrough,
19781
19992
  supportsDiscovery: boolean(),
19782
19993
  caps: TargetKindCapsSchema
@@ -20224,6 +20435,29 @@ var MotionEventSchema = object({
20224
20435
  * Absent on legacy rows ⇒ treat as `pipeline`.
20225
20436
  */
20226
20437
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
20438
+ /**
20439
+ * The confirmed zone crossing that produced an object event. Present ONLY on
20440
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
20441
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
20442
+ * appearance event carry none, so a rule asking for a direction fails closed
20443
+ * on them.
20444
+ *
20445
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
20446
+ * into its own event, so a frame in which a track enters A while leaving B
20447
+ * produces two events with two directions — never one ambiguous row.
20448
+ *
20449
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
20450
+ * membership the box has NOW, and by definition it no longer contains the zone
20451
+ * that was just left. Without the id here, a zone-scoped rule could never match
20452
+ * the exit it asked for.
20453
+ */
20454
+ var ZoneCrossingSchema = object({
20455
+ direction: _enum(["enter", "exit"]),
20456
+ /** Admin zone id crossed. */
20457
+ zoneId: string(),
20458
+ /** Zone display name at crossing time (falls back to the id). */
20459
+ zoneName: string().optional()
20460
+ });
20227
20461
  var ObjectEventSchema = object({
20228
20462
  ...BaseEventFields,
20229
20463
  kind: literal("object"),
@@ -20250,6 +20484,12 @@ var ObjectEventSchema = object({
20250
20484
  zones: array(string()).readonly().optional(),
20251
20485
  /** Omitted in slim projection. */
20252
20486
  state: TrackStateSchema.optional(),
20487
+ /**
20488
+ * The zone crossing this event IS, when it is one. Absent on every other
20489
+ * event kind (movement state, appearance, package) — see
20490
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
20491
+ */
20492
+ zoneCrossing: ZoneCrossingSchema.optional(),
20253
20493
  /** Detection-frame dimensions in pixels — let consumers normalize the
20254
20494
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20255
20495
  frameWidth: number().optional(),
@@ -20508,6 +20748,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20508
20748
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
20509
20749
  kind: "mutation",
20510
20750
  auth: "admin"
20751
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
20752
+ kind: "mutation",
20753
+ auth: "admin"
20754
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
20755
+ kind: "query",
20756
+ auth: "admin"
20757
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20758
+ kind: "mutation",
20759
+ auth: "admin"
20511
20760
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20512
20761
  kind: "query",
20513
20762
  auth: "admin"
@@ -23038,6 +23287,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23038
23287
  */
23039
23288
  priority: number()
23040
23289
  })).readonly() });
23290
+ /**
23291
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23292
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
23293
+ * what AUTO currently picks, so the UI can show the effective value either way.
23294
+ */
23295
+ var NotificationEndpointSchema = object({
23296
+ /** The operator's explicit choice, or null for AUTO. */
23297
+ baseUrl: string().nullable(),
23298
+ /** What the ranking currently resolves to (null when nothing is reachable). */
23299
+ resolved: string().nullable()
23300
+ });
23041
23301
  var AllowedAddressesSchema = object({
23042
23302
  /**
23043
23303
  * Allowlist of interface addresses operators have explicitly opted
@@ -23060,7 +23320,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
23060
23320
  * to avoid mixed-content blocks in the browser. The public
23061
23321
  * tunnel always emits `https://` regardless. */
23062
23322
  scheme: _enum(["http", "https"]).optional()
23063
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23323
+ }), GetConnectionEndpointsResultSchema), method(_void(), NotificationEndpointSchema), method(object({ baseUrl: string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23064
23324
  /**
23065
23325
  * mesh-network — collection cap for mesh-VPN providers.
23066
23326
  *
@@ -23859,7 +24119,12 @@ var RecordingDeviceUsageSchema = object({
23859
24119
  var RecordingLocationUsageSchema = object({
23860
24120
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
23861
24121
  locationId: string().nullable(),
23862
- /** Bytes of recordings stored on this location. */
24122
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
24123
+ * is emitted per physical disk (2026-07-29): two locations on one root
24124
+ * previously rendered as two identical "disks" with a nonsensical used
24125
+ * split — hydrate attribution across aliases is arbitrary by nature. */
24126
+ locationIds: array(string()).optional(),
24127
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
23863
24128
  usedBytes: number(),
23864
24129
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
23865
24130
  availableBytes: number().nullable(),
@@ -23971,6 +24236,44 @@ method(object({
23971
24236
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
23972
24237
  kind: "query",
23973
24238
  auth: "admin"
24239
+ }), method(object({
24240
+ deviceId: number(),
24241
+ aroundMs: number(),
24242
+ preRollSec: number().min(0).max(30).default(2),
24243
+ postRollSec: number().min(0).max(30).default(5),
24244
+ maxWidth: number().int().min(120).max(1280).default(480),
24245
+ fps: number().int().min(1).max(15).default(5)
24246
+ }), object({
24247
+ gifBase64: string(),
24248
+ fromMs: number(),
24249
+ toMs: number()
24250
+ }), {
24251
+ kind: "mutation",
24252
+ auth: "admin"
24253
+ }), method(object({
24254
+ deviceId: number(),
24255
+ aroundMs: number(),
24256
+ preRollSec: number().min(0).max(30).default(3),
24257
+ postRollSec: number().min(0).max(30).default(7),
24258
+ maxWidth: number().int().min(160).max(1920).default(640)
24259
+ }), object({
24260
+ clipBase64: string(),
24261
+ mime: string(),
24262
+ fromMs: number(),
24263
+ toMs: number(),
24264
+ bytes: number().int()
24265
+ }), {
24266
+ kind: "mutation",
24267
+ auth: "admin"
24268
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24269
+ kind: "mutation",
24270
+ auth: "admin"
24271
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
24272
+ kind: "query",
24273
+ auth: "admin"
24274
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24275
+ kind: "mutation",
24276
+ auth: "admin"
23974
24277
  });
23975
24278
  /**
23976
24279
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25575,6 +25878,12 @@ Object.freeze({
25575
25878
  addonId: null,
25576
25879
  access: "view"
25577
25880
  },
25881
+ "deviceManager.getDeviceStatusAggregateBatch": {
25882
+ capName: "device-manager",
25883
+ capScope: "system",
25884
+ addonId: null,
25885
+ access: "view"
25886
+ },
25578
25887
  "deviceManager.getLinkedDevices": {
25579
25888
  capName: "device-manager",
25580
25889
  capScope: "system",
@@ -26469,6 +26778,12 @@ Object.freeze({
26469
26778
  addonId: null,
26470
26779
  access: "view"
26471
26780
  },
26781
+ "localNetwork.getNotificationEndpoint": {
26782
+ capName: "local-network",
26783
+ capScope: "system",
26784
+ addonId: null,
26785
+ access: "view"
26786
+ },
26472
26787
  "localNetwork.getPreferred": {
26473
26788
  capName: "local-network",
26474
26789
  capScope: "system",
@@ -26493,6 +26808,12 @@ Object.freeze({
26493
26808
  addonId: null,
26494
26809
  access: "create"
26495
26810
  },
26811
+ "localNetwork.setNotificationEndpoint": {
26812
+ capName: "local-network",
26813
+ capScope: "system",
26814
+ addonId: null,
26815
+ access: "create"
26816
+ },
26496
26817
  "lockControl.lock": {
26497
26818
  capName: "lock-control",
26498
26819
  capScope: "device",
@@ -27135,6 +27456,12 @@ Object.freeze({
27135
27456
  addonId: null,
27136
27457
  access: "create"
27137
27458
  },
27459
+ "pipelineAnalytics.cancelMediaRelocate": {
27460
+ capName: "pipeline-analytics",
27461
+ capScope: "device",
27462
+ addonId: null,
27463
+ access: "create"
27464
+ },
27138
27465
  "pipelineAnalytics.clearTracks": {
27139
27466
  capName: "pipeline-analytics",
27140
27467
  capScope: "device",
@@ -27189,6 +27516,12 @@ Object.freeze({
27189
27516
  addonId: null,
27190
27517
  access: "view"
27191
27518
  },
27519
+ "pipelineAnalytics.getMediaRelocateStatus": {
27520
+ capName: "pipeline-analytics",
27521
+ capScope: "device",
27522
+ addonId: null,
27523
+ access: "view"
27524
+ },
27192
27525
  "pipelineAnalytics.getMotionEvents": {
27193
27526
  capName: "pipeline-analytics",
27194
27527
  capScope: "device",
@@ -27261,6 +27594,12 @@ Object.freeze({
27261
27594
  addonId: null,
27262
27595
  access: "create"
27263
27596
  },
27597
+ "pipelineAnalytics.relocateMedia": {
27598
+ capName: "pipeline-analytics",
27599
+ capScope: "device",
27600
+ addonId: null,
27601
+ access: "create"
27602
+ },
27264
27603
  "pipelineAnalytics.searchObjectEvents": {
27265
27604
  capName: "pipeline-analytics",
27266
27605
  capScope: "device",
@@ -28023,6 +28362,12 @@ Object.freeze({
28023
28362
  addonId: null,
28024
28363
  access: "create"
28025
28364
  },
28365
+ "recording.cancelRelocate": {
28366
+ capName: "recording",
28367
+ capScope: "system",
28368
+ addonId: null,
28369
+ access: "create"
28370
+ },
28026
28371
  "recording.deleteFootprint": {
28027
28372
  capName: "recording",
28028
28373
  capScope: "system",
@@ -28053,6 +28398,12 @@ Object.freeze({
28053
28398
  addonId: null,
28054
28399
  access: "view"
28055
28400
  },
28401
+ "recording.getRelocateStatus": {
28402
+ capName: "recording",
28403
+ capScope: "system",
28404
+ addonId: null,
28405
+ access: "view"
28406
+ },
28056
28407
  "recording.getStorageUsage": {
28057
28408
  capName: "recording",
28058
28409
  capScope: "system",
@@ -28083,6 +28434,24 @@ Object.freeze({
28083
28434
  addonId: null,
28084
28435
  access: "view"
28085
28436
  },
28437
+ "recording.relocateFootage": {
28438
+ capName: "recording",
28439
+ capScope: "system",
28440
+ addonId: null,
28441
+ access: "create"
28442
+ },
28443
+ "recording.renderClip": {
28444
+ capName: "recording",
28445
+ capScope: "system",
28446
+ addonId: null,
28447
+ access: "create"
28448
+ },
28449
+ "recording.renderGif": {
28450
+ capName: "recording",
28451
+ capScope: "system",
28452
+ addonId: null,
28453
+ access: "create"
28454
+ },
28086
28455
  "recording.rescanStorage": {
28087
28456
  capName: "recording",
28088
28457
  capScope: "system",
@@ -28677,6 +29046,12 @@ Object.freeze({
28677
29046
  addonId: null,
28678
29047
  access: "create"
28679
29048
  },
29049
+ "streamBroker.renderPreBufferClip": {
29050
+ capName: "stream-broker",
29051
+ capScope: "system",
29052
+ addonId: null,
29053
+ access: "create"
29054
+ },
28680
29055
  "streamBroker.restartProfile": {
28681
29056
  capName: "stream-broker",
28682
29057
  capScope: "system",