@camstack/addon-model-studio 1.1.12 → 1.1.14

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.
@@ -4665,7 +4665,7 @@ var ZodIssueCode = {
4665
4665
  var ZodFirstPartyTypeKind;
4666
4666
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
4667
4667
  //#endregion
4668
- //#region ../types/dist/event-category-BLcNejAE.mjs
4668
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
4669
4669
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4670
4670
  EventCategory["SystemBoot"] = "system.boot";
4671
4671
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -4936,6 +4936,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4936
4936
  */
4937
4937
  EventCategory["DeviceStateChanged"] = "device.state-changed";
4938
4938
  /**
4939
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
4940
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
4941
+ *
4942
+ * Emitted only on a change, so a steady scene is silent. It exists so a
4943
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
4944
+ * one live badge with no push signal at all, and it cost a request every
4945
+ * four seconds per visible camera.
4946
+ *
4947
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
4948
+ * keeps a slow reconcile rather than trusting it alone.
4949
+ */
4950
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
4951
+ /**
4939
4952
  * Cap event fired by every device that registers the `battery`
4940
4953
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
4941
4954
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7224,35 +7237,22 @@ var ConvertResultSchema = object({
7224
7237
  */
7225
7238
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7226
7239
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7227
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7228
- kind: literal("timeOfDay"),
7229
- start: string().regex(HHMM),
7230
- end: string().regex(HHMM),
7231
- /** Restrict to these weekdays; omit = every day. */
7232
- days: array(RecordingWeekdaySchema).optional()
7233
- })]);
7234
- var RecordingModeSchema = _enum([
7235
- "continuous",
7236
- "onMotion",
7237
- "onAudioThreshold"
7238
- ]);
7239
7240
  /**
7240
- * First-class, authoritative per-camera storage mode — the explicit choice the
7241
- * UI reads directly (never inferred from `rules`):
7242
- * - `off` — not recording.
7243
- * - `events` — record only around triggers (motion / audio threshold),
7244
- * with pre/post-buffer.
7245
- * - `continuous` — record 24/7 within the schedule.
7241
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7242
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7243
+ * - `off` — no band covers the camera (or it is disabled).
7244
+ * - `events` — every band records around triggers only.
7245
+ * - `continuous` — at least one band records continuously.
7246
7246
  *
7247
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7248
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7247
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7248
+ * every save (`activeModeForConfig`). Writing it has no effect.
7249
7249
  */
7250
7250
  var RecordingStorageModeSchema = _enum([
7251
7251
  "off",
7252
7252
  "events",
7253
7253
  "continuous"
7254
7254
  ]);
