@camstack/addon-post-analysis 1.2.16 → 1.2.18

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.
@@ -7265,35 +7265,22 @@ var EVENT_PAD_MS = {
7265
7265
  */
7266
7266
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7267
7267
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7268
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7269
- kind: literal("timeOfDay"),
7270
- start: string().regex(HHMM),
7271
- end: string().regex(HHMM),
7272
- /** Restrict to these weekdays; omit = every day. */
7273
- days: array(RecordingWeekdaySchema).optional()
7274
- })]);
7275
- var RecordingModeSchema = _enum([
7276
- "continuous",
7277
- "onMotion",
7278
- "onAudioThreshold"
7279
- ]);
7280
7268
  /**
7281
- * First-class, authoritative per-camera storage mode — the explicit choice the
7282
- * UI reads directly (never inferred from `rules`):
7283
- * - `off` — not recording.
7284
- * - `events` — record only around triggers (motion / audio threshold),
7285
- * with pre/post-buffer.
7286
- * - `continuous` — record 24/7 within the schedule.
7269
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7270
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7271
+ * - `off` — no band covers the camera (or it is disabled).
7272
+ * - `events` — every band records around triggers only.
7273
+ * - `continuous` — at least one band records continuously.
7287
7274
  *
7288
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7289
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7275
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7276
+ * every save (`activeModeForConfig`). Writing it has no effect.
7290
7277
  */
7291
7278
  var RecordingStorageModeSchema = _enum([
7292
7279
  "off",
7293
7280
  "events",
7294
7281
  "continuous"
7295
7282
  ]);
7296
- /** Which detectors trigger an `events`-mode recording. */
7283
+ /** Which detectors trigger an `events`-mode band. */
7297
7284
  var RecordingTriggersSchema = object({
7298
7285
  motion: boolean().optional(),
7299
7286
  audioThresholdDbfs: number().optional()
@@ -7329,18 +7316,6 @@ var RecordingBandSchema = object({
7329
7316
  preBufferSec: number().min(0).optional(),
7330
7317
  postBufferSec: number().min(0).optional()
7331
7318
  });
7332
- var RecordingRuleSchema = object({
7333
- schedule: RecordingScheduleSchema,
7334
- mode: RecordingModeSchema,
7335
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7336
- preBufferSec: number().min(0).default(0),
7337
- /** Keep recording until this many seconds after the last trigger. */
7338
- postBufferSec: number().min(0).default(0),
7339
- /** Each new trigger restarts the post-buffer window. */
7340
- resetTimeoutOnNewEvent: boolean().default(true),
7341
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7342
- thresholdDbfs: number().optional()
7343
- });
7344
7319
  /**
7345
7320
  * Per-device retention overrides. Every field is optional; an unset or `0`
7346
7321
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7374,40 +7349,28 @@ var ScrubThumbnailPresetSchema = _enum([
7374
7349
  /**
7375
7350
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7376
7351
  *
7377
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7378
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7379
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7380
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7352
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7353
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7354
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7355
+ *
7356
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7357
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7358
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7359
+ * persist a band-less config, i.e. silently stop recording the camera.
7381
7360
  */
7382
7361
  var RecordingConfigSchema = object({
7383
7362
  enabled: boolean(),
7384
- /** Authoritative storage mode. Absent on legacy targets derived once via
7385
- * `migrateRulesToMode`, then persisted. */
7363
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7364
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7386
7365
  mode: RecordingStorageModeSchema.optional(),
7387
7366
  profiles: array(CamProfileSchema).optional(),
7388
7367
  segmentSeconds: number().int().positive().optional(),
7389
- /** Shared recording time-bands for `events` & `continuous` — record only when
7390
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7391
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7392
- schedules: array(RecordingScheduleSchema).optional(),
7393
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7394
- * normalized into `schedules` on read and never written going forward. (Not
7395
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7396
- schedule: RecordingScheduleSchema.optional(),
7397
- /** `events`-mode only — which detectors trigger a recording. */
7398
- triggers: RecordingTriggersSchema.optional(),
7399
- /** `events`-mode only — seconds retained before / after a trigger. */
7400
- preBufferSec: number().min(0).optional(),
7401
- postBufferSec: number().min(0).optional(),
7402
- /** DEPRECATED authoring input; retained for migration/transition. */
7403
- rules: array(RecordingRuleSchema).optional(),
7404
- /**
7405
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7406
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7407
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7408
- * derived into bands once via `migrateConfigToBands`.
7368
+ /**
7369
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7370
+ * the recorder's band engine consumes. An empty array = record nothing;
7371
+ * "off" is the absence of a covering band, never a band value.
7409
7372
  */
7410
- bands: array(RecordingBandSchema).optional(),
7373
+ bands: array(RecordingBandSchema).default([]),
7411
7374
  retention: RecordingRetentionSchema.optional(),
7412
7375
  /**
7413
7376
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7415,8 +7378,15 @@ var RecordingConfigSchema = object({
7415
7378
  * windows only — existing sheets are immutable, and each window's index
7416
7379
  * carries its own tile dims so mixed-preset history renders correctly.
7417
7380
  */
7418
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7419
- });
7381
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7382
+ /**
7383
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7384
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7385
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7386
+ * are written and scrub reads exact keyframes at every velocity.
7387
+ */
7388
+ stripsEnabled: boolean().optional()
7389
+ }).strict();
7420
7390
  /**
7421
7391
  * Ops-log — the durable, append-only operations audit shared by the
7422
7392
  * recordings and events management surfaces.
@@ -7435,7 +7405,8 @@ var OpsLogOpSchema = _enum([
7435
7405
  "prune",
7436
7406
  "manual-delete",
7437
7407
  "rescan",
7438
- "retention-run"
7408
+ "retention-run",
7409
+ "relocate"
7439
7410
  ]);
7440
7411
  /** Why the operation ran. */
