@camstack/addon-decoder-nodeav 1.2.6 → 1.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/index.js +451 -76
  2. package/dist/index.mjs +451 -76
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
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,
@@ -7195,35 +7208,22 @@ var ConvertResultSchema = object({
7195
7208
  */
7196
7209
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7197
7210
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7198
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7199
- kind: literal("timeOfDay"),
7200
- start: string().regex(HHMM),
7201
- end: string().regex(HHMM),
7202
- /** Restrict to these weekdays; omit = every day. */
7203
- days: array(RecordingWeekdaySchema).optional()
7204
- })]);
7205
- var RecordingModeSchema = _enum([
7206
- "continuous",
7207
- "onMotion",
7208
- "onAudioThreshold"
7209
- ]);
7210
7211
  /**
7211
- * First-class, authoritative per-camera storage mode — the explicit choice the
7212
- * UI reads directly (never inferred from `rules`):
7213
- * - `off` — not recording.
7214
- * - `events` — record only around triggers (motion / audio threshold),
7215
- * with pre/post-buffer.
7216
- * - `continuous` — record 24/7 within the schedule.
7212
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7213
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7214
+ * - `off` — no band covers the camera (or it is disabled).
7215
+ * - `events` — every band records around triggers only.
7216
+ * - `continuous` — at least one band records continuously.
7217
7217
  *
7218
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7219
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7218
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7219
+ * every save (`activeModeForConfig`). Writing it has no effect.
7220
7220
  */
7221
7221
  var RecordingStorageModeSchema = _enum([
7222
7222
  "off",
7223
7223
  "events",
7224
7224
  "continuous"
7225
7225
  ]);
7226
- /** Which detectors trigger an `events`-mode recording. */
7226
+ /** Which detectors trigger an `events`-mode band. */
7227
7227
  var RecordingTriggersSchema = object({
7228
7228
  motion: boolean().optional(),
7229
7229
  audioThresholdDbfs: number().optional()
@@ -7259,18 +7259,6 @@ var RecordingBandSchema = object({
7259
7259
  preBufferSec: number().min(0).optional(),
7260
7260
  postBufferSec: number().min(0).optional()
7261
7261
  });
7262
- var RecordingRuleSchema = object({
7263
- schedule: RecordingScheduleSchema,
7264
- mode: RecordingModeSchema,
7265
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7266
- preBufferSec: number().min(0).default(0),
7267
- /** Keep recording until this many seconds after the last trigger. */
7268
- postBufferSec: number().min(0).default(0),
7269
- /** Each new trigger restarts the post-buffer window. */
7270
- resetTimeoutOnNewEvent: boolean().default(true),
7271
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7272
- thresholdDbfs: number().optional()
7273
- });
7274
7262
  /**
7275
7263
  * Per-device retention overrides. Every field is optional; an unset or `0`
7276
7264
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7304,40 +7292,28 @@ var ScrubThumbnailPresetSchema = _enum([
7304
7292
  /**
7305
7293
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7306
7294
  *
7307
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7308
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7309
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7310
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7295
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7296
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7297
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7298
+ *
7299
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7300
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7301
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7302
+ * persist a band-less config, i.e. silently stop recording the camera.
7311
7303
  */
7312
7304
  var RecordingConfigSchema = object({
7313
7305
  enabled: boolean(),
7314
- /** Authoritative storage mode. Absent on legacy targets derived once via
7315
- * `migrateRulesToMode`, then persisted. */
7306
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7307
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7316
7308
  mode: RecordingStorageModeSchema.optional(),
7317
7309
  profiles: array(CamProfileSchema).optional(),
7318
7310
  segmentSeconds: number().int().positive().optional(),
7319
- /** Shared recording time-bands for `events` & `continuous` — record only when
7320
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7321
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7322
- schedules: array(RecordingScheduleSchema).optional(),
7323
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7324
- * normalized into `schedules` on read and never written going forward. (Not
7325
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7326
- schedule: RecordingScheduleSchema.optional(),
7327
- /** `events`-mode only — which detectors trigger a recording. */
7328
- triggers: RecordingTriggersSchema.optional(),
7329
- /** `events`-mode only — seconds retained before / after a trigger. */
7330
- preBufferSec: number().min(0).optional(),
7331
- postBufferSec: number().min(0).optional(),
7332
- /** DEPRECATED authoring input; retained for migration/transition. */
7333
- rules: array(RecordingRuleSchema).optional(),
7334
7311
  /**
7335
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7336
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7337
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7338
- * derived into bands once via `migrateConfigToBands`.
7312
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7313
+ * the recorder's band engine consumes. An empty array = record nothing;
7314
+ * "off" is the absence of a covering band, never a band value.
7339
7315
  */
7340
- bands: array(RecordingBandSchema).optional(),
7316
+ bands: array(RecordingBandSchema).default([]),
7341
7317
  retention: RecordingRetentionSchema.optional(),
7342
7318
  /**
7343
7319
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7345,8 +7321,15 @@ var RecordingConfigSchema = object({
7345
7321
  * windows only — existing sheets are immutable, and each window's index
7346
7322
  * carries its own tile dims so mixed-preset history renders correctly.
7347
7323
  */
7348
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7349
- });
7324
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7325
+ /**
7326
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7327
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7328
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7329
+ * are written and scrub reads exact keyframes at every velocity.
7330
+ */
7331
+ stripsEnabled: boolean().optional()
7332
+ }).strict();
7350
7333
  /**
7351
7334
  * Ops-log — the durable, append-only operations audit shared by the
7352
7335
  * recordings and events management surfaces.
@@ -7365,7 +7348,8 @@ var OpsLogOpSchema = _enum([
7365
7348
  "prune",
7366
7349
  "manual-delete",
7367
7350
  "rescan",
7368
- "retention-run"
7351
+ "retention-run",
7352
+ "relocate"
7369
7353
  ]);
7370
7354
  /** Why the operation ran. */
