@camstack/addon-agent-ui 1.2.138 → 1.2.140

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 (2) hide show
  1. package/dist/addon.js +570 -2
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
5361
5361
  var ZodFirstPartyTypeKind;
5362
5362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5363
5363
  //#endregion
5364
- //#region ../types/dist/sleep-De1BvmWo.mjs
5364
+ //#region ../types/dist/sleep-COWaSCAi.mjs
5365
5365
  /**
5366
5366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5367
5367
  * window to float samples (D455).
@@ -7533,6 +7533,24 @@ object({
7533
7533
  unreachable: number()
7534
7534
  })
7535
7535
  });
7536
+ /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7537
+ var PeerBytesTicketSchema = object({
7538
+ /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
7539
+ url: string().min(1),
7540
+ /**
7541
+ * The HOST node this URL means something on — the hub or a named agent,
7542
+ * never a runner. {@link AddonPeerBytes.open} compares it to its own and
7543
+ * refuses `cross-node` by name when they differ, without dialling.
7544
+ */
7545
+ hostNodeId: string().min(1),
7546
+ expiresAtMs: number().int().nonnegative(),
7547
+ /**
7548
+ * What the producer DECLARED the body to be, when it knows — `null` when it
7549
+ * does not. Never `0` for unknown (D393): a consumer sizing a bound off this
7550
+ * must be able to tell "the producer did not say" from "the body is empty".
7551
+ */
7552
+ declaredBytes: number().int().nonnegative().nullable()
7553
+ });
7536
7554
  /**
7537
7555
  * Adoption job — the background form of `device-adoption.adopt`.
7538
7556
  *
@@ -13310,6 +13328,97 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
13310
13328
  auth: "admin"
13311
13329
  });
13312
13330
  /**
13331
+ * device-admin-link — "this device has a management page of its own, and here
13332
+ * is its address".
13333
+ *
13334
+ * ## Why this is not a `deviceConfig` cap
13335
+ *
13336
+ * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
13337
+ * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
13338
+ * patch back through a setter; it costs a `builderId` reducer in
13339
+ * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
13340
+ * renders a form section. This cap answers ONE question with ONE read and
13341
+ * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
13342
+ * block, no `settings`, no `runtimeState` and no reducer — exactly like
13343
+ * `reboot`, the other pure-RPC device-native cap.
13344
+ *
13345
+ * ## Absent, and the difference between "no page" and "we cannot say"
13346
+ *
13347
+ * The two are answered at DIFFERENT layers, on purpose:
13348
+ *
13349
+ * - **"We cannot say"** → the provider never registers the cap for that
13350
+ * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
13351
+ * fan are reached only through a vendor cloud; there is no address to hand
13352
+ * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
13353
+ * conditioner DO have a LAN IP, and still have no HTTP management page
13354
+ * behind it. None of them register, so `deviceManager.getBindings` never
13355
+ * lists the cap and no surface asks.
13356
+ * - **"This device has no page, and I know that"** → the provider registers
13357
+ * and `getAdminLink` returns `null`. This is the answer for a device whose
13358
+ * sibling DOES have a page: a Reolink battery camera reached over UDP by
13359
+ * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
13360
+ * transport, a Home Assistant broker authenticated by supervisor token
13361
+ * (which carries no `baseUrl` at all).
13362
+ *
13363
+ * Both draw NOTHING. A button that opens a browser error is worse than no
13364
+ * button, and D62 is the same rule from the other side: an off switch is
13365
+ * reported off, never made to look broken. There is no third state where the
13366
+ * UI renders a disabled button "because the device might have a page".
13367
+ *
13368
+ * ## The URL never carries credentials
13369
+ *
13370
+ * Not in userinfo, not in a query string. Every provider builds through
13371
+ * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
13372
+ * scheme and path as separate arguments — there is no parameter a secret could
13373
+ * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
13374
+ * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
13375
+ * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
13376
+ * keeps providers from hand-rolling one anyway.
13377
+ *
13378
+ * This matters here more than anywhere else in the repo, because every provider
13379
+ * that knows a device's host knows its PASSWORD too: `{ host, port, username,
13380
+ * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
13381
+ * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
13382
+ * camera's own page will ask for its own login. That is correct, and pre-
13383
+ * filling it is the operator's business, not ours.
13384
+ *
13385
+ * ## It is a LAN fact
13386
+ *
13387
+ * The URL addresses the device where the NODE can see it. It is not proxied,
13388
+ * not made reachable from outside, and not sent anywhere. A surface renders it
13389
+ * as a link the operator's own browser follows, on the operator's own network,
13390
+ * or renders nothing.
13391
+ */
13392
+ /**
13393
+ * Whose page is it. The distinction is for the OPERATOR, who needs to know
13394
+ * before clicking whether he is about to land on a camera's own web server or
13395
+ * inside Home Assistant.
13396
+ */
13397
+ var AdminLinkTargetEnum = _enum(["device", "integration"]);
13398
+ var DeviceAdminLinkSchema = object({
13399
+ /**
13400
+ * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
13401
+ * free of userinfo and of any credential-shaped query key.
13402
+ */
13403
+ url: string(),
13404
+ /**
13405
+ * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
13406
+ * The PROVIDER names it, because only the provider knows what the page is;
13407
+ * a UI that invented the label from the addon id would call the Home
13408
+ * Assistant device page "Provider Homeassistant".
13409
+ */
13410
+ label: string(),
13411
+ target: AdminLinkTargetEnum,
13412
+ /**
13413
+ * Host the URL points at, without scheme, port or path — for the tooltip, so
13414
+ * an operator can see WHERE the button goes before he follows it. Redundant
13415
+ * with `url` by construction; carried separately so no surface has to parse
13416
+ * a URL to show it.
13417
+ */
13418
+ host: string()
13419
+ });
13420
+ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
13421
+ /**
13313
13422
  * `device-export` — collection cap for addons that export camstack
13314
13423
  * devices to external ecosystems (HomeAssistant via MQTT discovery,
13315
13424
  * HomeKit/HAP, Alexa Smart Home, …).
@@ -24001,6 +24110,7 @@ _enum([
24001
24110
  "sleeping",
24002
24111
  "camera-refused",
24003
24112
  "no-keyframe",
24113
+ "decode-failed",
24004
24114
  "no-catalog-row",
24005
24115
  "unsupported",
24006
24116
  "unknown-device",
@@ -24275,6 +24385,32 @@ var ClipBytesSchema = object({
24275
24385
  durationMs: number().positive().optional()
24276
24386
  });
24277
24387
  /**
24388
+ * Where a clip's finished bytes can be TAKEN (D613) — the answer to
24389
+ * {@link videoclipsCapability.methods.offerClipBytes}.
24390
+ *
24391
+ * Everything {@link ClipBytesSchema} carries except the bytes themselves, plus
24392
+ * the one-shot ticket that leads to them. The metadata is answered BEFORE the
24393
+ * transfer on purpose: a consumer learns which twin it got, what to call the
24394
+ * file and how long the clip runs without having to read a byte, so a decision
24395
+ * it would make on that metadata (a wrong twin, an implausible duration) costs
24396
+ * no transfer at all.
24397
+ */
24398
+ var ClipBytesOfferSchema = object({
24399
+ /**
24400
+ * One shot, seconds-long, loopback, on the PROVIDER's own host. Open it with
24401
+ * `ctx.peerBytes.open(...)`, which refuses a ticket from another node by
24402
+ * name rather than dialling a port that means something else here.
24403
+ */
24404
+ ticket: PeerBytesTicketSchema,
24405
+ contentType: string(),
24406
+ /** Suggested filename, extension included. */
24407
+ name: string(),
24408
+ /** Which twin was actually served — see {@link ClipBytesSchema.served}. */
24409
+ served: CamProfileSchema,
24410
+ /** See {@link ClipBytesSchema.durationMs}. Absent when nothing measured it. */
24411
+ durationMs: number().positive().optional()
24412
+ });
24413
+ /**
24278
24414
  * Where a clip's STREAM can be dialled (D597) — the answer to
24279
24415
  * {@link videoclipsCapability.methods.dialClipStream}.
24280
24416
  *
@@ -24350,6 +24486,44 @@ var ClipStreamDialSchema = object({
24350
24486
  /** Why `servedAudio` is `none` although sound was asked for. */