7441
7412
  var OpsLogReasonSchema = _enum([
@@ -7474,6 +7445,55 @@ var OpsLogQueryInputSchema = object({
7474
7445
  limit: number().int().min(1).max(1e3).optional()
7475
7446
  });
7476
7447
  /**
7448
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7449
+ *
7450
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7451
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7452
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7453
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7454
+ * after verify) and each completed/failed run also lands one durable ops-log
7455
+ * row on the owning addon's surface.
7456
+ */
7457
+ var RelocateJobStateSchema = _enum([
7458
+ "running",
7459
+ "done",
7460
+ "failed",
7461
+ "cancelled"
7462
+ ]);
7463
+ var RelocateJobSchema = object({
7464
+ jobId: string(),
7465
+ state: RelocateJobStateSchema,
7466
+ /** Source location — for media relocation this is informational ('*': rows
7467
+ * move from wherever they are to the target). */
7468
+ fromLocationId: string(),
7469
+ toLocationId: string(),
7470
+ /** Scoped device, or null = every device. */
7471
+ deviceId: number().nullable(),
7472
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7473
+ entities: array(string()),
7474
+ filesMoved: number().int(),
7475
+ bytesMoved: number().int(),
7476
+ /** Total files discovered up front; null while (or when) unknown. */
7477
+ filesTotal: number().int().nullable(),
7478
+ startedAt: number(),
7479
+ finishedAt: number().nullable(),
7480
+ error: string().nullable()
7481
+ });
7482
+ var RelocateFootageInputSchema = object({
7483
+ deviceId: number().optional(),
7484
+ fromLocationId: string(),
7485
+ toLocationId: string(),
7486
+ entities: array(_enum(["segments", "strips"])).optional(),
7487
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7488
+ * never allowed to starve live writers. */
7489
+ throttleMbps: number().min(1).max(1e3).optional()
7490
+ });
7491
+ var RelocateMediaInputSchema = object({
7492
+ deviceId: number().optional(),
7493
+ toLocationId: string(),
7494
+ throttleMbps: number().min(1).max(1e3).optional()
7495
+ });
7496
+ /**
7477
7497
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7478
7498
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7479
7499
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7523,6 +7543,13 @@ var StorageLocationSchema = object({
7523
7543
  nodeId: string().optional(),
7524
7544
  isDefault: boolean().default(false),
7525
7545
  isSystem: boolean().default(false),
7546
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7547
+ * for node-local locations it can reach) — never persisted, absent when the
7548
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7549
+ capacity: object({
7550
+ totalBytes: number(),
7551
+ availableBytes: number()
7552
+ }).nullable().optional(),
7526
7553
  createdAt: number(),
7527
7554
  updatedAt: number()
7528
7555
  });
@@ -7584,16 +7611,23 @@ var StorageLocationDeclarationSchema = object({
7584
7611
  * Which node root the seeded `<id>:default` instance is placed under on a
7585
7612
  * FRESH install:
7586
7613
  * - `'data'` (default) — the node's data dir (`CAMSTACK_DATA` / boot dir),
7587
- * the appData volume. Right for small/durable data (backups, logs, models).
7614
+ * the appData volume. Right for small/durable data (logs, models).
7588
7615
  * - `'media'` — the dedicated media volume (`CAMSTACK_MEDIA_ROOT`) when that
7589
7616
  * env is set, else falls back to the data root. Right for bulky, hot media
7590
7617
  * (recordings, event media) that should stay off the appData disk.
7618
+ * - `'backup'` — the dedicated backup volume (`CAMSTACK_BACKUP_ROOT`, default
7619
+ * `/backups` in the image) so archives live on their own mount rather than
7620
+ * filling the appData disk. Falls back to the data root when unset.
7591
7621
  *
7592
7622
  * Only affects the seeded default's `basePath`; operators can repoint any
7593
7623
  * location afterwards, and a `defaultsTo` slot inherits its parent's root
7594
7624
  * regardless of this field. Absent (the common case) is treated as `'data'`.
7595
7625
  */
7596
- defaultRoot: _enum(["data", "media"]).optional()
7626
+ defaultRoot: _enum([
7627
+ "data",
7628
+ "media",
7629
+ "backup"
7630
+ ]).optional()
7597
7631
  });
