@camstack/addon-decoder-ffmpeg 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/index.js +451 -76
  2. package/dist/index.mjs +451 -76
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
4
4
  });
5
5
  let node_crypto = require("node:crypto");
6
6
  let node_child_process = require("node:child_process");
7
- //#region ../types/dist/event-category-BLcNejAE.mjs
7
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
8
8
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
9
9
  EventCategory["SystemBoot"] = "system.boot";
10
10
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -275,6 +275,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
275
275
  */
276
276
  EventCategory["DeviceStateChanged"] = "device.state-changed";
277
277
  /**
278
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
279
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
280
+ *
281
+ * Emitted only on a change, so a steady scene is silent. It exists so a
282
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
283
+ * one live badge with no push signal at all, and it cost a request every
284
+ * four seconds per visible camera.
285
+ *
286
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
287
+ * keeps a slow reconcile rather than trusting it alone.
288
+ */
289
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
290
+ /**
278
291
  * Cap event fired by every device that registers the `battery`
279
292
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
280
293
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7200,35 +7213,22 @@ var ConvertResultSchema = object({
7200
7213
  */
7201
7214
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7202
7215
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7203
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7204
- kind: literal("timeOfDay"),
7205
- start: string().regex(HHMM),
7206
- end: string().regex(HHMM),
7207
- /** Restrict to these weekdays; omit = every day. */
7208
- days: array(RecordingWeekdaySchema).optional()
7209
- })]);
7210
- var RecordingModeSchema = _enum([
7211
- "continuous",
7212
- "onMotion",
7213
- "onAudioThreshold"
7214
- ]);
7215
7216
  /**
7216
- * First-class, authoritative per-camera storage mode — the explicit choice the
7217
- * UI reads directly (never inferred from `rules`):
7218
- * - `off` — not recording.
7219
- * - `events` — record only around triggers (motion / audio threshold),
7220
- * with pre/post-buffer.
7221
- * - `continuous` — record 24/7 within the schedule.
7217
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7218
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7219
+ * - `off` — no band covers the camera (or it is disabled).
7220
+ * - `events` — every band records around triggers only.
7221
+ * - `continuous` — at least one band records continuously.
7222
7222
  *
7223
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7224
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7223
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7224
+ * every save (`activeModeForConfig`). Writing it has no effect.
7225
7225
  */
7226
7226
  var RecordingStorageModeSchema = _enum([
7227
7227
  "off",
7228
7228
  "events",
7229
7229
  "continuous"
7230
7230
  ]);
