@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.
@@ -4688,7 +4688,7 @@ var ZodIssueCode = {
4688
4688
  var ZodFirstPartyTypeKind;
4689
4689
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
4690
4690
  //#endregion
4691
- //#region ../types/dist/event-category-BLcNejAE.mjs
4691
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
4692
4692
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4693
4693
  EventCategory["SystemBoot"] = "system.boot";
4694
4694
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -4959,6 +4959,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
4959
4959
  */
4960
4960
  EventCategory["DeviceStateChanged"] = "device.state-changed";
4961
4961
  /**
4962
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
4963
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
4964
+ *
4965
+ * Emitted only on a change, so a steady scene is silent. It exists so a
4966
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
4967
+ * one live badge with no push signal at all, and it cost a request every
4968
+ * four seconds per visible camera.
4969
+ *
4970
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
4971
+ * keeps a slow reconcile rather than trusting it alone.
4972
+ */
4973
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
4974
+ /**
4962
4975
  * Cap event fired by every device that registers the `battery`
4963
4976
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
4964
4977
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7247,35 +7260,22 @@ var ConvertResultSchema = object({
7247
7260
  */
7248
7261
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7249
7262
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7250
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7251
- kind: literal("timeOfDay"),
7252
- start: string().regex(HHMM),
7253
- end: string().regex(HHMM),
7254
- /** Restrict to these weekdays; omit = every day. */
7255
- days: array(RecordingWeekdaySchema).optional()
7256
- })]);
7257
- var RecordingModeSchema = _enum([
7258
- "continuous",
7259
- "onMotion",
7260
- "onAudioThreshold"
7261
- ]);
7262
7263
  /**
7263
- * First-class, authoritative per-camera storage mode — the explicit choice the
7264
- * UI reads directly (never inferred from `rules`):
7265
- * - `off` — not recording.
7266
- * - `events` — record only around triggers (motion / audio threshold),
7267
- * with pre/post-buffer.
7268
- * - `continuous` — record 24/7 within the schedule.
7264
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7265
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7266
+ * - `off` — no band covers the camera (or it is disabled).
7267
+ * - `events` — every band records around triggers only.
7268
+ * - `continuous` — at least one band records continuously.
7269
7269
  *
7270
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7271
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7270
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7271
+ * every save (`activeModeForConfig`). Writing it has no effect.
7272
7272
  */
7273
7273
  var RecordingStorageModeSchema = _enum([
7274
7274
  "off",
7275
7275
  "events",
7276
7276
  "continuous"
7277
7277
  ]);