7598
7632
  var DecoderStatsSchema = object({
7599
7633
  inputFps: number(),
@@ -8988,6 +9022,7 @@ var AccessoryKind = {
8988
9022
  };
8989
9023
  AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
8990
9024
  DeviceFeature.BatteryOperated;
9025
+ new Set(["devices", "classes"]);
8991
9026
  /**
8992
9027
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
8993
9028
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9304,12 +9339,60 @@ var NcRuleTargetSchema = object({
9304
9339
  * - `keyFrame` — the clean scene frame (no subject box).
9305
9340
  * - `none` — no attachment.
9306
9341
  */
9307
- var NcMediaPolicySchema = object({ attach: _enum([
9308
- "best",
9309
- "best-matching",
9310
- "keyFrame",
9311
- "none"
9312
- ]).default("best") });
9342
+ /**
9343
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9344
+ * conflate it with the selection strategy and betray the request: asking for
9345
+ * the clean scene frame on an object-event owner used to start at
9346
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9347
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9348
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9349
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9350
+ * the pipeline actually saw.
9351
+ */
9352
+ var NcMediaFrameSchema = _enum([
9353
+ "cropped",
9354
+ "full",
9355
+ "boxed"
9356
+ ]);
9357
+ var NcMediaPolicySchema = object({
9358
+ attach: _enum([
9359
+ "best",
9360
+ "best-matching",
9361
+ "keyFrame",
9362
+ "none"
9363
+ ]).default("best"),
9364
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9365
+ frame: NcMediaFrameSchema.optional(),
9366
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9367
+ * "show me the ZONE", not the whole scene or the subject crop. */
9368
+ zoneCrop: boolean().optional(),
9369
+ /**
9370
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9371
+ * event — NOT from the recording, so the camera does not have to be
9372
+ * recording, and the window sits AROUND the moment instead of a segment
9373
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9374
+ * gif, never a failed notification.
9375
+ */
9376
+ gif: boolean().optional(),
9377
+ /**
9378
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9379
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9380
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9381
+ * the degrade engine, which drops the video and keeps the still.
9382
+ */
9383
+ clip: boolean().optional(),
9384
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9385
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9386
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9387
+ /**
9388
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9389
+ * assigned profile: a notification is watched on a phone, so the 4K
9390
+ * rendition would burn CPU to produce a file the client downscales anyway.
9391
+ * A profile that is not assigned falls back to the cheapest, and the render
9392
+ * reports which one actually ran.
9393
+ */
9394
+ profile: CamProfileSchema.optional()
9395
+ });
9313
9396
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9314
9397
  var NcThrottleSchema = object({
9315
9398
  cooldownSec: number().int().min(0).max(86400).default(60),
@@ -9323,7 +9406,19 @@ var NcRuleInputSchema = object({
9323
9406
  delivery: NcDeliverySchema,
9324
9407
  conditions: NcConditionsSchema.default({}),
9325
9408
  schedule: NcScheduleSchema.optional(),
9326
- targets: array(NcRuleTargetSchema).min(1),
9409
+ /** May be empty when `targetUsers` addresses at least one user — the
9410
+ * "at least one addressee" invariant is enforced by the provider, because
9411
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9412
+ targets: array(NcRuleTargetSchema),
9413
+ /**
9414
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9415
+ * time each user fans out to the personal targets they own
9416
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9417
+ * firing camera — a user is never notified about a device they cannot open.
9418
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9419
+ * targets.
9420
+ */
9421
+ targetUsers: array(string()).optional(),
9327
9422
  media: NcMediaPolicySchema.default({ attach: "best" }),
9328
9423
  throttle: NcThrottleSchema.default({
9329
9424
  cooldownSec: 60,
@@ -9795,7 +9890,20 @@ var notificationRulesCapability = {
9795
9890
  kind: "mutation",
9796
9891
  auth: "admin"
9797
9892
  }),
9798
- getConditionCatalog: method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })),
9893
+ /**
9894
+ * The machine-readable condition surface a rule editor renders from, plus
9895
+ * the picker VOCABULARY those conditions draw on.
9896
+ *
9897
+ * `taxonomy` is optional so an older provider that only returns `catalog`
9898
+ * still validates; a client that receives none keeps free-text inputs.
9899
+ * It was previously served ONLY on the `nc.getConditionCatalog` bridge
9900
+ * action, which is why the viewer had grouped pickers and the admin UI —
9901
+ * which reaches this cap — was stuck typing `person` from memory.
9902
+ */
9903
+ getConditionCatalog: method(object({}), object({
9904
+ catalog: array(NcConditionDescriptorSchema),
9905
+ taxonomy: NcTaxonomySchema.optional()
9906
+ })),
9799
9907
  /**
9800
9908
  * Queryable delivery history — a read-only view over the durable outbox
9801
9909
  * (fired rule, subject summary, target, status, timestamps, error on a
@@ -9879,7 +9987,8 @@ object({
9879
9987
  template: TimelapseTemplateSchema.nullable().optional(),
9880
9988
  priority: PriorityField.optional()
9881
9989
  });
9882
- TimelapseRuleInputSchema.extend({
9990
+ /** A persisted timelapse rule. */
9991
+ var TimelapseRuleSchema = TimelapseRuleInputSchema.extend({
9883
9992
  id: string(),
9884
9993
  /**
9885
9994
  * Ownership/visibility key. Absent = admin/global rule (visible to all).
@@ -10573,6 +10682,28 @@ method(object({
10573
10682
  }), object({ success: literal(true) }), {
10574
10683
  kind: "mutation",
10575
10684
  auth: "admin"
10685
+ }), method(object({
10686
+ deviceId: number(),
10687
+ /** Absent = the LOWEST assigned profile — a notification attachment is
10688
+ * watched on a phone, and the cheap rendition is the right default. */
10689
+ profile: CamProfileSchema.optional(),
10690
+ aroundMs: number(),
10691
+ preRollSec: number().min(0).max(20).default(3),
10692
+ postRollSec: number().min(0).max(20).default(5),
10693
+ format: _enum(["gif", "mp4"]).default("gif"),
10694
+ maxWidth: number().int().min(120).max(1920).default(480),
10695
+ /** GIF only — MP4 keeps the source cadence. */
10696
+ fps: number().int().min(1).max(15).default(5)
10697
+ }), object({
10698
+ base64: string(),
10699
+ mime: string(),
10700
+ bytes: number().int(),
10701
+ /** The profile actually rendered (what the default resolved to). */
10702
+ profile: CamProfileSchema,
10703
+ durationMs: number()
10704
+ }), {
10705
+ kind: "mutation",
10706
+ auth: "admin"
10576
10707
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10577
10708
  probed: boolean(),
10578
10709
  summary: string()
@@ -14978,11 +15109,53 @@ var LocationStatSchema = object({
14978
15109
  fileCount: number(),
14979
15110
  present: boolean()
14980
15111
  });
15112
+ /**
15113
+ * A backup schedule — the N:M "entry" that binds one cron cadence to a
15114
+ * SET of destination locations. Supersedes the per-location cron on
15115
+ * `BackupDestinationPolicy`: an operator creates a schedule, picks the
15116
+ * `backups` locations it should write to, and the orchestrator fans a
15117
+ * single archive out to all of them when the cron fires.
15118
+ *
15119
+ * `retentionCount` is per-schedule (D-decision 2026-07-28): every
15120
+ * location targeted by this schedule keeps this many archives from
15121
+ * this schedule's runs.
15122
+ *
15123
+ * `dataSources` optionally narrows which top-level state locations
15124
+ * (db, addons, tls, …) are archived; omitted = the orchestrator's
15125
+ * default full set.
15126
+ */
15127
+ var BackupScheduleSchema = object({
15128
+ /** Stable id. Generated by the orchestrator on first upsert if absent. */
15129
+ id: string(),
15130
+ /** Operator-facing display name. */
15131
+ label: string(),
15132
+ /** 5-field POSIX cron. Empty = disabled cadence (kept for editing). */
15133
+ cron: string(),
15134
+ /** Master on/off toggle for the whole schedule. */
15135
+ enabled: boolean(),
15136
+ /** `backups`-location ids this schedule writes to (fan-out set). */
15137
+ locationIds: array(string()).readonly(),
15138
+ /** Archives kept per targeted location for this schedule. */
15139
+ retentionCount: number().int().min(1).max(1e3),
15140
+ /** Optional subset of source locations to include; omitted = all. */
15141
+ dataSources: array(string()).readonly().optional(),
15142
+ /** ms-epoch of last successful run. */
15143
+ lastRunAt: number().optional(),
15144
+ /** ms-epoch of next computed firing (read-only, filled on list). */
15145
+ nextRunAt: number().optional()
15146
+ });
14981
15147
  method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }), method(object({
14982
15148
  /** Subset of registered `backup-destination` addon ids to write to. */
14983
15149
  destinations: array(string()).optional(),
14984
15150
  locations: array(string()).optional(),
14985
- label: string().optional()
15151
+ label: string().optional(),
15152
+ /**
15153
+ * Per-run retention override applied to every targeted
15154
+ * destination. Used by schedule-driven runs (per-entry
15155
+ * retention). Omitted = each destination's own policy
15156
+ * retention (manual runs).
15157
+ */
15158
+ retentionCount: number().int().min(1).max(1e3).optional()
14986
15159
  }).optional(), array(BackupEntrySchema).readonly(), {
14987
15160
  kind: "mutation",
14988
15161
  auth: "admin"
@@ -15031,7 +15204,21 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
15031
15204
  ok: boolean(),
15032
15205
  error: string().optional(),
15033
15206
  nextRuns: array(number()).readonly()
15034
- }));
15207
+ })), method(_void(), array(BackupScheduleSchema).readonly(), { auth: "admin" }), method(object({
15208
+ id: string().optional(),
15209
+ label: string(),
15210
+ cron: string(),
15211
+ enabled: boolean(),
15212
+ locationIds: array(string()).readonly(),
15213
+ retentionCount: number().int().min(1).max(1e3),
15214
+ dataSources: array(string()).readonly().optional()
15215
+ }), BackupScheduleSchema, {
15216
+ kind: "mutation",
15217
+ auth: "admin"
15218
+ }), method(object({ id: string() }), _void(), {
15219
+ kind: "mutation",
15220
+ auth: "admin"
15221
+ });
15035
15222
  /**
15036
15223
  * `broker` — unified pub/sub broker registry, system-scoped collection.
15037
15224
  *
@@ -17129,6 +17316,36 @@ var TargetKindSchema = object({
17129
17316
  icon: string(),
17130
17317
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
17131
17318
  addonId: string(),
17319
+ /**
17320
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
17321
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
17322
+ * when the addon bundles no icon for that kind — the client then falls back
17323
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
17324
+ *
17325
+ * Root-relative on purpose: it resolves against whatever origin serves a web
17326
+ * client, and a native client joins it onto its own hub base.
17327
+ *
17328
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
17329
+ * field that survived only because the runtime cap-router forwards provider
17330
+ * output verbatim — so every consumer had to re-declare it by hand to stop
17331
+ * its own Zod parse from stripping it, and the whole arrangement would have
17332
+ * broken silently the moment output validation was tightened anywhere.
17333
+ */
17334
+ iconUrl: string().optional(),
17335
+ /**
17336
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
17337
+ *
17338
+ * The server knows this and therefore says it, because the client cannot
17339
+ * safely guess: a React-Native client renders SVG and raster through two
17340
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
17341
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
17342
+ * placeholder glyph for every vector icon while the web build looked fine.
17343
+ *
17344
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
17345
+ * not been updated — a client that cannot determine the type should prefer
17346
+ * its raster path, which is the safe default for an unknown image.
17347
+ */
17348
+ iconMediaType: string().optional(),
17132
17349
  configSchema: ConfigSchemaPassthrough,