7231
- /** Which detectors trigger an `events`-mode recording. */
7231
+ /** Which detectors trigger an `events`-mode band. */
7232
7232
  var RecordingTriggersSchema = object({
7233
7233
  motion: boolean().optional(),
7234
7234
  audioThresholdDbfs: number().optional()
@@ -7264,18 +7264,6 @@ var RecordingBandSchema = object({
7264
7264
  preBufferSec: number().min(0).optional(),
7265
7265
  postBufferSec: number().min(0).optional()
7266
7266
  });
7267
- var RecordingRuleSchema = object({
7268
- schedule: RecordingScheduleSchema,
7269
- mode: RecordingModeSchema,
7270
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7271
- preBufferSec: number().min(0).default(0),
7272
- /** Keep recording until this many seconds after the last trigger. */
7273
- postBufferSec: number().min(0).default(0),
7274
- /** Each new trigger restarts the post-buffer window. */
7275
- resetTimeoutOnNewEvent: boolean().default(true),
7276
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7277
- thresholdDbfs: number().optional()
7278
- });
7279
7267
  /**
7280
7268
  * Per-device retention overrides. Every field is optional; an unset or `0`
7281
7269
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7309,40 +7297,28 @@ var ScrubThumbnailPresetSchema = _enum([
7309
7297
  /**
7310
7298
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7311
7299
  *
7312
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7313
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7314
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7315
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7300
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7301
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7302
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7303
+ *
7304
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7305
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7306
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7307
+ * persist a band-less config, i.e. silently stop recording the camera.
7316
7308
  */
7317
7309
  var RecordingConfigSchema = object({
7318
7310
  enabled: boolean(),
7319
- /** Authoritative storage mode. Absent on legacy targets derived once via
7320
- * `migrateRulesToMode`, then persisted. */
7311
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7312
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7321
7313
  mode: RecordingStorageModeSchema.optional(),
7322
7314
  profiles: array(CamProfileSchema).optional(),
7323
7315
  segmentSeconds: number().int().positive().optional(),
7324
- /** Shared recording time-bands for `events` & `continuous` — record only when
7325
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7326
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7327
- schedules: array(RecordingScheduleSchema).optional(),
7328
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7329
- * normalized into `schedules` on read and never written going forward. (Not
7330
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7331
- schedule: RecordingScheduleSchema.optional(),
7332
- /** `events`-mode only — which detectors trigger a recording. */
7333
- triggers: RecordingTriggersSchema.optional(),
7334
- /** `events`-mode only — seconds retained before / after a trigger. */
7335
- preBufferSec: number().min(0).optional(),
7336
- postBufferSec: number().min(0).optional(),
7337
- /** DEPRECATED authoring input; retained for migration/transition. */
7338
- rules: array(RecordingRuleSchema).optional(),
7339
7316
  /**
7340
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7341
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7342
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7343
- * derived into bands once via `migrateConfigToBands`.
7317
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7318
+ * the recorder's band engine consumes. An empty array = record nothing;
7319
+ * "off" is the absence of a covering band, never a band value.
7344
7320
  */
7345
- bands: array(RecordingBandSchema).optional(),
7321
+ bands: array(RecordingBandSchema).default([]),
7346
7322
  retention: RecordingRetentionSchema.optional(),
7347
7323
  /**
7348
7324
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7350,8 +7326,15 @@ var RecordingConfigSchema = object({
7350
7326
  * windows only — existing sheets are immutable, and each window's index
7351
7327
  * carries its own tile dims so mixed-preset history renders correctly.
7352
7328
  */
7353
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7354
- });
7329
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7330
+ /**
7331
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7332
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7333
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7334
+ * are written and scrub reads exact keyframes at every velocity.
7335
+ */
7336
+ stripsEnabled: boolean().optional()
7337
+ }).strict();
7355
7338
  /**
7356
7339
  * Ops-log — the durable, append-only operations audit shared by the
7357
7340
  * recordings and events management surfaces.
@@ -7370,7 +7353,8 @@ var OpsLogOpSchema = _enum([
7370
7353
  "prune",
7371
7354
  "manual-delete",
7372
7355
  "rescan",
7373
- "retention-run"
7356
+ "retention-run",
7357
+ "relocate"
7374
7358
  ]);
7375
7359
  /** Why the operation ran. */
