@camstack/addon-import-alexa 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +463 -76
  2. package/dist/addon.mjs +463 -76
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -38,7 +38,7 @@ let node_crypto = require("node:crypto");
38
38
  let node_fs = require("node:fs");
39
39
  let node_path = require("node:path");
40
40
  node_path = __toESM(node_path);
41
- //#region ../types/dist/event-category-BLcNejAE.mjs
41
+ //#region ../types/dist/event-category-Bz24uP1U.mjs
42
42
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
43
43
  EventCategory["SystemBoot"] = "system.boot";
44
44
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -309,6 +309,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
309
309
  */
310
310
  EventCategory["DeviceStateChanged"] = "device.state-changed";
311
311
  /**
312
+ * Frame occupancy for a camera CHANGED — a tracked object was gained or
313
+ * lost. Carries `{ deviceId, totalObjects, byClass, zones }`.
314
+ *
315
+ * Emitted only on a change, so a steady scene is silent. It exists so a
316
+ * client can stop polling `zoneAnalytics.getCurrentSnapshot`: that was the
317
+ * one live badge with no push signal at all, and it cost a request every
318
+ * four seconds per visible camera.
319
+ *
320
+ * Like every event it is telemetry and may be dropped ([D8]) — a consumer
321
+ * keeps a slow reconcile rather than trusting it alone.
322
+ */
323
+ EventCategory["ZoneAnalyticsOccupancyChanged"] = "zone-analytics.occupancy-changed";
324
+ /**
312
325
  * Cap event fired by every device that registers the `battery`
313
326
  * capability. Mirrors the cap definition's `onStatusChanged`. Carries
314
327
  * `{ deviceId, status: BatteryStatus }`. Subscribers (alert center,
@@ -7369,35 +7382,22 @@ function buildCapturingReply(envelope) {
7369
7382
  */
7370
7383
  var RecordingWeekdaySchema = number().int().min(0).max(6);
7371
7384
  var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7372
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
7373
- kind: literal("timeOfDay"),
7374
- start: string().regex(HHMM),
7375
- end: string().regex(HHMM),
7376
- /** Restrict to these weekdays; omit = every day. */
7377
- days: array(RecordingWeekdaySchema).optional()
7378
- })]);
7379
- var RecordingModeSchema = _enum([
7380
- "continuous",
7381
- "onMotion",
7382
- "onAudioThreshold"
7383
- ]);
7384
7385
  /**
7385
- * First-class, authoritative per-camera storage mode — the explicit choice the
7386
- * UI reads directly (never inferred from `rules`):
7387
- * - `off` — not recording.
7388
- * - `events` — record only around triggers (motion / audio threshold),
7389
- * with pre/post-buffer.
7390
- * - `continuous` — record 24/7 within the schedule.
7386
+ * DERIVED per-camera storage summary — the single field cheap consumers read
7387
+ * (the viewer's status dot, the camera list) instead of walking `bands`:
7388
+ * - `off` — no band covers the camera (or it is disabled).
7389
+ * - `events` — every band records around triggers only.
7390
+ * - `continuous` — at least one band records continuously.
7391
7391
  *
7392
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
7393
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
7392
+ * NEVER authored: the recorder stamps it from the authoritative `bands` on
7393
+ * every save (`activeModeForConfig`). Writing it has no effect.
7394
7394
  */
7395
7395
  var RecordingStorageModeSchema = _enum([
7396
7396
  "off",
7397
7397
  "events",
7398
7398
  "continuous"
7399
7399
  ]);
