@camstack/addon-mqtt-broker 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.
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-BLcNejAE.mjs
42
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -310,6 +310,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
310
310
  */
311
311
  EventCategory["DeviceStateChanged"] = "device.state-changed";
312
312
  /**
313
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
314
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
315
+ *
316
+ * Emitted only on a change, so a steady scene is silent. It exists so a
317
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
318
+ * one live badge with no push signal at all, and it cost a request every
319
+ * four seconds per visible camera.
320
+ *
321
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
322
+ * keeps a slow reconcile rather than trusting it alone.
323
+ */
324
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
325
+ /**
313
326
  * Cap event fired by every device that registers the `battery`
314
327
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
315
328
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7223,35 +7236,22 @@ var ConvertResultSchema = object({
7223
7236
  */
7224
7237
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7225
7238
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7226
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7227
- kind: literal("timeOfDay"),
7228
- start: string().regex(HHMM),
7229
- end: string().regex(HHMM),
7230
- /** Restrict to these weekdays; omit = every day. */
7231
- days: array(RecordingWeekdaySchema).optional()
7232
- })]);
7233
- var RecordingModeSchema = _enum([
7234
- "continuous",
7235
- "onMotion",
7236
- "onAudioThreshold"
7237
- ]);
7238
7239
  /**
7239
- * First-class, authoritative per-camera storage mode — the explicit choice the
7240
- * UI reads directly (never inferred from `rules`):
7241
- * - `off` — not recording.
7242
- * - `events` — record only around triggers (motion / audio threshold),
7243
- * with pre/post-buffer.
7244
- * - `continuous` — record 24/7 within the schedule.
7240
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7241
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7242
+ * - `off` — no band covers the camera (or it is disabled).
7243
+ * - `events` — every band records around triggers only.
7244
+ * - `continuous` — at least one band records continuously.
7245
7245
  *
7246
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7247
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7246
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7247
+ * every save (`activeModeForConfig`). Writing it has no effect.
7248
7248
  */
7249
7249
  var RecordingStorageModeSchema = _enum([
7250
7250
  "off",
7251
7251
  "events",
7252
7252
  "continuous"
7253
7253
  ]);
7254
- /** Which detectors trigger an `events`-mode recording. */
7254
+ /** Which detectors trigger an `events`-mode band. */
7255
7255
  var RecordingTriggersSchema = object({
7256
7256
  motion: boolean().optional(),
7257
7257
  audioThresholdDbfs: number().optional()
@@ -7287,18 +7287,6 @@ var RecordingBandSchema = object({
7287
7287
  preBufferSec: number().min(0).optional(),
7288
7288
  postBufferSec: number().min(0).optional()
7289
7289
  });
7290
- var RecordingRuleSchema = object({
7291
- schedule: RecordingScheduleSchema,
7292
- mode: RecordingModeSchema,
7293
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7294
- preBufferSec: number().min(0).default(0),
7295
- /** Keep recording until this many seconds after the last trigger. */
7296
- postBufferSec: number().min(0).default(0),
7297
- /** Each new trigger restarts the post-buffer window. */
7298
- resetTimeoutOnNewEvent: boolean().default(true),
7299
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7300
- thresholdDbfs: number().optional()
7301
- });
7302
7290
  /**
7303
7291
  * Per-device retention overrides. Every field is optional; an unset or `0`
7304
7292
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7332,40 +7320,28 @@ var ScrubThumbnailPresetSchema = _enum([
7332
7320
  /**
7333
7321
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7334
7322
  *
7335
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7336
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7337
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7338
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7323
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7324
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7325
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7326
+ *
7327
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7328
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7329
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7330
+ * persist a band-less config, i.e. silently stop recording the camera.
7339
7331
  */
7340
7332
  var RecordingConfigSchema = object({
7341
7333
  enabled: boolean(),
7342
- /** Authoritative storage mode. Absent on legacy targets derived once via
7343
- * `migrateRulesToMode`, then persisted. */
7334
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7335
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7344
7336
  mode: RecordingStorageModeSchema.optional(),
7345
7337
  profiles: array(CamProfileSchema).optional(),
7346
7338
  segmentSeconds: number().int().positive().optional(),
7347
- /** Shared recording time-bands for `events` & `continuous` — record only when
7348
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7349
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7350
- schedules: array(RecordingScheduleSchema).optional(),
7351
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7352
- * normalized into `schedules` on read and never written going forward. (Not
7353
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7354
- schedule: RecordingScheduleSchema.optional(),
7355
- /** `events`-mode only — which detectors trigger a recording. */
7356
- triggers: RecordingTriggersSchema.optional(),
7357
- /** `events`-mode only — seconds retained before / after a trigger. */
7358
- preBufferSec: number().min(0).optional(),
7359
- postBufferSec: number().min(0).optional(),
7360
- /** DEPRECATED authoring input; retained for migration/transition. */
7361
- rules: array(RecordingRuleSchema).optional(),
7362
7339
  /**
7363
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7364
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7365
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7366
- * derived into bands once via `migrateConfigToBands`.
7340
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7341
+ * the recorder's band engine consumes. An empty array = record nothing;
7342
+ * "off" is the absence of a covering band, never a band value.
7367
7343
  */
7368
- bands: array(RecordingBandSchema).optional(),
7344
+ bands: array(RecordingBandSchema).default([]),
7369
7345
  retention: RecordingRetentionSchema.optional(),
7370
7346
  /**
7371
7347
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7373,8 +7349,15 @@ var RecordingConfigSchema = object({
7373
7349
  * windows only — existing sheets are immutable, and each window's index
7374
7350
  * carries its own tile dims so mixed-preset history renders correctly.
7375
7351
  */
7376
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7377
- });
7352
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7353
+ /**
7354
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7355
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7356
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7357
+ * are written and scrub reads exact keyframes at every velocity.
7358
+ */
7359
+ stripsEnabled: boolean().optional()
7360
+ }).strict();
7378
7361
  /**
7379
7362
  * Ops-log — the durable, append-only operations audit shared by the
7380
7363
  * recordings and events management surfaces.
@@ -7393,7 +7376,8 @@ var OpsLogOpSchema = _enum([
7393
7376
  "prune",
7394
7377
  "manual-delete",
7395
7378
  "rescan",
7396
- "retention-run"
7379
+ "retention-run",
7380
+ "relocate"
7397
7381
  ]);
7398
7382
  /** Why the operation ran. */