17133
17350
  supportsDiscovery: boolean(),
17134
17351
  caps: TargetKindCapsSchema
@@ -17981,6 +18198,23 @@ var pipelineAnalyticsCapability = {
17981
18198
  }),
17982
18199
  /** The events ops-log rows (newest-first), optionally scoped to one camera.
17983
18200
  * Backed by a declared pipeline-analytics SQLite collection. */
18201
+ /**
18202
+ * Move event-media blobs onto `toLocationId` (entity-routing spec Phase
18203
+ * 4): per-row copy → stamp row.locationId → delete old blob. Rows already
18204
+ * at the target are skipped, so a re-run resumes. Single-flight.
18205
+ */
18206
+ relocateMedia: method(RelocateMediaInputSchema, object({ jobId: string() }), {
18207
+ kind: "mutation",
18208
+ auth: "admin"
18209
+ }),
18210
+ getMediaRelocateStatus: method(object({}), array(RelocateJobSchema).readonly(), {
18211
+ kind: "query",
18212
+ auth: "admin"
18213
+ }),
18214
+ cancelMediaRelocate: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
18215
+ kind: "mutation",
18216
+ auth: "admin"
18217
+ }),
17984
18218
  listOpsLog: method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
17985
18219
  kind: "query",
17986
18220
  auth: "admin"