7400
- /** Which detectors trigger an `events`-mode recording. */
7400
+ /** Which detectors trigger an `events`-mode band. */
7401
7401
  var RecordingTriggersSchema = object({
7402
7402
  motion: boolean().optional(),
7403
7403
  audioThresholdDbfs: number().optional()
@@ -7433,18 +7433,6 @@ var RecordingBandSchema = object({
7433
7433
  preBufferSec: number().min(0).optional(),
7434
7434
  postBufferSec: number().min(0).optional()
7435
7435
  });
7436
- var RecordingRuleSchema = object({
7437
- schedule: RecordingScheduleSchema,
7438
- mode: RecordingModeSchema,
7439
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
7440
- preBufferSec: number().min(0).default(0),
7441
- /** Keep recording until this many seconds after the last trigger. */
7442
- postBufferSec: number().min(0).default(0),
7443
- /** Each new trigger restarts the post-buffer window. */
7444
- resetTimeoutOnNewEvent: boolean().default(true),
7445
- /** onAudioThreshold only — dBFS level that counts as a trigger. */
7446
- thresholdDbfs: number().optional()
7447
- });
7448
7436
  /**
7449
7437
  * Per-device retention overrides. Every field is optional; an unset or `0`
7450
7438
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7478,40 +7466,28 @@ var ScrubThumbnailPresetSchema = _enum([
7478
7466
  /**
7479
7467
  * The full per-camera recording intent — the wire shape of a RecordingTarget.
7480
7468
  *
7481
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
7482
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
7483
- * only for transition + migration (`migrateRulesToMode`); the policy engine
7484
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
7469
+ * `bands` is the ONLY authored recording intent: what to record, when, and on
7470
+ * which trigger. `mode` is a derived summary the recorder stamps on save; every
7471
+ * other field is a storage knob (profiles, segment length, retention, scrub).
7472
+ *
7473
+ * STRICT on purpose: the legacy authoring surface (`schedule`/`schedules`/
7474
+ * `triggers`/`preBufferSec`/`postBufferSec`/`rules`) was retired 2026-07-30.
7475
+ * A stale caller must fail loudly — silently stripping its legacy intent would
7476
+ * persist a band-less config, i.e. silently stop recording the camera.
7485
7477
  */
7486
7478
  var RecordingConfigSchema = object({
7487
7479
  enabled: boolean(),
7488
- /** Authoritative storage mode. Absent on legacy targets derived once via
7489
- * `migrateRulesToMode`, then persisted. */
7480
+ /** DERIVED summary of `bands`, stamped by the recorder on every save.
7481
+ * Authoring it has no effect — see {@link RecordingStorageModeSchema}. */
7490
7482
  mode: RecordingStorageModeSchema.optional(),
7491
7483
  profiles: array(CamProfileSchema).optional(),
7492
7484
  segmentSeconds: number().int().positive().optional(),
7493
- /** Shared recording time-bands for `events` & `continuous` — record only when
7494
- * the wall-clock falls inside one of these windows. Omit or empty = always.
7495
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
7496
- schedules: array(RecordingScheduleSchema).optional(),
7497
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
7498
- * normalized into `schedules` on read and never written going forward. (Not
7499
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
7500
- schedule: RecordingScheduleSchema.optional(),
7501
- /** `events`-mode only — which detectors trigger a recording. */
7502
- triggers: RecordingTriggersSchema.optional(),
7503
- /** `events`-mode only — seconds retained before / after a trigger. */
7504
- preBufferSec: number().min(0).optional(),
7505
- postBufferSec: number().min(0).optional(),
7506
- /** DEPRECATED authoring input; retained for migration/transition. */
7507
- rules: array(RecordingRuleSchema).optional(),
7508
7485
  /**
7509
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
7510
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
7511
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
7512
- * derived into bands once via `migrateConfigToBands`.
7486
+ * AUTHORITATIVE mode-per-band recording model the single source of truth
7487
+ * the recorder's band engine consumes. An empty array = record nothing;
7488
+ * "off" is the absence of a covering band, never a band value.
7513
7489
  */
7514
- bands: array(RecordingBandSchema).optional(),
7490
+ bands: array(RecordingBandSchema).default([]),
7515
7491
  retention: RecordingRetentionSchema.optional(),
7516
7492
  /**
7517
7493
  * Per-camera scrub-thumbnail fidelity preset (resolution + JPEG quality for
@@ -7519,8 +7495,15 @@ var RecordingConfigSchema = object({
7519
7495
  * windows only — existing sheets are immutable, and each window's index
7520
7496
  * carries its own tile dims so mixed-preset history renders correctly.
7521
7497
  */
7522
- scrubThumbnails: ScrubThumbnailPresetSchema.optional()
7523
- });
7498
+ scrubThumbnails: ScrubThumbnailPresetSchema.optional(),
7499
+ /**
7500
+ * OPT-IN thumbnail-strip generation for this camera: every keyframe of the
7501
+ * low recording saved as a JPEG (the fast-drag scrub depth), a derived
7502
+ * cache that eviction reclaims with the footage. Absent/false = no strips
7503
+ * are written and scrub reads exact keyframes at every velocity.
7504
+ */
7505
+ stripsEnabled: boolean().optional()
7506
+ }).strict();
7524
7507
  /**
7525
7508
  * Ops-log — the durable, append-only operations audit shared by the
7526
7509
  * recordings and events management surfaces.
@@ -7539,7 +7522,8 @@ var OpsLogOpSchema = _enum([
7539
7522
  "prune",
7540
7523
  "manual-delete",
7541
7524
  "rescan",
7542
- "retention-run"
7525
+ "retention-run",
7526
+ "relocate"
7543
7527
  ]);
7544
7528
  /** Why the operation ran. */
