@camstack/addon-export-ha-mqtt 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.
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  }) : target, mod));
37
37
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-BLcNejAE.mjs
39
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -307,6 +307,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
307
307
  */
308
308
  EventCategory["DeviceStateChanged"] = "device.state-changed";
309
309
  /**
310
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
311
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
312
+ *
313
+ * Emitted only on a change, so a steady scene is silent. It exists so a
314
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
315
+ * one live badge with no push signal at all, and it cost a request every
316
+ * four seconds per visible camera.
317
+ *
318
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
319
+ * keeps a slow reconcile rather than trusting it alone.
320
+ */
321
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
322
+ /**
310
323
  * Cap event fired by every device that registers the `battery`
311
324
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
312
325
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7234,35 +7247,22 @@ var ConvertResultSchema = object({
7234
7247
  */
7235
7248
  var RecordingWeekdaySchema = number$1().int().min(0).max(6);
7236
7249
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7237
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7238
- kind: literal("timeOfDay"),
7239
- start: string().regex(HHMM),
7240
- end: string().regex(HHMM),
7241
- /** Restrict to these weekdays; omit = every day. */
7242
- days: array(RecordingWeekdaySchema).optional()
7243
- })]);
7244
- var RecordingModeSchema = _enum([
7245
- "continuous",
7246
- "onMotion",
7247
- "onAudioThreshold"
7248
- ]);
7249
7250
  /**
7250
- * First-class, authoritative per-camera storage mode — the explicit choice the
7251
- * UI reads directly (never inferred from `rules`):
7252
- * - `off` — not recording.
7253
- * - `events` — record only around triggers (motion / audio threshold),
7254
- * with pre/post-buffer.
7255
- * - `continuous` — record 24/7 within the schedule.
7251
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7252
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7253
+ * - `off` — no band covers the camera (or it is disabled).
7254
+ * - `events` — every band records around triggers only.
7255
+ * - `continuous` — at least one band records continuously.
7256
7256
  *
7257
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7258
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7257
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7258
+ * every save (`activeModeForConfig`). Writing it has no effect.
7259
7259
  */
7260
7260
  var RecordingStorageModeSchema = _enum([
7261
7261
  "off",
7262
7262
  "events",
7263
7263
  "continuous"
7264
7264
  ]);