7399
7383
  var OpsLogReasonSchema = _enum([
@@ -7432,6 +7416,55 @@ var OpsLogQueryInputSchema = object({
7432
7416
  limit: number().int().min(1).max(1e3).optional()
7433
7417
  });
7434
7418
  /**
7419
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7420
+ *
7421
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7422
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7423
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7424
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7425
+ * after verify) and each completed/failed run also lands one durable ops-log
7426
+ * row on the owning addon's surface.
7427
+ */
7428
+ var RelocateJobStateSchema = _enum([
7429
+ "running",
7430
+ "done",
7431
+ "failed",
7432
+ "cancelled"
7433
+ ]);
7434
+ var RelocateJobSchema = object({
7435
+ jobId: string(),
7436
+ state: RelocateJobStateSchema,
7437
+ /** Source location — for media relocation this is informational ('*': rows
7438
+ * move from wherever they are to the target). */
7439
+ fromLocationId: string(),
7440
+ toLocationId: string(),
7441
+ /** Scoped device, or null = every device. */
7442
+ deviceId: number().nullable(),
7443
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7444
+ entities: array(string()),
7445
+ filesMoved: number().int(),
7446
+ bytesMoved: number().int(),
7447
+ /** Total files discovered up front; null while (or when) unknown. */
7448
+ filesTotal: number().int().nullable(),
7449
+ startedAt: number(),
7450
+ finishedAt: number().nullable(),
7451
+ error: string().nullable()
7452
+ });
7453
+ var RelocateFootageInputSchema = object({
7454
+ deviceId: number().optional(),
7455
+ fromLocationId: string(),
7456
+ toLocationId: string(),
7457
+ entities: array(_enum(["segments", "strips"])).optional(),
7458
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7459
+ * never allowed to starve live writers. */
7460
+ throttleMbps: number().min(1).max(1e3).optional()
7461
+ });
7462
+ var RelocateMediaInputSchema = object({
7463
+ deviceId: number().optional(),
7464
+ toLocationId: string(),
7465
+ throttleMbps: number().min(1).max(1e3).optional()
7466
+ });
7467
+ /**
7435
7468
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7436
7469
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7437
7470
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7481,6 +7514,13 @@ var StorageLocationSchema = object({
7481
7514
  nodeId: string().optional(),
7482
7515
  isDefault: boolean().default(false),
7483
7516
  isSystem: boolean().default(false),
7517
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7518
+ * for node-local locations it can reach) — never persisted, absent when the
7519
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7520
+ capacity: object({
7521
+ totalBytes: number(),
7522
+ availableBytes: number()
7523
+ }).nullable().optional(),
7484
7524
  createdAt: number(),
7485
7525
  updatedAt: number()
7486
7526
  });
@@ -8248,7 +8288,8 @@ var NcTaxonomyEntrySchema = object({
8248
8288
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8249
8289
  parentKind: string().nullable()
8250
8290
  });
8251
- object({
8291
+ /** The complete NC picker taxonomy — three grouped buckets. */
8292
+ var NcTaxonomySchema = object({
8252
8293
  videoClasses: array(NcTaxonomyEntrySchema),
8253
8294
  audioKinds: array(NcTaxonomyEntrySchema),
8254
8295
  labels: array(NcTaxonomyEntrySchema)
@@ -8908,6 +8949,7 @@ var AccessoryKind = {
8908
8949
  };
8909
8950
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8910
8951
  DeviceFeature.BatteryOperated;
8952
+ new Set(["devices", "classes"]);
8911
8953
  /**
8912
8954
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8913
8955
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9066,6 +9108,29 @@ var NcOccupancyConditionSchema = object({
9066
9108
  count: number().int().min(0).default(1),
9067
9109
  sustainSeconds: number().int().min(0).max(3600).default(15)
9068
9110
  });
9111
+ /**
9112
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9113
+ *
9114
+ * The values are not symmetric, and deliberately so — the absent value has to
9115
+ * mean exactly what every rule authored before this condition existed already
9116
+ * does:
9117
+ * - `enter` — entries and every NON-crossing record (movement state,
9118
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9119
+ * an operator who never asked for exits must not start receiving them.
9120
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9121
+ * fails closed, because "the car left the drive" is a question about a
9122
+ * boundary, not about a detection.
9123
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9124
+ *
9125
+ * A rule asking for a direction should normally also scope `zones`, which the
9126
+ * engine evaluates against the crossed zone as well as the current membership
9127
+ * (an exit's membership no longer contains the zone it just left).
9128
+ */
9129
+ var NcCrossingSchema = _enum([
9130
+ "enter",
9131
+ "exit",
9132
+ "any"
9133
+ ]);
9069
9134
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9070
9135
  var NcZoneConditionSchema = object({
9071
9136
  ids: array(string().min(1)).min(1),
@@ -9090,6 +9155,13 @@ var NcConditionsSchema = object({
9090
9155
  /** Veto zones — any hit fails the rule. */
9091
9156
  zonesExclude: array(string().min(1)).optional(),
9092
9157
  /**
9158
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9159
+ * and a closed track carries none, so a `track-end` rule asking for one
9160
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9161
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9162
+ */
9163
+ crossing: NcCrossingSchema.optional(),
9164
+ /**
9093
9165
  * Exact (case-insensitive) match on the record's collapsed `label`
9094
9166
  * (identity name / plate text / subclass).
9095
9167
  */
@@ -9224,17 +9296,85 @@ var NcRuleTargetSchema = object({
9224
9296
  * - `keyFrame` — the clean scene frame (no subject box).
9225
9297
  * - `none` — no attachment.
9226
9298
  */
9227
- var NcMediaPolicySchema = object({ attach: _enum([
9228
- "best",
9229
- "best-matching",
9230
- "keyFrame",
9231
- "none"
9232
- ]).default("best") });
9299
+ /**
9300
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9301
+ * conflate it with the selection strategy and betray the request: asking for
9302
+ * the clean scene frame on an object-event owner used to start at
9303
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9304
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9305
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9306
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9307
+ * the pipeline actually saw.
9308
+ */
9309
+ var NcMediaFrameSchema = _enum([
9310
+ "cropped",
9311
+ "full",
9312
+ "boxed"
9313
+ ]);
9314
+ var NcMediaPolicySchema = object({
9315
+ attach: _enum([
9316
+ "best",
9317
+ "best-matching",
9318
+ "keyFrame",
9319
+ "none"
9320
+ ]).default("best"),
9321
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9322
+ frame: NcMediaFrameSchema.optional(),
9323
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9324
+ * "show me the ZONE", not the whole scene or the subject crop. */
9325
+ zoneCrop: boolean().optional(),
9326
+ /**
9327
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9328
+ * event — NOT from the recording, so the camera does not have to be
9329
+ * recording, and the window sits AROUND the moment instead of a segment
9330
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9331
+ * gif, never a failed notification.
9332
+ */
9333
+ gif: boolean().optional(),
9334
+ /**
9335
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9336
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9337
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9338
+ * the degrade engine, which drops the video and keeps the still.
9339
+ */
9340
+ clip: boolean().optional(),
9341
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9342
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9343
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9344
+ /**
9345
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9346
+ * assigned profile: a notification is watched on a phone, so the 4K
9347
+ * rendition would burn CPU to produce a file the client downscales anyway.
9348
+ * A profile that is not assigned falls back to the cheapest, and the render
9349
+ * reports which one actually ran.
9350
+ */
9351
+ profile: CamProfileSchema.optional()
9352
+ });
9353
+ /**
9354
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9355
+ * notification suppresses.
9356
+ * - `shared` (default, and the absent value) — one window for the whole
9357
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9358
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9359
+ * at once and cat→cat still waits.
9360
+ *
9361
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9362
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9363
+ * see `cooldownKey` in the rule engine).
9364
+ */
9365
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9233
9366
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9234
9367
  var NcThrottleSchema = object({
9235
9368
  cooldownSec: number().int().min(0).max(86400).default(60),
9236
9369
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9237
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9370
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9371
+ /**
9372
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9373
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9374
+ * rule authored before this field simply carries none — and the engine
9375
+ * reads absent as `shared`, the pre-existing behaviour.
9376
+ */
9377
+ granularity: NcThrottleGranularitySchema.optional()
9238
9378
  });
9239
9379
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9240
9380
  var NcRuleInputSchema = object({
@@ -9243,7 +9383,19 @@ var NcRuleInputSchema = object({
9243
9383
  delivery: NcDeliverySchema,
9244
9384
  conditions: NcConditionsSchema.default({}),
9245
9385
  schedule: NcScheduleSchema.optional(),
9246
- targets: array(NcRuleTargetSchema).min(1),
9386
+ /** May be empty when `targetUsers` addresses at least one user — the
9387
+ * "at least one addressee" invariant is enforced by the provider, because
9388
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9389
+ targets: array(NcRuleTargetSchema),
9390
+ /**
9391
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9392
+ * time each user fans out to the personal targets they own
9393
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9394
+ * firing camera — a user is never notified about a device they cannot open.
9395
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9396
+ * targets.
9397
+ */
9398
+ targetUsers: array(string()).optional(),
9247
9399
  media: NcMediaPolicySchema.default({ attach: "best" }),
9248
9400
  throttle: NcThrottleSchema.default({
9249
9401
  cooldownSec: 60,
@@ -9330,6 +9482,7 @@ var NcConditionDescriptorSchema = object({
9330
9482
  "schedule",
9331
9483
  "plateMatcher",
9332
9484
  "packagePhase",
9485
+ "crossingSelect",
9333
9486
  "polygonDraw",
9334
9487
  "occupancy"
9335
9488
  ]),
@@ -9456,7 +9609,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9456
9609
  }), object({ results: array(NcTestResultSchema) }), {
9457
9610
  kind: "mutation",
9458
9611
  auth: "admin"
9459
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9612
+ }), method(object({}), object({
9613
+ catalog: array(NcConditionDescriptorSchema),
9614
+ taxonomy: NcTaxonomySchema.optional()
9615
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9460
9616
  /**
9461
9617
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9462
9618
  *
@@ -10193,6 +10349,28 @@ method(object({
10193
10349
  }), object({ success: literal(true) }), {
10194
10350
  kind: "mutation",
10195
10351
  auth: "admin"
10352
+ }), method(object({
10353
+ deviceId: number(),
10354
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10355
+ * watched on a phone, and the cheap rendition is the right default. */
10356
+ profile: CamProfileSchema.optional(),
10357
+ aroundMs: number(),
10358
+ preRollSec: number().min(0).max(20).default(3),
10359
+ postRollSec: number().min(0).max(20).default(5),
10360
+ format: _enum(["gif", "mp4"]).default("gif"),
10361
+ maxWidth: number().int().min(120).max(1920).default(480),
10362
+ /** GIF only — MP4 keeps the source cadence. */
10363
+ fps: number().int().min(1).max(15).default(5)
10364
+ }), object({
10365
+ base64: string(),
10366
+ mime: string(),
10367
+ bytes: number().int(),
10368
+ /** The profile actually rendered (what the default resolved to). */
10369
+ profile: CamProfileSchema,
10370
+ durationMs: number()
10371
+ }), {
10372
+ kind: "mutation",
10373
+ auth: "admin"
10196
10374
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10197
10375
  probed: boolean(),
10198
10376
  summary: string()
@@ -15836,7 +16014,10 @@ method(object({
15836
16014
  }), method(object({
15837
16015
  deviceId: number(),
15838
16016
  caps: array(string()).readonly().optional()
15839
- }), record(string(), unknown().nullable()));
16017
+ }), record(string(), unknown().nullable())), method(object({
16018
+ deviceIds: array(number()).readonly(),
16019
+ caps: array(string()).readonly().optional()
16020
+ }), record(string(), record(string(), unknown().nullable())));
15840
16021
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15841
16022
  deviceId: number(),
15842
16023
  capName: string()
@@ -16786,6 +16967,36 @@ var TargetKindSchema = object({
16786
16967
  icon: string(),
16787
16968
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16788
16969
  addonId: string(),
16970
+ /**
16971
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16972
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16973
+ * when the addon bundles no icon for that kind — the client then falls back
16974
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16975
+ *
16976
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16977
+ * client, and a native client joins it onto its own hub base.
16978
+ *
16979
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16980
+ * field that survived only because the runtime cap-router forwards provider
16981
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16982
+ * its own Zod parse from stripping it, and the whole arrangement would have
16983
+ * broken silently the moment output validation was tightened anywhere.
16984
+ */
16985
+ iconUrl: string().optional(),
16986
+ /**
16987
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16988
+ *
16989
+ * The server knows this and therefore says it, because the client cannot
16990
+ * safely guess: a React-Native client renders SVG and raster through two
16991
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16992
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16993
+ * placeholder glyph for every vector icon while the web build looked fine.
16994
+ *
16995
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16996
+ * not been updated — a client that cannot determine the type should prefer
16997
+ * its raster path, which is the safe default for an unknown image.
16998
+ */
16999
+ iconMediaType: string().optional(),
16789
17000
  configSchema: ConfigSchemaPassthrough,
16790
17001
  supportsDiscovery: boolean(),
16791
17002
  caps: TargetKindCapsSchema
@@ -17233,6 +17444,29 @@ var MotionEventSchema = object({
17233
17444
  * Absent on legacy rows ⇒ treat as `pipeline`.
17234
17445
  */
17235
17446
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17447
+ /**
17448
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17449
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17450
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17451
+ * appearance event carry none, so a rule asking for a direction fails closed
17452
+ * on them.
17453
+ *
17454
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17455
+ * into its own event, so a frame in which a track enters A while leaving B
17456
+ * produces two events with two directions — never one ambiguous row.
17457
+ *
17458
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17459
+ * membership the box has NOW, and by definition it no longer contains the zone
17460
+ * that was just left. Without the id here, a zone-scoped rule could never match
17461
+ * the exit it asked for.
17462
+ */
17463
+ var ZoneCrossingSchema = object({
17464
+ direction: _enum(["enter", "exit"]),
17465
+ /** Admin zone id crossed. */
17466
+ zoneId: string(),
17467
+ /** Zone display name at crossing time (falls back to the id). */
17468
+ zoneName: string().optional()
17469
+ });
17236
17470
  var ObjectEventSchema = object({
17237
17471
  ...BaseEventFields,
17238
17472
  kind: literal("object"),
@@ -17259,6 +17493,12 @@ var ObjectEventSchema = object({
17259
17493
  zones: array(string()).readonly().optional(),
17260
17494
  /** Omitted in slim projection. */
17261
17495
  state: TrackStateSchema.optional(),
17496
+ /**
17497
+ * The zone crossing this event IS, when it is one. Absent on every other
17498
+ * event kind (movement state, appearance, package) — see
17499
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17500
+ */
17501
+ zoneCrossing: ZoneCrossingSchema.optional(),
17262
17502
  /** Detection-frame dimensions in pixels — let consumers normalize the
17263
17503
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17264
17504
  frameWidth: number().optional(),
@@ -17517,6 +17757,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17517
17757
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17518
17758
  kind: "mutation",
17519
17759
  auth: "admin"
17760
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17761
+ kind: "mutation",
17762
+ auth: "admin"
17763
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17764
+ kind: "query",
17765
+ auth: "admin"
17766
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17767
+ kind: "mutation",
17768
+ auth: "admin"
17520
17769
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17521
17770
  kind: "query",
17522
17771
  auth: "admin"
@@ -19996,6 +20245,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19996
20245
  */
19997
20246
  priority: number()
19998
20247
  })).readonly() });
20248
+ /**
20249
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20250
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20251
+ * what AUTO currently picks, so the UI can show the effective value either way.
20252
+ */
20253
+ var NotificationEndpointSchema = object({
20254
+ /** The operator's explicit choice, or null for AUTO. */
20255
+ baseUrl: string().nullable(),
20256
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20257
+ resolved: string().nullable()
20258
+ });
19999
20259
  var AllowedAddressesSchema = object({
20000
20260
  /**
20001
20261
  * Allowlist of interface addresses operators have explicitly opted
@@ -20018,7 +20278,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20018
20278
  * to avoid mixed-content blocks in the browser. The public
20019
20279
  * tunnel always emits `https://` regardless. */
20020
20280
  scheme: _enum(["http", "https"]).optional()
20021
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20281
+ }), 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" });
20022
20282
  /**
20023
20283
  * mesh-network — collection cap for mesh-VPN providers.
20024
20284
  *
@@ -20817,7 +21077,12 @@ var RecordingDeviceUsageSchema = object({
20817
21077
  var RecordingLocationUsageSchema = object({
20818
21078
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20819
21079
  locationId: string().nullable(),
20820
- /** Bytes of recordings stored on this location. */
21080
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21081
+ * is emitted per physical disk (2026-07-29): two locations on one root
21082
+ * previously rendered as two identical "disks" with a nonsensical used
21083
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21084
+ locationIds: array(string()).optional(),
21085
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20821
21086
  usedBytes: number(),
20822
21087
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20823
21088
  availableBytes: number().nullable(),
@@ -20929,6 +21194,44 @@ method(object({
20929
21194
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20930
21195
  kind: "query",
20931
21196
  auth: "admin"
21197
+ }), method(object({
21198
+ deviceId: number(),
21199
+ aroundMs: number(),
21200
+ preRollSec: number().min(0).max(30).default(2),
21201
+ postRollSec: number().min(0).max(30).default(5),
21202
+ maxWidth: number().int().min(120).max(1280).default(480),
21203
+ fps: number().int().min(1).max(15).default(5)
21204
+ }), object({
21205
+ gifBase64: string(),
21206
+ fromMs: number(),
21207
+ toMs: number()
21208
+ }), {
21209
+ kind: "mutation",
21210
+ auth: "admin"
21211
+ }), method(object({
21212
+ deviceId: number(),
21213
+ aroundMs: number(),
21214
+ preRollSec: number().min(0).max(30).default(3),
21215
+ postRollSec: number().min(0).max(30).default(7),
21216
+ maxWidth: number().int().min(160).max(1920).default(640)
21217
+ }), object({
21218
+ clipBase64: string(),
21219
+ mime: string(),
21220
+ fromMs: number(),
21221
+ toMs: number(),
21222
+ bytes: number().int()
21223
+ }), {
21224
+ kind: "mutation",
21225
+ auth: "admin"
21226
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21227
+ kind: "mutation",
21228
+ auth: "admin"
21229
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21230
+ kind: "query",
21231
+ auth: "admin"
21232
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21233
+ kind: "mutation",
21234
+ auth: "admin"
20932
21235
  });
20933
21236
  /**
20934
21237
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22520,6 +22823,12 @@ Object.freeze({
22520
22823
  addonId: null,
22521
22824
  access: "view"
22522
22825
  },
22826
+ "deviceManager.getDeviceStatusAggregateBatch": {
22827
+ capName: "device-manager",
22828
+ capScope: "system",
22829
+ addonId: null,
22830
+ access: "view"
22831
+ },
22523
22832
  "deviceManager.getLinkedDevices": {
22524
22833
  capName: "device-manager",
22525
22834
  capScope: "system",
@@ -23414,6 +23723,12 @@ Object.freeze({
23414
23723
  addonId: null,
23415
23724
  access: "view"
23416
23725
  },
23726
+ "localNetwork.getNotificationEndpoint": {
23727
+ capName: "local-network",
23728
+ capScope: "system",
23729
+ addonId: null,
23730
+ access: "view"
23731
+ },
23417
23732
  "localNetwork.getPreferred": {
23418
23733
  capName: "local-network",
23419
23734
  capScope: "system",
@@ -23438,6 +23753,12 @@ Object.freeze({
23438
23753
  addonId: null,
23439
23754
  access: "create"
23440
23755
  },
23756
+ "localNetwork.setNotificationEndpoint": {
23757
+ capName: "local-network",
23758
+ capScope: "system",
23759
+ addonId: null,
23760
+ access: "create"
23761
+ },
23441
23762
  "lockControl.lock": {
23442
23763
  capName: "lock-control",
23443
23764
  capScope: "device",
@@ -24080,6 +24401,12 @@ Object.freeze({
24080
24401
  addonId: null,
24081
24402
  access: "create"
24082
24403
  },
24404
+ "pipelineAnalytics.cancelMediaRelocate": {
24405
+ capName: "pipeline-analytics",
24406
+ capScope: "device",
24407
+ addonId: null,
24408
+ access: "create"
24409
+ },
24083
24410
  "pipelineAnalytics.clearTracks": {
24084
24411
  capName: "pipeline-analytics",
24085
24412
  capScope: "device",
@@ -24134,6 +24461,12 @@ Object.freeze({
24134
24461
  addonId: null,
24135
24462
  access: "view"
24136
24463
  },
24464
+ "pipelineAnalytics.getMediaRelocateStatus": {
24465
+ capName: "pipeline-analytics",
24466
+ capScope: "device",
24467
+ addonId: null,
24468
+ access: "view"
24469
+ },
24137
24470
  "pipelineAnalytics.getMotionEvents": {
24138
24471
  capName: "pipeline-analytics",
24139
24472
  capScope: "device",
@@ -24206,6 +24539,12 @@ Object.freeze({
24206
24539
  addonId: null,
24207
24540
  access: "create"
24208
24541
  },
24542
+ "pipelineAnalytics.relocateMedia": {
24543
+ capName: "pipeline-analytics",
24544
+ capScope: "device",
24545
+ addonId: null,
24546
+ access: "create"
24547
+ },
24209
24548
  "pipelineAnalytics.searchObjectEvents": {
24210
24549
  capName: "pipeline-analytics",
24211
24550
  capScope: "device",
@@ -24968,6 +25307,12 @@ Object.freeze({
24968
25307
  addonId: null,
24969
25308
  access: "create"
24970
25309
  },
25310
+ "recording.cancelRelocate": {
25311
+ capName: "recording",
25312
+ capScope: "system",
25313
+ addonId: null,
25314
+ access: "create"
25315
+ },
24971
25316
  "recording.deleteFootprint": {
24972
25317
  capName: "recording",
24973
25318
  capScope: "system",
@@ -24998,6 +25343,12 @@ Object.freeze({
24998
25343
  addonId: null,
24999
25344
  access: "view"
25000
25345
  },
25346
+ "recording.getRelocateStatus": {
25347
+ capName: "recording",
25348
+ capScope: "system",
25349
+ addonId: null,
25350
+ access: "view"
25351
+ },
25001
25352
  "recording.getStorageUsage": {
25002
25353
  capName: "recording",
25003
25354
  capScope: "system",
@@ -25028,6 +25379,24 @@ Object.freeze({
25028
25379
  addonId: null,
25029
25380
  access: "view"
25030
25381
  },
25382
+ "recording.relocateFootage": {
25383
+ capName: "recording",
25384
+ capScope: "system",
25385
+ addonId: null,
25386
+ access: "create"
25387
+ },
25388
+ "recording.renderClip": {
25389
+ capName: "recording",
25390
+ capScope: "system",
25391
+ addonId: null,
25392
+ access: "create"
25393
+ },
25394
+ "recording.renderGif": {
25395
+ capName: "recording",
25396
+ capScope: "system",
25397
+ addonId: null,
25398
+ access: "create"
25399
+ },
25031
25400
  "recording.rescanStorage": {
25032
25401
  capName: "recording",
25033
25402
  capScope: "system",
@@ -25622,6 +25991,12 @@ Object.freeze({
25622
25991
  addonId: null,
25623
25992
  access: "create"
25624
25993
  },
25994
+ "streamBroker.renderPreBufferClip": {
25995
+ capName: "stream-broker",
25996
+ capScope: "system",
25997
+ addonId: null,
25998
+ access: "create"
25999
+ },
25625
26000
  "streamBroker.restartProfile": {
25626
26001
  capName: "stream-broker",
25627
26002
  capScope: "system",