@camstack/addon-provider-unraid 0.2.6 → 0.2.8

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 +463 -76
  2. package/dist/addon.mjs +463 -76
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-BLcNejAE.mjs
1
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -269,6 +269,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
269
269
  */
270
270
  EventCategory["DeviceStateChanged"] = "device.state-changed";
271
271
  /**
272
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
273
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
274
+ *
275
+ * Emitted only on a change, so a steady scene is silent. It exists so a
276
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
277
+ * one live badge with no push signal at all, and it cost a request every
278
+ * four seconds per visible camera.
279
+ *
280
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
281
+ * keeps a slow reconcile rather than trusting it alone.
282
+ */
283
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
284
+ /**
272
285
  * Cap event fired by every device that registers the `battery`
273
286
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
274
287
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7212,35 +7225,22 @@ var ConvertResultSchema = object({
7212
7225
  */
7213
7226
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7214
7227
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7215
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7216
- kind: literal("timeOfDay"),
7217
- start: string().regex(HHMM),
7218
- end: string().regex(HHMM),
7219
- /** Restrict to these weekdays; omit = every day. */
7220
- days: array(RecordingWeekdaySchema).optional()
7221
- })]);
7222
- var RecordingModeSchema = _enum([
7223
- "continuous",
7224
- "onMotion",
7225
- "onAudioThreshold"
7226
- ]);
7227
7228
  /**
7228
- * First-class, authoritative per-camera storage mode — the explicit choice the
7229
- * UI reads directly (never inferred from `rules`):
7230
- * - `off` — not recording.
7231
- * - `events` — record only around triggers (motion / audio threshold),
7232
- * with pre/post-buffer.
7233
- * - `continuous` — record 24/7 within the schedule.
7229
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7230
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7231
+ * - `off` — no band covers the camera (or it is disabled).
7232
+ * - `events` — every band records around triggers only.
7233
+ * - `continuous` — at least one band records continuously.
7234
7234
  *
7235
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7236
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7235
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7236
+ * every save (`activeModeForConfig`). Writing it has no effect.
7237
7237
  */
7238
7238
  var RecordingStorageModeSchema = _enum([
7239
7239
  "off",
7240
7240
  "events",
7241
7241
  "continuous"
7242
7242
  ]);