7255
- /** Which detectors trigger an `events`-mode recording. */
7255
+ /** Which detectors trigger an `events`-mode band. */
7256
7256
  var RecordingTriggersSchema = object({
7257
7257
  motion: boolean().optional(),
7258
7258
  audioThresholdDbfs: number().optional()
@@ -7288,18 +7288,6 @@ var RecordingBandSchema = object({
7288
7288
  preBufferSec: number().min(0).optional(),
7289
7289
  postBufferSec: number().min(0).optional()
7290
7290
  });
7291
- var RecordingRuleSchema = object({
7292
- schedule: RecordingScheduleSchema,
7293
- mode: RecordingModeSchema,
7294
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7295
- preBufferSec: number().min(0).default(0),
7296
- /** Keep recording until this many seconds after the last trigger. */
7297
- postBufferSec: number().min(0).default(0),
7298
- /** Each new trigger restarts the post-buffer window. */
7299
- resetTimeoutOnNewEvent: boolean().default(true),
7300
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7301
- thresholdDbfs: number().optional()
7302
- });
7303
7291
  /**
7304
7292
  * Per-device retention overrides. Every field is optional; an unset or `0`
7305
7293
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7333,40 +7321,28 @@ var ScrubThumbnailPresetSchema = _enum([
7333
7321
  /**
7334
7322
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7335
7323
  *
7336
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7337
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7338
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7339
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7324
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7325
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7326
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7327
+ *
7328
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7329
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7330
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7331
+ * persist a band-less config, i.e. silently stop recording the camera.
7340
7332
  */
7341
7333
  var RecordingConfigSchema = object({
7342
7334
  enabled: boolean(),
7343
- /** Authoritative storage mode. Absent on legacy targets derived once via
7344
- * `migrateRulesToMode`, then persisted. */
7335
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7336
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7345
7337
  mode: RecordingStorageModeSchema.optional(),
7346
7338
  profiles: array(CamProfileSchema).optional(),
7347
7339
  segmentSeconds: number().int().positive().optional(),
7348
- /** Shared recording time-bands for `events` & `continuous` — record only when
7349
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7350
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7351
- schedules: array(RecordingScheduleSchema).optional(),
7352
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7353
- * normalized into `schedules` on read and never written going forward. (Not
7354
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7355
- schedule: RecordingScheduleSchema.optional(),
7356
- /** `events`-mode only — which detectors trigger a recording. */
7357
- triggers: RecordingTriggersSchema.optional(),
7358
- /** `events`-mode only — seconds retained before / after a trigger. */
7359
- preBufferSec: number().min(0).optional(),
7360
- postBufferSec: number().min(0).optional(),
7361
- /** DEPRECATED authoring input; retained for migration/transition. */
7362
- rules: array(RecordingRuleSchema).optional(),
7363
7340
  /**
7364
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7365
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7366
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7367
- * derived into bands once via `migrateConfigToBands`.
7341
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7342
+ * the recorder's band engine consumes. An empty array = record nothing;
7343
+ * "off" is the absence of a covering band, never a band value.
7368
7344
  */
7369
- bands: array(RecordingBandSchema).optional(),
7345
+ bands: array(RecordingBandSchema).default([]),
7370
7346
  retention: RecordingRetentionSchema.optional(),
7371
7347
  /**
7372
7348
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7374,8 +7350,15 @@ var RecordingConfigSchema = object({
7374
7350
  * windows only — existing sheets are immutable, and each window's index
7375
7351
  * carries its own tile dims so mixed-preset history renders correctly.
7376
7352
  */
7377
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7378
- });
7353
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7354
+ /**
7355
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7356
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7357
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7358
+ * are written and scrub reads exact keyframes at every velocity.
7359
+ */
7360
+ stripsEnabled: boolean().optional()
7361
+ }).strict();
7379
7362
  /**
7380
7363
  * Ops-log — the durable, append-only operations audit shared by the
7381
7364
  * recordings and events management surfaces.
@@ -7394,7 +7377,8 @@ var OpsLogOpSchema = _enum([
7394
7377
  "prune",
7395
7378
  "manual-delete",
7396
7379
  "rescan",
7397
- "retention-run"
7380
+ "retention-run",
7381
+ "relocate"
7398
7382
  ]);
7399
7383
  /** Why the operation ran. */