7545
7529
  var OpsLogReasonSchema = _enum([
@@ -7578,6 +7562,55 @@ var OpsLogQueryInputSchema = object({
7578
7562
  limit: number().int().min(1).max(1e3).optional()
7579
7563
  });
7580
7564
  /**
7565
+ * Entity-relocation job state (storage entity-routing spec, Phase 4).
7566
+ *
7567
+ * One shape shared by the recorder's `relocateFootage` (segments + strips) and
7568
+ * pipeline-analytics' `relocateMedia` (event media blobs) so the admin Data
7569
+ * page renders both movers with one component. Jobs are in-RAM (a restart
7570
+ * forgets them — re-running is safe by construction: copy-if-absent, delete
7571
+ * after verify) and each completed/failed run also lands one durable ops-log
7572
+ * row on the owning addon's surface.
7573
+ */
7574
+ var RelocateJobStateSchema = _enum([
7575
+ "running",
7576
+ "done",
7577
+ "failed",
7578
+ "cancelled"
7579
+ ]);
7580
+ var RelocateJobSchema = object({
7581
+ jobId: string(),
7582
+ state: RelocateJobStateSchema,
7583
+ /** Source location — for media relocation this is informational ('*': rows
7584
+ * move from wherever they are to the target). */
7585
+ fromLocationId: string(),
7586
+ toLocationId: string(),
7587
+ /** Scoped device, or null = every device. */
7588
+ deviceId: number().nullable(),
7589
+ /** What the job moves (owner-addon specific: segments/strips or media). */
7590
+ entities: array(string()),
7591
+ filesMoved: number().int(),
7592
+ bytesMoved: number().int(),
7593
+ /** Total files discovered up front; null while (or when) unknown. */
7594
+ filesTotal: number().int().nullable(),
7595
+ startedAt: number(),
7596
+ finishedAt: number().nullable(),
7597
+ error: string().nullable()
7598
+ });
7599
+ var RelocateFootageInputSchema = object({
7600
+ deviceId: number().optional(),
7601
+ fromLocationId: string(),
7602
+ toLocationId: string(),
7603
+ entities: array(_enum(["segments", "strips"])).optional(),
7604
+ /** Copy throttle in MB/s (default 40) — the drain is a background chore,
7605
+ * never allowed to starve live writers. */
7606
+ throttleMbps: number().min(1).max(1e3).optional()
7607
+ });
7608
+ var RelocateMediaInputSchema = object({
7609
+ deviceId: number().optional(),
7610
+ toLocationId: string(),
7611
+ throttleMbps: number().min(1).max(1e3).optional()
7612
+ });
7613
+ /**
7581
7614
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
7582
7615
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
7583
7616
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -7627,6 +7660,13 @@ var StorageLocationSchema = object({
7627
7660
  nodeId: string().optional(),
7628
7661
  isDefault: boolean().default(false),
7629
7662
  isSystem: boolean().default(false),
7663
+ /** COMPUTED at read time by the orchestrator (statfs of the backing volume
7664
+ * for node-local locations it can reach) — never persisted, absent when the
7665
+ * volume is remote/unreachable. The single capacity truth every UI reads. */
7666
+ capacity: object({
7667
+ totalBytes: number(),
7668
+ availableBytes: number()
7669
+ }).nullable().optional(),
7630
7670
  createdAt: number(),
7631
7671
  updatedAt: number()
7632
7672
  });
@@ -8394,7 +8434,8 @@ var NcTaxonomyEntrySchema = object({
8394
8434
  /** Macro/category parent for grouping ('car' → 'vehicle'); null for a top. */
8395
8435
  parentKind: string().nullable()
8396
8436
  });