7243
- /** Which detectors trigger an `events`-mode recording. */
7243
+ /** Which detectors trigger an `events`-mode band. */
7244
7244
  var RecordingTriggersSchema = object({
7245
7245
  motion: boolean().optional(),
7246
7246
  audioThresholdDbfs: number().optional()
@@ -7276,18 +7276,6 @@ var RecordingBandSchema = object({
7276
7276
  preBufferSec: number().min(0).optional(),
7277
7277
  postBufferSec: number().min(0).optional()
7278
7278
  });
7279
- var RecordingRuleSchema = object({
7280
- schedule: RecordingScheduleSchema,
7281
- mode: RecordingModeSchema,
7282
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7283
- preBufferSec: number().min(0).default(0),
7284
- /** Keep recording until this many seconds after the last trigger. */
7285
- postBufferSec: number().min(0).default(0),
7286
- /** Each new trigger restarts the post-buffer window. */
7287
- resetTimeoutOnNewEvent: boolean().default(true),
7288
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7289
- thresholdDbfs: number().optional()
7290
- });
7291
7279
  /**
7292
7280
  * Per-device retention overrides. Every field is optional; an unset or `0`
7293
7281
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7321,40 +7309,28 @@ var ScrubThumbnailPresetSchema = _enum([
7321
7309
  /**
7322
7310
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7323
7311
  *
7324
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7325
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7326
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7327
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7312
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7313
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7314
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7315
+ *
7316
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7317
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7318
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7319
+ * persist a band-less config, i.e. silently stop recording the camera.
7328
7320
  */
7329
7321
  var RecordingConfigSchema = object({
7330
7322
  enabled: boolean(),
7331
- /** Authoritative storage mode. Absent on legacy targets derived once via
7332
- * `migrateRulesToMode`, then persisted. */
7323
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7324
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7333
7325
  mode: RecordingStorageModeSchema.optional(),
7334
7326
  profiles: array(CamProfileSchema).optional(),
7335
7327
  segmentSeconds: number().int().positive().optional(),
7336
- /** Shared recording time-bands for `events` & `continuous` — record only when
7337
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7338
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7339
- schedules: array(RecordingScheduleSchema).optional(),
7340
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7341
- * normalized into `schedules` on read and never written going forward. (Not
7342
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7343
- schedule: RecordingScheduleSchema.optional(),
7344
- /** `events`-mode only — which detectors trigger a recording. */
7345
- triggers: RecordingTriggersSchema.optional(),
7346
- /** `events`-mode only — seconds retained before / after a trigger. */
7347
- preBufferSec: number().min(0).optional(),
7348
- postBufferSec: number().min(0).optional(),
7349
- /** DEPRECATED authoring input; retained for migration/transition. */
7350
- rules: array(RecordingRuleSchema).optional(),
7351
7328
  /**
7352
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7353
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7354
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7355
- * derived into bands once via `migrateConfigToBands`.
7329
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7330
+ * the recorder's band engine consumes. An empty array = record nothing;
7331
+ * "off" is the absence of a covering band, never a band value.
7356
7332
  */
7357
- bands: array(RecordingBandSchema).optional(),
7333
+ bands: array(RecordingBandSchema).default([]),
7358
7334
  retention: RecordingRetentionSchema.optional(),
7359
7335
  /**
7360
7336
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7362,8 +7338,15 @@ var RecordingConfigSchema = object({
7362
7338
  * windows only — existing sheets are immutable, and each window's index
7363
7339
  * carries its own tile dims so mixed-preset history renders correctly.
7364
7340
  */
7365
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7366
- });
7341
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7342
+ /**
7343
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7344
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7345
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7346
+ * are written and scrub reads exact keyframes at every velocity.
7347
+ */
7348
+ stripsEnabled: boolean().optional()
7349
+ }).strict();
7367
7350
  /**
7368
7351
  * Ops-log — the durable, append-only operations audit shared by the
7369
7352
  * recordings and events management surfaces.
@@ -7382,7 +7365,8 @@ var OpsLogOpSchema = _enum([
7382
7365
  "prune",
7383
7366
  "manual-delete",
7384
7367
  "rescan",
7385
- "retention-run"
7368
+ "retention-run",
7369
+ "relocate"
7386
7370
  ]);
7387
7371
  /** Why the operation ran. */