7400
7384
  var OpsLogReasonSchema = _enum([
@@ -7433,6 +7417,55 @@ var OpsLogQueryInputSchema = object({
7433
7417
  limit: number().int().min(1).max(1e3).optional()
7434
7418
  });
7435
7419
  /**
7420
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7421
+ *
7422
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7423
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7424
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7425
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7426
+ * after verify) and each completed/failed run also lands one durable ops-log
7427
+ * row on the owning addon's surface.
7428
+ */
7429
+ var RelocateJobStateSchema = _enum([
7430
+ "running",
7431
+ "done",
7432
+ "failed",
7433
+ "cancelled"
7434
+ ]);
7435
+ var RelocateJobSchema = object({
7436
+ jobId: string(),
7437
+ state: RelocateJobStateSchema,
7438
+ /** Source location — for media relocation this is informational ('*': rows
7439
+ * move from wherever they are to the target). */
7440
+ fromLocationId: string(),
7441
+ toLocationId: string(),
7442
+ /** Scoped device, or null = every device. */
7443
+ deviceId: number().nullable(),
7444
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7445
+ entities: array(string()),
7446
+ filesMoved: number().int(),
7447
+ bytesMoved: number().int(),
7448
+ /** Total files discovered up front; null while (or when) unknown. */
7449
+ filesTotal: number().int().nullable(),
7450
+ startedAt: number(),
7451
+ finishedAt: number().nullable(),
7452
+ error: string().nullable()
7453
+ });
7454
+ var RelocateFootageInputSchema = object({
7455
+ deviceId: number().optional(),
7456
+ fromLocationId: string(),
7457
+ toLocationId: string(),
7458
+ entities: array(_enum(["segments", "strips"])).optional(),
7459
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7460
+ * never allowed to starve live writers. */
7461
+ throttleMbps: number().min(1).max(1e3).optional()
7462
+ });
7463
+ var RelocateMediaInputSchema = object({
7464
+ deviceId: number().optional(),
7465
+ toLocationId: string(),
7466
+ throttleMbps: number().min(1).max(1e3).optional()
7467
+ });
7468
+ /**
7436
7469
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7437
7470
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7438
7471
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7482,6 +7515,13 @@ var StorageLocationSchema = object({
7482
7515
  nodeId: string().optional(),
7483
7516
  isDefault: boolean().default(false),
7484
7517
  isSystem: boolean().default(false),
7518
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7519
+ * for node-local locations it can reach) — never persisted, absent when the
7520
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7521
+ capacity: object({
7522
+ totalBytes: number(),
7523
+ availableBytes: number()
7524
+ }).nullable().optional(),
7485
7525
  createdAt: number(),
7486
7526
  updatedAt: number()
7487
7527
  });
@@ -8249,7 +8289,8 @@ var NcTaxonomyEntrySchema = object({
8249
8289
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8250
8290
  parentKind: string().nullable()
8251
8291
  });
8252
- object({
8292
+ /** The complete NC picker taxonomy — three grouped buckets. */
8293
+ var NcTaxonomySchema = object({
8253
8294
  videoClasses: array(NcTaxonomyEntrySchema),
8254
8295
  audioKinds: array(NcTaxonomyEntrySchema),
8255
8296
  labels: array(NcTaxonomyEntrySchema)
@@ -8909,6 +8950,7 @@ var AccessoryKind = {
8909
8950
  };
8910
8951
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8911
8952
  DeviceFeature.BatteryOperated;
8953
+ new Set(["devices", "classes"]);
8912
8954
  /**
8913
8955
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8914
8956
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9067,6 +9109,29 @@ var NcOccupancyConditionSchema = object({
9067
9109
  count: number().int().min(0).default(1),
9068
9110
  sustainSeconds: number().int().min(0).max(3600).default(15)
9069
9111
  });
9112
+ /**
9113
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9114
+ *
9115
+ * The values are not symmetric, and deliberately so — the absent value has to
9116
+ * mean exactly what every rule authored before this condition existed already
9117
+ * does:
9118
+ * - `enter` — entries and every NON-crossing record (movement state,
9119
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9120
+ * an operator who never asked for exits must not start receiving them.
9121
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9122
+ * fails closed, because "the car left the drive" is a question about a
9123
+ * boundary, not about a detection.
9124
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9125
+ *
9126
+ * A rule asking for a direction should normally also scope `zones`, which the
9127
+ * engine evaluates against the crossed zone as well as the current membership
9128
+ * (an exit's membership no longer contains the zone it just left).
9129
+ */
9130
+ var NcCrossingSchema = _enum([
9131
+ "enter",
9132
+ "exit",
9133
+ "any"
9134
+ ]);
9070
9135
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9071
9136
  var NcZoneConditionSchema = object({
9072
9137
  ids: array(string().min(1)).min(1),
@@ -9091,6 +9156,13 @@ var NcConditionsSchema = object({
9091
9156
  /** Veto zones — any hit fails the rule. */
9092
9157
  zonesExclude: array(string().min(1)).optional(),
9093
9158
  /**
9159
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9160
+ * and a closed track carries none, so a `track-end` rule asking for one
9161
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9162
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9163
+ */
9164
+ crossing: NcCrossingSchema.optional(),
9165
+ /**
9094
9166
  * Exact (case-insensitive) match on the record's collapsed `label`
9095
9167
  * (identity name / plate text / subclass).
9096
9168
  */
@@ -9225,17 +9297,85 @@ var NcRuleTargetSchema = object({
9225
9297
  * - `keyFrame` — the clean scene frame (no subject box).
9226
9298
  * - `none` — no attachment.
9227
9299
  */
9228
- var NcMediaPolicySchema = object({ attach: _enum([
9229
- "best",
9230
- "best-matching",
9231
- "keyFrame",
9232
- "none"
9233
- ]).default("best") });
9300
+ /**
9301
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9302
+ * conflate it with the selection strategy and betray the request: asking for
9303
+ * the clean scene frame on an object-event owner used to start at
9304
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9305
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9306
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9307
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9308
+ * the pipeline actually saw.
9309
+ */
9310
+ var NcMediaFrameSchema = _enum([
9311
+ "cropped",
9312
+ "full",
9313
+ "boxed"
9314
+ ]);
9315
+ var NcMediaPolicySchema = object({
9316
+ attach: _enum([
9317
+ "best",
9318
+ "best-matching",
9319
+ "keyFrame",
9320
+ "none"
9321
+ ]).default("best"),
9322
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9323
+ frame: NcMediaFrameSchema.optional(),
9324
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9325
+ * "show me the ZONE", not the whole scene or the subject crop. */
9326
+ zoneCrop: boolean().optional(),
9327
+ /**
9328
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9329
+ * event — NOT from the recording, so the camera does not have to be
9330
+ * recording, and the window sits AROUND the moment instead of a segment
9331
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9332
+ * gif, never a failed notification.
9333
+ */
9334
+ gif: boolean().optional(),
9335
+ /**
9336
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9337
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9338
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9339
+ * the degrade engine, which drops the video and keeps the still.
9340
+ */
9341
+ clip: boolean().optional(),
9342
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9343
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9344
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9345
+ /**
9346
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9347
+ * assigned profile: a notification is watched on a phone, so the 4K
9348
+ * rendition would burn CPU to produce a file the client downscales anyway.
9349
+ * A profile that is not assigned falls back to the cheapest, and the render
9350
+ * reports which one actually ran.
9351
+ */
9352
+ profile: CamProfileSchema.optional()
9353
+ });
9354
+ /**
9355
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9356
+ * notification suppresses.
9357
+ * - `shared` (default, and the absent value) — one window for the whole
9358
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9359
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9360
+ * at once and cat→cat still waits.
9361
+ *
9362
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9363
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9364
+ * see `cooldownKey` in the rule engine).
9365
+ */
9366
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9234
9367
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9235
9368
  var NcThrottleSchema = object({
9236
9369
  cooldownSec: number().int().min(0).max(86400).default(60),
9237
9370
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9238
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9371
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9372
+ /**
9373
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9374
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9375
+ * rule authored before this field simply carries none — and the engine
9376
+ * reads absent as `shared`, the pre-existing behaviour.
9377
+ */
9378
+ granularity: NcThrottleGranularitySchema.optional()
9239
9379
  });
9240
9380
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9241
9381
  var NcRuleInputSchema = object({
@@ -9244,7 +9384,19 @@ var NcRuleInputSchema = object({
9244
9384
  delivery: NcDeliverySchema,
9245
9385
  conditions: NcConditionsSchema.default({}),
9246
9386
  schedule: NcScheduleSchema.optional(),
9247
- targets: array(NcRuleTargetSchema).min(1),
9387
+ /** May be empty when `targetUsers` addresses at least one user — the
9388
+ * "at least one addressee" invariant is enforced by the provider, because
9389
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9390
+ targets: array(NcRuleTargetSchema),
9391
+ /**
9392
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9393
+ * time each user fans out to the personal targets they own
9394
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9395
+ * firing camera — a user is never notified about a device they cannot open.
9396
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9397
+ * targets.
9398
+ */
9399
+ targetUsers: array(string()).optional(),
9248
9400
  media: NcMediaPolicySchema.default({ attach: "best" }),
9249
9401
  throttle: NcThrottleSchema.default({
9250
9402
  cooldownSec: 60,
@@ -9331,6 +9483,7 @@ var NcConditionDescriptorSchema = object({
9331
9483
  "schedule",
9332
9484
  "plateMatcher",
9333
9485
  "packagePhase",
9486
+ "crossingSelect",
9334
9487
  "polygonDraw",
9335
9488
  "occupancy"
9336
9489
  ]),
@@ -9457,7 +9610,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9457
9610
  }), object({ results: array(NcTestResultSchema) }), {
9458
9611
  kind: "mutation",
9459
9612
  auth: "admin"
9460
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9613
+ }), method(object({}), object({
9614
+ catalog: array(NcConditionDescriptorSchema),
9615
+ taxonomy: NcTaxonomySchema.optional()
9616
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9461
9617
  /**
9462
9618
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9463
9619
  *
@@ -10194,6 +10350,28 @@ method(object({
10194
10350
  }), object({ success: literal(true) }), {
10195
10351
  kind: "mutation",
10196
10352
  auth: "admin"
10353
+ }), method(object({
10354
+ deviceId: number(),
10355
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10356
+ * watched on a phone, and the cheap rendition is the right default. */
10357
+ profile: CamProfileSchema.optional(),
10358
+ aroundMs: number(),
10359
+ preRollSec: number().min(0).max(20).default(3),
10360
+ postRollSec: number().min(0).max(20).default(5),
10361
+ format: _enum(["gif", "mp4"]).default("gif"),
10362
+ maxWidth: number().int().min(120).max(1920).default(480),
10363
+ /** GIF only — MP4 keeps the source cadence. */
10364
+ fps: number().int().min(1).max(15).default(5)
10365
+ }), object({
10366
+ base64: string(),
10367
+ mime: string(),
10368
+ bytes: number().int(),
10369
+ /** The profile actually rendered (what the default resolved to). */
10370
+ profile: CamProfileSchema,
10371
+ durationMs: number()
10372
+ }), {
10373
+ kind: "mutation",
10374
+ auth: "admin"
10197
10375
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10198
10376
  probed: boolean(),
10199
10377
  summary: string()
@@ -15822,7 +16000,10 @@ method(object({
15822
16000
  }), method(object({
15823
16001
  deviceId: number(),
15824
16002
  caps: array(string()).readonly().optional()
15825
- }), record(string(), unknown().nullable()));
16003
+ }), record(string(), unknown().nullable())), method(object({
16004
+ deviceIds: array(number()).readonly(),
16005
+ caps: array(string()).readonly().optional()
16006
+ }), record(string(), record(string(), unknown().nullable())));
15826
16007
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15827
16008
  deviceId: number(),
15828
16009
  capName: string()
@@ -16759,6 +16940,36 @@ var TargetKindSchema = object({
16759
16940
  icon: string(),
16760
16941
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16761
16942
  addonId: string(),
16943
+ /**
16944
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16945
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16946
+ * when the addon bundles no icon for that kind — the client then falls back
16947
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16948
+ *
16949
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16950
+ * client, and a native client joins it onto its own hub base.
16951
+ *
16952
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16953
+ * field that survived only because the runtime cap-router forwards provider
16954
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16955
+ * its own Zod parse from stripping it, and the whole arrangement would have
16956
+ * broken silently the moment output validation was tightened anywhere.
16957
+ */
16958
+ iconUrl: string().optional(),
16959
+ /**
16960
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16961
+ *
16962
+ * The server knows this and therefore says it, because the client cannot
16963
+ * safely guess: a React-Native client renders SVG and raster through two
16964
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16965
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16966
+ * placeholder glyph for every vector icon while the web build looked fine.
16967
+ *
16968
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16969
+ * not been updated — a client that cannot determine the type should prefer
16970
+ * its raster path, which is the safe default for an unknown image.
16971
+ */
16972
+ iconMediaType: string().optional(),
16762
16973
  configSchema: ConfigSchemaPassthrough,
16763
16974
  supportsDiscovery: boolean(),
16764
16975
  caps: TargetKindCapsSchema
@@ -17206,6 +17417,29 @@ var MotionEventSchema = object({
17206
17417
  * Absent on legacy rows ⇒ treat as `pipeline`.
17207
17418
  */
17208
17419
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17420
+ /**
17421
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17422
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17423
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17424
+ * appearance event carry none, so a rule asking for a direction fails closed
17425
+ * on them.
17426
+ *
17427
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17428
+ * into its own event, so a frame in which a track enters A while leaving B
17429
+ * produces two events with two directions — never one ambiguous row.
17430
+ *
17431
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17432
+ * membership the box has NOW, and by definition it no longer contains the zone
17433
+ * that was just left. Without the id here, a zone-scoped rule could never match
17434
+ * the exit it asked for.
17435
+ */
17436
+ var ZoneCrossingSchema = object({
17437
+ direction: _enum(["enter", "exit"]),
17438
+ /** Admin zone id crossed. */
17439
+ zoneId: string(),
17440
+ /** Zone display name at crossing time (falls back to the id). */
17441
+ zoneName: string().optional()
17442
+ });
17209
17443
  var ObjectEventSchema = object({
17210
17444
  ...BaseEventFields,
17211
17445
  kind: literal("object"),
@@ -17232,6 +17466,12 @@ var ObjectEventSchema = object({
17232
17466
  zones: array(string()).readonly().optional(),
17233
17467
  /** Omitted in slim projection. */
17234
17468
  state: TrackStateSchema.optional(),
17469
+ /**
17470
+ * The zone crossing this event IS, when it is one. Absent on every other
17471
+ * event kind (movement state, appearance, package) — see
17472
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17473
+ */
17474
+ zoneCrossing: ZoneCrossingSchema.optional(),
17235
17475
  /** Detection-frame dimensions in pixels — let consumers normalize the
17236
17476
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17237
17477
  frameWidth: number().optional(),
@@ -17490,6 +17730,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17490
17730
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17491
17731
  kind: "mutation",
17492
17732
  auth: "admin"
17733
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17734
+ kind: "mutation",
17735
+ auth: "admin"
17736
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17737
+ kind: "query",
17738
+ auth: "admin"
17739
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17740
+ kind: "mutation",
17741
+ auth: "admin"
17493
17742
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17494
17743
  kind: "query",
17495
17744
  auth: "admin"
@@ -19969,6 +20218,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19969
20218
  */
19970
20219
  priority: number()
19971
20220
  })).readonly() });
20221
+ /**
20222
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20223
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20224
+ * what AUTO currently picks, so the UI can show the effective value either way.
20225
+ */
20226
+ var NotificationEndpointSchema = object({
20227
+ /** The operator's explicit choice, or null for AUTO. */
20228
+ baseUrl: string().nullable(),
20229
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20230
+ resolved: string().nullable()
20231
+ });
19972
20232
  var AllowedAddressesSchema = object({
19973
20233
  /**
19974
20234
  * Allowlist of interface addresses operators have explicitly opted
@@ -19991,7 +20251,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
19991
20251
  * to avoid mixed-content blocks in the browser. The public
19992
20252
  * tunnel always emits `https://` regardless. */
19993
20253
  scheme: _enum(["http", "https"]).optional()
19994
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20254
+ }), 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" });
19995
20255
  /**
19996
20256
  * mesh-network — collection cap for mesh-VPN providers.
19997
20257
  *
@@ -20790,7 +21050,12 @@ var RecordingDeviceUsageSchema = object({
20790
21050
  var RecordingLocationUsageSchema = object({
20791
21051
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20792
21052
  locationId: string().nullable(),
20793
- /** Bytes of recordings stored on this location. */
21053
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21054
+ * is emitted per physical disk (2026-07-29): two locations on one root
21055
+ * previously rendered as two identical "disks" with a nonsensical used
21056
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21057
+ locationIds: array(string()).optional(),
21058
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20794
21059
  usedBytes: number(),
20795
21060
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20796
21061
  availableBytes: number().nullable(),
@@ -20902,6 +21167,44 @@ method(object({
20902
21167
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20903
21168
  kind: "query",
20904
21169
  auth: "admin"
21170
+ }), method(object({
21171
+ deviceId: number(),
21172
+ aroundMs: number(),
21173
+ preRollSec: number().min(0).max(30).default(2),
21174
+ postRollSec: number().min(0).max(30).default(5),
21175
+ maxWidth: number().int().min(120).max(1280).default(480),
21176
+ fps: number().int().min(1).max(15).default(5)
21177
+ }), object({
21178
+ gifBase64: string(),
21179
+ fromMs: number(),
21180
+ toMs: number()
21181
+ }), {
21182
+ kind: "mutation",
21183
+ auth: "admin"
21184
+ }), method(object({
21185
+ deviceId: number(),
21186
+ aroundMs: number(),
21187
+ preRollSec: number().min(0).max(30).default(3),
21188
+ postRollSec: number().min(0).max(30).default(7),
21189
+ maxWidth: number().int().min(160).max(1920).default(640)
21190
+ }), object({
21191
+ clipBase64: string(),
21192
+ mime: string(),
21193
+ fromMs: number(),
21194
+ toMs: number(),
21195
+ bytes: number().int()
21196
+ }), {
21197
+ kind: "mutation",
21198
+ auth: "admin"
21199
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21200
+ kind: "mutation",
21201
+ auth: "admin"
21202
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21203
+ kind: "query",
21204
+ auth: "admin"
21205
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21206
+ kind: "mutation",
21207
+ auth: "admin"
20905
21208
  });
20906
21209
  /**
20907
21210
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22493,6 +22796,12 @@ Object.freeze({
22493
22796
  addonId: null,
22494
22797
  access: "view"
22495
22798
  },
22799
+ "deviceManager.getDeviceStatusAggregateBatch": {
22800
+ capName: "device-manager",
22801
+ capScope: "system",
22802
+ addonId: null,
22803
+ access: "view"
22804
+ },
22496
22805
  "deviceManager.getLinkedDevices": {
22497
22806
  capName: "device-manager",
22498
22807
  capScope: "system",
@@ -23387,6 +23696,12 @@ Object.freeze({
23387
23696
  addonId: null,
23388
23697
  access: "view"
23389
23698
  },
23699
+ "localNetwork.getNotificationEndpoint": {
23700
+ capName: "local-network",
23701
+ capScope: "system",
23702
+ addonId: null,
23703
+ access: "view"
23704
+ },
23390
23705
  "localNetwork.getPreferred": {
23391
23706
  capName: "local-network",
23392
23707
  capScope: "system",
@@ -23411,6 +23726,12 @@ Object.freeze({
23411
23726
  addonId: null,
23412
23727
  access: "create"
23413
23728
  },
23729
+ "localNetwork.setNotificationEndpoint": {
23730
+ capName: "local-network",
23731
+ capScope: "system",
23732
+ addonId: null,
23733
+ access: "create"
23734
+ },
23414
23735
  "lockControl.lock": {
23415
23736
  capName: "lock-control",
23416
23737
  capScope: "device",
@@ -24053,6 +24374,12 @@ Object.freeze({
24053
24374
  addonId: null,
24054
24375
  access: "create"
24055
24376
  },
24377
+ "pipelineAnalytics.cancelMediaRelocate": {
24378
+ capName: "pipeline-analytics",
24379
+ capScope: "device",
24380
+ addonId: null,
24381
+ access: "create"
24382
+ },
24056
24383
  "pipelineAnalytics.clearTracks": {
24057
24384
  capName: "pipeline-analytics",
24058
24385
  capScope: "device",
@@ -24107,6 +24434,12 @@ Object.freeze({
24107
24434
  addonId: null,
24108
24435
  access: "view"
24109
24436
  },
24437
+ "pipelineAnalytics.getMediaRelocateStatus": {
24438
+ capName: "pipeline-analytics",
24439
+ capScope: "device",
24440
+ addonId: null,
24441
+ access: "view"
24442
+ },
24110
24443
  "pipelineAnalytics.getMotionEvents": {
24111
24444
  capName: "pipeline-analytics",
24112
24445
  capScope: "device",
@@ -24179,6 +24512,12 @@ Object.freeze({
24179
24512
  addonId: null,
24180
24513
  access: "create"
24181
24514
  },
24515
+ "pipelineAnalytics.relocateMedia": {
24516
+ capName: "pipeline-analytics",
24517
+ capScope: "device",
24518
+ addonId: null,
24519
+ access: "create"
24520
+ },
24182
24521
  "pipelineAnalytics.searchObjectEvents": {
24183
24522
  capName: "pipeline-analytics",
24184
24523
  capScope: "device",
@@ -24941,6 +25280,12 @@ Object.freeze({
24941
25280
  addonId: null,
24942
25281
  access: "create"
24943
25282
  },
25283
+ "recording.cancelRelocate": {
25284
+ capName: "recording",
25285
+ capScope: "system",
25286
+ addonId: null,
25287
+ access: "create"
25288
+ },
24944
25289
  "recording.deleteFootprint": {
24945
25290
  capName: "recording",
24946
25291
  capScope: "system",
@@ -24971,6 +25316,12 @@ Object.freeze({
24971
25316
  addonId: null,
24972
25317
  access: "view"
24973
25318
  },
25319
+ "recording.getRelocateStatus": {
25320
+ capName: "recording",
25321
+ capScope: "system",
25322
+ addonId: null,
25323
+ access: "view"
25324
+ },
24974
25325
  "recording.getStorageUsage": {
24975
25326
  capName: "recording",
24976
25327
  capScope: "system",
@@ -25001,6 +25352,24 @@ Object.freeze({
25001
25352
  addonId: null,
25002
25353
  access: "view"
25003
25354
  },
25355
+ "recording.relocateFootage": {
25356
+ capName: "recording",
25357
+ capScope: "system",
25358
+ addonId: null,
25359
+ access: "create"
25360
+ },
25361
+ "recording.renderClip": {
25362
+ capName: "recording",
25363
+ capScope: "system",
25364
+ addonId: null,
25365
+ access: "create"
25366
+ },
25367
+ "recording.renderGif": {
25368
+ capName: "recording",
25369
+ capScope: "system",
25370
+ addonId: null,
25371
+ access: "create"
25372
+ },
25004
25373
  "recording.rescanStorage": {
25005
25374
  capName: "recording",
25006
25375
  capScope: "system",
@@ -25595,6 +25964,12 @@ Object.freeze({
25595
25964
  addonId: null,
25596
25965
  access: "create"
25597
25966
  },
25967
+ "streamBroker.renderPreBufferClip": {
25968
+ capName: "stream-broker",
25969
+ capScope: "system",
25970
+ addonId: null,
25971
+ access: "create"
25972
+ },
25598
25973
  "streamBroker.restartProfile": {
25599
25974
  capName: "stream-broker",
25600
25975
  capScope: "system",