7278
- /** Which detectors trigger an `events`-mode recording. */
7278
+ /** Which detectors trigger an `events`-mode band. */
7279
7279
  var RecordingTriggersSchema = object({
7280
7280
  motion: boolean().optional(),
7281
7281
  audioThresholdDbfs: number().optional()
@@ -7311,18 +7311,6 @@ var RecordingBandSchema = object({
7311
7311
  preBufferSec: number().min(0).optional(),
7312
7312
  postBufferSec: number().min(0).optional()
7313
7313
  });
7314
- var RecordingRuleSchema = object({
7315
- schedule: RecordingScheduleSchema,
7316
- mode: RecordingModeSchema,
7317
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7318
- preBufferSec: number().min(0).default(0),
7319
- /** Keep recording until this many seconds after the last trigger. */
7320
- postBufferSec: number().min(0).default(0),
7321
- /** Each new trigger restarts the post-buffer window. */
7322
- resetTimeoutOnNewEvent: boolean().default(true),
7323
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7324
- thresholdDbfs: number().optional()
7325
- });
7326
7314
  /**
7327
7315
  * Per-device retention overrides. Every field is optional; an unset or `0`
7328
7316
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7356,40 +7344,28 @@ var ScrubThumbnailPresetSchema = _enum([
7356
7344
  /**
7357
7345
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7358
7346
  *
7359
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7360
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7361
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7362
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7347
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7348
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7349
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7350
+ *
7351
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7352
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7353
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7354
+ * persist a band-less config, i.e. silently stop recording the camera.
7363
7355
  */
7364
7356
  var RecordingConfigSchema = object({
7365
7357
  enabled: boolean(),
7366
- /** Authoritative storage mode. Absent on legacy targets derived once via
7367
- * `migrateRulesToMode`, then persisted. */
7358
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7359
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7368
7360
  mode: RecordingStorageModeSchema.optional(),
7369
7361
  profiles: array(CamProfileSchema).optional(),
7370
7362
  segmentSeconds: number().int().positive().optional(),
7371
- /** Shared recording time-bands for `events` & `continuous` — record only when
7372
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7373
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7374
- schedules: array(RecordingScheduleSchema).optional(),
7375
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7376
- * normalized into `schedules` on read and never written going forward. (Not
7377
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7378
- schedule: RecordingScheduleSchema.optional(),
7379
- /** `events`-mode only — which detectors trigger a recording. */
7380
- triggers: RecordingTriggersSchema.optional(),
7381
- /** `events`-mode only — seconds retained before / after a trigger. */
7382
- preBufferSec: number().min(0).optional(),
7383
- postBufferSec: number().min(0).optional(),
7384
- /** DEPRECATED authoring input; retained for migration/transition. */
7385
- rules: array(RecordingRuleSchema).optional(),
7386
7363
  /**
7387
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7388
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7389
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7390
- * derived into bands once via `migrateConfigToBands`.
7364
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7365
+ * the recorder's band engine consumes. An empty array = record nothing;
7366
+ * "off" is the absence of a covering band, never a band value.
7391
7367
  */
7392
- bands: array(RecordingBandSchema).optional(),
7368
+ bands: array(RecordingBandSchema).default([]),
7393
7369
  retention: RecordingRetentionSchema.optional(),
7394
7370
  /**
7395
7371
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7397,8 +7373,15 @@ var RecordingConfigSchema = object({
7397
7373
  * windows only — existing sheets are immutable, and each window's index
7398
7374
  * carries its own tile dims so mixed-preset history renders correctly.
7399
7375
  */
7400
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7401
- });
7376
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7377
+ /**
7378
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7379
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7380
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7381
+ * are written and scrub reads exact keyframes at every velocity.
7382
+ */
7383
+ stripsEnabled: boolean().optional()
7384
+ }).strict();
7402
7385
  /**
7403
7386
  * Ops-log — the durable, append-only operations audit shared by the
7404
7387
  * recordings and events management surfaces.
@@ -7417,7 +7400,8 @@ var OpsLogOpSchema = _enum([
7417
7400
  "prune",
7418
7401
  "manual-delete",
7419
7402
  "rescan",
7420
- "retention-run"
7403
+ "retention-run",
7404
+ "relocate"
7421
7405
  ]);
7422
7406
  /** Why the operation ran. */