7265
- /** Which detectors trigger an `events`-mode recording. */
7265
+ /** Which detectors trigger an `events`-mode band. */
7266
7266
  var RecordingTriggersSchema = object({
7267
7267
  motion: boolean().optional(),
7268
7268
  audioThresholdDbfs: number$1().optional()
@@ -7298,18 +7298,6 @@ var RecordingBandSchema = object({
7298
7298
  preBufferSec: number$1().min(0).optional(),
7299
7299
  postBufferSec: number$1().min(0).optional()
7300
7300
  });
7301
- var RecordingRuleSchema = object({
7302
- schedule: RecordingScheduleSchema,
7303
- mode: RecordingModeSchema,
7304
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7305
- preBufferSec: number$1().min(0).default(0),
7306
- /** Keep recording until this many seconds after the last trigger. */
7307
- postBufferSec: number$1().min(0).default(0),
7308
- /** Each new trigger restarts the post-buffer window. */
7309
- resetTimeoutOnNewEvent: boolean().default(true),
7310
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7311
- thresholdDbfs: number$1().optional()
7312
- });
7313
7301
  /**
7314
7302
  * Per-device retention overrides. Every field is optional; an unset or `0`
7315
7303
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7343,40 +7331,28 @@ var ScrubThumbnailPresetSchema = _enum([
7343
7331
  /**
7344
7332
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7345
7333
  *
7346
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7347
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7348
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7349
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7334
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7335
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7336
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7337
+ *
7338
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7339
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7340
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7341
+ * persist a band-less config, i.e. silently stop recording the camera.
7350
7342
  */
7351
7343
  var RecordingConfigSchema = object({
7352
7344
  enabled: boolean(),
7353
- /** Authoritative storage mode. Absent on legacy targets derived once via
7354
- * `migrateRulesToMode`, then persisted. */
7345
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7346
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7355
7347
  mode: RecordingStorageModeSchema.optional(),
7356
7348
  profiles: array(CamProfileSchema).optional(),
7357
7349
  segmentSeconds: number$1().int().positive().optional(),
7358
- /** Shared recording time-bands for `events` & `continuous` — record only when
7359
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7360
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7361
- schedules: array(RecordingScheduleSchema).optional(),
7362
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7363
- * normalized into `schedules` on read and never written going forward. (Not
7364
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7365
- schedule: RecordingScheduleSchema.optional(),
7366
- /** `events`-mode only — which detectors trigger a recording. */
7367
- triggers: RecordingTriggersSchema.optional(),
7368
- /** `events`-mode only — seconds retained before / after a trigger. */
7369
- preBufferSec: number$1().min(0).optional(),
7370
- postBufferSec: number$1().min(0).optional(),
7371
- /** DEPRECATED authoring input; retained for migration/transition. */
7372
- rules: array(RecordingRuleSchema).optional(),
7373
7350
  /**
7374
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7375
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7376
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7377
- * derived into bands once via `migrateConfigToBands`.
7351
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7352
+ * the recorder's band engine consumes. An empty array = record nothing;
7353
+ * "off" is the absence of a covering band, never a band value.
7378
7354
  */
7379
- bands: array(RecordingBandSchema).optional(),
7355
+ bands: array(RecordingBandSchema).default([]),
7380
7356
  retention: RecordingRetentionSchema.optional(),
7381
7357
  /**
7382
7358
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7384,8 +7360,15 @@ var RecordingConfigSchema = object({
7384
7360
  * windows only — existing sheets are immutable, and each window's index
7385
7361
  * carries its own tile dims so mixed-preset history renders correctly.
7386
7362
  */
7387
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7388
- });
7363
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7364
+ /**
7365
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7366
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7367
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7368
+ * are written and scrub reads exact keyframes at every velocity.
7369
+ */
7370
+ stripsEnabled: boolean().optional()
7371
+ }).strict();
7389
7372
  /**
7390
7373
  * Ops-log — the durable, append-only operations audit shared by the
7391
7374
  * recordings and events management surfaces.
@@ -7404,7 +7387,8 @@ var OpsLogOpSchema = _enum([
7404
7387
  "prune",
7405
7388
  "manual-delete",
7406
7389
  "rescan",
7407
- "retention-run"
7390
+ "retention-run",
7391
+ "relocate"
7408
7392
  ]);
7409
7393
  /** Why the operation ran. */