8397
- object({
8437
+ /** The complete NC picker taxonomy — three grouped buckets. */
8438
+ var NcTaxonomySchema = object({
8398
8439
  videoClasses: array(NcTaxonomyEntrySchema),
8399
8440
  audioKinds: array(NcTaxonomyEntrySchema),
8400
8441
  labels: array(NcTaxonomyEntrySchema)
@@ -9297,6 +9338,7 @@ function shallowEqual(a, b) {
9297
9338
  for (const k of ak) if (a[k] !== b[k]) return false;
9298
9339
  return true;
9299
9340
  }
9341
+ new Set(["devices", "classes"]);
9300
9342
  /**
9301
9343
  * Shared geometry vocabulary for on-frame shape caps — privacy-mask,
9302
9344
  * motion-zones, and the detection zones/lines editor all speak this one
@@ -9455,6 +9497,29 @@ var NcOccupancyConditionSchema = object({
9455
9497
  count: number().int().min(0).default(1),
9456
9498
  sustainSeconds: number().int().min(0).max(3600).default(15)
9457
9499
  });
9500
+ /**
9501
+ * Which zone-crossing DIRECTION a rule accepts (`ObjectEvent.zoneCrossing`).
9502
+ *
9503
+ * The values are not symmetric, and deliberately so — the absent value has to
9504
+ * mean exactly what every rule authored before this condition existed already
9505
+ * does:
9506
+ * - `enter` — entries and every NON-crossing record (movement state,
9507
+ * package, sensor). Exits are rejected. **This is the absent behaviour**:
9508
+ * an operator who never asked for exits must not start receiving them.
9509
+ * - `exit` — ONLY an exit crossing. A record that is not a crossing at all
9510
+ * fails closed, because "the car left the drive" is a question about a
9511
+ * boundary, not about a detection.
9512
+ * - `any` — no direction filter; entries, exits and non-crossings alike.
9513
+ *
9514
+ * A rule asking for a direction should normally also scope `zones`, which the
9515
+ * engine evaluates against the crossed zone as well as the current membership
9516
+ * (an exit's membership no longer contains the zone it just left).
9517
+ */
9518
+ var NcCrossingSchema = _enum([
9519
+ "enter",
9520
+ "exit",
9521
+ "any"
9522
+ ]);
9458
9523
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
9459
9524
  var NcZoneConditionSchema = object({
9460
9525
  ids: array(string().min(1)).min(1),
@@ -9479,6 +9544,13 @@ var NcConditionsSchema = object({
9479
9544
  /** Veto zones — any hit fails the rule. */
9480
9545
  zonesExclude: array(string().min(1)).optional(),
9481
9546
  /**
9547
+ * Zone-crossing direction. IMMEDIATE only — a crossing is a per-event fact
9548
+ * and a closed track carries none, so a `track-end` rule asking for one
9549
+ * fails closed (use `zones`, which tests `zonesVisited`). ABSENT = `enter`,
9550
+ * which is exactly today's behaviour. See {@link NcCrossingSchema}.
9551
+ */
9552
+ crossing: NcCrossingSchema.optional(),
9553
+ /**
9482
9554
  * Exact (case-insensitive) match on the record's collapsed `label`
9483
9555
  * (identity name / plate text / subclass).
9484
9556
  */
@@ -9613,17 +9685,85 @@ var NcRuleTargetSchema = object({
9613
9685
  * - `keyFrame` — the clean scene frame (no subject box).
9614
9686
  * - `none` — no attachment.
9615
9687
  */
9616
- var NcMediaPolicySchema = object({ attach: _enum([
9617
- "best",
9618
- "best-matching",
9619
- "keyFrame",
9620
- "none"
9621
- ]).default("best") });
9688
+ /**
9689
+ * WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
9690
+ * conflate it with the selection strategy and betray the request: asking for
9691
+ * the clean scene frame on an object-event owner used to start at
9692
+ * `fullFrameBoxed`, i.e. the annotated frame (2026-07-30).
9693
+ * - `cropped` — the subject, tight. What "who is at the door" wants.
9694
+ * - `full` — the clean scene, no annotation. What "what is going on" wants.
9695
+ * - `boxed` — the scene WITH the detection boxes drawn, for verifying what
9696
+ * the pipeline actually saw.
9697
+ */
9698
+ var NcMediaFrameSchema = _enum([
9699
+ "cropped",
9700
+ "full",
9701
+ "boxed"
9702
+ ]);
9703
+ var NcMediaPolicySchema = object({
9704
+ attach: _enum([
9705
+ "best",
9706
+ "best-matching",
9707
+ "keyFrame",
9708
+ "none"
9709
+ ]).default("best"),
9710
+ /** What the still shows. Absent = `cropped` (the historical `best` shape). */
9711
+ frame: NcMediaFrameSchema.optional(),
9712
+ /** Crop the attached still to the rule's condition-zone bbox (padded) —
9713
+ * "show me the ZONE", not the whole scene or the subject crop. */
9714
+ zoneCrop: boolean().optional(),
9715
+ /**
9716
+ * Also attach a short GIF cut from the stream broker's clip ring around the
9717
+ * event — NOT from the recording, so the camera does not have to be
9718
+ * recording, and the window sits AROUND the moment instead of a segment
9719
+ * behind it. Fail-closed: a window the ring does not cover contributes no
9720
+ * gif, never a failed notification.
9721
+ */
9722
+ gif: boolean().optional(),
9723
+ /**
9724
+ * Also attach a short MP4 CLIP of the same cut. Same source and the same
9725
+ * fail-closed rule as `gif`. Prefer it where the backend takes video
9726
+ * (telegram, discord, zentik, webhook); backends that do not are handled by
9727
+ * the degrade engine, which drops the video and keeps the still.
9728
+ */
9729
+ clip: boolean().optional(),
9730
+ /** Seconds of footage BEFORE / AFTER the event instant. Defaults 3 / 7. */
9731
+ clipPreRollSec: number().int().min(0).max(30).optional(),
9732
+ clipPostRollSec: number().int().min(0).max(30).optional(),
9733
+ /**
9734
+ * Which stream profile the footage is cut from. Absent = the CHEAPEST
9735
+ * assigned profile: a notification is watched on a phone, so the 4K
9736
+ * rendition would burn CPU to produce a file the client downscales anyway.
9737
+ * A profile that is not assigned falls back to the cheapest, and the render
9738
+ * reports which one actually ran.
9739
+ */
9740
+ profile: CamProfileSchema.optional()
9741
+ });
9742
+ /**
9743
+ * Cooldown GRANULARITY over the subject's class — how much a fired
9744
+ * notification suppresses.
9745
+ * - `shared` (default, and the absent value) — one window for the whole
9746
+ * rule/scope: a cat silences the next dog for `cooldownSec`.
9747
+ * - `per-class` — an independent window per detected class, so cat→dog fires
9748
+ * at once and cat→cat still waits.
9749
+ *
9750
+ * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
9751
+ * must not be swallowed by a bark's window (the precedent this generalizes —
9752
+ * see `cooldownKey` in the rule engine).
9753
+ */
9754
+ var NcThrottleGranularitySchema = _enum(["shared", "per-class"]);
9622
9755
  /** Throttle — cooldown survives restarts (rebuilt from the outbox on boot). */
9623
9756
  var NcThrottleSchema = object({
9624
9757
  cooldownSec: number().int().min(0).max(86400).default(60),
9625
9758
  /** `rule` = one shared cooldown; `rule-device` = per-camera cooldown. */
9626
- scope: _enum(["rule", "rule-device"]).default("rule-device")
9759
+ scope: _enum(["rule", "rule-device"]).default("rule-device"),
9760
+ /**
9761
+ * Class granularity of the cooldown key. Optional rather than defaulted:
9762
+ * a Zod default does NOT run on the addon→addon cap path, so a persisted
9763
+ * rule authored before this field simply carries none — and the engine
9764
+ * reads absent as `shared`, the pre-existing behaviour.
9765
+ */
9766
+ granularity: NcThrottleGranularitySchema.optional()
9627
9767
  });
9628
9768
  /** Client-supplied rule fields (server stamps id/createdBy/createdAt/updatedAt). */
9629
9769
  var NcRuleInputSchema = object({
@@ -9632,7 +9772,19 @@ var NcRuleInputSchema = object({
9632
9772
  delivery: NcDeliverySchema,
9633
9773
  conditions: NcConditionsSchema.default({}),
9634
9774
  schedule: NcScheduleSchema.optional(),
9635
- targets: array(NcRuleTargetSchema).min(1),
9775
+ /** May be empty when `targetUsers` addresses at least one user — the
9776
+ * "at least one addressee" invariant is enforced by the provider, because
9777
+ * a cross-field refine here would break `NcRulePatchSchema.partial()`. */
9778
+ targets: array(NcRuleTargetSchema),
9779
+ /**
9780
+ * USERS this rule addresses in addition to `targets` (Phase 4). At fire
9781
+ * time each user fans out to the personal targets they own
9782
+ * (`config.ownerUserId`), filtered by that user's `allowedDevices` for the
9783
+ * firing camera — a user is never notified about a device they cannot open.
9784
+ * Per-user opt-outs (`disabledTargetIds`) still apply to the fanned-out
9785
+ * targets.
9786
+ */
9787
+ targetUsers: array(string()).optional(),
9636
9788
  media: NcMediaPolicySchema.default({ attach: "best" }),
9637
9789
  throttle: NcThrottleSchema.default({
9638
9790
  cooldownSec: 60,
@@ -9719,6 +9871,7 @@ var NcConditionDescriptorSchema = object({
9719
9871
  "schedule",
9720
9872
  "plateMatcher",
9721
9873
  "packagePhase",
9874
+ "crossingSelect",
9722
9875
  "polygonDraw",
9723
9876
  "occupancy"
9724
9877
  ]),
@@ -9845,7 +9998,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
9845
9998
  }), object({ results: array(NcTestResultSchema) }), {
9846
9999
  kind: "mutation",
9847
10000
  auth: "admin"
9848
- }), method(object({}), object({ catalog: array(NcConditionDescriptorSchema) })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
10001
+ }), method(object({}), object({
10002
+ catalog: array(NcConditionDescriptorSchema),
10003
+ taxonomy: NcTaxonomySchema.optional()
10004
+ })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" });
9849
10005
  /**
9850
10006
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
9851
10007
  *
@@ -10854,6 +11010,28 @@ method(object({
10854
11010
  }), object({ success: literal(true) }), {
10855
11011
  kind: "mutation",
10856
11012
  auth: "admin"
11013
+ }), method(object({
11014
+ deviceId: number(),
11015
+ /** Absent = the LOWEST assigned profile — a notification attachment is
11016
+ * watched on a phone, and the cheap rendition is the right default. */
11017
+ profile: CamProfileSchema.optional(),
11018
+ aroundMs: number(),
11019
+ preRollSec: number().min(0).max(20).default(3),
11020
+ postRollSec: number().min(0).max(20).default(5),
11021
+ format: _enum(["gif", "mp4"]).default("gif"),
11022
+ maxWidth: number().int().min(120).max(1920).default(480),
11023
+ /** GIF only — MP4 keeps the source cadence. */
11024
+ fps: number().int().min(1).max(15).default(5)
11025
+ }), object({
11026
+ base64: string(),
11027
+ mime: string(),
11028
+ bytes: number().int(),
11029
+ /** The profile actually rendered (what the default resolved to). */
11030
+ profile: CamProfileSchema,
11031
+ durationMs: number()
11032
+ }), {
11033
+ kind: "mutation",
11034
+ auth: "admin"
10857
11035
  }), method(_void(), array(CameraStreamSchema).readonly()), method(_void(), array(ProfileSlotSchema).readonly()), method(object({ brokerId: string() }), BrokerStatsSchema), method(object({ brokerId: string() }), object({
10858
11036
  probed: boolean(),
10859
11037
  summary: string()
@@ -13984,6 +14162,18 @@ var motionCapability = {
13984
14162
  name: "motion",
13985
14163
  scope: "device",
13986
14164
  mode: "singleton",
14165
+ /**
14166
+ * Providers register per-device natives via `ctx.registerNativeCap`
14167
+ * (Hikvision/Reolink/Amcrest/Wyze/HA/Homematic/Alexa/Matter) — there is
14168
+ * NO system singleton provider. Without this flag `resolveCapMount`
14169
+ * derived `{ kind: 'singleton' }`, so `motion.getStatus`/`isDetected`
14170
+ * resolved via `registry.getSingleton('motion')` (always null) and every
14171
+ * call 412'd "provider not available" while bindings listed a live
14172
+ * `motion` native (2026-08-02). The flag routes the router through
14173
+ * `requireDeviceScoped` → `getProviderForDevice`, like `motion-trigger`,
14174
+ * `snapshot` and every other per-device native cap.
14175
+ */
14176
+ deviceNative: true,
13987
14177
  deviceTypes: [DeviceType.Camera, DeviceType.Sensor],
13988
14178
  methods: {
13989
14179
  /**
@@ -19001,7 +19191,10 @@ method(object({
19001
19191
  }), method(object({
19002
19192
  deviceId: number(),
19003
19193
  caps: array(string()).readonly().optional()
19004
- }), record(string(), unknown().nullable()));
19194
+ }), record(string(), unknown().nullable())), method(object({
19195
+ deviceIds: array(number()).readonly(),
19196
+ caps: array(string()).readonly().optional()
19197
+ }), record(string(), record(string(), unknown().nullable())));
19005
19198
  method(object({ deviceId: number() }), record(string(), record(string(), unknown()))), method(object({
19006
19199
  deviceId: number(),
19007
19200
  capName: string()
@@ -19932,6 +20125,36 @@ var TargetKindSchema = object({
19932
20125
  icon: string(),
19933
20126
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19934
20127
  addonId: string(),
20128
+ /**
20129
+ * URL of the kind's bundled BRAND icon, served by the providing addon over
20130
+ * its own `addon-routes` surface (`/addon/<addonId>/icons/<kind>`). Absent
20131
+ * when the addon bundles no icon for that kind — the client then falls back
20132
+ * to a neutral glyph rather than rendering the raw `icon` NAME as text.
20133
+ *
20134
+ * Root-relative on purpose: it resolves against whatever origin serves a web
20135
+ * client, and a native client joins it onto its own hub base.
20136
+ *
20137
+ * DECLARED here deliberately. It used to travel as an undeclared passthrough
20138
+ * field that survived only because the runtime cap-router forwards provider
20139
+ * output verbatim — so every consumer had to re-declare it by hand to stop
20140
+ * its own Zod parse from stripping it, and the whole arrangement would have
20141
+ * broken silently the moment output validation was tightened anywhere.
20142
+ */
20143
+ iconUrl: string().optional(),
20144
+ /**
20145
+ * Media type of {@link iconUrl} (`image/svg+xml`, `image/png`, …).
20146
+ *
20147
+ * The server knows this and therefore says it, because the client cannot
20148
+ * safely guess: a React-Native client renders SVG and raster through two
20149
+ * DIFFERENT components (`react-native-svg` vs `expo-image` — expo-image does
20150
+ * not decode SVG on iOS/Android), so without this it silently fell back to a
20151
+ * placeholder glyph for every vector icon while the web build looked fine.
20152
+ *
20153
+ * Absent when {@link iconUrl} is absent, or for a legacy provider that has
20154
+ * not been updated — a client that cannot determine the type should prefer
20155
+ * its raster path, which is the safe default for an unknown image.
20156
+ */
20157
+ iconMediaType: string().optional(),
19935
20158
  configSchema: ConfigSchemaPassthrough,
19936
20159
  supportsDiscovery: boolean(),
19937
20160
  caps: TargetKindCapsSchema
@@ -20379,6 +20602,29 @@ var MotionEventSchema = object({
20379
20602
  * Absent on legacy rows ⇒ treat as `pipeline`.
20380
20603
  */
20381
20604
  var DetectionSourceSchema = _enum(["pipeline", "onboard"]);
20605
+ /**
20606
+ * The confirmed zone crossing that produced an object event. Present ONLY on
20607
+ * an event emitted BY a crossing (`zone.enter` / `zone.exit`); a movement-state
20608
+ * event (`object.entering` / `leaving` / `stationary` / `loitering`) and an
20609
+ * appearance event carry none, so a rule asking for a direction fails closed
20610
+ * on them.
20611
+ *
20612
+ * Exactly ONE crossing per event: the emitter turns each confirmed crossing
20613
+ * into its own event, so a frame in which a track enters A while leaving B
20614
+ * produces two events with two directions — never one ambiguous row.
20615
+ *
20616
+ * `zoneId` is load-bearing for an EXIT: the event's `zones` list is the
20617
+ * membership the box has NOW, and by definition it no longer contains the zone
20618
+ * that was just left. Without the id here, a zone-scoped rule could never match
20619
+ * the exit it asked for.
20620
+ */
20621
+ var ZoneCrossingSchema = object({
20622
+ direction: _enum(["enter", "exit"]),
20623
+ /** Admin zone id crossed. */
20624
+ zoneId: string(),
20625
+ /** Zone display name at crossing time (falls back to the id). */
20626
+ zoneName: string().optional()
20627
+ });
20382
20628
  var ObjectEventSchema = object({
20383
20629
  ...BaseEventFields,
20384
20630
  kind: literal("object"),
@@ -20405,6 +20651,12 @@ var ObjectEventSchema = object({
20405
20651
  zones: array(string()).readonly().optional(),
20406
20652
  /** Omitted in slim projection. */
20407
20653
  state: TrackStateSchema.optional(),
20654
+ /**
20655
+ * The zone crossing this event IS, when it is one. Absent on every other
20656
+ * event kind (movement state, appearance, package) — see
20657
+ * {@link ZoneCrossingSchema}. Omitted in slim projection.
20658
+ */
20659
+ zoneCrossing: ZoneCrossingSchema.optional(),
20408
20660
  /** Detection-frame dimensions in pixels — let consumers normalize the
20409
20661
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
20410
20662
  frameWidth: number().optional(),
@@ -20663,6 +20915,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20663
20915
  }), method(object({ deviceId: number() }), EventPruneCountsSchema, {
20664
20916
  kind: "mutation",
20665
20917
  auth: "admin"
20918
+ }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
20919
+ kind: "mutation",
20920
+ auth: "admin"
20921
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
20922
+ kind: "query",
20923
+ auth: "admin"
20924
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20925
+ kind: "mutation",
20926
+ auth: "admin"
20666
20927
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
20667
20928
  kind: "query",
20668
20929
  auth: "admin"
@@ -23159,6 +23420,17 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23159
23420
  */
23160
23421
  priority: number()
23161
23422
  })).readonly() });
23423
+ /**
23424
+ * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23425
+ * AUTO (resolved from the candidate ranking at send time); `resolved` reports
23426
+ * what AUTO currently picks, so the UI can show the effective value either way.
23427
+ */
23428
+ var NotificationEndpointSchema = object({
23429
+ /** The operator's explicit choice, or null for AUTO. */
23430
+ baseUrl: string().nullable(),
23431
+ /** What the ranking currently resolves to (null when nothing is reachable). */
23432
+ resolved: string().nullable()
23433
+ });
23162
23434
  var AllowedAddressesSchema = object({
23163
23435
  /**
23164
23436
  * Allowlist of interface addresses operators have explicitly opted
@@ -23181,7 +23453,7 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
23181
23453
  * to avoid mixed-content blocks in the browser. The public
23182
23454
  * tunnel always emits `https://` regardless. */
23183
23455
  scheme: _enum(["http", "https"]).optional()
23184
- }), GetConnectionEndpointsResultSchema), method(_void(), AllowedAddressesSchema), method(AllowedAddressesSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), AllowedAddressesSchema, { kind: "mutation" });
23456
+ }), 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" });
23185
23457
  /**
23186
23458
  * mesh-network — collection cap for mesh-VPN providers.
23187
23459
  *
@@ -23980,7 +24252,12 @@ var RecordingDeviceUsageSchema = object({
23980
24252
  var RecordingLocationUsageSchema = object({
23981
24253
  /** StorageLocation id; null for the legacy/degraded single-root fallback. */
23982
24254
  locationId: string().nullable(),
23983
- /** Bytes of recordings stored on this location. */
24255
+ /** Every location id sharing this row's PHYSICAL volume (aliases). One row
24256
+ * is emitted per physical disk (2026-07-29): two locations on one root
24257
+ * previously rendered as two identical "disks" with a nonsensical used
24258
+ * split — hydrate attribution across aliases is arbitrary by nature. */
24259
+ locationIds: array(string()).optional(),
24260
+ /** Bytes of recordings stored on this PHYSICAL volume (all aliases). */
23984
24261
  usedBytes: number(),
23985
24262
  /** Free bytes on the location's volume; null when capacity is unknown (remote). */
23986
24263
  availableBytes: number().nullable(),
@@ -24092,6 +24369,44 @@ method(object({
24092
24369
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
24093
24370
  kind: "query",
24094
24371
  auth: "admin"
24372
+ }), method(object({
24373
+ deviceId: number(),
24374
+ aroundMs: number(),
24375
+ preRollSec: number().min(0).max(30).default(2),
24376
+ postRollSec: number().min(0).max(30).default(5),
24377
+ maxWidth: number().int().min(120).max(1280).default(480),
24378
+ fps: number().int().min(1).max(15).default(5)
24379
+ }), object({
24380
+ gifBase64: string(),
24381
+ fromMs: number(),
24382
+ toMs: number()
24383
+ }), {
24384
+ kind: "mutation",
24385
+ auth: "admin"
24386
+ }), method(object({
24387
+ deviceId: number(),
24388
+ aroundMs: number(),
24389
+ preRollSec: number().min(0).max(30).default(3),
24390
+ postRollSec: number().min(0).max(30).default(7),
24391
+ maxWidth: number().int().min(160).max(1920).default(640)
24392
+ }), object({
24393
+ clipBase64: string(),
24394
+ mime: string(),
24395
+ fromMs: number(),
24396
+ toMs: number(),
24397
+ bytes: number().int()
24398
+ }), {
24399
+ kind: "mutation",
24400
+ auth: "admin"
24401
+ }), method(RelocateFootageInputSchema, object({ jobId: string() }), {
24402
+ kind: "mutation",
24403
+ auth: "admin"
24404
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
24405
+ kind: "query",
24406
+ auth: "admin"
24407
+ }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
24408
+ kind: "mutation",
24409
+ auth: "admin"
24095
24410
  });
24096
24411
  /**
24097
24412
  * `recordingExport` cap — render a footage time range into a single downloadable
@@ -25683,6 +25998,12 @@ Object.freeze({
25683
25998
  addonId: null,
25684
25999
  access: "view"
25685
26000
  },
26001
+ "deviceManager.getDeviceStatusAggregateBatch": {
26002
+ capName: "device-manager",
26003
+ capScope: "system",
26004
+ addonId: null,
26005
+ access: "view"
26006
+ },
25686
26007
  "deviceManager.getLinkedDevices": {
25687
26008
  capName: "device-manager",
25688
26009
  capScope: "system",
@@ -26577,6 +26898,12 @@ Object.freeze({
26577
26898
  addonId: null,
26578
26899
  access: "view"
26579
26900
  },
26901
+ "localNetwork.getNotificationEndpoint": {
26902
+ capName: "local-network",
26903
+ capScope: "system",
26904
+ addonId: null,
26905
+ access: "view"
26906
+ },
26580
26907
  "localNetwork.getPreferred": {
26581
26908
  capName: "local-network",
26582
26909
  capScope: "system",
@@ -26601,6 +26928,12 @@ Object.freeze({
26601
26928
  addonId: null,
26602
26929
  access: "create"
26603
26930
  },
26931
+ "localNetwork.setNotificationEndpoint": {
26932
+ capName: "local-network",
26933
+ capScope: "system",
26934
+ addonId: null,
26935
+ access: "create"
26936
+ },
26604
26937
  "lockControl.lock": {
26605
26938
  capName: "lock-control",
26606
26939
  capScope: "device",
@@ -27243,6 +27576,12 @@ Object.freeze({
27243
27576
  addonId: null,
27244
27577
  access: "create"
27245
27578
  },
27579
+ "pipelineAnalytics.cancelMediaRelocate": {
27580
+ capName: "pipeline-analytics",
27581
+ capScope: "device",
27582
+ addonId: null,
27583
+ access: "create"
27584
+ },
27246
27585
  "pipelineAnalytics.clearTracks": {
27247
27586
  capName: "pipeline-analytics",
27248
27587
  capScope: "device",
@@ -27297,6 +27636,12 @@ Object.freeze({
27297
27636
  addonId: null,
27298
27637
  access: "view"
27299
27638
  },
27639
+ "pipelineAnalytics.getMediaRelocateStatus": {
27640
+ capName: "pipeline-analytics",
27641
+ capScope: "device",
27642
+ addonId: null,
27643
+ access: "view"
27644
+ },
27300
27645
  "pipelineAnalytics.getMotionEvents": {
27301
27646
  capName: "pipeline-analytics",
27302
27647
  capScope: "device",
@@ -27369,6 +27714,12 @@ Object.freeze({
27369
27714
  addonId: null,
27370
27715
  access: "create"
27371
27716
  },
27717
+ "pipelineAnalytics.relocateMedia": {
27718
+ capName: "pipeline-analytics",
27719
+ capScope: "device",
27720
+ addonId: null,
27721
+ access: "create"
27722
+ },
27372
27723
  "pipelineAnalytics.searchObjectEvents": {
27373
27724
  capName: "pipeline-analytics",
27374
27725
  capScope: "device",
@@ -28131,6 +28482,12 @@ Object.freeze({
28131
28482
  addonId: null,
28132
28483
  access: "create"
28133
28484
  },
28485
+ "recording.cancelRelocate": {
28486
+ capName: "recording",
28487
+ capScope: "system",
28488
+ addonId: null,
28489
+ access: "create"
28490
+ },
28134
28491
  "recording.deleteFootprint": {
28135
28492
  capName: "recording",
28136
28493
  capScope: "system",
@@ -28161,6 +28518,12 @@ Object.freeze({
28161
28518
  addonId: null,
28162
28519
  access: "view"
28163
28520
  },
28521
+ "recording.getRelocateStatus": {
28522
+ capName: "recording",
28523
+ capScope: "system",
28524
+ addonId: null,
28525
+ access: "view"
28526
+ },
28164
28527
  "recording.getStorageUsage": {
28165
28528
  capName: "recording",
28166
28529
  capScope: "system",
@@ -28191,6 +28554,24 @@ Object.freeze({
28191
28554
  addonId: null,
28192
28555
  access: "view"
28193
28556
  },
28557
+ "recording.relocateFootage": {
28558
+ capName: "recording",
28559
+ capScope: "system",
28560
+ addonId: null,
28561
+ access: "create"
28562
+ },
28563
+ "recording.renderClip": {
28564
+ capName: "recording",
28565
+ capScope: "system",
28566
+ addonId: null,
28567
+ access: "create"
28568
+ },
28569
+ "recording.renderGif": {
28570
+ capName: "recording",
28571
+ capScope: "system",
28572
+ addonId: null,
28573
+ access: "create"
28574
+ },
28194
28575
  "recording.rescanStorage": {
28195
28576
  capName: "recording",
28196
28577
  capScope: "system",
@@ -28785,6 +29166,12 @@ Object.freeze({
28785
29166
  addonId: null,
28786
29167
  access: "create"
28787
29168
  },
29169
+ "streamBroker.renderPreBufferClip": {
29170
+ capName: "stream-broker",
29171
+ capScope: "system",
29172
+ addonId: null,
29173
+ access: "create"
29174
+ },
28788
29175
  "streamBroker.restartProfile": {
28789
29176
  capName: "stream-broker",
28790
29177
  capScope: "system",