7376
7360
  var OpsLogReasonSchema = _enum([
@@ -7409,6 +7393,55 @@ var OpsLogQueryInputSchema = object({
7409
7393
  limit: number().int().min(1).max(1e3).optional()
7410
7394
  });
7411
7395
  /**
7396
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7397
+ *
7398
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7399
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7400
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7401
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7402
+ * after verify) and each completed/failed run also lands one durable ops-log
7403
+ * row on the owning addon's surface.
7404
+ */
7405
+ var RelocateJobStateSchema = _enum([
7406
+ "running",
7407
+ "done",
7408
+ "failed",
7409
+ "cancelled"
7410
+ ]);
7411
+ var RelocateJobSchema = object({
7412
+ jobId: string(),
7413
+ state: RelocateJobStateSchema,
7414
+ /** Source location — for media relocation this is informational ('*': rows
7415
+ * move from wherever they are to the target). */
7416
+ fromLocationId: string(),
7417
+ toLocationId: string(),
7418
+ /** Scoped device, or null = every device. */
7419
+ deviceId: number().nullable(),
7420
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7421
+ entities: array(string()),
7422
+ filesMoved: number().int(),
7423
+ bytesMoved: number().int(),
7424
+ /** Total files discovered up front; null while (or when) unknown. */
7425
+ filesTotal: number().int().nullable(),
7426
+ startedAt: number(),
7427
+ finishedAt: number().nullable(),
7428
+ error: string().nullable()
7429
+ });
7430
+ var RelocateFootageInputSchema = object({
7431
+ deviceId: number().optional(),
7432
+ fromLocationId: string(),
7433
+ toLocationId: string(),
7434
+ entities: array(_enum(["segments", "strips"])).optional(),
7435
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7436
+ * never allowed to starve live writers. */
7437
+ throttleMbps: number().min(1).max(1e3).optional()
7438
+ });
7439
+ var RelocateMediaInputSchema = object({
7440
+ deviceId: number().optional(),
7441
+ toLocationId: string(),
7442
+ throttleMbps: number().min(1).max(1e3).optional()
7443
+ });
7444
+ /**
7412
7445
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7413
7446
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7414
7447
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7458,6 +7491,13 @@ var StorageLocationSchema = object({
7458
7491
  nodeId: string().optional(),
7459
7492
  isDefault: boolean().default(false),
7460
7493
  isSystem: boolean().default(false),
7494
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7495
+ * for node-local locations it can reach) — never persisted, absent when the
7496
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7497
+ capacity: object({
7498
+ totalBytes: number(),
7499
+ availableBytes: number()
7500
+ }).nullable().optional(),
7461
7501
  createdAt: number(),
7462
7502
  updatedAt: number()
7463
7503
  });
@@ -8225,7 +8265,8 @@ var NcTaxonomyEntrySchema = object({
8225
8265
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8226
8266
  parentKind: string().nullable()
8227
8267
  });
8228
- object({
8268
+ /** The complete NC picker taxonomy — three grouped buckets. */
8269
+ var NcTaxonomySchema = object({
8229
8270
  videoClasses: array(NcTaxonomyEntrySchema),
8230
8271
  audioKinds: array(NcTaxonomyEntrySchema),
8231
8272
  labels: array(NcTaxonomyEntrySchema)
@@ -8885,6 +8926,7 @@ var AccessoryKind = {
8885
8926
  };
8886
8927
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8887
8928
  DeviceFeature.BatteryOperated;
8929
+ new Set(["devices", "classes"]);
8888
8930
  /**
8889
8931
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8890
8932
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9043,6 +9085,29 @@ var NcOccupancyConditionSchema = object({
9043
9085
  count: number().int().min(0).default(1),
9044
9086
  sustainSeconds: number().int().min(0).max(3600).default(15)
9045
9087
  });
9088
+ /**
9089
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9090
+ *
9091
+ * The values are not symmetric, and deliberately so — the absent value has to
9092
+ * mean exactly what every rule authored before this condition existed already
9093
+ * does:
9094
+ * - `enter` — entries and every NON-crossing record (movement state,
9095
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9096
+ * an operator who never asked for exits must not start receiving them.
9097
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9098
+ * fails closed, because "the car left the drive" is a question about a
9099
+ * boundary, not about a detection.
9100
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9101
+ *
9102
+ * A rule asking for a direction should normally also scope `zones`, which the
9103
+ * engine evaluates against the crossed zone as well as the current membership
9104
+ * (an exit's membership no longer contains the zone it just left).
9105
+ */
9106
+ var NcCrossingSchema = _enum([
9107
+ "enter",
9108
+ "exit",
9109
+ "any"
9110
+ ]);
9046
9111
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9047
9112
  var NcZoneConditionSchema = object({
9048
9113
  ids: array(string().min(1)).min(1),
@@ -9067,6 +9132,13 @@ var NcConditionsSchema = object({
9067
9132
  /** Veto zones — any hit fails the rule. */
9068
9133
  zonesExclude: array(string().min(1)).optional(),
9069
9134
  /**
9135
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9136
+ * and a closed track carries none, so a `track-end` rule asking for one
9137
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9138
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9139
+ */
9140
+ crossing: NcCrossingSchema.optional(),
9141
+ /**
9070
9142
  * Exact (case-insensitive) match on the record's collapsed `label`
9071
9143
  * (identity name / plate text / subclass).
9072
9144
  */
@@ -9201,17 +9273,85 @@ var NcRuleTargetSchema = object({
9201
9273
  * - `keyFrame` — the clean scene frame (no subject box).
9202
9274
  * - `none` — no attachment.
9203
9275
  */
9204
- var NcMediaPolicySchema = object({ attach: _enum([
9205
- "best",
9206
- "best-matching",
9207
- "keyFrame",
9208
- "none"
9209
- ]).default("best") });
9276
+ /**
9277
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9278
+ * conflate it with the selection strategy and betray the request: asking for
9279
+ * the clean scene frame on an object-event owner used to start at
9280
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9281
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9282
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9283
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9284
+ * the pipeline actually saw.
9285
+ */
9286
+ var NcMediaFrameSchema = _enum([
9287
+ "cropped",
9288
+ "full",
9289
+ "boxed"
9290
+ ]);
9291
+ var NcMediaPolicySchema = object({
9292
+ attach: _enum([
9293
+ "best",
9294
+ "best-matching",
9295
+ "keyFrame",
9296
+ "none"
9297
+ ]).default("best"),
9298
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9299
+ frame: NcMediaFrameSchema.optional(),
9300
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9301
+ * "show me the ZONE", not the whole scene or the subject crop. */
9302
+ zoneCrop: boolean().optional(),
9303
+ /**
9304
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9305
+ * event — NOT from the recording, so the camera does not have to be
9306
+ * recording, and the window sits AROUND the moment instead of a segment
9307
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9308
+ * gif, never a failed notification.
9309
+ */
9310
+ gif: boolean().optional(),
9311
+ /**
9312
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9313
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9314
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9315
+ * the degrade engine, which drops the video and keeps the still.
9316
+ */
9317
+ clip: boolean().optional(),
9318
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9319
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9320
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9321
+ /**
9322
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9323
+ * assigned profile: a notification is watched on a phone, so the 4K
9324
+ * rendition would burn CPU to produce a file the client downscales anyway.
9325
+ * A profile that is not assigned falls back to the cheapest, and the render
9326
+ * reports which one actually ran.
9327
+ */
9328
+ profile: CamProfileSchema.optional()
9329
+ });
9330
+ /**
9331
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9332
+ * notification suppresses.
9333
+ * - `shared` (default, and the absent value) — one window for the whole
9334
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9335
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9336
+ * at once and cat→cat still waits.
9337
+ *
9338
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9339
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9340
+ * see `cooldownKey` in the rule engine).
9341
+ */
9342
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9210
9343
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9211
9344
  var NcThrottleSchema = object({
9212
9345
  cooldownSec: number().int().min(0).max(86400).default(60),
9213
9346
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9214
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9347
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9348
+ /**
9349
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9350
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9351
+ * rule authored before this field simply carries none — and the engine
9352
+ * reads absent as `shared`, the pre-existing behaviour.
9353
+ */
9354
+ granularity: NcThrottleGranularitySchema.optional()
9215
9355
  });
9216
9356
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9217
9357
  var NcRuleInputSchema = object({
@@ -9220,7 +9360,19 @@ var NcRuleInputSchema = object({
9220
9360
  delivery: NcDeliverySchema,
9221
9361
  conditions: NcConditionsSchema.default({}),
9222
9362
  schedule: NcScheduleSchema.optional(),
9223
- targets: array(NcRuleTargetSchema).min(1),
9363
+ /** May be empty when `targetUsers` addresses at least one user — the
9364
+ * "at least one addressee" invariant is enforced by the provider, because
9365
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9366
+ targets: array(NcRuleTargetSchema),
9367
+ /**
9368
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9369
+ * time each user fans out to the personal targets they own
9370
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9371
+ * firing camera — a user is never notified about a device they cannot open.
9372
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9373
+ * targets.
9374
+ */
9375
+ targetUsers: array(string()).optional(),
9224
9376
  media: NcMediaPolicySchema.default({ attach: "best" }),
9225
9377
  throttle: NcThrottleSchema.default({
9226
9378
  cooldownSec: 60,
@@ -9307,6 +9459,7 @@ var NcConditionDescriptorSchema = object({
9307
9459
  "schedule",
9308
9460
  "plateMatcher",
9309
9461
  "packagePhase",
9462
+ "crossingSelect",
9310
9463
  "polygonDraw",
9311
9464
  "occupancy"
9312
9465
  ]),
@@ -9433,7 +9586,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9433
9586
  }), object({ results: array(NcTestResultSchema) }), {
9434
9587
  kind: "mutation",
9435
9588
  auth: "admin"
9436
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9589
+ }), method(object({}), object({
9590
+ catalog: array(NcConditionDescriptorSchema),
9591
+ taxonomy: NcTaxonomySchema.optional()
9592
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9437
9593
  /**
9438
9594
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9439
9595
  *
@@ -10170,6 +10326,28 @@ method(object({
10170
10326
  }), object({ success: literal(true) }), {
10171
10327
  kind: "mutation",
10172
10328
  auth: "admin"
10329
+ }), method(object({
10330
+ deviceId: number(),
10331
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10332
+ * watched on a phone, and the cheap rendition is the right default. */
10333
+ profile: CamProfileSchema.optional(),
10334
+ aroundMs: number(),
10335
+ preRollSec: number().min(0).max(20).default(3),
10336
+ postRollSec: number().min(0).max(20).default(5),
10337
+ format: _enum(["gif", "mp4"]).default("gif"),
10338
+ maxWidth: number().int().min(120).max(1920).default(480),
10339
+ /** GIF only — MP4 keeps the source cadence. */
10340
+ fps: number().int().min(1).max(15).default(5)
10341
+ }), object({
10342
+ base64: string(),
10343
+ mime: string(),
10344
+ bytes: number().int(),
10345
+ /** The profile actually rendered (what the default resolved to). */
10346
+ profile: CamProfileSchema,
10347
+ durationMs: number()
10348
+ }), {
10349
+ kind: "mutation",
10350
+ auth: "admin"
10173
10351
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10174
10352
  probed: boolean(),
10175
10353
  summary: string()
@@ -15894,7 +16072,10 @@ method(object({
15894
16072
  }), method(object({
15895
16073
  deviceId: number(),
15896
16074
  caps: array(string()).readonly().optional()
15897
- }), record(string(), unknown().nullable()));
16075
+ }), record(string(), unknown().nullable())), method(object({
16076
+ deviceIds: array(number()).readonly(),
16077
+ caps: array(string()).readonly().optional()
16078
+ }), record(string(), record(string(), unknown().nullable())));
15898
16079
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15899
16080
  deviceId: number(),
15900
16081
  capName: string()
@@ -16825,6 +17006,36 @@ var TargetKindSchema = object({
16825
17006
  icon: string(),
16826
17007
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16827
17008
  addonId: string(),
17009
+ /**
17010
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17011
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17012
+ * when the addon bundles no icon for that kind — the client then falls back
17013
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17014
+ *
17015
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17016
+ * client, and a native client joins it onto its own hub base.
17017
+ *
17018
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17019
+ * field that survived only because the runtime cap-router forwards provider
17020
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17021
+ * its own Zod parse from stripping it, and the whole arrangement would have
17022
+ * broken silently the moment output validation was tightened anywhere.
17023
+ */
17024
+ iconUrl: string().optional(),
17025
+ /**
17026
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17027
+ *
17028
+ * The server knows this and therefore says it, because the client cannot
17029
+ * safely guess: a React-Native client renders SVG and raster through two
17030
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17031
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17032
+ * placeholder glyph for every vector icon while the web build looked fine.
17033
+ *
17034
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17035
+ * not been updated — a client that cannot determine the type should prefer
17036
+ * its raster path, which is the safe default for an unknown image.
17037
+ */
17038
+ iconMediaType: string().optional(),
16828
17039
  configSchema: ConfigSchemaPassthrough,
16829
17040
  supportsDiscovery: boolean(),
16830
17041
  caps: TargetKindCapsSchema
@@ -17272,6 +17483,29 @@ var MotionEventSchema = object({
17272
17483
  * Absent on legacy rows ⇒ treat as `pipeline`.
17273
17484
  */
17274
17485
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17486
+ /**
17487
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17488
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17489
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17490
+ * appearance event carry none, so a rule asking for a direction fails closed
17491
+ * on them.
17492
+ *
17493
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17494
+ * into its own event, so a frame in which a track enters A while leaving B
17495
+ * produces two events with two directions — never one ambiguous row.
17496
+ *
17497
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17498
+ * membership the box has NOW, and by definition it no longer contains the zone
17499
+ * that was just left. Without the id here, a zone-scoped rule could never match
17500
+ * the exit it asked for.
17501
+ */
17502
+ var ZoneCrossingSchema = object({
17503
+ direction: _enum(["enter", "exit"]),
17504
+ /** Admin zone id crossed. */
17505
+ zoneId: string(),
17506
+ /** Zone display name at crossing time (falls back to the id). */
17507
+ zoneName: string().optional()
17508
+ });
17275
17509
  var ObjectEventSchema = object({
17276
17510
  ...BaseEventFields,
17277
17511
  kind: literal("object"),
@@ -17298,6 +17532,12 @@ var ObjectEventSchema = object({
17298
17532
  zones: array(string()).readonly().optional(),
17299
17533
  /** Omitted in slim projection. */
17300
17534
  state: TrackStateSchema.optional(),
17535
+ /**
17536
+ * The zone crossing this event IS, when it is one. Absent on every other
17537
+ * event kind (movement state, appearance, package) — see
17538
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17539
+ */
17540
+ zoneCrossing: ZoneCrossingSchema.optional(),
17301
17541
  /** Detection-frame dimensions in pixels — let consumers normalize the
17302
17542
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17303
17543
  frameWidth: number().optional(),
@@ -17556,6 +17796,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17556
17796
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17557
17797
  kind: "mutation",
17558
17798
  auth: "admin"
17799
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17800
+ kind: "mutation",
17801
+ auth: "admin"
17802
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17803
+ kind: "query",
17804
+ auth: "admin"
17805
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17806
+ kind: "mutation",
17807
+ auth: "admin"
17559
17808
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17560
17809
  kind: "query",
17561
17810
  auth: "admin"
@@ -20035,6 +20284,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20035
20284
  */
20036
20285
  priority: number()
20037
20286
  })).readonly() });
20287
+ /**
20288
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20289
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20290
+ * what AUTO currently picks, so the UI can show the effective value either way.
20291
+ */
20292
+ var NotificationEndpointSchema = object({
20293
+ /** The operator's explicit choice, or null for AUTO. */
20294
+ baseUrl: string().nullable(),
20295
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20296
+ resolved: string().nullable()
20297
+ });
20038
20298
  var AllowedAddressesSchema = object({
20039
20299
  /**
20040
20300
  * Allowlist of interface addresses operators have explicitly opted
@@ -20057,7 +20317,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20057
20317
  * to avoid mixed-content blocks in the browser. The public
20058
20318
  * tunnel always emits `https://` regardless. */
20059
20319
  scheme: _enum(["http", "https"]).optional()
20060
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20320
+ }), 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" });
20061
20321
  /**
20062
20322
  * mesh-network — collection cap for mesh-VPN providers.
20063
20323
  *
@@ -20856,7 +21116,12 @@ var RecordingDeviceUsageSchema = object({
20856
21116
  var RecordingLocationUsageSchema = object({
20857
21117
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20858
21118
  locationId: string().nullable(),
20859
- /** Bytes of recordings stored on this location. */
21119
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21120
+ * is emitted per physical disk (2026-07-29): two locations on one root
21121
+ * previously rendered as two identical "disks" with a nonsensical used
21122
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21123
+ locationIds: array(string()).optional(),
21124
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20860
21125
  usedBytes: number(),
20861
21126
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20862
21127
  availableBytes: number().nullable(),
@@ -20968,6 +21233,44 @@ method(object({
20968
21233
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20969
21234
  kind: "query",
20970
21235
  auth: "admin"
21236
+ }), method(object({
21237
+ deviceId: number(),
21238
+ aroundMs: number(),
21239
+ preRollSec: number().min(0).max(30).default(2),
21240
+ postRollSec: number().min(0).max(30).default(5),
21241
+ maxWidth: number().int().min(120).max(1280).default(480),
21242
+ fps: number().int().min(1).max(15).default(5)
21243
+ }), object({
21244
+ gifBase64: string(),
21245
+ fromMs: number(),
21246
+ toMs: number()
21247
+ }), {
21248
+ kind: "mutation",
21249
+ auth: "admin"
21250
+ }), method(object({
21251
+ deviceId: number(),
21252
+ aroundMs: number(),
21253
+ preRollSec: number().min(0).max(30).default(3),
21254
+ postRollSec: number().min(0).max(30).default(7),
21255
+ maxWidth: number().int().min(160).max(1920).default(640)
21256
+ }), object({
21257
+ clipBase64: string(),
21258
+ mime: string(),
21259
+ fromMs: number(),
21260
+ toMs: number(),
21261
+ bytes: number().int()
21262
+ }), {
21263
+ kind: "mutation",
21264
+ auth: "admin"
21265
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21266
+ kind: "mutation",
21267
+ auth: "admin"
21268
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21269
+ kind: "query",
21270
+ auth: "admin"
21271
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21272
+ kind: "mutation",
21273
+ auth: "admin"
20971
21274
  });
20972
21275
  /**
20973
21276
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22559,6 +22862,12 @@ Object.freeze({
22559
22862
  addonId: null,
22560
22863
  access: "view"
22561
22864
  },
22865
+ "deviceManager.getDeviceStatusAggregateBatch": {
22866
+ capName: "device-manager",
22867
+ capScope: "system",
22868
+ addonId: null,
22869
+ access: "view"
22870
+ },
22562
22871
  "deviceManager.getLinkedDevices": {
22563
22872
  capName: "device-manager",
22564
22873
  capScope: "system",
@@ -23453,6 +23762,12 @@ Object.freeze({
23453
23762
  addonId: null,
23454
23763
  access: "view"
23455
23764
  },
23765
+ "localNetwork.getNotificationEndpoint": {
23766
+ capName: "local-network",
23767
+ capScope: "system",
23768
+ addonId: null,
23769
+ access: "view"
23770
+ },
23456
23771
  "localNetwork.getPreferred": {
23457
23772
  capName: "local-network",
23458
23773
  capScope: "system",
@@ -23477,6 +23792,12 @@ Object.freeze({
23477
23792
  addonId: null,
23478
23793
  access: "create"
23479
23794
  },
23795
+ "localNetwork.setNotificationEndpoint": {
23796
+ capName: "local-network",
23797
+ capScope: "system",
23798
+ addonId: null,
23799
+ access: "create"
23800
+ },
23480
23801
  "lockControl.lock": {
23481
23802
  capName: "lock-control",
23482
23803
  capScope: "device",
@@ -24119,6 +24440,12 @@ Object.freeze({
24119
24440
  addonId: null,
24120
24441
  access: "create"
24121
24442
  },
24443
+ "pipelineAnalytics.cancelMediaRelocate": {
24444
+ capName: "pipeline-analytics",
24445
+ capScope: "device",
24446
+ addonId: null,
24447
+ access: "create"
24448
+ },
24122
24449
  "pipelineAnalytics.clearTracks": {
24123
24450
  capName: "pipeline-analytics",
24124
24451
  capScope: "device",
@@ -24173,6 +24500,12 @@ Object.freeze({
24173
24500
  addonId: null,
24174
24501
  access: "view"
24175
24502
  },
24503
+ "pipelineAnalytics.getMediaRelocateStatus": {
24504
+ capName: "pipeline-analytics",
24505
+ capScope: "device",
24506
+ addonId: null,
24507
+ access: "view"
24508
+ },
24176
24509
  "pipelineAnalytics.getMotionEvents": {
24177
24510
  capName: "pipeline-analytics",
24178
24511
  capScope: "device",
@@ -24245,6 +24578,12 @@ Object.freeze({
24245
24578
  addonId: null,
24246
24579
  access: "create"
24247
24580
  },
24581
+ "pipelineAnalytics.relocateMedia": {
24582
+ capName: "pipeline-analytics",
24583
+ capScope: "device",
24584
+ addonId: null,
24585
+ access: "create"
24586
+ },
24248
24587
  "pipelineAnalytics.searchObjectEvents": {
24249
24588
  capName: "pipeline-analytics",
24250
24589
  capScope: "device",
@@ -25007,6 +25346,12 @@ Object.freeze({
25007
25346
  addonId: null,
25008
25347
  access: "create"
25009
25348
  },
25349
+ "recording.cancelRelocate": {
25350
+ capName: "recording",
25351
+ capScope: "system",
25352
+ addonId: null,
25353
+ access: "create"
25354
+ },
25010
25355
  "recording.deleteFootprint": {
25011
25356
  capName: "recording",
25012
25357
  capScope: "system",
@@ -25037,6 +25382,12 @@ Object.freeze({
25037
25382
  addonId: null,
25038
25383
  access: "view"
25039
25384
  },
25385
+ "recording.getRelocateStatus": {
25386
+ capName: "recording",
25387
+ capScope: "system",
25388
+ addonId: null,
25389
+ access: "view"
25390
+ },
25040
25391
  "recording.getStorageUsage": {
25041
25392
  capName: "recording",
25042
25393
  capScope: "system",
@@ -25067,6 +25418,24 @@ Object.freeze({
25067
25418
  addonId: null,
25068
25419
  access: "view"
25069
25420
  },
25421
+ "recording.relocateFootage": {
25422
+ capName: "recording",
25423
+ capScope: "system",
25424
+ addonId: null,
25425
+ access: "create"
25426
+ },
25427
+ "recording.renderClip": {
25428
+ capName: "recording",
25429
+ capScope: "system",
25430
+ addonId: null,
25431
+ access: "create"
25432
+ },
25433
+ "recording.renderGif": {
25434
+ capName: "recording",
25435
+ capScope: "system",
25436
+ addonId: null,
25437
+ access: "create"
25438
+ },
25070
25439
  "recording.rescanStorage": {
25071
25440
  capName: "recording",
25072
25441
  capScope: "system",
@@ -25661,6 +26030,12 @@ Object.freeze({
25661
26030
  addonId: null,
25662
26031
  access: "create"
25663
26032
  },
26033
+ "streamBroker.renderPreBufferClip": {
26034
+ capName: "stream-broker",
26035
+ capScope: "system",
26036
+ addonId: null,
26037
+ access: "create"
26038
+ },
25664
26039
  "streamBroker.restartProfile": {
25665
26040
  capName: "stream-broker",
25666
26041
  capScope: "system",