@@ -20560,6 +20794,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
20560
20794
  */
20561
20795
  priority: number()
20562
20796
  })).readonly() });
20797
+ /**
20798
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
20799
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
20800
+ * what AUTO currently picks, so the UI can show the effective value either way.
20801
+ */
20802
+ var NotificationEndpointSchema = object({
20803
+ /** The operator's explicit choice, or null for AUTO. */
20804
+ baseUrl: string().nullable(),
20805
+ /** What the ranking currently resolves to (null when nothing is reachable). */
20806
+ resolved: string().nullable()
20807
+ });
20563
20808
  var AllowedAddressesSchema = object({
20564
20809
  /**
20565
20810
  * Allowlist of interface addresses operators have explicitly opted
@@ -20582,7 +20827,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
20582
20827
  * to avoid mixed-content blocks in the browser. The public
20583
20828
  * tunnel always emits `https://` regardless. */
20584
20829
  scheme: _enum(["http", "https"]).optional()
20585
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
20830
+ }), 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" });
20586
20831
  /**
20587
20832
  * mesh-network — collection cap for mesh-VPN providers.
20588
20833
  *
@@ -21415,7 +21660,12 @@ var RecordingDeviceUsageSchema = object({
21415
21660
  var RecordingLocationUsageSchema = object({
21416
21661
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
21417
21662
  locationId: string().nullable(),
21418
- /** Bytes of recordings stored on this location. */
21663
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
21664
+ * is emitted per physical disk (2026-07-29): two locations on one root
21665
+ * previously rendered as two identical "disks" with a nonsensical used
21666
+ * split — hydrate attribution across aliases is arbitrary by nature. */
21667
+ locationIds: array(string()).optional(),
21668
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
21419
21669
  usedBytes: number(),