24351
24487
  audioReason: ClipStreamAudioReasonSchema.optional()
24352
24488
  });
24489
+ /**
24490
+ * What a surface may DRAW for this provider's clips — the answer to
24491
+ * {@link videoclipsCapability.methods.getPlaybackOptions} (D612).
24492
+ *
24493
+ * The envelope is a PROVIDER fact, not a clip fact, and that is measured, not
24494
+ * assumed: the broker's `chooseClipPath` reads exactly two inputs — whether
24495
+ * `dialClipStream` and `readClipBytes` are wired — and both are constants of
24496
+ * the broker's own closure over the provider's methods. The `profile` it is
24497
+ * handed is explicitly not read. So every clip of a provider is served the
24498
+ * same way, and a per-clip channel carried a value that could not vary. The
24499
+ * per-clip `clipTransport` server message was removed for exactly that reason.
24500
+ *
24501
+ * Queried per camera, before a clip is picked, so a control is rendered or
24502
+ * DISABLED rather than offered and refused at play time (D62: a disabled
24503
+ * control reads as unavailable, one that undoes the gesture reads as broken).
24504
+ */
24505
+ var ClipPlaybackOptionsSchema = object({
24506
+ /**
24507
+ * How this provider's clips reach the player. `stream` is the provider's
24508
+ * forward-only fMP4 (D597); `file` is one bounded by-handle fetch of the
24509
+ * whole clip, `stbl` indexed (D575).
24510
+ */
24511
+ transport: _enum(["stream", "file"]),
24512
+ /** `forward` = only ahead of the playhead. `free` = anywhere. */
24513
+ seek: _enum(["forward", "free"]),
24514
+ /** Frame-step BACKWARD is meaningful. Forward always is. */
24515
+ stepBack: boolean(),
24516
+ /** Whether the scrub gesture is served, as opposed to refused by name. */
24517
+ scrub: boolean(),
24518
+ /**
24519
+ * The rates that can be delivered, ascending, always containing `1`. The
24520
+ * viewer draws its picker from this and from nothing else — a constant it
24521
+ * keeps instead is the second authority that produced the defect: `8` and
24522
+ * `16` were offered, the broker clamped them to `4`, and no line anywhere
24523
+ * said so. `0` is not a member: pause is the absence of a rate.
24524
+ */
24525
+ rates: array(number().positive()).min(1).readonly()
24526
+ });
24353
24527
  var ClipSourceAvailabilitySchema = object({
24354
24528
  state: _enum([
24355
24529
  "ok",
@@ -24509,6 +24683,29 @@ DeviceType.Camera, method(object({
24509
24683
  }), ClipBytesSchema, {
24510
24684
  kind: "query",
24511
24685
  auth: "protected"
24686
+ }), optionalMethod(object({
24687
+ deviceId: number(),
24688
+ clipId: string().min(1),
24689
+ /** WHICH provider holds the bytes — see `readClipBytes.provider`. */
24690
+ provider: string().min(1),
24691
+ /** Which twin — `low | mid` → the sub file, `high` → the main twin. */
24692
+ profile: CamProfileSchema.optional(),
24693
+ /**
24694
+ * The CALLER's byte bound, so an over-size clip is refused before the
24695
+ * camera is touched rather than after. Capped by
24696
+ * {@link VIDEOCLIPS_MAX_OFFER_BYTES} whatever is passed; absent means
24697
+ * that ceiling.
24698
+ */
24699
+ maxBytes: number().int().positive().optional(),
24700
+ /**
24701
+ * The operator's authorisation to wake a sleeping camera for this
24702
+ * read. Absent — the default — means a sleeping standalone battery
24703
+ * camera is REFUSED by name, before any session is opened.
24704
+ */
24705
+ wake: ClipWakeSchema.optional()
24706
+ }), ClipBytesOfferSchema, {
24707
+ kind: "query",
24708
+ auth: "protected"
24512
24709
  }), optionalMethod(object({
24513
24710
  deviceId: number(),
24514
24711
  clipId: string().min(1),
@@ -24530,6 +24727,15 @@ DeviceType.Camera, method(object({
24530
24727
  }), ClipStreamDialSchema, {
24531
24728
  kind: "query",
24532
24729
  auth: "protected"
24730
+ }), optionalMethod(object({
24731
+ deviceId: number(),
24732
+ /** WHICH provider to ask — the `addonId` a {@link ClipSourceSchema}
24733
+ * row carries. Required for the same reason `listClips` requires it:
24734
+ * a collection cap has no "the bound one" to resolve to (D554). */
24735
+ provider: string().min(1)
24736
+ }), ClipPlaybackOptionsSchema, {
24737
+ kind: "query",
24738
+ auth: "protected"
24533
24739
  });
24534
24740
  /**
24535
24741
  * Optional client-side hints sent at session creation to help the provider
@@ -26087,6 +26293,307 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
26087
26293
  auth: "admin"
26088
26294
  });
26089
26295
  /**
26296
+ * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
26297
+ * writes to the CAMERA's own card, on the camera's own schedule.
26298
+ *
26299
+ * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
26300
+ * footage ledger, our storage locations, our retention. This one has a
26301
+ * different authority — the camera's firmware — and per D62 it stores
26302
+ * nothing of its own. Every value here is read from the camera and every
26303
+ * write goes back to the camera; there is no CamStack-side mirror that
26304
+ * could disagree with the device.
26305
+ *
26306
+ * ## One shape, two firmwares
26307
+ *
26308
+ * Measured 2026-09-22 against the live fleet:
26309
+ *
26310
+ * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
26311
+ * | --- | --- | --- |
26312
+ * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
26313
+ * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
26314
+ * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
26315
+ * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
26316
+ * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
26317
+ * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
26318
+ * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
26319
+ * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
26320
+ *
26321
+ * The two schedule models look different and are the same thing in
26322
+ * different coordinates: both answer "for this trigger, during which
26323
+ * weekly windows does the camera record". {@link RecordWindow} is that
26324
+ * question in one shape — Hikvision's ranges map straight onto it,
26325
+ * Reolink's mask expands into hour-aligned windows.
26326
+ *
26327
+ * ## Union, not intersection
26328
+ *
26329
+ * **The same fields exist on every camera.** What differs per device is
26330
+ * which VALUES that device accepts, and that is what {@link
26331
+ * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
26332
+ * per field plus the schedule's own limits. A control a camera cannot
26333
+ * honour is rendered DISABLED WITH ITS REASON, never missing and never
26334
+ * dead: disabled must not look like broken.
26335
+ *
26336
+ * ## Refusal by name
26337
+ *
26338
+ * A write a camera cannot honour is refused with a sentence the operator
26339
+ * can read — never accepted and dropped. Both providers refuse through
26340
+ * {@link describeOnboardRefusal}, so the vocabulary is one function and
26341
+ * one test, not two hand-written vendor opinions.
26342
+ *
26343
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
26344
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
26345
+ * injected from `status`) reports the live values, and a single
26346
+ * `setSettings` mutation applies a partial change. No hand-written
26347
+ * settings-contribution methods.
26348
+ */
26349
+ /**
26350
+ * What makes the camera start recording during a window.
26351
+ *
26352
+ * The union of both vendors' vocabularies. `continuous` is Hikvision's
26353
+ * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
26354
+ * object-class triggers are Reolink-only today and the smart-event ones
26355
+ * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
26356
+ * firmwares measured — a camera that cannot record on a trigger simply
26357
+ * does not list it in `options.schedule.triggers`, and a window naming
26358
+ * it is REFUSED, not dropped.
26359
+ */
26360
+ var RecordTriggerSchema = _enum([
26361
+ "continuous",
26362
+ "motion",
26363
+ "person",
26364
+ "vehicle",
26365
+ "animal",
26366
+ "lineCrossing",
26367
+ "intrusion",
26368
+ "loitering",
26369
+ "alarmInput"
26370
+ ]);
26371
+ /**
26372
+ * One weekly recording window: "on `day`, from `startMinute` to
26373
+ * `endMinute`, record on `trigger`".
26374
+ *
26375
+ * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
26376
+ * both firmwares enumerate). Minutes are local camera time since
26377
+ * midnight; `endMinute` may be 1440, meaning end of day — that is
26378
+ * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
26379
+ * collapsing it to 0 would turn a whole-day window into an empty one.
26380
+ */
26381
+ var RecordWindowSchema = object({
26382
+ trigger: RecordTriggerSchema,
26383
+ day: number().int().min(0).max(6),
26384
+ startMinute: number().int().min(0).max(1439),
26385
+ endMinute: number().int().min(1).max(1440)
26386
+ });
26387
+ /** Status of one physical volume, as the camera itself describes it. */
26388
+ var OnboardStorageVolumeSchema = object({
26389
+ /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
26390
+ id: string(),
26391
+ /** The camera's own name for it, when it gives one (`hddName`). */
26392
+ label: string().optional(),
26393
+ status: _enum([
26394
+ "ok",
26395
+ "unformatted",
26396
+ "error",
26397
+ "offline",
26398
+ "unknown"
26399
+ ]),
26400
+ /**
26401
+ * Total size in MB, or **null when the camera did not say**.
26402
+ *
26403
+ * Never 0 for an unreadable value: a measurement that failed is not a
26404
+ * measurement (D393), and a card whose size is unknown must not be
26405
+ * rendered as a card of size zero.
26406
+ */
26407
+ capacityMb: number().nullable(),
26408
+ /**
26409
+ * Free space in MB, or null when unknown.
26410
+ *
26411
+ * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
26412
+ * 1439 both report exactly 11776 MB free — the fixed reserve a looping
26413
+ * card converges on once it has wrapped. At loop steady state the
26414
+ * number is identical whether the camera recorded yesterday or stopped
26415
+ * a month ago.
26416
+ */
26417
+ freeMb: number().nullable(),
26418
+ /** True when the camera reports the volume writable (`property` RW). */
26419
+ writable: boolean().optional()
26420
+ });
26421
+ object({
26422
+ storage: discriminatedUnion("kind", [
26423
+ object({
26424
+ kind: literal("present"),
26425
+ volumes: array(OnboardStorageVolumeSchema)
26426
+ }),
26427
+ object({
26428
+ kind: literal("absent"),
26429
+ reason: string()
26430
+ }),
26431
+ object({
26432
+ kind: literal("unknown"),
26433
+ reason: string()
26434
+ })
26435
+ ]),
26436
+ tracks: array(object({
26437
+ id: string(),
26438
+ enabled: boolean(),
26439
+ isVideo: boolean(),
26440
+ /** From the camera's own track description. Null when it does not say. */
26441
+ codec: string().nullable(),
26442
+ resolution: string().nullable(),
26443
+ /** Per-track overwrite flag, where the firmware keeps it per track. */
26444
+ overwriteWhenFull: boolean().nullable()
26445
+ })),
26446
+ /**
26447
+ * The track the write path targets — the enabled VIDEO one. Null when
26448
+ * no track could be identified, which is itself a refusal reason.
26449
+ */
26450
+ primaryTrackId: string().nullable(),
26451
+ /** Master "record to the card at all" switch. */
26452
+ enabled: boolean().nullable(),
26453
+ overwriteWhenFull: boolean().nullable(),
26454
+ preRecordSec: number().nullable(),
26455
+ postRecordSec: number().nullable(),
26456
+ /** Length of one recorded file, in minutes. */
26457
+ segmentMinutes: number().nullable(),
26458
+ /** The primary track's weekly windows, flattened. */
26459
+ windows: array(RecordWindowSchema),
26460
+ /**
26461
+ * How many windows the camera described that CamStack could NOT read —
26462
+ * an unrecognised trigger, an unparseable clock, a weekday it does not
26463
+ * name.
26464
+ *
26465
+ * A dropped window is work the reader threw away, and a schedule that
26466
+ * silently shows fewer rows than the camera holds is how an operator
26467
+ * saves back a schedule shorter than the one they were looking at
26468
+ * (D391). Non-zero means the window list is INCOMPLETE and a write
26469
+ * that replaces it would delete what was not shown — which is why a
26470
+ * provider reporting a non-zero count also reports the schedule as not
26471
+ * writable.
26472
+ */
26473
+ unreadableWindows: number(),
26474
+ /**
26475
+ * The camera is scheduled to record and has NO usable storage.
26476
+ *
26477
+ * A first-class fact because it is the fleet's most common silent
26478
+ * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
26479
+ * to a card that is not there. Neither the schedule nor the storage
26480
+ * read says anything wrong on its own; only the pair does.
26481
+ */
26482
+ recordingToNowhere: boolean(),
26483
+ lastFetchedAt: number()
26484
+ });
26485
+ /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
26486
+ var RangeSchema = object({
26487
+ min: number(),
26488
+ max: number(),
26489
+ step: number()
26490
+ });
26491
+ /**
26492
+ * The values a camera actually takes for a numeric field, when they are a SET
26493
+ * rather than a range.
26494
+ *
26495
+ * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
26496
+ * (I91DN) on 2026-09-22 by writing each value and reading it back:
26497
+ *
26498
+ * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
26499
+ * camera's "no limit" — `-1` and `4294967295` both land on it);
26500
+ * - post-record: `5, 10, 30, 60, 120, 300, 600`.
26501
+ *
26502
+ * Neither is expressible as a step: the first has a sentinel two billion away
26503
+ * from its neighbours, the second doubles and then jumps. A range that tried
26504
+ * would forbid values the camera takes AND permit values it silently replaces
26505
+ * with 5 — wrong in both directions at once.
26506
+ *
26507
+ * `sentinel` names the member that is not a duration, so a surface can render
26508
+ * "no limit" instead of `2147483647` seconds.
26509
+ */
26510
+ var AllowedValuesSchema = object({
26511
+ values: array(number()).min(1),
26512
+ sentinel: object({
26513
+ value: number(),
26514
+ meaning: _enum(["no-limit", "disabled"])
26515
+ }).optional()
26516
+ });
26517
+ /**
26518
+ * Per-field availability on ONE camera.
26519
+ *
26520
+ * The field exists on every camera — this says whether this one can be
26521
+ * read and whether it can be written, and `reason` says why not when
26522
+ * either is false. The UI renders the control DISABLED with the reason
26523
+ * rather than hiding it, so a limitation is legible instead of looking
26524
+ * like a missing feature.
26525
+ */
26526
+ var OnboardFieldSupportSchema = object({
26527
+ readable: boolean(),
26528
+ writable: boolean(),
26529
+ /** Required whenever `readable` or `writable` is false. */
26530
+ reason: string().optional()
26531
+ });
26532
+ /** What this camera's schedule model can express. */
26533
+ var OnboardScheduleSupportSchema = object({
26534
+ support: OnboardFieldSupportSchema,
26535
+ /**
26536
+ * The smallest time step the camera can express, in minutes.
26537
+ *
26538
+ * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
26539
+ * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
26540
+ * window whose edges are not a multiple of this is REFUSED rather than
26541
+ * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
26542
+ * and nothing says so.
26543
+ */
26544
+ granularityMinutes: number(),
26545
+ /** Triggers this camera can record on. A window naming another is refused. */
26546
+ triggers: array(RecordTriggerSchema),
26547
+ /**
26548
+ * False when the camera stores ONE trigger per time range, so two
26549
+ * windows overlapping on the same day cannot carry different triggers.
26550
+ * True on Reolink, whose mask is per-trigger and independent.
26551
+ */
26552
+ supportsOverlappingTriggers: boolean()
26553
+ });
26554
+ var RecordingOnboardOptionsSchema = object({
26555
+ enabled: OnboardFieldSupportSchema,
26556
+ overwriteWhenFull: OnboardFieldSupportSchema,
26557
+ preRecordSec: OnboardFieldSupportSchema,
26558
+ preRecordSecRange: RangeSchema.optional(),
26559
+ /** Preferred over the range when the camera takes a SET, not a span. */
26560
+ preRecordSecAllowed: AllowedValuesSchema.optional(),
26561
+ postRecordSec: OnboardFieldSupportSchema,
26562
+ postRecordSecRange: RangeSchema.optional(),
26563
+ /** Preferred over the range when the camera takes a SET, not a span. */
26564
+ postRecordSecAllowed: AllowedValuesSchema.optional(),
26565
+ segmentMinutes: OnboardFieldSupportSchema,
26566
+ segmentMinutesRange: RangeSchema.optional(),
26567
+ /** Preferred over the range when the camera takes a SET, not a span. */
26568
+ segmentMinutesAllowed: AllowedValuesSchema.optional(),
26569
+ schedule: OnboardScheduleSupportSchema
26570
+ });
26571
+ /**
26572
+ * A partial change. Every field optional.
26573
+ *
26574
+ * Unlike the other `deviceConfig` caps, a provider here does **NOT**
26575
+ * silently ignore a field it cannot support — it refuses, by name,
26576
+ * through {@link describeOnboardRefusal}. Silence on a recording setting
26577
+ * is the failure D62 exists to prevent: the operator believes the camera
26578
+ * is recording the way the form says, and it is not.
26579
+ */
26580
+ var RecordingOnboardPatchSchema = object({
26581
+ enabled: boolean().optional(),
26582
+ overwriteWhenFull: boolean().optional(),
26583
+ preRecordSec: number().optional(),
26584
+ postRecordSec: number().optional(),
26585
+ segmentMinutes: number().optional(),
26586
+ /** The complete new window set for the primary track — not a delta. */
26587
+ windows: array(RecordWindowSchema).optional()
26588
+ });
26589
+ DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
26590
+ deviceId: number(),
26591
+ settings: RecordingOnboardPatchSchema
26592
+ }), _void(), {
26593
+ kind: "mutation",
26594
+ auth: "admin"
26595
+ });
26596
+ /**
26090
26597
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
26091
26598
  * for every device, regardless of provider — the kernel needs a uniform
26092
26599
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -35079,6 +35586,12 @@ Object.freeze({
35079
35586
  addonId: null,
35080
35587
  access: "view"
35081
35588
  },
35589
+ "deviceAdminLink.getAdminLink": {
35590
+ capName: "device-admin-link",
35591
+ capScope: "device",
35592
+ addonId: null,
35593
+ access: "view"
35594
+ },
35082
35595
  "deviceAdoption.adopt": {
35083
35596
  capName: "device-adoption",
35084
35597
  capScope: "system",
@@ -39117,6 +39630,24 @@ Object.freeze({
39117
39630
  addonId: null,
39118
39631
  access: "view"
39119
39632
  },
39633
+ "recordingOnboard.getOptions": {
39634
+ capName: "recording-onboard",
39635
+ capScope: "device",
39636
+ addonId: null,
39637
+ access: "view"
39638
+ },
39639
+ "recordingOnboard.getStatus": {
39640
+ capName: "recording-onboard",
39641
+ capScope: "device",
39642
+ addonId: null,
39643
+ access: "view"
39644
+ },
39645
+ "recordingOnboard.setSettings": {
39646
+ capName: "recording-onboard",
39647
+ capScope: "device",
39648
+ addonId: null,
39649
+ access: "create"
39650
+ },
39120
39651
  "recordingSignal.getStatus": {
39121
39652
  capName: "recording-signal",
39122
39653
  capScope: "device",
@@ -40581,6 +41112,12 @@ Object.freeze({
40581
41112
  addonId: null,
40582
41113
  access: "view"
40583
41114
  },
41115
+ "videoclips.getPlaybackOptions": {
41116
+ capName: "videoclips",
41117
+ capScope: "device",
41118
+ addonId: null,
41119
+ access: "view"
41120
+ },
40584
41121
  "videoclips.listClips": {
40585
41122
  capName: "videoclips",
40586
41123
  capScope: "device",
@@ -40593,6 +41130,12 @@ Object.freeze({
40593
41130
  addonId: null,
40594
41131
  access: "view"
40595
41132
  },
41133
+ "videoclips.offerClipBytes": {
41134
+ capName: "videoclips",
41135
+ capScope: "device",
41136
+ addonId: null,
41137
+ access: "view"
41138
+ },
40596
41139
  "videoclips.readClipBytes": {
40597
41140
  capName: "videoclips",
40598
41141
  capScope: "device",
@@ -41003,6 +41546,11 @@ Object.freeze({
41003
41546
  form: "single",
41004
41547
  optional: true
41005
41548
  }],
41549
+ "deviceAdminLink.getAdminLink": [{
41550
+ name: "deviceId",
41551
+ form: "single",
41552
+ optional: false
41553
+ }],
41006
41554
  "deviceAdoption.release": [{
41007
41555
  name: "camDeviceId",
41008
41556
  form: "single",
@@ -42388,6 +42936,16 @@ Object.freeze({
42388
42936
  form: "single",
42389
42937
  optional: true
42390
42938
  }],
42939
+ "recordingOnboard.getOptions": [{
42940
+ name: "deviceId",
42941
+ form: "single",
42942
+ optional: false
42943
+ }],
42944
+ "recordingOnboard.setSettings": [{
42945
+ name: "deviceId",
42946
+ form: "single",
42947
+ optional: false
42948
+ }],
42391
42949
  "recordingSignal.getStatus": [{
42392
42950
  name: "deviceId",
42393
42951
  form: "single",
@@ -42624,6 +43182,11 @@ Object.freeze({
42624
43182
  form: "single",
42625
43183
  optional: false
42626
43184
  }],
43185
+ "videoclips.getPlaybackOptions": [{
43186
+ name: "deviceId",
43187
+ form: "single",
43188
+ optional: false
43189
+ }],
42627
43190
  "videoclips.listClips": [{
42628
43191
  name: "deviceId",
42629
43192
  form: "single",
@@ -42634,6 +43197,11 @@ Object.freeze({
42634
43197
  form: "single",
42635
43198
  optional: false
42636
43199
  }],
43200
+ "videoclips.offerClipBytes": [{
43201
+ name: "deviceId",
43202
+ form: "single",
43203
+ optional: false
43204
+ }],
42637
43205
  "videoclips.readClipBytes": [{
42638
43206
  name: "deviceId",
42639
43207
  form: "single",
@@ -43318,7 +43886,7 @@ var AgentUIAddon = class extends BaseAddon {
43318
43886
  capability: adminUiCapability,
43319
43887
  provider: {
43320
43888
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
43321
- getVersion: async () => ({ version: "1.2.138" })
43889
+ getVersion: async () => ({ version: "1.2.140" })
43322
43890
  }
43323
43891
  }];
43324
43892
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.138",
3
+ "version": "1.2.140",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",