7423
7407
  var OpsLogReasonSchema = _enum([
@@ -7456,6 +7440,55 @@ var OpsLogQueryInputSchema = object({
7456
7440
  limit: number().int().min(1).max(1e3).optional()
7457
7441
  });
7458
7442
  /**
7443
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7444
+ *
7445
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7446
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7447
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7448
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7449
+ * after verify) and each completed/failed run also lands one durable ops-log
7450
+ * row on the owning addon's surface.
7451
+ */
7452
+ var RelocateJobStateSchema = _enum([
7453
+ "running",
7454
+ "done",
7455
+ "failed",
7456
+ "cancelled"
7457
+ ]);
7458
+ var RelocateJobSchema = object({
7459
+ jobId: string(),
7460
+ state: RelocateJobStateSchema,
7461
+ /** Source location — for media relocation this is informational ('*': rows
7462
+ * move from wherever they are to the target). */
7463
+ fromLocationId: string(),
7464
+ toLocationId: string(),
7465
+ /** Scoped device, or null = every device. */
7466
+ deviceId: number().nullable(),
7467
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7468
+ entities: array(string()),
7469
+ filesMoved: number().int(),
7470
+ bytesMoved: number().int(),
7471
+ /** Total files discovered up front; null while (or when) unknown. */
7472
+ filesTotal: number().int().nullable(),
7473
+ startedAt: number(),
7474
+ finishedAt: number().nullable(),
7475
+ error: string().nullable()
7476
+ });
7477
+ var RelocateFootageInputSchema = object({
7478
+ deviceId: number().optional(),
7479
+ fromLocationId: string(),
7480
+ toLocationId: string(),
7481
+ entities: array(_enum(["segments", "strips"])).optional(),
7482
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7483
+ * never allowed to starve live writers. */
7484
+ throttleMbps: number().min(1).max(1e3).optional()
7485
+ });
7486
+ var RelocateMediaInputSchema = object({
7487
+ deviceId: number().optional(),
7488
+ toLocationId: string(),
7489
+ throttleMbps: number().min(1).max(1e3).optional()
7490
+ });
7491
+ /**
7459
7492
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7460
7493
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7461
7494
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7505,6 +7538,13 @@ var StorageLocationSchema = object({
7505
7538
  nodeId: string().optional(),
7506
7539
  isDefault: boolean().default(false),
7507
7540
  isSystem: boolean().default(false),
7541
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7542
+ * for node-local locations it can reach) — never persisted, absent when the
7543
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7544
+ capacity: object({
7545
+ totalBytes: number(),
7546
+ availableBytes: number()
7547
+ }).nullable().optional(),
7508
7548
  createdAt: number(),
7509
7549
  updatedAt: number()
7510
7550
  });
@@ -8272,7 +8312,8 @@ var NcTaxonomyEntrySchema = object({
8272
8312
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8273
8313
  parentKind: string().nullable()
8274
8314
  });
8275
- object({
8315
+ /** The complete NC picker taxonomy — three grouped buckets. */
8316
+ var NcTaxonomySchema = object({
8276
8317
  videoClasses: array(NcTaxonomyEntrySchema),
8277
8318
  audioKinds: array(NcTaxonomyEntrySchema),
8278
8319
  labels: array(NcTaxonomyEntrySchema)
@@ -8932,6 +8973,7 @@ var AccessoryKind = {
8932
8973
  };
8933
8974
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8934
8975
  DeviceFeature.BatteryOperated;
8976
+ new Set(["devices", "classes"]);
8935
8977
  /**
8936
8978
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8937
8979
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9090,6 +9132,29 @@ var NcOccupancyConditionSchema = object({
9090
9132
  count: number().int().min(0).default(1),
9091
9133
  sustainSeconds: number().int().min(0).max(3600).default(15)
9092
9134
  });
9135
+ /**
9136
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9137
+ *
9138
+ * The values are not symmetric, and deliberately so — the absent value has to
9139
+ * mean exactly what every rule authored before this condition existed already
9140
+ * does:
9141
+ * - `enter` — entries and every NON-crossing record (movement state,
9142
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9143
+ * an operator who never asked for exits must not start receiving them.
9144
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9145
+ * fails closed, because "the car left the drive" is a question about a
9146
+ * boundary, not about a detection.
9147
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9148
+ *
9149
+ * A rule asking for a direction should normally also scope `zones`, which the
9150
+ * engine evaluates against the crossed zone as well as the current membership
9151
+ * (an exit's membership no longer contains the zone it just left).
9152
+ */
9153
+ var NcCrossingSchema = _enum([
9154
+ "enter",
9155
+ "exit",
9156
+ "any"
9157
+ ]);
9093
9158
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9094
9159
  var NcZoneConditionSchema = object({
9095
9160
  ids: array(string().min(1)).min(1),
@@ -9114,6 +9179,13 @@ var NcConditionsSchema = object({
9114
9179
  /** Veto zones — any hit fails the rule. */
9115
9180
  zonesExclude: array(string().min(1)).optional(),
9116
9181
  /**
9182
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9183
+ * and a closed track carries none, so a `track-end` rule asking for one
9184
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9185
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9186
+ */
9187
+ crossing: NcCrossingSchema.optional(),
9188
+ /**
9117
9189
  * Exact (case-insensitive) match on the record's collapsed `label`
9118
9190
  * (identity name / plate text / subclass).
9119
9191
  */
@@ -9248,17 +9320,85 @@ var NcRuleTargetSchema = object({
9248
9320
  * - `keyFrame` — the clean scene frame (no subject box).
9249
9321
  * - `none` — no attachment.
9250
9322
  */
9251
- var NcMediaPolicySchema = object({ attach: _enum([
9252
- "best",
9253
- "best-matching",
9254
- "keyFrame",
9255
- "none"
9256
- ]).default("best") });
9323
+ /**
9324
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9325
+ * conflate it with the selection strategy and betray the request: asking for
9326
+ * the clean scene frame on an object-event owner used to start at
9327
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9328
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9329
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9330
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9331
+ * the pipeline actually saw.
9332
+ */
9333
+ var NcMediaFrameSchema = _enum([
9334
+ "cropped",
9335
+ "full",
9336
+ "boxed"
9337
+ ]);
9338
+ var NcMediaPolicySchema = object({
9339
+ attach: _enum([
9340
+ "best",
9341
+ "best-matching",
9342
+ "keyFrame",
9343
+ "none"
9344
+ ]).default("best"),
9345
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9346
+ frame: NcMediaFrameSchema.optional(),
9347
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9348
+ * "show me the ZONE", not the whole scene or the subject crop. */
9349
+ zoneCrop: boolean().optional(),
9350
+ /**
9351
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9352
+ * event — NOT from the recording, so the camera does not have to be
9353
+ * recording, and the window sits AROUND the moment instead of a segment
9354
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9355
+ * gif, never a failed notification.
9356
+ */
9357
+ gif: boolean().optional(),
9358
+ /**
9359
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9360
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9361
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9362
+ * the degrade engine, which drops the video and keeps the still.
9363
+ */
9364
+ clip: boolean().optional(),
9365
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9366
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9367
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9368
+ /**
9369
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9370
+ * assigned profile: a notification is watched on a phone, so the 4K
9371
+ * rendition would burn CPU to produce a file the client downscales anyway.
9372
+ * A profile that is not assigned falls back to the cheapest, and the render
9373
+ * reports which one actually ran.
9374
+ */
9375
+ profile: CamProfileSchema.optional()
9376
+ });
9377
+ /**
9378
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9379
+ * notification suppresses.
9380
+ * - `shared` (default, and the absent value) — one window for the whole
9381
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9382
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9383
+ * at once and cat→cat still waits.
9384
+ *
9385
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9386
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9387
+ * see `cooldownKey` in the rule engine).
9388
+ */
9389
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9257
9390
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9258
9391
  var NcThrottleSchema = object({
9259
9392
  cooldownSec: number().int().min(0).max(86400).default(60),
9260
9393
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9261
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9394
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9395
+ /**
9396
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9397
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9398
+ * rule authored before this field simply carries none — and the engine
9399
+ * reads absent as `shared`, the pre-existing behaviour.
9400
+ */
9401
+ granularity: NcThrottleGranularitySchema.optional()
9262
9402
  });
9263
9403
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9264
9404
  var NcRuleInputSchema = object({
@@ -9267,7 +9407,19 @@ var NcRuleInputSchema = object({
9267
9407
  delivery: NcDeliverySchema,
9268
9408
  conditions: NcConditionsSchema.default({}),
9269
9409
  schedule: NcScheduleSchema.optional(),
9270
- targets: array(NcRuleTargetSchema).min(1),
9410
+ /** May be empty when `targetUsers` addresses at least one user — the
9411
+ * "at least one addressee" invariant is enforced by the provider, because
9412
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9413
+ targets: array(NcRuleTargetSchema),
9414
+ /**
9415
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9416
+ * time each user fans out to the personal targets they own
9417
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9418
+ * firing camera — a user is never notified about a device they cannot open.
9419
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9420
+ * targets.
9421
+ */
9422
+ targetUsers: array(string()).optional(),
9271
9423
  media: NcMediaPolicySchema.default({ attach: "best" }),
9272
9424
  throttle: NcThrottleSchema.default({
9273
9425
  cooldownSec: 60,
@@ -9354,6 +9506,7 @@ var NcConditionDescriptorSchema = object({
9354
9506
  "schedule",
9355
9507
  "plateMatcher",
9356
9508
  "packagePhase",
9509
+ "crossingSelect",
9357
9510
  "polygonDraw",
9358
9511
  "occupancy"
9359
9512
  ]),
@@ -9480,7 +9633,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9480
9633
  }), object({ results: array(NcTestResultSchema) }), {
9481
9634
  kind: "mutation",
9482
9635
  auth: "admin"
9483
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9636
+ }), method(object({}), object({
9637
+ catalog: array(NcConditionDescriptorSchema),
9638
+ taxonomy: NcTaxonomySchema.optional()
9639
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9484
9640
  /**
9485
9641
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9486
9642
  *
@@ -10217,6 +10373,28 @@ method(object({
10217
10373
  }), object({ success: literal(true) }), {
10218
10374
  kind: "mutation",
10219
10375
  auth: "admin"
10376
+ }), method(object({
10377
+ deviceId: number(),
10378
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10379
+ * watched on a phone, and the cheap rendition is the right default. */
10380
+ profile: CamProfileSchema.optional(),
10381
+ aroundMs: number(),
10382
+ preRollSec: number().min(0).max(20).default(3),
10383
+ postRollSec: number().min(0).max(20).default(5),
10384
+ format: _enum(["gif", "mp4"]).default("gif"),
10385
+ maxWidth: number().int().min(120).max(1920).default(480),
10386
+ /** GIF only — MP4 keeps the source cadence. */
10387
+ fps: number().int().min(1).max(15).default(5)
10388
+ }), object({
10389
+ base64: string(),
10390
+ mime: string(),
10391
+ bytes: number().int(),
10392
+ /** The profile actually rendered (what the default resolved to). */
10393
+ profile: CamProfileSchema,
10394
+ durationMs: number()
10395
+ }), {
10396
+ kind: "mutation",
10397
+ auth: "admin"
10220
10398
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10221
10399
  probed: boolean(),
10222
10400
  summary: string()
@@ -15845,7 +16023,10 @@ method(object({
15845
16023
  }), method(object({
15846
16024
  deviceId: number(),
15847
16025
  caps: array(string()).readonly().optional()
15848
- }), record(string(), unknown().nullable()));
16026
+ }), record(string(), unknown().nullable())), method(object({
16027
+ deviceIds: array(number()).readonly(),
16028
+ caps: array(string()).readonly().optional()
16029
+ }), record(string(), record(string(), unknown().nullable())));
15849
16030
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
15850
16031
  deviceId: number(),
15851
16032
  capName: string()
@@ -16782,6 +16963,36 @@ var TargetKindSchema = object({
16782
16963
  icon: string(),
16783
16964
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
16784
16965
  addonId: string(),
16966
+ /**
16967
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
16968
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
16969
+ * when the addon bundles no icon for that kind — the client then falls back
16970
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
16971
+ *
16972
+ * Root-relative on purpose: it resolves against whatever origin serves a web
16973
+ * client, and a native client joins it onto its own hub base.
16974
+ *
16975
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
16976
+ * field that survived only because the runtime cap-router forwards provider
16977
+ * output verbatim — so every consumer had to re-declare it by hand to stop
16978
+ * its own Zod parse from stripping it, and the whole arrangement would have
16979
+ * broken silently the moment output validation was tightened anywhere.
16980
+ */
16981
+ iconUrl: string().optional(),
16982
+ /**
16983
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
16984
+ *
16985
+ * The server knows this and therefore says it, because the client cannot
16986
+ * safely guess: a React-Native client renders SVG and raster through two
16987
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
16988
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
16989
+ * placeholder glyph for every vector icon while the web build looked fine.
16990
+ *
16991
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
16992
+ * not been updated — a client that cannot determine the type should prefer
16993
+ * its raster path, which is the safe default for an unknown image.
16994
+ */
16995
+ iconMediaType: string().optional(),
16785
16996
  configSchema: ConfigSchemaPassthrough,
16786
16997
  supportsDiscovery: boolean(),
16787
16998
  caps: TargetKindCapsSchema
@@ -17229,6 +17440,29 @@ var MotionEventSchema = object({
17229
17440
  * Absent on legacy rows ⇒ treat as `pipeline`.
17230
17441
  */
17231
17442
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
17443
+ /**
17444
+ * The confirmed zone crossing that produced an object event. Present ONLY on
17445
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
17446
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
17447
+ * appearance event carry none, so a rule asking for a direction fails closed
17448
+ * on them.
17449
+ *
17450
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
17451
+ * into its own event, so a frame in which a track enters A while leaving B
17452
+ * produces two events with two directions — never one ambiguous row.
17453
+ *
17454
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
17455
+ * membership the box has NOW, and by definition it no longer contains the zone
17456
+ * that was just left. Without the id here, a zone-scoped rule could never match
17457
+ * the exit it asked for.
17458
+ */
17459
+ var ZoneCrossingSchema = object({
17460
+ direction: _enum(["enter", "exit"]),
17461
+ /** Admin zone id crossed. */
17462
+ zoneId: string(),
17463
+ /** Zone display name at crossing time (falls back to the id). */
17464
+ zoneName: string().optional()
17465
+ });
17232
17466
  var ObjectEventSchema = object({
17233
17467
  ...BaseEventFields,
17234
17468
  kind: literal("object"),
@@ -17255,6 +17489,12 @@ var ObjectEventSchema = object({
17255
17489
  zones: array(string()).readonly().optional(),
17256
17490
  /** Omitted in slim projection. */
17257
17491
  state: TrackStateSchema.optional(),
17492
+ /**
17493
+ * The zone crossing this event IS, when it is one. Absent on every other
17494
+ * event kind (movement state, appearance, package) — see
17495
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
17496
+ */
17497
+ zoneCrossing: ZoneCrossingSchema.optional(),
17258
17498
  /** Detection-frame dimensions in pixels — let consumers normalize the
17259
17499
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
17260
17500
  frameWidth: number().optional(),
@@ -17513,6 +17753,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17513
17753
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
17514
17754
  kind: "mutation",
17515
17755
  auth: "admin"
17756
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
17757
+ kind: "mutation",
17758
+ auth: "admin"
17759
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
17760
+ kind: "query",
17761
+ auth: "admin"
17762
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
17763
+ kind: "mutation",
17764
+ auth: "admin"
17516
17765
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17517
17766
  kind: "query",
17518
17767
  auth: "admin"
@@ -19992,6 +20241,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
19992
20241
  */
19993
20242
  priority: number()
19994
20243
  })).readonly() });
20244
+ /**
20245
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20246
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20247
+ * what AUTO currently picks, so the UI can show the effective value either way.
20248
+ */
20249
+ var NotificationEndpointSchema = object({
20250
+ /** The operator's explicit choice, or null for AUTO. */
20251
+ baseUrl: string().nullable(),
20252
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20253
+ resolved: string().nullable()
20254
+ });
19995
20255
  var AllowedAddressesSchema = object({
19996
20256
  /**
19997
20257
  * Allowlist of interface addresses operators have explicitly opted
@@ -20014,7 +20274,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20014
20274
  * to avoid mixed-content blocks in the browser. The public
20015
20275
  * tunnel always emits `https://` regardless. */
20016
20276
  scheme: _enum(["http", "https"]).optional()
20017
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20277
+ }), 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" });
20018
20278
  /**
20019
20279
  * mesh-network — collection cap for mesh-VPN providers.
20020
20280
  *
@@ -20813,7 +21073,12 @@ var RecordingDeviceUsageSchema = object({
20813
21073
  var RecordingLocationUsageSchema = object({
20814
21074
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
20815
21075
  locationId: string().nullable(),
20816
- /** Bytes of recordings stored on this location. */
21076
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21077
+ * is emitted per physical disk (2026-07-29): two locations on one root
21078
+ * previously rendered as two identical "disks" with a nonsensical used
21079
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21080
+ locationIds: array(string()).optional(),
21081
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
20817
21082
  usedBytes: number(),
20818
21083
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
20819
21084
  availableBytes: number().nullable(),
@@ -20925,6 +21190,44 @@ method(object({
20925
21190
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20926
21191
  kind: "query",
20927
21192
  auth: "admin"
21193
+ }), method(object({
21194
+ deviceId: number(),
21195
+ aroundMs: number(),
21196
+ preRollSec: number().min(0).max(30).default(2),
21197
+ postRollSec: number().min(0).max(30).default(5),
21198
+ maxWidth: number().int().min(120).max(1280).default(480),
21199
+ fps: number().int().min(1).max(15).default(5)
21200
+ }), object({
21201
+ gifBase64: string(),
21202
+ fromMs: number(),
21203
+ toMs: number()
21204
+ }), {
21205
+ kind: "mutation",
21206
+ auth: "admin"
21207
+ }), method(object({
21208
+ deviceId: number(),
21209
+ aroundMs: number(),
21210
+ preRollSec: number().min(0).max(30).default(3),
21211
+ postRollSec: number().min(0).max(30).default(7),
21212
+ maxWidth: number().int().min(160).max(1920).default(640)
21213
+ }), object({
21214
+ clipBase64: string(),
21215
+ mime: string(),
21216
+ fromMs: number(),
21217
+ toMs: number(),
21218
+ bytes: number().int()
21219
+ }), {
21220
+ kind: "mutation",
21221
+ auth: "admin"
21222
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21223
+ kind: "mutation",
21224
+ auth: "admin"
21225
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21226
+ kind: "query",
21227
+ auth: "admin"
21228
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21229
+ kind: "mutation",
21230
+ auth: "admin"
20928
21231
  });
20929
21232
  /**
20930
21233
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22516,6 +22819,12 @@ Object.freeze({
22516
22819
  addonId: null,
22517
22820
  access: "view"
22518
22821
  },
22822
+ "deviceManager.getDeviceStatusAggregateBatch": {
22823
+ capName: "device-manager",
22824
+ capScope: "system",
22825
+ addonId: null,
22826
+ access: "view"
22827
+ },
22519
22828
  "deviceManager.getLinkedDevices": {
22520
22829
  capName: "device-manager",
22521
22830
  capScope: "system",
@@ -23410,6 +23719,12 @@ Object.freeze({
23410
23719
  addonId: null,
23411
23720
  access: "view"
23412
23721
  },
23722
+ "localNetwork.getNotificationEndpoint": {
23723
+ capName: "local-network",
23724
+ capScope: "system",
23725
+ addonId: null,
23726
+ access: "view"
23727
+ },
23413
23728
  "localNetwork.getPreferred": {
23414
23729
  capName: "local-network",
23415
23730
  capScope: "system",
@@ -23434,6 +23749,12 @@ Object.freeze({
23434
23749
  addonId: null,
23435
23750
  access: "create"
23436
23751
  },
23752
+ "localNetwork.setNotificationEndpoint": {
23753
+ capName: "local-network",
23754
+ capScope: "system",
23755
+ addonId: null,
23756
+ access: "create"
23757
+ },
23437
23758
  "lockControl.lock": {
23438
23759
  capName: "lock-control",
23439
23760
  capScope: "device",
@@ -24076,6 +24397,12 @@ Object.freeze({
24076
24397
  addonId: null,
24077
24398
  access: "create"
24078
24399
  },
24400
+ "pipelineAnalytics.cancelMediaRelocate": {
24401
+ capName: "pipeline-analytics",
24402
+ capScope: "device",
24403
+ addonId: null,
24404
+ access: "create"
24405
+ },
24079
24406
  "pipelineAnalytics.clearTracks": {
24080
24407
  capName: "pipeline-analytics",
24081
24408
  capScope: "device",
@@ -24130,6 +24457,12 @@ Object.freeze({
24130
24457
  addonId: null,
24131
24458
  access: "view"
24132
24459
  },
24460
+ "pipelineAnalytics.getMediaRelocateStatus": {
24461
+ capName: "pipeline-analytics",
24462
+ capScope: "device",
24463
+ addonId: null,
24464
+ access: "view"
24465
+ },
24133
24466
  "pipelineAnalytics.getMotionEvents": {
24134
24467
  capName: "pipeline-analytics",
24135
24468
  capScope: "device",
@@ -24202,6 +24535,12 @@ Object.freeze({
24202
24535
  addonId: null,
24203
24536
  access: "create"
24204
24537
  },
24538
+ "pipelineAnalytics.relocateMedia": {
24539
+ capName: "pipeline-analytics",
24540
+ capScope: "device",
24541
+ addonId: null,
24542
+ access: "create"
24543
+ },
24205
24544
  "pipelineAnalytics.searchObjectEvents": {
24206
24545
  capName: "pipeline-analytics",
24207
24546
  capScope: "device",
@@ -24964,6 +25303,12 @@ Object.freeze({
24964
25303
  addonId: null,
24965
25304
  access: "create"
24966
25305
  },
25306
+ "recording.cancelRelocate": {
25307
+ capName: "recording",
25308
+ capScope: "system",
25309
+ addonId: null,
25310
+ access: "create"
25311
+ },
24967
25312
  "recording.deleteFootprint": {
24968
25313
  capName: "recording",
24969
25314
  capScope: "system",
@@ -24994,6 +25339,12 @@ Object.freeze({
24994
25339
  addonId: null,
24995
25340
  access: "view"
24996
25341
  },
25342
+ "recording.getRelocateStatus": {
25343
+ capName: "recording",
25344
+ capScope: "system",
25345
+ addonId: null,
25346
+ access: "view"
25347
+ },
24997
25348
  "recording.getStorageUsage": {
24998
25349
  capName: "recording",
24999
25350
  capScope: "system",
@@ -25024,6 +25375,24 @@ Object.freeze({
25024
25375
  addonId: null,
25025
25376
  access: "view"
25026
25377
  },
25378
+ "recording.relocateFootage": {
25379
+ capName: "recording",
25380
+ capScope: "system",
25381
+ addonId: null,
25382
+ access: "create"
25383
+ },
25384
+ "recording.renderClip": {
25385
+ capName: "recording",
25386
+ capScope: "system",
25387
+ addonId: null,
25388
+ access: "create"
25389
+ },
25390
+ "recording.renderGif": {
25391
+ capName: "recording",
25392
+ capScope: "system",
25393
+ addonId: null,
25394
+ access: "create"
25395
+ },
25027
25396
  "recording.rescanStorage": {
25028
25397
  capName: "recording",
25029
25398
  capScope: "system",
@@ -25618,6 +25987,12 @@ Object.freeze({
25618
25987
  addonId: null,
25619
25988
  access: "create"
25620
25989
  },
25990
+ "streamBroker.renderPreBufferClip": {
25991
+ capName: "stream-broker",
25992
+ capScope: "system",
25993
+ addonId: null,
25994
+ access: "create"
25995
+ },
25621
25996
  "streamBroker.restartProfile": {
25622
25997
  capName: "stream-broker",
25623
25998
  capScope: "system",