7388
7372
  var OpsLogReasonSchema = _enum([
@@ -7421,6 +7405,55 @@ var OpsLogQueryInputSchema = object({
7421
7405
  limit: number().int().min(1).max(1e3).optional()
7422
7406
  });
7423
7407
  /**
7408
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7409
+ *
7410
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7411
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7412
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7413
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7414
+ * after verify) and each completed/failed run also lands one durable ops-log
7415
+ * row on the owning addon's surface.
7416
+ */
7417
+ var RelocateJobStateSchema = _enum([
7418
+ "running",
7419
+ "done",
7420
+ "failed",
7421
+ "cancelled"
7422
+ ]);
7423
+ var RelocateJobSchema = object({
7424
+ jobId: string(),
7425
+ state: RelocateJobStateSchema,
7426
+ /** Source location — for media relocation this is informational ('*': rows
7427
+ * move from wherever they are to the target). */
7428
+ fromLocationId: string(),
7429
+ toLocationId: string(),
7430
+ /** Scoped device, or null = every device. */
7431
+ deviceId: number().nullable(),
7432
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7433
+ entities: array(string()),
7434
+ filesMoved: number().int(),
7435
+ bytesMoved: number().int(),
7436
+ /** Total files discovered up front; null while (or when) unknown. */
7437
+ filesTotal: number().int().nullable(),
7438
+ startedAt: number(),
7439
+ finishedAt: number().nullable(),
7440
+ error: string().nullable()
7441
+ });
7442
+ var RelocateFootageInputSchema = object({
7443
+ deviceId: number().optional(),
7444
+ fromLocationId: string(),
7445
+ toLocationId: string(),
7446
+ entities: array(_enum(["segments", "strips"])).optional(),
7447
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7448
+ * never allowed to starve live writers. */
7449
+ throttleMbps: number().min(1).max(1e3).optional()
7450
+ });
7451
+ var RelocateMediaInputSchema = object({
7452
+ deviceId: number().optional(),
7453
+ toLocationId: string(),
7454
+ throttleMbps: number().min(1).max(1e3).optional()
7455
+ });
7456
+ /**
7424
7457
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7425
7458
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7426
7459
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7470,6 +7503,13 @@ var StorageLocationSchema = object({
7470
7503
  nodeId: string().optional(),
7471
7504
  isDefault: boolean().default(false),
7472
7505
  isSystem: boolean().default(false),
7506
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7507
+ * for node-local locations it can reach) — never persisted, absent when the
7508
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7509
+ capacity: object({
7510
+ totalBytes: number(),
7511
+ availableBytes: number()
7512
+ }).nullable().optional(),
7473
7513
  createdAt: number(),
7474
7514
  updatedAt: number()
7475
7515
  });
@@ -8237,7 +8277,8 @@ var NcTaxonomyEntrySchema = object({
8237
8277
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8238
8278
  parentKind: string().nullable()
8239
8279
  });
8240
- object({
8280
+ /** The complete NC picker taxonomy — three grouped buckets. */
8281
+ var NcTaxonomySchema = object({
8241
8282
  videoClasses: array(NcTaxonomyEntrySchema),
8242
8283
  audioKinds: array(NcTaxonomyEntrySchema),
8243
8284
  labels: array(NcTaxonomyEntrySchema)
@@ -9140,6 +9181,7 @@ function shallowEqual(a, b) {
9140
9181
  for (const k of ak) if (a[k] !== b[k]) return false;
9141
9182
  return true;
9142
9183
  }
9184
+ new Set(["devices", "classes"]);
9143
9185
  /**
9144
9186
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9145
9187
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9298,6 +9340,29 @@ var NcOccupancyConditionSchema = object({
9298
9340
  count: number().int().min(0).default(1),
9299
9341
  sustainSeconds: number().int().min(0).max(3600).default(15)
9300
9342
  });
9343
+ /**
9344
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9345
+ *
9346
+ * The values are not symmetric, and deliberately so — the absent value has to
9347
+ * mean exactly what every rule authored before this condition existed already
9348
+ * does:
9349
+ * - `enter` — entries and every NON-crossing record (movement state,
9350
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9351
+ * an operator who never asked for exits must not start receiving them.
9352
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9353
+ * fails closed, because "the car left the drive" is a question about a
9354
+ * boundary, not about a detection.
9355
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9356
+ *
9357
+ * A rule asking for a direction should normally also scope `zones`, which the
9358
+ * engine evaluates against the crossed zone as well as the current membership
9359
+ * (an exit's membership no longer contains the zone it just left).
9360
+ */
9361
+ var NcCrossingSchema = _enum([
9362
+ "enter",
9363
+ "exit",
9364
+ "any"
9365
+ ]);
9301
9366
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9302
9367
  var NcZoneConditionSchema = object({
9303
9368
  ids: array(string().min(1)).min(1),
@@ -9322,6 +9387,13 @@ var NcConditionsSchema = object({
9322
9387
  /** Veto zones — any hit fails the rule. */
9323
9388
  zonesExclude: array(string().min(1)).optional(),
9324
9389
  /**
9390
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9391
+ * and a closed track carries none, so a `track-end` rule asking for one
9392
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9393
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9394
+ */
9395
+ crossing: NcCrossingSchema.optional(),
9396
+ /**
9325
9397
  * Exact (case-insensitive) match on the record's collapsed `label`
9326
9398
  * (identity name / plate text / subclass).
9327
9399
  */
@@ -9456,17 +9528,85 @@ var NcRuleTargetSchema = object({
9456
9528
  * - `keyFrame` — the clean scene frame (no subject box).
9457
9529
  * - `none` — no attachment.
9458
9530
  */
9459
- var NcMediaPolicySchema = object({ attach: _enum([
9460
- "best",
9461
- "best-matching",
9462
- "keyFrame",
9463
- "none"
9464
- ]).default("best") });
9531
+ /**
9532
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9533
+ * conflate it with the selection strategy and betray the request: asking for
9534
+ * the clean scene frame on an object-event owner used to start at
9535
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9536
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9537
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9538
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9539
+ * the pipeline actually saw.
9540
+ */
9541
+ var NcMediaFrameSchema = _enum([
9542
+ "cropped",
9543
+ "full",
9544
+ "boxed"
9545
+ ]);
9546
+ var NcMediaPolicySchema = object({
9547
+ attach: _enum([
9548
+ "best",
9549
+ "best-matching",
9550
+ "keyFrame",
9551
+ "none"
9552
+ ]).default("best"),
9553
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9554
+ frame: NcMediaFrameSchema.optional(),
9555
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9556
+ * "show me the ZONE", not the whole scene or the subject crop. */
9557
+ zoneCrop: boolean().optional(),
9558
+ /**
9559
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9560
+ * event — NOT from the recording, so the camera does not have to be
9561
+ * recording, and the window sits AROUND the moment instead of a segment
9562
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9563
+ * gif, never a failed notification.
9564
+ */
9565
+ gif: boolean().optional(),
9566
+ /**
9567
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9568
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9569
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9570
+ * the degrade engine, which drops the video and keeps the still.
9571
+ */
9572
+ clip: boolean().optional(),
9573
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9574
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9575
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9576
+ /**
9577
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9578
+ * assigned profile: a notification is watched on a phone, so the 4K
9579
+ * rendition would burn CPU to produce a file the client downscales anyway.
9580
+ * A profile that is not assigned falls back to the cheapest, and the render
9581
+ * reports which one actually ran.
9582
+ */
9583
+ profile: CamProfileSchema.optional()
9584
+ });
9585
+ /**
9586
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9587
+ * notification suppresses.
9588
+ * - `shared` (default, and the absent value) — one window for the whole
9589
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9590
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9591
+ * at once and cat→cat still waits.
9592
+ *
9593
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9594
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9595
+ * see `cooldownKey` in the rule engine).
9596
+ */
9597
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9465
9598
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9466
9599
  var NcThrottleSchema = object({
9467
9600
  cooldownSec: number().int().min(0).max(86400).default(60),
9468
9601
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9469
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9602
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9603
+ /**
9604
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9605
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9606
+ * rule authored before this field simply carries none — and the engine
9607
+ * reads absent as `shared`, the pre-existing behaviour.
9608
+ */
9609
+ granularity: NcThrottleGranularitySchema.optional()
9470
9610
  });
9471
9611
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9472
9612
  var NcRuleInputSchema = object({
@@ -9475,7 +9615,19 @@ var NcRuleInputSchema = object({
9475
9615
  delivery: NcDeliverySchema,
9476
9616
  conditions: NcConditionsSchema.default({}),
9477
9617
  schedule: NcScheduleSchema.optional(),
9478
- targets: array(NcRuleTargetSchema).min(1),
9618
+ /** May be empty when `targetUsers` addresses at least one user — the
9619
+ * "at least one addressee" invariant is enforced by the provider, because
9620
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9621
+ targets: array(NcRuleTargetSchema),
9622
+ /**
9623
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9624
+ * time each user fans out to the personal targets they own
9625
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9626
+ * firing camera — a user is never notified about a device they cannot open.
9627
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9628
+ * targets.
9629
+ */
9630
+ targetUsers: array(string()).optional(),
9479
9631
  media: NcMediaPolicySchema.default({ attach: "best" }),
9480
9632
  throttle: NcThrottleSchema.default({
9481
9633
  cooldownSec: 60,
@@ -9562,6 +9714,7 @@ var NcConditionDescriptorSchema = object({
9562
9714
  "schedule",
9563
9715
  "plateMatcher",
9564
9716
  "packagePhase",
9717
+ "crossingSelect",
9565
9718
  "polygonDraw",
9566
9719
  "occupancy"
9567
9720
  ]),
@@ -9688,7 +9841,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9688
9841
  }), object({ results: array(NcTestResultSchema) }), {
9689
9842
  kind: "mutation",
9690
9843
  auth: "admin"
9691
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9844
+ }), method(object({}), object({
9845
+ catalog: array(NcConditionDescriptorSchema),
9846
+ taxonomy: NcTaxonomySchema.optional()
9847
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9692
9848
  /**
9693
9849
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9694
9850
  *
@@ -10697,6 +10853,28 @@ method(object({
10697
10853
  }), object({ success: literal(true) }), {
10698
10854
  kind: "mutation",
10699
10855
  auth: "admin"
10856
+ }), method(object({
10857
+ deviceId: number(),
10858
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10859
+ * watched on a phone, and the cheap rendition is the right default. */
10860
+ profile: CamProfileSchema.optional(),
10861
+ aroundMs: number(),
10862
+ preRollSec: number().min(0).max(20).default(3),
10863
+ postRollSec: number().min(0).max(20).default(5),
10864
+ format: _enum(["gif", "mp4"]).default("gif"),
10865
+ maxWidth: number().int().min(120).max(1920).default(480),
10866
+ /** GIF only — MP4 keeps the source cadence. */
10867
+ fps: number().int().min(1).max(15).default(5)
10868
+ }), object({
10869
+ base64: string(),
10870
+ mime: string(),
10871
+ bytes: number().int(),
10872
+ /** The profile actually rendered (what the default resolved to). */
10873
+ profile: CamProfileSchema,
10874
+ durationMs: number()
10875
+ }), {
10876
+ kind: "mutation",
10877
+ auth: "admin"
10700
10878
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10701
10879
  probed: boolean(),
10702
10880
  summary: string()
@@ -13827,6 +14005,18 @@ var motionCapability = {
13827
14005
  name: "motion",
13828
14006
  scope: "device",
13829
14007
  mode: "singleton",
14008
+ /**
14009
+ * Providers register per-device natives via `ctx.registerNativeCap`
14010
+ * (Hikvision/Reolink/Amcrest/Wyze/HA/Homematic/Alexa/Matter) — there is
14011
+ * NO system singleton provider. Without this flag `resolveCapMount`
14012
+ * derived `{ kind: 'singleton' }`, so `motion.getStatus`/`isDetected`
14013
+ * resolved via `registry.getSingleton('motion')` (always null) and every
14014
+ * call 412'd "provider not available" while bindings listed a live
14015
+ * `motion` native (2026-08-02). The flag routes the router through
14016
+ * `requireDeviceScoped` → `getProviderForDevice`, like `motion-trigger`,
14017
+ * `snapshot` and every other per-device native cap.
14018
+ */
14019
+ deviceNative: true,
13830
14020
  deviceTypes: [DeviceType.Camera, DeviceType.Sensor],
13831
14021
  methods: {
13832
14022
  /**
@@ -18759,7 +18949,10 @@ method(object({
18759
18949
  }), method(object({
18760
18950
  deviceId: number(),
18761
18951
  caps: array(string()).readonly().optional()
18762
- }), record(string(), unknown().nullable()));
18952
+ }), record(string(), unknown().nullable())), method(object({
18953
+ deviceIds: array(number()).readonly(),
18954
+ caps: array(string()).readonly().optional()
18955
+ }), record(string(), record(string(), unknown().nullable())));
18763
18956
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
18764
18957
  deviceId: number(),
18765
18958
  capName: string()
@@ -19690,6 +19883,36 @@ var TargetKindSchema = object({
19690
19883
  icon: string(),
19691
19884
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19692
19885
  addonId: string(),
19886
+ /**
19887
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
19888
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
19889
+ * when the addon bundles no icon for that kind — the client then falls back
19890
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
19891
+ *
19892
+ * Root-relative on purpose: it resolves against whatever origin serves a web
19893
+ * client, and a native client joins it onto its own hub base.
19894
+ *
19895
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
19896
+ * field that survived only because the runtime cap-router forwards provider
19897
+ * output verbatim — so every consumer had to re-declare it by hand to stop
19898
+ * its own Zod parse from stripping it, and the whole arrangement would have
19899
+ * broken silently the moment output validation was tightened anywhere.
19900
+ */
19901
+ iconUrl: string().optional(),
19902
+ /**
19903
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
19904
+ *
19905
+ * The server knows this and therefore says it, because the client cannot
19906
+ * safely guess: a React-Native client renders SVG and raster through two
19907
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
19908
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
19909
+ * placeholder glyph for every vector icon while the web build looked fine.
19910
+ *
19911
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
19912
+ * not been updated — a client that cannot determine the type should prefer
19913
+ * its raster path, which is the safe default for an unknown image.
19914
+ */
19915
+ iconMediaType: string().optional(),
19693
19916
  configSchema: ConfigSchemaPassthrough,
19694
19917
  supportsDiscovery: boolean(),
19695
19918
  caps: TargetKindCapsSchema
@@ -20137,6 +20360,29 @@ var MotionEventSchema = object({
20137
20360
  * Absent on legacy rows ⇒ treat as `pipeline`.
20138
20361
  */
20139
20362
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
20363
+ /**
20364
+ * The confirmed zone crossing that produced an object event. Present ONLY on
20365
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
20366
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
20367
+ * appearance event carry none, so a rule asking for a direction fails closed
20368
+ * on them.
20369
+ *
20370
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
20371
+ * into its own event, so a frame in which a track enters A while leaving B
20372
+ * produces two events with two directions — never one ambiguous row.
20373
+ *
20374
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
20375
+ * membership the box has NOW, and by definition it no longer contains the zone
20376
+ * that was just left. Without the id here, a zone-scoped rule could never match
20377
+ * the exit it asked for.
20378
+ */
20379
+ var ZoneCrossingSchema = object({
20380
+ direction: _enum(["enter", "exit"]),
20381
+ /** Admin zone id crossed. */
20382
+ zoneId: string(),
20383
+ /** Zone display name at crossing time (falls back to the id). */
20384
+ zoneName: string().optional()
20385
+ });
20140
20386
  var ObjectEventSchema = object({
20141
20387
  ...BaseEventFields,
20142
20388
  kind: literal("object"),
@@ -20163,6 +20409,12 @@ var ObjectEventSchema = object({
20163
20409
  zones: array(string()).readonly().optional(),
20164
20410
  /** Omitted in slim projection. */
20165
20411
  state: TrackStateSchema.optional(),
20412
+ /**
20413
+ * The zone crossing this event IS, when it is one. Absent on every other
20414
+ * event kind (movement state, appearance, package) — see
20415
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
20416
+ */
20417
+ zoneCrossing: ZoneCrossingSchema.optional(),
20166
20418
  /** Detection-frame dimensions in pixels — let consumers normalize the
20167
20419
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20168
20420
  frameWidth: number().optional(),
@@ -20421,6 +20673,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20421
20673
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
20422
20674
  kind: "mutation",
20423
20675
  auth: "admin"
20676
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
20677
+ kind: "mutation",
20678
+ auth: "admin"
20679
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
20680
+ kind: "query",
20681
+ auth: "admin"
20682
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20683
+ kind: "mutation",
20684
+ auth: "admin"
20424
20685
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20425
20686
  kind: "query",
20426
20687
  auth: "admin"
@@ -22917,6 +23178,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22917
23178
  */
22918
23179
  priority: number()
22919
23180
  })).readonly() });
23181
+ /**
23182
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23183
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
23184
+ * what AUTO currently picks, so the UI can show the effective value either way.
23185
+ */
23186
+ var NotificationEndpointSchema = object({
23187
+ /** The operator's explicit choice, or null for AUTO. */
23188
+ baseUrl: string().nullable(),
23189
+ /** What the ranking currently resolves to (null when nothing is reachable). */
23190
+ resolved: string().nullable()
23191
+ });
22920
23192
  var AllowedAddressesSchema = object({
22921
23193
  /**
22922
23194
  * Allowlist of interface addresses operators have explicitly opted
@@ -22939,7 +23211,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
22939
23211
  * to avoid mixed-content blocks in the browser. The public
22940
23212
  * tunnel always emits `https://` regardless. */
22941
23213
  scheme: _enum(["http", "https"]).optional()
22942
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23214
+ }), 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" });
22943
23215
  /**
22944
23216
  * mesh-network — collection cap for mesh-VPN providers.
22945
23217
  *
@@ -23738,7 +24010,12 @@ var RecordingDeviceUsageSchema = object({
23738
24010
  var RecordingLocationUsageSchema = object({
23739
24011
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
23740
24012
  locationId: string().nullable(),
23741
- /** Bytes of recordings stored on this location. */
24013
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
24014
+ * is emitted per physical disk (2026-07-29): two locations on one root
24015
+ * previously rendered as two identical "disks" with a nonsensical used
24016
+ * split — hydrate attribution across aliases is arbitrary by nature. */
24017
+ locationIds: array(string()).optional(),
24018
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
23742
24019
  usedBytes: number(),
23743
24020
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
23744
24021
  availableBytes: number().nullable(),
@@ -23850,6 +24127,44 @@ method(object({
23850
24127
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
23851
24128
  kind: "query",
23852
24129
  auth: "admin"
24130
+ }), method(object({
24131
+ deviceId: number(),
24132
+ aroundMs: number(),
24133
+ preRollSec: number().min(0).max(30).default(2),
24134
+ postRollSec: number().min(0).max(30).default(5),
24135
+ maxWidth: number().int().min(120).max(1280).default(480),
24136
+ fps: number().int().min(1).max(15).default(5)
24137
+ }), object({
24138
+ gifBase64: string(),
24139
+ fromMs: number(),
24140
+ toMs: number()
24141
+ }), {
24142
+ kind: "mutation",
24143
+ auth: "admin"
24144
+ }), method(object({
24145
+ deviceId: number(),
24146
+ aroundMs: number(),
24147
+ preRollSec: number().min(0).max(30).default(3),
24148
+ postRollSec: number().min(0).max(30).default(7),
24149
+ maxWidth: number().int().min(160).max(1920).default(640)
24150
+ }), object({
24151
+ clipBase64: string(),
24152
+ mime: string(),
24153
+ fromMs: number(),
24154
+ toMs: number(),
24155
+ bytes: number().int()
24156
+ }), {
24157
+ kind: "mutation",
24158
+ auth: "admin"
24159
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24160
+ kind: "mutation",
24161
+ auth: "admin"
24162
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
24163
+ kind: "query",
24164
+ auth: "admin"
24165
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24166
+ kind: "mutation",
24167
+ auth: "admin"
23853
24168
  });
23854
24169
  /**
23855
24170
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25441,6 +25756,12 @@ Object.freeze({
25441
25756
  addonId: null,
25442
25757
  access: "view"
25443
25758
  },
25759
+ "deviceManager.getDeviceStatusAggregateBatch": {
25760
+ capName: "device-manager",
25761
+ capScope: "system",
25762
+ addonId: null,
25763
+ access: "view"
25764
+ },
25444
25765
  "deviceManager.getLinkedDevices": {
25445
25766
  capName: "device-manager",
25446
25767
  capScope: "system",
@@ -26335,6 +26656,12 @@ Object.freeze({
26335
26656
  addonId: null,
26336
26657
  access: "view"
26337
26658
  },
26659
+ "localNetwork.getNotificationEndpoint": {
26660
+ capName: "local-network",
26661
+ capScope: "system",
26662
+ addonId: null,
26663
+ access: "view"
26664
+ },
26338
26665
  "localNetwork.getPreferred": {
26339
26666
  capName: "local-network",
26340
26667
  capScope: "system",
@@ -26359,6 +26686,12 @@ Object.freeze({
26359
26686
  addonId: null,
26360
26687
  access: "create"
26361
26688
  },
26689
+ "localNetwork.setNotificationEndpoint": {
26690
+ capName: "local-network",
26691
+ capScope: "system",
26692
+ addonId: null,
26693
+ access: "create"
26694
+ },
26362
26695
  "lockControl.lock": {
26363
26696
  capName: "lock-control",
26364
26697
  capScope: "device",
@@ -27001,6 +27334,12 @@ Object.freeze({
27001
27334
  addonId: null,
27002
27335
  access: "create"
27003
27336
  },
27337
+ "pipelineAnalytics.cancelMediaRelocate": {
27338
+ capName: "pipeline-analytics",
27339
+ capScope: "device",
27340
+ addonId: null,
27341
+ access: "create"
27342
+ },
27004
27343
  "pipelineAnalytics.clearTracks": {
27005
27344
  capName: "pipeline-analytics",
27006
27345
  capScope: "device",
@@ -27055,6 +27394,12 @@ Object.freeze({
27055
27394
  addonId: null,
27056
27395
  access: "view"
27057
27396
  },
27397
+ "pipelineAnalytics.getMediaRelocateStatus": {
27398
+ capName: "pipeline-analytics",
27399
+ capScope: "device",
27400
+ addonId: null,
27401
+ access: "view"
27402
+ },
27058
27403
  "pipelineAnalytics.getMotionEvents": {
27059
27404
  capName: "pipeline-analytics",
27060
27405
  capScope: "device",
@@ -27127,6 +27472,12 @@ Object.freeze({
27127
27472
  addonId: null,
27128
27473
  access: "create"
27129
27474
  },
27475
+ "pipelineAnalytics.relocateMedia": {
27476
+ capName: "pipeline-analytics",
27477
+ capScope: "device",
27478
+ addonId: null,
27479
+ access: "create"
27480
+ },
27130
27481
  "pipelineAnalytics.searchObjectEvents": {
27131
27482
  capName: "pipeline-analytics",
27132
27483
  capScope: "device",
@@ -27889,6 +28240,12 @@ Object.freeze({
27889
28240
  addonId: null,
27890
28241
  access: "create"
27891
28242
  },
28243
+ "recording.cancelRelocate": {
28244
+ capName: "recording",
28245
+ capScope: "system",
28246
+ addonId: null,
28247
+ access: "create"
28248
+ },
27892
28249
  "recording.deleteFootprint": {
27893
28250
  capName: "recording",
27894
28251
  capScope: "system",
@@ -27919,6 +28276,12 @@ Object.freeze({
27919
28276
  addonId: null,
27920
28277
  access: "view"
27921
28278
  },
28279
+ "recording.getRelocateStatus": {
28280
+ capName: "recording",
28281
+ capScope: "system",
28282
+ addonId: null,
28283
+ access: "view"
28284
+ },
27922
28285
  "recording.getStorageUsage": {
27923
28286
  capName: "recording",
27924
28287
  capScope: "system",
@@ -27949,6 +28312,24 @@ Object.freeze({
27949
28312
  addonId: null,
27950
28313
  access: "view"
27951
28314
  },
28315
+ "recording.relocateFootage": {
28316
+ capName: "recording",
28317
+ capScope: "system",
28318
+ addonId: null,
28319
+ access: "create"
28320
+ },
28321
+ "recording.renderClip": {
28322
+ capName: "recording",
28323
+ capScope: "system",
28324
+ addonId: null,
28325
+ access: "create"
28326
+ },
28327
+ "recording.renderGif": {
28328
+ capName: "recording",
28329
+ capScope: "system",
28330
+ addonId: null,
28331
+ access: "create"
28332
+ },
27952
28333
  "recording.rescanStorage": {
27953
28334
  capName: "recording",
27954
28335
  capScope: "system",
@@ -28543,6 +28924,12 @@ Object.freeze({
28543
28924
  addonId: null,
28544
28925
  access: "create"
28545
28926
  },
28927
+ "streamBroker.renderPreBufferClip": {
28928
+ capName: "stream-broker",
28929
+ capScope: "system",
28930
+ addonId: null,
28931
+ access: "create"
28932
+ },
28546
28933
  "streamBroker.restartProfile": {
28547
28934
  capName: "stream-broker",
28548
28935
  capScope: "system",