7410
7394
  var OpsLogReasonSchema = _enum([
@@ -7443,6 +7427,55 @@ var OpsLogQueryInputSchema = object({
7443
7427
  limit: number$1().int().min(1).max(1e3).optional()
7444
7428
  });
7445
7429
  /**
7430
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7431
+ *
7432
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7433
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7434
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7435
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7436
+ * after verify) and each completed/failed run also lands one durable ops-log
7437
+ * row on the owning addon's surface.
7438
+ */
7439
+ var RelocateJobStateSchema = _enum([
7440
+ "running",
7441
+ "done",
7442
+ "failed",
7443
+ "cancelled"
7444
+ ]);
7445
+ var RelocateJobSchema = object({
7446
+ jobId: string(),
7447
+ state: RelocateJobStateSchema,
7448
+ /** Source location — for media relocation this is informational ('*': rows
7449
+ * move from wherever they are to the target). */
7450
+ fromLocationId: string(),
7451
+ toLocationId: string(),
7452
+ /** Scoped device, or null = every device. */
7453
+ deviceId: number$1().nullable(),
7454
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7455
+ entities: array(string()),
7456
+ filesMoved: number$1().int(),
7457
+ bytesMoved: number$1().int(),
7458
+ /** Total files discovered up front; null while (or when) unknown. */
7459
+ filesTotal: number$1().int().nullable(),
7460
+ startedAt: number$1(),
7461
+ finishedAt: number$1().nullable(),
7462
+ error: string().nullable()
7463
+ });
7464
+ var RelocateFootageInputSchema = object({
7465
+ deviceId: number$1().optional(),
7466
+ fromLocationId: string(),
7467
+ toLocationId: string(),
7468
+ entities: array(_enum(["segments", "strips"])).optional(),
7469
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7470
+ * never allowed to starve live writers. */
7471
+ throttleMbps: number$1().min(1).max(1e3).optional()
7472
+ });
7473
+ var RelocateMediaInputSchema = object({
7474
+ deviceId: number$1().optional(),
7475
+ toLocationId: string(),
7476
+ throttleMbps: number$1().min(1).max(1e3).optional()
7477
+ });
7478
+ /**
7446
7479
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7447
7480
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7448
7481
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7492,6 +7525,13 @@ var StorageLocationSchema = object({
7492
7525
  nodeId: string().optional(),
7493
7526
  isDefault: boolean().default(false),
7494
7527
  isSystem: boolean().default(false),
7528
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7529
+ * for node-local locations it can reach) — never persisted, absent when the
7530
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7531
+ capacity: object({
7532
+ totalBytes: number$1(),
7533
+ availableBytes: number$1()
7534
+ }).nullable().optional(),
7495
7535
  createdAt: number$1(),
7496
7536
  updatedAt: number$1()
7497
7537
  });
@@ -8259,7 +8299,8 @@ var NcTaxonomyEntrySchema = object({
8259
8299
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8260
8300
  parentKind: string().nullable()
8261
8301
  });
8262
- object({
8302
+ /** The complete NC picker taxonomy — three grouped buckets. */
8303
+ var NcTaxonomySchema = object({
8263
8304
  videoClasses: array(NcTaxonomyEntrySchema),
8264
8305
  audioKinds: array(NcTaxonomyEntrySchema),
8265
8306
  labels: array(NcTaxonomyEntrySchema)
@@ -8919,6 +8960,7 @@ var AccessoryKind = {
8919
8960
  };
8920
8961
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8921
8962
  DeviceFeature.BatteryOperated;
8963
+ new Set(["devices", "classes"]);
8922
8964
  /**
8923
8965
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8924
8966
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9077,6 +9119,29 @@ var NcOccupancyConditionSchema = object({
9077
9119
  count: number$1().int().min(0).default(1),
9078
9120
  sustainSeconds: number$1().int().min(0).max(3600).default(15)
9079
9121
  });
9122
+ /**
9123
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9124
+ *
9125
+ * The values are not symmetric, and deliberately so — the absent value has to
9126
+ * mean exactly what every rule authored before this condition existed already
9127
+ * does:
9128
+ * - `enter` — entries and every NON-crossing record (movement state,
9129
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9130
+ * an operator who never asked for exits must not start receiving them.
9131
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9132
+ * fails closed, because "the car left the drive" is a question about a
9133
+ * boundary, not about a detection.
9134
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9135
+ *
9136
+ * A rule asking for a direction should normally also scope `zones`, which the
9137
+ * engine evaluates against the crossed zone as well as the current membership
9138
+ * (an exit's membership no longer contains the zone it just left).
9139
+ */
9140
+ var NcCrossingSchema = _enum([
9141
+ "enter",
9142
+ "exit",
9143
+ "any"
9144
+ ]);
9080
9145
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9081
9146
  var NcZoneConditionSchema = object({
9082
9147
  ids: array(string().min(1)).min(1),
@@ -9101,6 +9166,13 @@ var NcConditionsSchema = object({
9101
9166
  /** Veto zones — any hit fails the rule. */
9102
9167
  zonesExclude: array(string().min(1)).optional(),
9103
9168
  /**
9169
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9170
+ * and a closed track carries none, so a `track-end` rule asking for one
9171
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9172
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9173
+ */
9174
+ crossing: NcCrossingSchema.optional(),
9175
+ /**
9104
9176
  * Exact (case-insensitive) match on the record's collapsed `label`
9105
9177
  * (identity name / plate text / subclass).
9106
9178
  */
@@ -9235,17 +9307,85 @@ var NcRuleTargetSchema = object({
9235
9307
  * - `keyFrame` — the clean scene frame (no subject box).
9236
9308
  * - `none` — no attachment.
9237
9309
  */
9238
- var NcMediaPolicySchema = object({ attach: _enum([
9239
- "best",
9240
- "best-matching",
9241
- "keyFrame",
9242
- "none"
9243
- ]).default("best") });
9310
+ /**
9311
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9312
+ * conflate it with the selection strategy and betray the request: asking for
9313
+ * the clean scene frame on an object-event owner used to start at
9314
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9315
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9316
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9317
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9318
+ * the pipeline actually saw.
9319
+ */
9320
+ var NcMediaFrameSchema = _enum([
9321
+ "cropped",
9322
+ "full",
9323
+ "boxed"
9324
+ ]);
9325
+ var NcMediaPolicySchema = object({
9326
+ attach: _enum([
9327
+ "best",
9328
+ "best-matching",
9329
+ "keyFrame",
9330
+ "none"
9331
+ ]).default("best"),
9332
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9333
+ frame: NcMediaFrameSchema.optional(),
9334
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9335
+ * "show me the ZONE", not the whole scene or the subject crop. */
9336
+ zoneCrop: boolean().optional(),
9337
+ /**
9338
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9339
+ * event — NOT from the recording, so the camera does not have to be
9340
+ * recording, and the window sits AROUND the moment instead of a segment
9341
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9342
+ * gif, never a failed notification.
9343
+ */
9344
+ gif: boolean().optional(),
9345
+ /**
9346
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9347
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9348
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9349
+ * the degrade engine, which drops the video and keeps the still.
9350
+ */
9351
+ clip: boolean().optional(),
9352
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9353
+ clipPreRollSec: number$1().int().min(0).max(30).optional(),
9354
+ clipPostRollSec: number$1().int().min(0).max(30).optional(),
9355
+ /**
9356
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9357
+ * assigned profile: a notification is watched on a phone, so the 4K
9358
+ * rendition would burn CPU to produce a file the client downscales anyway.
9359
+ * A profile that is not assigned falls back to the cheapest, and the render
9360
+ * reports which one actually ran.
9361
+ */
9362
+ profile: CamProfileSchema.optional()
9363
+ });
9364
+ /**
9365
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9366
+ * notification suppresses.
9367
+ * - `shared` (default, and the absent value) — one window for the whole
9368
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9369
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9370
+ * at once and cat→cat still waits.
9371
+ *
9372
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9373
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9374
+ * see `cooldownKey` in the rule engine).
9375
+ */
9376
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9244
9377
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9245
9378
  var NcThrottleSchema = object({
9246
9379
  cooldownSec: number$1().int().min(0).max(86400).default(60),
9247
9380
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9248
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9381
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9382
+ /**
9383
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9384
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9385
+ * rule authored before this field simply carries none — and the engine
9386
+ * reads absent as `shared`, the pre-existing behaviour.
9387
+ */
9388
+ granularity: NcThrottleGranularitySchema.optional()
9249
9389
  });
9250
9390
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9251
9391
  var NcRuleInputSchema = object({
@@ -9254,7 +9394,19 @@ var NcRuleInputSchema = object({
9254
9394
  delivery: NcDeliverySchema,
9255
9395
  conditions: NcConditionsSchema.default({}),
9256
9396
  schedule: NcScheduleSchema.optional(),
9257
- targets: array(NcRuleTargetSchema).min(1),
9397
+ /** May be empty when `targetUsers` addresses at least one user — the
9398
+ * "at least one addressee" invariant is enforced by the provider, because
9399
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9400
+ targets: array(NcRuleTargetSchema),
9401
+ /**
9402
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9403
+ * time each user fans out to the personal targets they own
9404
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9405
+ * firing camera — a user is never notified about a device they cannot open.
9406
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9407
+ * targets.
9408
+ */
9409
+ targetUsers: array(string()).optional(),
9258
9410
  media: NcMediaPolicySchema.default({ attach: "best" }),
9259
9411
  throttle: NcThrottleSchema.default({
9260
9412
  cooldownSec: 60,
@@ -9341,6 +9493,7 @@ var NcConditionDescriptorSchema = object({
9341
9493
  "schedule",
9342
9494
  "plateMatcher",
9343
9495
  "packagePhase",
9496
+ "crossingSelect",
9344
9497
  "polygonDraw",
9345
9498
  "occupancy"
9346
9499
  ]),
@@ -9467,7 +9620,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9467
9620
  }), object({ results: array(NcTestResultSchema) }), {
9468
9621
  kind: "mutation",
9469
9622
  auth: "admin"
9470
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9623
+ }), method(object({}), object({
9624
+ catalog: array(NcConditionDescriptorSchema),
9625
+ taxonomy: NcTaxonomySchema.optional()
9626
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9471
9627
  /**
9472
9628
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9473
9629
  *
@@ -10204,6 +10360,28 @@ method(object({
10204
10360
  }), object({ success: literal(true) }), {
10205
10361
  kind: "mutation",
10206
10362
  auth: "admin"
10363
+ }), method(object({
10364
+ deviceId: number$1(),
10365
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10366
+ * watched on a phone, and the cheap rendition is the right default. */
10367
+ profile: CamProfileSchema.optional(),
10368
+ aroundMs: number$1(),
10369
+ preRollSec: number$1().min(0).max(20).default(3),
10370
+ postRollSec: number$1().min(0).max(20).default(5),
10371
+ format: _enum(["gif", "mp4"]).default("gif"),
10372
+ maxWidth: number$1().int().min(120).max(1920).default(480),
10373
+ /** GIF only — MP4 keeps the source cadence. */
10374
+ fps: number$1().int().min(1).max(15).default(5)
10375
+ }), object({
10376
+ base64: string(),
10377
+ mime: string(),
10378
+ bytes: number$1().int(),
10379
+ /** The profile actually rendered (what the default resolved to). */
10380
+ profile: CamProfileSchema,
10381
+ durationMs: number$1()
10382
+ }), {
10383
+ kind: "mutation",
10384
+ auth: "admin"
10207
10385
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10208
10386
  probed: boolean(),
10209
10387
  summary: string()
@@ -15823,7 +16001,10 @@ method(object({
15823
16001
  }), method(object({
15824
16002
  deviceId: number$1(),
15825
16003
  caps: array(string()).readonly().optional()
15826
- }), record(string(), unknown().nullable()));
16004
+ }), record(string(), unknown().nullable())), method(object({
16005
+ deviceIds: array(number$1()).readonly(),
16006
+ caps: array(string()).readonly().optional()
16007
+ }), record(string(), record(string(), unknown().nullable())));
15827
16008
  method(object({ deviceId: number$1() }), record(string(), record(string(), unknown()))), method(object({
15828
16009
  deviceId: number$1(),
15829
16010
  capName: string()
@@ -16754,6 +16935,36 @@ var TargetKindSchema = object({
16754
16935
  icon: string(),
16755
16936
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16756
16937
  addonId: string(),
16938
+ /**
16939
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16940
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16941
+ * when the addon bundles no icon for that kind — the client then falls back
16942
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16943
+ *
16944
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16945
+ * client, and a native client joins it onto its own hub base.
16946
+ *
16947
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16948
+ * field that survived only because the runtime cap-router forwards provider
16949
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16950
+ * its own Zod parse from stripping it, and the whole arrangement would have
16951
+ * broken silently the moment output validation was tightened anywhere.
16952
+ */
16953
+ iconUrl: string().optional(),
16954
+ /**
16955
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16956
+ *
16957
+ * The server knows this and therefore says it, because the client cannot
16958
+ * safely guess: a React-Native client renders SVG and raster through two
16959
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16960
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16961
+ * placeholder glyph for every vector icon while the web build looked fine.
16962
+ *
16963
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16964
+ * not been updated — a client that cannot determine the type should prefer
16965
+ * its raster path, which is the safe default for an unknown image.
16966
+ */
16967
+ iconMediaType: string().optional(),
16757
16968
  configSchema: ConfigSchemaPassthrough,
16758
16969
  supportsDiscovery: boolean(),
16759
16970
  caps: TargetKindCapsSchema
@@ -17201,6 +17412,29 @@ var MotionEventSchema = object({
17201
17412
  * Absent on legacy rows ⇒ treat as `pipeline`.
17202
17413
  */
17203
17414
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17415
+ /**
17416
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17417
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17418
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17419
+ * appearance event carry none, so a rule asking for a direction fails closed
17420
+ * on them.
17421
+ *
17422
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17423
+ * into its own event, so a frame in which a track enters A while leaving B
17424
+ * produces two events with two directions — never one ambiguous row.
17425
+ *
17426
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17427
+ * membership the box has NOW, and by definition it no longer contains the zone
17428
+ * that was just left. Without the id here, a zone-scoped rule could never match
17429
+ * the exit it asked for.
17430
+ */
17431
+ var ZoneCrossingSchema = object({
17432
+ direction: _enum(["enter", "exit"]),
17433
+ /** Admin zone id crossed. */
17434
+ zoneId: string(),
17435
+ /** Zone display name at crossing time (falls back to the id). */
17436
+ zoneName: string().optional()
17437
+ });
17204
17438
  var ObjectEventSchema = object({
17205
17439
  ...BaseEventFields,
17206
17440
  kind: literal("object"),
@@ -17227,6 +17461,12 @@ var ObjectEventSchema = object({
17227
17461
  zones: array(string()).readonly().optional(),
17228
17462
  /** Omitted in slim projection. */
17229
17463
  state: TrackStateSchema.optional(),
17464
+ /**
17465
+ * The zone crossing this event IS, when it is one. Absent on every other
17466
+ * event kind (movement state, appearance, package) — see
17467
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17468
+ */
17469
+ zoneCrossing: ZoneCrossingSchema.optional(),
17230
17470
  /** Detection-frame dimensions in pixels — let consumers normalize the
17231
17471
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17232
17472
  frameWidth: number$1().optional(),
@@ -17485,6 +17725,15 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
17485
17725
  }), method(object({ deviceId: number$1() }), EventPruneCountsSchema, {
17486
17726
  kind: "mutation",
17487
17727
  auth: "admin"
17728
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17729
+ kind: "mutation",
17730
+ auth: "admin"
17731
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17732
+ kind: "query",
17733
+ auth: "admin"
17734
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17735
+ kind: "mutation",
17736
+ auth: "admin"
17488
17737
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17489
17738
  kind: "query",
17490
17739
  auth: "admin"
@@ -19964,6 +20213,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19964
20213
  */
19965
20214
  priority: number$1()
19966
20215
  })).readonly() });
20216
+ /**
20217
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20218
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20219
+ * what AUTO currently picks, so the UI can show the effective value either way.
20220
+ */
20221
+ var NotificationEndpointSchema = object({
20222
+ /** The operator's explicit choice, or null for AUTO. */
20223
+ baseUrl: string().nullable(),
20224
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20225
+ resolved: string().nullable()
20226
+ });
19967
20227
  var AllowedAddressesSchema = object({
19968
20228
  /**
19969
20229
  * Allowlist of interface addresses operators have explicitly opted
@@ -19986,7 +20246,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
19986
20246
  * to avoid mixed-content blocks in the browser. The public
19987
20247
  * tunnel always emits `https://` regardless. */
19988
20248
  scheme: _enum(["http", "https"]).optional()
19989
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20249
+ }), 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" });
19990
20250
  /**
19991
20251
  * mesh-network — collection cap for mesh-VPN providers.
19992
20252
  *
@@ -20785,7 +21045,12 @@ var RecordingDeviceUsageSchema = object({
20785
21045
  var RecordingLocationUsageSchema = object({
20786
21046
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20787
21047
  locationId: string().nullable(),
20788
- /** Bytes of recordings stored on this location. */
21048
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21049
+ * is emitted per physical disk (2026-07-29): two locations on one root
21050
+ * previously rendered as two identical "disks" with a nonsensical used
21051
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21052
+ locationIds: array(string()).optional(),
21053
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20789
21054
  usedBytes: number$1(),
20790
21055
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20791
21056
  availableBytes: number$1().nullable(),
@@ -20897,6 +21162,44 @@ method(object({
20897
21162
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20898
21163
  kind: "query",
20899
21164
  auth: "admin"
21165
+ }), method(object({
21166
+ deviceId: number$1(),
21167
+ aroundMs: number$1(),
21168
+ preRollSec: number$1().min(0).max(30).default(2),
21169
+ postRollSec: number$1().min(0).max(30).default(5),
21170
+ maxWidth: number$1().int().min(120).max(1280).default(480),
21171
+ fps: number$1().int().min(1).max(15).default(5)
21172
+ }), object({
21173
+ gifBase64: string(),
21174
+ fromMs: number$1(),
21175
+ toMs: number$1()
21176
+ }), {
21177
+ kind: "mutation",
21178
+ auth: "admin"
21179
+ }), method(object({
21180
+ deviceId: number$1(),
21181
+ aroundMs: number$1(),
21182
+ preRollSec: number$1().min(0).max(30).default(3),
21183
+ postRollSec: number$1().min(0).max(30).default(7),
21184
+ maxWidth: number$1().int().min(160).max(1920).default(640)
21185
+ }), object({
21186
+ clipBase64: string(),
21187
+ mime: string(),
21188
+ fromMs: number$1(),
21189
+ toMs: number$1(),
21190
+ bytes: number$1().int()
21191
+ }), {
21192
+ kind: "mutation",
21193
+ auth: "admin"
21194
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21195
+ kind: "mutation",
21196
+ auth: "admin"
21197
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21198
+ kind: "query",
21199
+ auth: "admin"
21200
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21201
+ kind: "mutation",
21202
+ auth: "admin"
20900
21203
  });
20901
21204
  /**
20902
21205
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22488,6 +22791,12 @@ Object.freeze({
22488
22791
  addonId: null,
22489
22792
  access: "view"
22490
22793
  },
22794
+ "deviceManager.getDeviceStatusAggregateBatch": {
22795
+ capName: "device-manager",
22796
+ capScope: "system",
22797
+ addonId: null,
22798
+ access: "view"
22799
+ },
22491
22800
  "deviceManager.getLinkedDevices": {
22492
22801
  capName: "device-manager",
22493
22802
  capScope: "system",
@@ -23382,6 +23691,12 @@ Object.freeze({
23382
23691
  addonId: null,
23383
23692
  access: "view"
23384
23693
  },
23694
+ "localNetwork.getNotificationEndpoint": {
23695
+ capName: "local-network",
23696
+ capScope: "system",
23697
+ addonId: null,
23698
+ access: "view"
23699
+ },
23385
23700
  "localNetwork.getPreferred": {
23386
23701
  capName: "local-network",
23387
23702
  capScope: "system",
@@ -23406,6 +23721,12 @@ Object.freeze({
23406
23721
  addonId: null,
23407
23722
  access: "create"
23408
23723
  },
23724
+ "localNetwork.setNotificationEndpoint": {
23725
+ capName: "local-network",
23726
+ capScope: "system",
23727
+ addonId: null,
23728
+ access: "create"
23729
+ },
23409
23730
  "lockControl.lock": {
23410
23731
  capName: "lock-control",
23411
23732
  capScope: "device",
@@ -24048,6 +24369,12 @@ Object.freeze({
24048
24369
  addonId: null,
24049
24370
  access: "create"
24050
24371
  },
24372
+ "pipelineAnalytics.cancelMediaRelocate": {
24373
+ capName: "pipeline-analytics",
24374
+ capScope: "device",
24375
+ addonId: null,
24376
+ access: "create"
24377
+ },
24051
24378
  "pipelineAnalytics.clearTracks": {
24052
24379
  capName: "pipeline-analytics",
24053
24380
  capScope: "device",
@@ -24102,6 +24429,12 @@ Object.freeze({
24102
24429
  addonId: null,
24103
24430
  access: "view"
24104
24431
  },
24432
+ "pipelineAnalytics.getMediaRelocateStatus": {
24433
+ capName: "pipeline-analytics",
24434
+ capScope: "device",
24435
+ addonId: null,
24436
+ access: "view"
24437
+ },
24105
24438
  "pipelineAnalytics.getMotionEvents": {
24106
24439
  capName: "pipeline-analytics",
24107
24440
  capScope: "device",
@@ -24174,6 +24507,12 @@ Object.freeze({
24174
24507
  addonId: null,
24175
24508
  access: "create"
24176
24509
  },
24510
+ "pipelineAnalytics.relocateMedia": {
24511
+ capName: "pipeline-analytics",
24512
+ capScope: "device",
24513
+ addonId: null,
24514
+ access: "create"
24515
+ },
24177
24516
  "pipelineAnalytics.searchObjectEvents": {
24178
24517
  capName: "pipeline-analytics",
24179
24518
  capScope: "device",
@@ -24936,6 +25275,12 @@ Object.freeze({
24936
25275
  addonId: null,
24937
25276
  access: "create"
24938
25277
  },
25278
+ "recording.cancelRelocate": {
25279
+ capName: "recording",
25280
+ capScope: "system",
25281
+ addonId: null,
25282
+ access: "create"
25283
+ },
24939
25284
  "recording.deleteFootprint": {
24940
25285
  capName: "recording",
24941
25286
  capScope: "system",
@@ -24966,6 +25311,12 @@ Object.freeze({
24966
25311
  addonId: null,
24967
25312
  access: "view"
24968
25313
  },
25314
+ "recording.getRelocateStatus": {
25315
+ capName: "recording",
25316
+ capScope: "system",
25317
+ addonId: null,
25318
+ access: "view"
25319
+ },
24969
25320
  "recording.getStorageUsage": {
24970
25321
  capName: "recording",
24971
25322
  capScope: "system",
@@ -24996,6 +25347,24 @@ Object.freeze({
24996
25347
  addonId: null,
24997
25348
  access: "view"
24998
25349
  },
25350
+ "recording.relocateFootage": {
25351
+ capName: "recording",
25352
+ capScope: "system",
25353
+ addonId: null,
25354
+ access: "create"
25355
+ },
25356
+ "recording.renderClip": {
25357
+ capName: "recording",
25358
+ capScope: "system",
25359
+ addonId: null,
25360
+ access: "create"
25361
+ },
25362
+ "recording.renderGif": {
25363
+ capName: "recording",
25364
+ capScope: "system",
25365
+ addonId: null,
25366
+ access: "create"
25367
+ },
24999
25368
  "recording.rescanStorage": {
25000
25369
  capName: "recording",
25001
25370
  capScope: "system",
@@ -25590,6 +25959,12 @@ Object.freeze({
25590
25959
  addonId: null,
25591
25960
  access: "create"
25592
25961
  },
25962
+ "streamBroker.renderPreBufferClip": {
25963
+ capName: "stream-broker",
25964
+ capScope: "system",
25965
+ addonId: null,
25966
+ access: "create"
25967
+ },
25593
25968
  "streamBroker.restartProfile": {
25594
25969
  capName: "stream-broker",
25595
25970
  capScope: "system",