7371
7355
  var OpsLogReasonSchema = _enum([
@@ -7404,6 +7388,55 @@ var OpsLogQueryInputSchema = object({
7404
7388
  limit: number().int().min(1).max(1e3).optional()
7405
7389
  });
7406
7390
  /**
7391
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7392
+ *
7393
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7394
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7395
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7396
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7397
+ * after verify) and each completed/failed run also lands one durable ops-log
7398
+ * row on the owning addon's surface.
7399
+ */
7400
+ var RelocateJobStateSchema = _enum([
7401
+ "running",
7402
+ "done",
7403
+ "failed",
7404
+ "cancelled"
7405
+ ]);
7406
+ var RelocateJobSchema = object({
7407
+ jobId: string(),
7408
+ state: RelocateJobStateSchema,
7409
+ /** Source location — for media relocation this is informational ('*': rows
7410
+ * move from wherever they are to the target). */
7411
+ fromLocationId: string(),
7412
+ toLocationId: string(),
7413
+ /** Scoped device, or null = every device. */
7414
+ deviceId: number().nullable(),
7415
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7416
+ entities: array(string()),
7417
+ filesMoved: number().int(),
7418
+ bytesMoved: number().int(),
7419
+ /** Total files discovered up front; null while (or when) unknown. */
7420
+ filesTotal: number().int().nullable(),
7421
+ startedAt: number(),
7422
+ finishedAt: number().nullable(),
7423
+ error: string().nullable()
7424
+ });
7425
+ var RelocateFootageInputSchema = object({
7426
+ deviceId: number().optional(),
7427
+ fromLocationId: string(),
7428
+ toLocationId: string(),
7429
+ entities: array(_enum(["segments", "strips"])).optional(),
7430
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7431
+ * never allowed to starve live writers. */
7432
+ throttleMbps: number().min(1).max(1e3).optional()
7433
+ });
7434
+ var RelocateMediaInputSchema = object({
7435
+ deviceId: number().optional(),
7436
+ toLocationId: string(),
7437
+ throttleMbps: number().min(1).max(1e3).optional()
7438
+ });
7439
+ /**
7407
7440
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7408
7441
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7409
7442
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7453,6 +7486,13 @@ var StorageLocationSchema = object({
7453
7486
  nodeId: string().optional(),
7454
7487
  isDefault: boolean().default(false),
7455
7488
  isSystem: boolean().default(false),
7489
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7490
+ * for node-local locations it can reach) — never persisted, absent when the
7491
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7492
+ capacity: object({
7493
+ totalBytes: number(),
7494
+ availableBytes: number()
7495
+ }).nullable().optional(),
7456
7496
  createdAt: number(),
7457
7497
  updatedAt: number()
7458
7498
  });
@@ -8220,7 +8260,8 @@ var NcTaxonomyEntrySchema = object({
8220
8260
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8221
8261
  parentKind: string().nullable()
8222
8262
  });
8223
- object({
8263
+ /** The complete NC picker taxonomy — three grouped buckets. */
8264
+ var NcTaxonomySchema = object({
8224
8265
  videoClasses: array(NcTaxonomyEntrySchema),
8225
8266
  audioKinds: array(NcTaxonomyEntrySchema),
8226
8267
  labels: array(NcTaxonomyEntrySchema)
@@ -8880,6 +8921,7 @@ var AccessoryKind = {
8880
8921
  };
8881
8922
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8882
8923
  DeviceFeature.BatteryOperated;
8924
+ new Set(["devices", "classes"]);
8883
8925
  /**
8884
8926
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8885
8927
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9038,6 +9080,29 @@ var NcOccupancyConditionSchema = object({
9038
9080
  count: number().int().min(0).default(1),
9039
9081
  sustainSeconds: number().int().min(0).max(3600).default(15)
9040
9082
  });
9083
+ /**
9084
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9085
+ *
9086
+ * The values are not symmetric, and deliberately so — the absent value has to
9087
+ * mean exactly what every rule authored before this condition existed already
9088
+ * does:
9089
+ * - `enter` — entries and every NON-crossing record (movement state,
9090
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9091
+ * an operator who never asked for exits must not start receiving them.
9092
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9093
+ * fails closed, because "the car left the drive" is a question about a
9094
+ * boundary, not about a detection.
9095
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9096
+ *
9097
+ * A rule asking for a direction should normally also scope `zones`, which the
9098
+ * engine evaluates against the crossed zone as well as the current membership
9099
+ * (an exit's membership no longer contains the zone it just left).
9100
+ */
9101
+ var NcCrossingSchema = _enum([
9102
+ "enter",
9103
+ "exit",
9104
+ "any"
9105
+ ]);
9041
9106
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9042
9107
  var NcZoneConditionSchema = object({
9043
9108
  ids: array(string().min(1)).min(1),
@@ -9062,6 +9127,13 @@ var NcConditionsSchema = object({
9062
9127
  /** Veto zones — any hit fails the rule. */
9063
9128
  zonesExclude: array(string().min(1)).optional(),
9064
9129
  /**
9130
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9131
+ * and a closed track carries none, so a `track-end` rule asking for one
9132
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9133
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9134
+ */
9135
+ crossing: NcCrossingSchema.optional(),
9136
+ /**
9065
9137
  * Exact (case-insensitive) match on the record's collapsed `label`
9066
9138
  * (identity name / plate text / subclass).
9067
9139
  */
@@ -9196,17 +9268,85 @@ var NcRuleTargetSchema = object({
9196
9268
  * - `keyFrame` — the clean scene frame (no subject box).
9197
9269
  * - `none` — no attachment.
9198
9270
  */
9199
- var NcMediaPolicySchema = object({ attach: _enum([
9200
- "best",
9201
- "best-matching",
9202
- "keyFrame",
9203
- "none"
9204
- ]).default("best") });
9271
+ /**
9272
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9273
+ * conflate it with the selection strategy and betray the request: asking for
9274
+ * the clean scene frame on an object-event owner used to start at
9275
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9276
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9277
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9278
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9279
+ * the pipeline actually saw.
9280
+ */
9281
+ var NcMediaFrameSchema = _enum([
9282
+ "cropped",
9283
+ "full",
9284
+ "boxed"
9285
+ ]);
9286
+ var NcMediaPolicySchema = object({
9287
+ attach: _enum([
9288
+ "best",
9289
+ "best-matching",
9290
+ "keyFrame",
9291
+ "none"
9292
+ ]).default("best"),
9293
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9294
+ frame: NcMediaFrameSchema.optional(),
9295
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9296
+ * "show me the ZONE", not the whole scene or the subject crop. */
9297
+ zoneCrop: boolean().optional(),
9298
+ /**
9299
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9300
+ * event — NOT from the recording, so the camera does not have to be
9301
+ * recording, and the window sits AROUND the moment instead of a segment
9302
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9303
+ * gif, never a failed notification.
9304
+ */
9305
+ gif: boolean().optional(),
9306
+ /**
9307
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9308
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9309
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9310
+ * the degrade engine, which drops the video and keeps the still.
9311
+ */
9312
+ clip: boolean().optional(),
9313
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9314
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9315
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9316
+ /**
9317
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9318
+ * assigned profile: a notification is watched on a phone, so the 4K
9319
+ * rendition would burn CPU to produce a file the client downscales anyway.
9320
+ * A profile that is not assigned falls back to the cheapest, and the render
9321
+ * reports which one actually ran.
9322
+ */
9323
+ profile: CamProfileSchema.optional()
9324
+ });
9325
+ /**
9326
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9327
+ * notification suppresses.
9328
+ * - `shared` (default, and the absent value) — one window for the whole
9329
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9330
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9331
+ * at once and cat→cat still waits.
9332
+ *
9333
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9334
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9335
+ * see `cooldownKey` in the rule engine).
9336
+ */
9337
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9205
9338
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9206
9339
  var NcThrottleSchema = object({
9207
9340
  cooldownSec: number().int().min(0).max(86400).default(60),
9208
9341
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9209
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9342
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9343
+ /**
9344
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9345
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9346
+ * rule authored before this field simply carries none — and the engine
9347
+ * reads absent as `shared`, the pre-existing behaviour.
9348
+ */
9349
+ granularity: NcThrottleGranularitySchema.optional()
9210
9350
  });
9211
9351
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9212
9352
  var NcRuleInputSchema = object({
@@ -9215,7 +9355,19 @@ var NcRuleInputSchema = object({
9215
9355
  delivery: NcDeliverySchema,
9216
9356
  conditions: NcConditionsSchema.default({}),
9217
9357
  schedule: NcScheduleSchema.optional(),
9218
- targets: array(NcRuleTargetSchema).min(1),
9358
+ /** May be empty when `targetUsers` addresses at least one user — the
9359
+ * "at least one addressee" invariant is enforced by the provider, because
9360
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9361
+ targets: array(NcRuleTargetSchema),
9362
+ /**
9363
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9364
+ * time each user fans out to the personal targets they own
9365
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9366
+ * firing camera — a user is never notified about a device they cannot open.
9367
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9368
+ * targets.
9369
+ */
9370
+ targetUsers: array(string()).optional(),
9219
9371
  media: NcMediaPolicySchema.default({ attach: "best" }),
9220
9372
  throttle: NcThrottleSchema.default({
9221
9373
  cooldownSec: 60,
@@ -9302,6 +9454,7 @@ var NcConditionDescriptorSchema = object({
9302
9454
  "schedule",
9303
9455
  "plateMatcher",
9304
9456
  "packagePhase",
9457
+ "crossingSelect",
9305
9458
  "polygonDraw",
9306
9459
  "occupancy"
9307
9460
  ]),
@@ -9428,7 +9581,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9428
9581
  }), object({ results: array(NcTestResultSchema) }), {
9429
9582
  kind: "mutation",
9430
9583
  auth: "admin"
9431
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9584
+ }), method(object({}), object({
9585
+ catalog: array(NcConditionDescriptorSchema),
9586
+ taxonomy: NcTaxonomySchema.optional()
9587
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9432
9588
  /**
9433
9589
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9434
9590
  *
@@ -10165,6 +10321,28 @@ method(object({
10165
10321
  }), object({ success: literal(true) }), {
10166
10322
  kind: "mutation",
10167
10323
  auth: "admin"
10324
+ }), method(object({
10325
+ deviceId: number(),
10326
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10327
+ * watched on a phone, and the cheap rendition is the right default. */
10328
+ profile: CamProfileSchema.optional(),
10329
+ aroundMs: number(),
10330
+ preRollSec: number().min(0).max(20).default(3),
10331
+ postRollSec: number().min(0).max(20).default(5),
10332
+ format: _enum(["gif", "mp4"]).default("gif"),
10333
+ maxWidth: number().int().min(120).max(1920).default(480),
10334
+ /** GIF only — MP4 keeps the source cadence. */
10335
+ fps: number().int().min(1).max(15).default(5)
10336
+ }), object({
10337
+ base64: string(),
10338
+ mime: string(),
10339
+ bytes: number().int(),
10340
+ /** The profile actually rendered (what the default resolved to). */
10341
+ profile: CamProfileSchema,
10342
+ durationMs: number()
10343
+ }), {
10344
+ kind: "mutation",
10345
+ auth: "admin"
10168
10346
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10169
10347
  probed: boolean(),
10170
10348
  summary: string()
@@ -15889,7 +16067,10 @@ method(object({
15889
16067
  }), method(object({
15890
16068
  deviceId: number(),
15891
16069
  caps: array(string()).readonly().optional()
15892
- }), record(string(), unknown().nullable()));
16070
+ }), record(string(), unknown().nullable())), method(object({
16071
+ deviceIds: array(number()).readonly(),
16072
+ caps: array(string()).readonly().optional()
16073
+ }), record(string(), record(string(), unknown().nullable())));
15893
16074
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15894
16075
  deviceId: number(),
15895
16076
  capName: string()
@@ -16820,6 +17001,36 @@ var TargetKindSchema = object({
16820
17001
  icon: string(),
16821
17002
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16822
17003
  addonId: string(),
17004
+ /**
17005
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17006
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17007
+ * when the addon bundles no icon for that kind — the client then falls back
17008
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17009
+ *
17010
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17011
+ * client, and a native client joins it onto its own hub base.
17012
+ *
17013
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17014
+ * field that survived only because the runtime cap-router forwards provider
17015
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17016
+ * its own Zod parse from stripping it, and the whole arrangement would have
17017
+ * broken silently the moment output validation was tightened anywhere.
17018
+ */
17019
+ iconUrl: string().optional(),
17020
+ /**
17021
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17022
+ *
17023
+ * The server knows this and therefore says it, because the client cannot
17024
+ * safely guess: a React-Native client renders SVG and raster through two
17025
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17026
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17027
+ * placeholder glyph for every vector icon while the web build looked fine.
17028
+ *
17029
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17030
+ * not been updated — a client that cannot determine the type should prefer
17031
+ * its raster path, which is the safe default for an unknown image.
17032
+ */
17033
+ iconMediaType: string().optional(),
16823
17034
  configSchema: ConfigSchemaPassthrough,
16824
17035
  supportsDiscovery: boolean(),
16825
17036
  caps: TargetKindCapsSchema
@@ -17267,6 +17478,29 @@ var MotionEventSchema = object({
17267
17478
  * Absent on legacy rows ⇒ treat as `pipeline`.
17268
17479
  */
17269
17480
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17481
+ /**
17482
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17483
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17484
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17485
+ * appearance event carry none, so a rule asking for a direction fails closed
17486
+ * on them.
17487
+ *
17488
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17489
+ * into its own event, so a frame in which a track enters A while leaving B
17490
+ * produces two events with two directions — never one ambiguous row.
17491
+ *
17492
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17493
+ * membership the box has NOW, and by definition it no longer contains the zone
17494
+ * that was just left. Without the id here, a zone-scoped rule could never match
17495
+ * the exit it asked for.
17496
+ */
17497
+ var ZoneCrossingSchema = object({
17498
+ direction: _enum(["enter", "exit"]),
17499
+ /** Admin zone id crossed. */
17500
+ zoneId: string(),
17501
+ /** Zone display name at crossing time (falls back to the id). */
17502
+ zoneName: string().optional()
17503
+ });
17270
17504
  var ObjectEventSchema = object({
17271
17505
  ...BaseEventFields,
17272
17506
  kind: literal("object"),
@@ -17293,6 +17527,12 @@ var ObjectEventSchema = object({
17293
17527
  zones: array(string()).readonly().optional(),
17294
17528
  /** Omitted in slim projection. */
17295
17529
  state: TrackStateSchema.optional(),
17530
+ /**
17531
+ * The zone crossing this event IS, when it is one. Absent on every other
17532
+ * event kind (movement state, appearance, package) — see
17533
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17534
+ */
17535
+ zoneCrossing: ZoneCrossingSchema.optional(),
17296
17536
  /** Detection-frame dimensions in pixels — let consumers normalize the
17297
17537
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17298
17538
  frameWidth: number().optional(),
@@ -17551,6 +17791,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17551
17791
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17552
17792
  kind: "mutation",
17553
17793
  auth: "admin"
17794
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17795
+ kind: "mutation",
17796
+ auth: "admin"
17797
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17798
+ kind: "query",
17799
+ auth: "admin"
17800
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17801
+ kind: "mutation",
17802
+ auth: "admin"
17554
17803
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17555
17804
  kind: "query",
17556
17805
  auth: "admin"
@@ -20030,6 +20279,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20030
20279
  */
20031
20280
  priority: number()
20032
20281
  })).readonly() });
20282
+ /**
20283
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20284
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20285
+ * what AUTO currently picks, so the UI can show the effective value either way.
20286
+ */
20287
+ var NotificationEndpointSchema = object({
20288
+ /** The operator's explicit choice, or null for AUTO. */
20289
+ baseUrl: string().nullable(),
20290
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20291
+ resolved: string().nullable()
20292
+ });
20033
20293
  var AllowedAddressesSchema = object({
20034
20294
  /**
20035
20295
  * Allowlist of interface addresses operators have explicitly opted
@@ -20052,7 +20312,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20052
20312
  * to avoid mixed-content blocks in the browser. The public
20053
20313
  * tunnel always emits `https://` regardless. */
20054
20314
  scheme: _enum(["http", "https"]).optional()
20055
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20315
+ }), 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" });
20056
20316
  /**
20057
20317
  * mesh-network — collection cap for mesh-VPN providers.
20058
20318
  *
@@ -20851,7 +21111,12 @@ var RecordingDeviceUsageSchema = object({
20851
21111
  var RecordingLocationUsageSchema = object({
20852
21112
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20853
21113
  locationId: string().nullable(),
20854
- /** Bytes of recordings stored on this location. */
21114
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21115
+ * is emitted per physical disk (2026-07-29): two locations on one root
21116
+ * previously rendered as two identical "disks" with a nonsensical used
21117
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21118
+ locationIds: array(string()).optional(),
21119
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20855
21120
  usedBytes: number(),
20856
21121
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20857
21122
  availableBytes: number().nullable(),
@@ -20963,6 +21228,44 @@ method(object({
20963
21228
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20964
21229
  kind: "query",
20965
21230
  auth: "admin"
21231
+ }), method(object({
21232
+ deviceId: number(),
21233
+ aroundMs: number(),
21234
+ preRollSec: number().min(0).max(30).default(2),
21235
+ postRollSec: number().min(0).max(30).default(5),
21236
+ maxWidth: number().int().min(120).max(1280).default(480),
21237
+ fps: number().int().min(1).max(15).default(5)
21238
+ }), object({
21239
+ gifBase64: string(),
21240
+ fromMs: number(),
21241
+ toMs: number()
21242
+ }), {
21243
+ kind: "mutation",
21244
+ auth: "admin"
21245
+ }), method(object({
21246
+ deviceId: number(),
21247
+ aroundMs: number(),
21248
+ preRollSec: number().min(0).max(30).default(3),
21249
+ postRollSec: number().min(0).max(30).default(7),
21250
+ maxWidth: number().int().min(160).max(1920).default(640)
21251
+ }), object({
21252
+ clipBase64: string(),
21253
+ mime: string(),
21254
+ fromMs: number(),
21255
+ toMs: number(),
21256
+ bytes: number().int()
21257
+ }), {
21258
+ kind: "mutation",
21259
+ auth: "admin"
21260
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21261
+ kind: "mutation",
21262
+ auth: "admin"
21263
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21264
+ kind: "query",
21265
+ auth: "admin"
21266
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21267
+ kind: "mutation",
21268
+ auth: "admin"
20966
21269
  });
20967
21270
  /**
20968
21271
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22554,6 +22857,12 @@ Object.freeze({
22554
22857
  addonId: null,
22555
22858
  access: "view"
22556
22859
  },
22860
+ "deviceManager.getDeviceStatusAggregateBatch": {
22861
+ capName: "device-manager",
22862
+ capScope: "system",
22863
+ addonId: null,
22864
+ access: "view"
22865
+ },
22557
22866
  "deviceManager.getLinkedDevices": {
22558
22867
  capName: "device-manager",
22559
22868
  capScope: "system",
@@ -23448,6 +23757,12 @@ Object.freeze({
23448
23757
  addonId: null,
23449
23758
  access: "view"
23450
23759
  },
23760
+ "localNetwork.getNotificationEndpoint": {
23761
+ capName: "local-network",
23762
+ capScope: "system",
23763
+ addonId: null,
23764
+ access: "view"
23765
+ },
23451
23766
  "localNetwork.getPreferred": {
23452
23767
  capName: "local-network",
23453
23768
  capScope: "system",
@@ -23472,6 +23787,12 @@ Object.freeze({
23472
23787
  addonId: null,
23473
23788
  access: "create"
23474
23789
  },
23790
+ "localNetwork.setNotificationEndpoint": {
23791
+ capName: "local-network",
23792
+ capScope: "system",
23793
+ addonId: null,
23794
+ access: "create"
23795
+ },
23475
23796
  "lockControl.lock": {
23476
23797
  capName: "lock-control",
23477
23798
  capScope: "device",
@@ -24114,6 +24435,12 @@ Object.freeze({
24114
24435
  addonId: null,
24115
24436
  access: "create"
24116
24437
  },
24438
+ "pipelineAnalytics.cancelMediaRelocate": {
24439
+ capName: "pipeline-analytics",
24440
+ capScope: "device",
24441
+ addonId: null,
24442
+ access: "create"
24443
+ },
24117
24444
  "pipelineAnalytics.clearTracks": {
24118
24445
  capName: "pipeline-analytics",
24119
24446
  capScope: "device",
@@ -24168,6 +24495,12 @@ Object.freeze({
24168
24495
  addonId: null,
24169
24496
  access: "view"
24170
24497
  },
24498
+ "pipelineAnalytics.getMediaRelocateStatus": {
24499
+ capName: "pipeline-analytics",
24500
+ capScope: "device",
24501
+ addonId: null,
24502
+ access: "view"
24503
+ },
24171
24504
  "pipelineAnalytics.getMotionEvents": {
24172
24505
  capName: "pipeline-analytics",
24173
24506
  capScope: "device",
@@ -24240,6 +24573,12 @@ Object.freeze({
24240
24573
  addonId: null,
24241
24574
  access: "create"
24242
24575
  },
24576
+ "pipelineAnalytics.relocateMedia": {
24577
+ capName: "pipeline-analytics",
24578
+ capScope: "device",
24579
+ addonId: null,
24580
+ access: "create"
24581
+ },
24243
24582
  "pipelineAnalytics.searchObjectEvents": {
24244
24583
  capName: "pipeline-analytics",
24245
24584
  capScope: "device",
@@ -25002,6 +25341,12 @@ Object.freeze({
25002
25341
  addonId: null,
25003
25342
  access: "create"
25004
25343
  },
25344
+ "recording.cancelRelocate": {
25345
+ capName: "recording",
25346
+ capScope: "system",
25347
+ addonId: null,
25348
+ access: "create"
25349
+ },
25005
25350
  "recording.deleteFootprint": {
25006
25351
  capName: "recording",
25007
25352
  capScope: "system",
@@ -25032,6 +25377,12 @@ Object.freeze({
25032
25377
  addonId: null,
25033
25378
  access: "view"
25034
25379
  },
25380
+ "recording.getRelocateStatus": {
25381
+ capName: "recording",
25382
+ capScope: "system",
25383
+ addonId: null,
25384
+ access: "view"
25385
+ },
25035
25386
  "recording.getStorageUsage": {
25036
25387
  capName: "recording",
25037
25388
  capScope: "system",
@@ -25062,6 +25413,24 @@ Object.freeze({
25062
25413
  addonId: null,
25063
25414
  access: "view"
25064
25415
  },
25416
+ "recording.relocateFootage": {
25417
+ capName: "recording",
25418
+ capScope: "system",
25419
+ addonId: null,
25420
+ access: "create"
25421
+ },
25422
+ "recording.renderClip": {
25423
+ capName: "recording",
25424
+ capScope: "system",
25425
+ addonId: null,
25426
+ access: "create"
25427
+ },
25428
+ "recording.renderGif": {
25429
+ capName: "recording",
25430
+ capScope: "system",
25431
+ addonId: null,
25432
+ access: "create"
25433
+ },
25065
25434
  "recording.rescanStorage": {
25066
25435
  capName: "recording",
25067
25436
  capScope: "system",
@@ -25656,6 +26025,12 @@ Object.freeze({
25656
26025
  addonId: null,
25657
26026
  access: "create"
25658
26027
  },
26028
+ "streamBroker.renderPreBufferClip": {
26029
+ capName: "stream-broker",
26030
+ capScope: "system",
26031
+ addonId: null,
26032
+ access: "create"
26033
+ },
25659
26034
  "streamBroker.restartProfile": {
25660
26035
  capName: "stream-broker",
25661
26036
  capScope: "system",