21420
21670
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
21421
21671
  availableBytes: number().nullable(),
@@ -21527,6 +21777,44 @@ method(object({
21527
21777
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
21528
21778
  kind: "query",
21529
21779
  auth: "admin"
21780
+ }), method(object({
21781
+ deviceId: number(),
21782
+ aroundMs: number(),
21783
+ preRollSec: number().min(0).max(30).default(2),
21784
+ postRollSec: number().min(0).max(30).default(5),
21785
+ maxWidth: number().int().min(120).max(1280).default(480),
21786
+ fps: number().int().min(1).max(15).default(5)
21787
+ }), object({
21788
+ gifBase64: string(),
21789
+ fromMs: number(),
21790
+ toMs: number()
21791
+ }), {
21792
+ kind: "mutation",
21793
+ auth: "admin"
21794
+ }), method(object({
21795
+ deviceId: number(),
21796
+ aroundMs: number(),
21797
+ preRollSec: number().min(0).max(30).default(3),
21798
+ postRollSec: number().min(0).max(30).default(7),
21799
+ maxWidth: number().int().min(160).max(1920).default(640)
21800
+ }), object({
21801
+ clipBase64: string(),
21802
+ mime: string(),
21803
+ fromMs: number(),
21804
+ toMs: number(),
21805
+ bytes: number().int()
21806
+ }), {
21807
+ kind: "mutation",
21808
+ auth: "admin"
21809
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
21810
+ kind: "mutation",
21811
+ auth: "admin"
21812
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21813
+ kind: "query",
21814
+ auth: "admin"
21815
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21816
+ kind: "mutation",
21817
+ auth: "admin"
21530
21818
  });
21531
21819
  /**
21532
21820
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -22440,6 +22728,12 @@ Object.freeze({
22440
22728
  addonId: null,
22441
22729
  access: "delete"
22442
22730
  },
22731
+ "backup.deleteSchedule": {
22732
+ capName: "backup",
22733
+ capScope: "system",
22734
+ addonId: null,
22735
+ access: "delete"
22736
+ },
22443
22737
  "backup.getEntries": {
22444
22738
  capName: "backup",
22445
22739
  capScope: "system",
@@ -22470,6 +22764,12 @@ Object.freeze({
22470
22764
  addonId: null,
22471
22765
  access: "view"
22472
22766
  },
22767
+ "backup.listSchedules": {
22768
+ capName: "backup",
22769
+ capScope: "system",
22770
+ addonId: null,
22771
+ access: "view"
22772
+ },
22473
22773
  "backup.previewSchedule": {
22474
22774
  capName: "backup",
22475
22775
  capScope: "system",
@@ -22494,6 +22794,12 @@ Object.freeze({
22494
22794
  addonId: null,
22495
22795
  access: "create"
22496
22796
  },
22797
+ "backup.upsertSchedule": {
22798
+ capName: "backup",
22799
+ capScope: "system",
22800
+ addonId: null,
22801
+ access: "create"
22802
+ },
22497
22803
  "battery.wakeForStream": {
22498
22804
  capName: "battery",
22499
22805
  capScope: "device",
@@ -23994,6 +24300,12 @@ Object.freeze({
23994
24300
  addonId: null,
23995
24301
  access: "view"
23996
24302
  },
24303
+ "localNetwork.getNotificationEndpoint": {
24304
+ capName: "local-network",
24305
+ capScope: "system",
24306
+ addonId: null,
24307
+ access: "view"
24308
+ },
23997
24309
  "localNetwork.getPreferred": {
23998
24310
  capName: "local-network",
23999
24311
  capScope: "system",
@@ -24018,6 +24330,12 @@ Object.freeze({
24018
24330
  addonId: null,
24019
24331
  access: "create"
24020
24332
  },
24333
+ "localNetwork.setNotificationEndpoint": {
24334
+ capName: "local-network",
24335
+ capScope: "system",
24336
+ addonId: null,
24337
+ access: "create"
24338
+ },
24021
24339
  "lockControl.lock": {
24022
24340
  capName: "lock-control",
24023
24341
  capScope: "device",
@@ -24660,6 +24978,12 @@ Object.freeze({
24660
24978
  addonId: null,
24661
24979
  access: "create"
24662
24980
  },
24981
+ "pipelineAnalytics.cancelMediaRelocate": {
24982
+ capName: "pipeline-analytics",
24983
+ capScope: "device",
24984
+ addonId: null,
24985
+ access: "create"
24986
+ },
24663
24987
  "pipelineAnalytics.clearTracks": {
24664
24988
  capName: "pipeline-analytics",
24665
24989
  capScope: "device",
@@ -24714,6 +25038,12 @@ Object.freeze({
24714
25038
  addonId: null,
24715
25039
  access: "view"
24716
25040
  },
25041
+ "pipelineAnalytics.getMediaRelocateStatus": {
25042
+ capName: "pipeline-analytics",
25043
+ capScope: "device",
25044
+ addonId: null,
25045
+ access: "view"
25046
+ },
24717
25047
  "pipelineAnalytics.getMotionEvents": {
24718
25048
  capName: "pipeline-analytics",
24719
25049
  capScope: "device",
@@ -24786,6 +25116,12 @@ Object.freeze({
24786
25116
  addonId: null,
24787
25117
  access: "create"
24788
25118
  },
25119
+ "pipelineAnalytics.relocateMedia": {
25120
+ capName: "pipeline-analytics",
25121
+ capScope: "device",
25122
+ addonId: null,
25123
+ access: "create"
25124
+ },
24789
25125
  "pipelineAnalytics.searchObjectEvents": {
24790
25126
  capName: "pipeline-analytics",
24791
25127
  capScope: "device",
@@ -25548,6 +25884,12 @@ Object.freeze({
25548
25884
  addonId: null,
25549
25885
  access: "create"
25550
25886
  },
25887
+ "recording.cancelRelocate": {
25888
+ capName: "recording",
25889
+ capScope: "system",
25890
+ addonId: null,
25891
+ access: "create"
25892
+ },
25551
25893
  "recording.deleteFootprint": {
25552
25894
  capName: "recording",
25553
25895
  capScope: "system",
@@ -25578,6 +25920,12 @@ Object.freeze({
25578
25920
  addonId: null,
25579
25921
  access: "view"
25580
25922
  },
25923
+ "recording.getRelocateStatus": {
25924
+ capName: "recording",
25925
+ capScope: "system",
25926
+ addonId: null,
25927
+ access: "view"
25928
+ },
25581
25929
  "recording.getStorageUsage": {
25582
25930
  capName: "recording",
25583
25931
  capScope: "system",
@@ -25608,6 +25956,24 @@ Object.freeze({
25608
25956
  addonId: null,
25609
25957
  access: "view"
25610
25958
  },
25959
+ "recording.relocateFootage": {
25960
+ capName: "recording",
25961
+ capScope: "system",
25962
+ addonId: null,
25963
+ access: "create"
25964
+ },
25965
+ "recording.renderClip": {
25966
+ capName: "recording",
25967
+ capScope: "system",
25968
+ addonId: null,
25969
+ access: "create"
25970
+ },
25971
+ "recording.renderGif": {
25972
+ capName: "recording",
25973
+ capScope: "system",
25974
+ addonId: null,
25975
+ access: "create"
25976
+ },
25611
25977
  "recording.rescanStorage": {
25612
25978
  capName: "recording",
25613
25979
  capScope: "system",
@@ -26202,6 +26568,12 @@ Object.freeze({
26202
26568
  addonId: null,
26203
26569
  access: "create"
26204
26570
  },
26571
+ "streamBroker.renderPreBufferClip": {
26572
+ capName: "stream-broker",
26573
+ capScope: "system",
26574
+ addonId: null,
26575
+ access: "create"
26576
+ },
26205
26577
  "streamBroker.restartProfile": {
26206
26578
  capName: "stream-broker",
26207
26579
  capScope: "system",
@@ -26909,12 +27281,30 @@ Object.defineProperty(exports, "OpsLogEntrySchema", {
26909
27281
  return OpsLogEntrySchema;
26910
27282
  }
26911
27283
  });
27284
+ Object.defineProperty(exports, "TimelapseRuleInputSchema", {
27285
+ enumerable: true,
27286
+ get: function() {
27287
+ return TimelapseRuleInputSchema;
27288
+ }
27289
+ });
27290
+ Object.defineProperty(exports, "TimelapseRuleSchema", {
27291
+ enumerable: true,
27292
+ get: function() {
27293
+ return TimelapseRuleSchema;
27294
+ }
27295
+ });
26912
27296
  Object.defineProperty(exports, "__toESM", {
26913
27297
  enumerable: true,
26914
27298
  get: function() {
26915
27299
  return __toESM;
26916
27300
  }
26917
27301
  });
27302
+ Object.defineProperty(exports, "_enum", {
27303
+ enumerable: true,
27304
+ get: function() {
27305
+ return _enum;
27306
+ }
27307
+ });
26918
27308
  Object.defineProperty(exports, "addonWidgetsSourceCapability", {
26919
27309
  enumerable: true,
26920
27310
  get: function() {