@camstack/addon-provider-onvif 1.2.100 → 1.2.102

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 +447 -15
  2. package/dist/addon.mjs +447 -15
  3. package/package.json +2 -2
package/dist/addon.mjs CHANGED
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
5
  //#endregion
6
- //#region ../types/dist/event-category-ZyX6jcse.mjs
6
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -620,6 +620,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
620
620
  * pull-reconcile from the provider's `getStatus` on reconnect. */
621
621
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
622
622
  EventCategory["BackupCompleted"] = "backup.completed";
623
+ /**
624
+ * A whole backup RUN finished — every destination attempted, win or lose.
625
+ *
626
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
627
+ * a progress UI and the wrong one for a notification: an operator with three
628
+ * destinations would be told three times. And a run where two of three
629
+ * destinations succeeded is not a clean success — a single "backup
630
+ * completed" that hid the failed one would be a lie, so the count of each is
631
+ * carried here and the message says both.
632
+ *
633
+ * Emitted by the backup orchestrator only after the destination loop, so a
634
+ * run that dies during the BUILD phase produces no completion at all.
635
+ */
636
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
623
637
  EventCategory["BackupRestored"] = "backup.restored";
624
638
  EventCategory["NotificationDispatched"] = "notification.dispatched";
625
639
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5350,7 +5364,7 @@ var ZodIssueCode = {
5350
5364
  var ZodFirstPartyTypeKind;
5351
5365
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5352
5366
  //#endregion
5353
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5367
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5354
5368
  /**
5355
5369
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5356
5370
  * window to float samples (D455).
@@ -11490,6 +11504,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11490
11504
  auth: "admin"
11491
11505
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11492
11506
  DeviceType.Camera;
11507
+ /**
11508
+ * The signals a device can emit to WAKE its own stream.
11509
+ *
11510
+ * A camera whose stream is built on demand sleeps until something asks for it,
11511
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11512
+ * puller holds a session open for ever, and treating that as demand would keep
11513
+ * a battery camera awake for ever, which is the whole thing the battery is for
11514
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11515
+ * itself, with no stream running.
11516
+ *
11517
+ * ## The vocabulary is the PROVIDER'S, not ours
11518
+ *
11519
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11520
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11521
+ * Reolink offers motion and camera-native detection; another provider may offer
11522
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11523
+ * yet. A fixed enum here would mean every new signal is a framework release.
11524
+ *
11525
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11526
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11527
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11528
+ * binding — but both answer "what drives the detection pipeline", which is a
11529
+ * different question from "what may wake a sleeping stream". A camera can do
11530
+ * the first and not be trusted with the second, and the operator picks per
11531
+ * camera. Two questions, two authorities.
11532
+ *
11533
+ * ## Availability is not permission
11534
+ *
11535
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11536
+ * wakes the stream is the operator's per-camera choice, held by the broker
11537
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11538
+ * provider declaring a signal is not a provider enabling it.
11539
+ */
11540
+ /** One signal a device can emit. */
11541
+ var StreamSignalSchema = object({
11542
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11543
+ code: string().min(1),
11544
+ /** What an operator reads in the picker. The provider's own wording. */
11545
+ label: string().min(1),
11546
+ /**
11547
+ * Whether the provider recommends this signal ON when a camera is first set
11548
+ * up. A provider knows which of its signals are cheap and reliable; an
11549
+ * operator should not have to discover that by trial. Reolink recommends
11550
+ * both of its own.
11551
+ */
11552
+ recommended: boolean()
11553
+ });
11554
+ object({
11555
+ signals: array(StreamSignalSchema),
11556
+ lastFetchedAt: number()
11557
+ });
11558
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11493
11559
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11494
11560
  var StreamFormatSchema = _enum([
11495
11561
  "webrtc",
@@ -11886,6 +11952,22 @@ var EgressTranscodeSchema = object({
11886
11952
  camStreamId: string().nullable()
11887
11953
  });
11888
11954
  method(object({
11955
+ deviceId: number().int().nonnegative(),
11956
+ /** The provider's signal code. */
11957
+ code: string().min(1),
11958
+ /** Ms epoch. Absent ⇒ now. */
11959
+ at: number().optional()
11960
+ }), object({
11961
+ /** Whether the broker acted on it, and if not, why. */
11962
+ accepted: boolean(),
11963
+ reason: _enum([
11964
+ "woke",
11965
+ "hold-extended",
11966
+ "not-enabled",
11967
+ "no-consumer",
11968
+ "unknown-code"
11969
+ ])
11970
+ }), { kind: "mutation" }), method(object({
11889
11971
  deviceId: number().int().nonnegative(),
11890
11972
  camStreamId: string().min(1),
11891
11973
  kind: CamStreamKindSchema,
@@ -12140,6 +12222,16 @@ var PickStreamRequirementsSchema = object({
12140
12222
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12141
12223
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12142
12224
  minHeight: number().int().positive().optional(),
12225
+ /**
12226
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12227
+ *
12228
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12229
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12230
+ * Without this the ceiling had to be re-implemented by every caller — and
12231
+ * one caller implementing it privately is how a second scoring authority
12232
+ * gets born.
12233
+ */
12234
+ maxHeight: number().int().positive().optional(),
12143
12235
  /** Minimum horizontal resolution. */
12144
12236
  minWidth: number().int().positive().optional(),
12145
12237
  /**
@@ -12156,7 +12248,22 @@ var PickStreamRequirementsSchema = object({
12156
12248
  * transcoded" guard: if the device is already serving the consumer's
12157
12249
  * codec end-to-end, there's nothing to optimise.
12158
12250
  */
12159
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12251
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12252
+ /**
12253
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12254
+ * understanding that it will be transcoded.
12255
+ *
12256
+ * Default `false` — today's behaviour, and the right one for a bypass
12257
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12258
+ * ask the larger question: "what is the best stream for me, transcoding if
12259
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12260
+ * does not, so a passthrough is never lost to a transcode; the answer says
12261
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12262
+ *
12263
+ * This is what lets one picker serve both the bypass and the full source
12264
+ * choice, instead of a consumer scoring privately when the bypass misses.
12265
+ */
12266
+ allowTranscode: boolean().optional()
12160
12267
  }).readonly();
12161
12268
  var PickStreamPreferencesSchema = object({
12162
12269
  /**
@@ -12170,12 +12277,32 @@ var PickStreamPreferencesSchema = object({
12170
12277
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12171
12278
  * memory-constrained consumers / Apple Home guest sessions).
12172
12279
  */
12173
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12280
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12281
+ /**
12282
+ * The height the consumer actually wants to DELIVER.
12283
+ *
12284
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12285
+ * above the target wins, and only if nothing reaches it does the tallest
12286
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12287
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12288
+ * express that: it says "as big as possible", which is a different wish.
12289
+ *
12290
+ * Ignored when absent, so every existing caller keeps its ordering.
12291
+ */
12292
+ targetHeight: number().int().positive().optional()
12174
12293
  }).readonly();
12175
12294
  var PickedCamStreamSchema = object({
12176
12295
  camStreamId: string(),
12177
12296
  codec: string().optional(),
12178
12297
  resolution: CamStreamResolutionSchema.optional(),
12298
+ /**
12299
+ * Whether serving this stream requires a decode + re-encode.
12300
+ *
12301
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12302
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12303
+ * not ask cannot be handed a cost it never agreed to pay.
12304
+ */
12305
+ transcodes: boolean(),
12179
12306
  /** One-line explanation of why this stream won — for logs / debug UI. */
12180
12307
  reason: string()
12181
12308
  });
@@ -16445,6 +16572,8 @@ var NcSystemEventKindSchema = _enum([
16445
16572
  "device-enabled",
16446
16573
  "device-battery-low",
16447
16574
  "device-battery-normal",
16575
+ "device-consumable-low",
16576
+ "device-consumable-normal",
16448
16577
  "stream-online",
16449
16578
  "stream-offline",
16450
16579
  "node-online",
@@ -16463,6 +16592,7 @@ var NcSystemEventKindSchema = _enum([
16463
16592
  "addon-updated",
16464
16593
  "server-updated",
16465
16594
  "export-completed",
16595
+ "backup-completed",
16466
16596
  "camera-online",
16467
16597
  "camera-offline",
16468
16598
  "camera-disabled",
@@ -17785,6 +17915,48 @@ var NcAlarmConfigSchema = object({
17785
17915
  settings: NcAlarmSettingsSchema,
17786
17916
  coverage: array(NcAlarmModeCoverageSchema)
17787
17917
  });
17918
+ /**
17919
+ * ONE rule's demand on ONE camera's clip ring.
17920
+ *
17921
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17922
+ * camera, so the answer stays a faithful description of the rules and the
17923
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17924
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17925
+ * a different thing from never having been told, and only the envelope
17926
+ * (`rulesLoaded`) can tell those apart.
17927
+ */
17928
+ var NcClipRetentionAskSchema = object({
17929
+ /**
17930
+ * The camera this ask is about. **Absent = every camera**, which is what a
17931
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17932
+ * asking everywhere.
17933
+ */
17934
+ deviceId: number().int().nonnegative().optional(),
17935
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17936
+ * needs nothing produces no ask at all. */
17937
+ seconds: number().min(0).max(60),
17938
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17939
+ * assigned, which is what the cut defaults to. */
17940
+ profile: CamProfileSchema.optional(),
17941
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17942
+ ruleId: string(),
17943
+ ruleName: string(),
17944
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17945
+ reason: _enum(["window", "occupancy"])
17946
+ });
17947
+ /**
17948
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17949
+ *
17950
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
17951
+ * once. A centre that is up but has not read its rules yet answers with an
17952
+ * empty ask list that means nothing at all — applying it would drop every
17953
+ * camera's ring to zero for the first events after a restart, which is the
17954
+ * footage this mechanism exists to keep.
17955
+ */
17956
+ var NcClipRetentionPlanSchema = object({
17957
+ rulesLoaded: boolean(),
17958
+ asks: array(NcClipRetentionAskSchema).readonly()
17959
+ });
17788
17960
  method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
17789
17961
  kind: "mutation",
17790
17962
  auth: "admin",
@@ -17805,7 +17977,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17805
17977
  }), object({ success: literal(true) }), {
17806
17978
  kind: "mutation",
17807
17979
  auth: "admin"
17808
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17980
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17809
17981
  deviceId: number().int(),
17810
17982
  muted: boolean()
17811
17983
  }), object({ success: literal(true) }), {
@@ -20339,6 +20511,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20339
20511
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20340
20512
  framesMatched: number().int()
20341
20513
  })).readonly() });
20514
+ /**
20515
+ * The long-term series a camera produces. A closed union so a typo cannot
20516
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20517
+ * is an alias of this, not a second list.
20518
+ */
20519
+ var AnalyticsLtsSeriesSchema = _enum([
20520
+ "motion",
20521
+ "audio-dbfs",
20522
+ "battery",
20523
+ "occupancy"
20524
+ ]);
20525
+ /**
20526
+ * One closed 5-minute bucket of a long-term series.
20527
+ *
20528
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20529
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20530
+ * that exists at all was measured; a bucket that is absent was not, which is a
20531
+ * different claim from zero and the reason this is a sparse series.
20532
+ */
20533
+ var LtsBucketSchema = object({
20534
+ scope: string(),
20535
+ bucketStart: number().int(),
20536
+ samples: number().int().nonnegative(),
20537
+ sum: number(),
20538
+ min: number(),
20539
+ max: number()
20540
+ });
20342
20541
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20343
20542
  deviceId: number(),
20344
20543
  trackId: string()
@@ -20385,6 +20584,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20385
20584
  kinds: array(string()).optional(),
20386
20585
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20387
20586
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20587
+ deviceId: number(),
20588
+ series: AnalyticsLtsSeriesSchema,
20589
+ /** Omit for EVERY scope of this series in the range. */
20590
+ scope: string().optional(),
20591
+ from: number(),
20592
+ to: number(),
20593
+ limit: number().int().positive().optional()
20594
+ }), array(LtsBucketSchema).readonly()), method(object({
20388
20595
  deviceId: number(),
20389
20596
  since: number(),
20390
20597
  until: number(),
@@ -21003,6 +21210,14 @@ var MotionSourceEnum = _enum([
21003
21210
  */
21004
21211
  var MotionSourcesSchema = array(MotionSourceEnum);
21005
21212
  /**
21213
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21214
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21215
+ * than a second spelling of the same two ideas — the value an operator picks
21216
+ * here is the value that comes back on the track, the overlay and the debug
21217
+ * row.
21218
+ */
21219
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21220
+ /**
21006
21221
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21007
21222
  * so cap-side consumers (the orchestrator forward, the runner addon's
21008
21223
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21153,6 +21368,35 @@ var RunnerCameraConfigSchema = object({
21153
21368
  * events; the orchestrator forwards to `reportMotion`.
21154
21369
  */
21155
21370
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21371
+ /**
21372
+ * WHICH root detector runs for this camera. The detection counterpart of
21373
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21374
+ * of sources the system understands, vendor-agnostic, owned here.
21375
+ *
21376
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21377
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21378
+ * here. Its boxes reach post-analysis on the same
21379
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21380
+ * track gets the same tracker, the same overlay and the same detail
21381
+ * subtree (face / plate / embedding).
21382
+ *
21383
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21384
+ * run, and that is where a camera with a usable onboard detector buys back
21385
+ * its share of the accelerator. It saves the root inference, not the decode
21386
+ * — the detail subtree still needs pixels to cut crops from.
21387
+ *
21388
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21389
+ * step at all (there is nothing to track), and the cap that knows this says
21390
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21391
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21392
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21393
+ * worth exactly what it already is — a wake signal with a class.
21394
+ *
21395
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21396
+ * vendor never turns a detector on for the operator, and neither does a
21397
+ * default.
21398
+ */
21399
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21156
21400
  pipelineEnabled: boolean().default(true),
21157
21401
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21158
21402
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21334,7 +21578,47 @@ var RunnerLocalMetricsSchema = object({
21334
21578
  queueDepth: number(),
21335
21579
  frameLazy: FrameLazyMetricsSchema.optional()
21336
21580
  });
21581
+ /**
21582
+ * Pipeline Runner capability — runtime detection workhorse.
21583
+ *
21584
+ * One instance per node. Receives camera assignments from
21585
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21586
+ * decoded frames, drains motion + detection queues, calls the local
21587
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21588
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21589
+ * the bus.
21590
+ *
21591
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21592
+ * runner has zero knowledge of other agents, no global state, and never
21593
+ * makes assignment decisions itself.
21594
+ */
21595
+ /**
21596
+ * Why a runner declined to look at a camera out of band. Named rather than a
21597
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21598
+ * already mid-session and one already bursting are four different facts, and a
21599
+ * caller told only "no" cannot tell a protection from a bug.
21600
+ */
21601
+ var OccupancyBurstRefusalSchema = _enum([
21602
+ "not-attached",
21603
+ "battery-asleep",
21604
+ "not-watching",
21605
+ "already-bursting"
21606
+ ]);
21337
21607
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
21608
+ deviceId: number(),
21609
+ /** How many frames to collect. The caller sizes this against what its
21610
+ * own confirmation needs; the runner clamps it to the field's range. */
21611
+ frames: number().int().positive().optional(),
21612
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21613
+ * defend — the periodic one at least has a timer to point at. */
21614
+ reason: string()
21615
+ }), object({
21616
+ started: boolean(),
21617
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21618
+ }), {
21619
+ auth: "admin",
21620
+ kind: "mutation"
21621
+ }), method(object({
21338
21622
  handle: FrameHandleSchema,
21339
21623
  bbox: NativeCropBboxSchema,
21340
21624
  maxWidth: number().int().positive().optional(),
@@ -23808,10 +24092,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23808
24092
  }), boolean()), method(object({
23809
24093
  deviceId: number().int().nonnegative(),
23810
24094
  sessionId: string()
23811
- }), object({ pendingRenegotiation: object({
23812
- target: WebrtcStreamTargetSchema,
23813
- epoch: number()
23814
- }).nullable() }));
24095
+ }), object({
24096
+ pendingRenegotiation: object({
24097
+ target: WebrtcStreamTargetSchema,
24098
+ epoch: number()
24099
+ }).nullable(),
24100
+ /**
24101
+ * Whether the session still EXISTS.
24102
+ *
24103
+ * A consumer that holds a resource for the life of a session needs to
24104
+ * be able to ask, because a session does not always end the way it
24105
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24106
+ * sent `SessionDisconnected`, so the Alexa exporter's
24107
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24108
+ * H.264 transcode kept running for NOBODY for more than twenty
24109
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24110
+ * minutes earlier — the broker knew; the holder had no way to ask.
24111
+ *
24112
+ * `false` for a session id the provider has never heard of, which is
24113
+ * the same answer as "it ended": either way nothing is holding it up.
24114
+ */
24115
+ alive: boolean()
24116
+ }));
23815
24117
  object({
23816
24118
  /** All accessory children of the parent. */
23817
24119
  childDeviceIds: array(number()).readonly(),
@@ -26889,7 +27191,7 @@ var NativeDetectionSchema = object({
26889
27191
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26890
27192
  confidence: number().min(0).max(1).optional()
26891
27193
  });
26892
- object({
27194
+ var NativeObjectDetectionStatusSchema = object({
26893
27195
  /**
26894
27196
  * Last observed instance per class. Missing entries mean the class
26895
27197
  * is supported but nothing has been seen since the provider started.
@@ -26906,14 +27208,56 @@ object({
26906
27208
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26907
27209
  /**
26908
27210
  * Whether forwarding of onboard AI detections is enabled for this device.
26909
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26910
- * churn the tracker, so forwarding stays off until the operator enables it.
27211
+ *
27212
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27213
+ * camera runs — that is the operator's choice, and it is made where every
27214
+ * other detection choice is made. `geometry` on
27215
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27216
+ * choice would buy this particular camera.
26911
27217
  */
26912
27218
  enabled: boolean()
26913
- }).extend({
27219
+ });
27220
+ /**
27221
+ * WHEN a camera's onboard detections carry geometry.
27222
+ *
27223
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27224
+ * a detection is a trackable subject whenever the camera sees one.
27225
+ * - `while-streaming` — only while some stream of this camera is already open.
27226
+ * The boxes ride the video's own side-channel rather than a feed of their
27227
+ * own, so they cost nothing and they exist only when something is pulling.
27228
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27229
+ * radio drain, but a camera that is awake is awake precisely because
27230
+ * something is in front of it, and its stream is already being pulled.
27231
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27232
+ * pipeline needs geometry to make a subject, so such a push reaches the
27233
+ * tracker as motion and no further.
27234
+ *
27235
+ * Reported and not inferred, because the operator's question in front of the
27236
+ * picker is "what do I get", and these are three different answers (D14: the
27237
+ * derived form is only as honest as `getOptions`).
27238
+ */
27239
+ var NativeObjectGeometryEnum = _enum([
27240
+ "boxed",
27241
+ "while-streaming",
27242
+ "flag-only"
27243
+ ]);
27244
+ var NativeObjectDetectionOptionsSchema = object({
27245
+ /** Classes this firmware can detect — the same list the status reports. */
27246
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27247
+ /** What a detection from this camera carries. */
27248
+ geometry: NativeObjectGeometryEnum
27249
+ });
27250
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27251
+ NativeObjectDetectionStatusSchema.extend({
26914
27252
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26915
27253
  lastFetchedAt: number() });
26916
- DeviceType.Camera, method(object({
27254
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27255
+ deviceId: number(),
27256
+ settings: NativeObjectDetectionSettingsPatchSchema
27257
+ }), _void(), {
27258
+ kind: "mutation",
27259
+ auth: "admin"
27260
+ }), method(object({
26917
27261
  deviceId: number(),
26918
27262
  enabled: boolean()
26919
27263
  }), _void(), {
@@ -30754,7 +31098,28 @@ var PerScopeBreakdownSchema = object({
30754
31098
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30755
31099
  totalObjects: number().int().nonnegative(),
30756
31100
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30757
- byClass: record(string(), number().int().nonnegative())
31101
+ byClass: record(string(), number().int().nonnegative()),
31102
+ /**
31103
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31104
+ * present but not going anywhere (a parked car, a bin, a statue).
31105
+ *
31106
+ * The operator's question about a scene has two halves and they answer
31107
+ * different things: "what is parked here" is stable for hours and must not
31108
+ * flap, while "who is walking through" is the thing an alert is about. One
31109
+ * number could only serve one of them, and `totalObjects` served the first
31110
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31111
+ *
31112
+ * `standing + transient === totalObjects`, always. The total keeps its old
31113
+ * meaning exactly, so no rule written against it changes behaviour.
31114
+ *
31115
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31116
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31117
+ * parked objects here" about a camera whose lot is full.
31118
+ */
31119
+ standingObjects: number().int().nonnegative().optional(),
31120
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31121
+ * same absence rule. */
31122
+ transientObjects: number().int().nonnegative().optional()
30758
31123
  });
30759
31124
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30760
31125
  zoneId: string(),
@@ -34519,12 +34884,24 @@ Object.freeze({
34519
34884
  addonId: null,
34520
34885
  access: "create"
34521
34886
  },
34887
+ "nativeObjectDetection.getOptions": {
34888
+ capName: "native-object-detection",
34889
+ capScope: "device",
34890
+ addonId: null,
34891
+ access: "view"
34892
+ },
34522
34893
  "nativeObjectDetection.setEnabled": {
34523
34894
  capName: "native-object-detection",
34524
34895
  capScope: "device",
34525
34896
  addonId: null,
34526
34897
  access: "create"
34527
34898
  },
34899
+ "nativeObjectDetection.setSettings": {
34900
+ capName: "native-object-detection",
34901
+ capScope: "device",
34902
+ addonId: null,
34903
+ access: "create"
34904
+ },
34528
34905
  "navigation.getFeatures": {
34529
34906
  capName: "navigation",
34530
34907
  capScope: "device",
@@ -34789,6 +35166,12 @@ Object.freeze({
34789
35166
  addonId: null,
34790
35167
  access: "view"
34791
35168
  },
35169
+ "notificationRules.getClipRetentionAsks": {
35170
+ capName: "notification-rules",
35171
+ capScope: "system",
35172
+ addonId: null,
35173
+ access: "view"
35174
+ },
34792
35175
  "notificationRules.getConditionCatalog": {
34793
35176
  capName: "notification-rules",
34794
35177
  capScope: "system",
@@ -35299,6 +35682,12 @@ Object.freeze({
35299
35682
  addonId: null,
35300
35683
  access: "create"
35301
35684
  },
35685
+ "pipelineAnalytics.readLongTermSeries": {
35686
+ capName: "pipeline-analytics",
35687
+ capScope: "device",
35688
+ addonId: null,
35689
+ access: "view"
35690
+ },
35302
35691
  "pipelineAnalytics.rebuildObjectEmbeddings": {
35303
35692
  capName: "pipeline-analytics",
35304
35693
  capScope: "device",
@@ -35971,6 +36360,12 @@ Object.freeze({
35971
36360
  addonId: null,
35972
36361
  access: "create"
35973
36362
  },
36363
+ "pipelineRunner.requestOccupancyBurst": {
36364
+ capName: "pipeline-runner",
36365
+ capScope: "system",
36366
+ addonId: null,
36367
+ access: "create"
36368
+ },
35974
36369
  "pipelineRunner.runDetailSubtree": {
35975
36370
  capName: "pipeline-runner",
35976
36371
  capScope: "system",
@@ -37183,6 +37578,12 @@ Object.freeze({
37183
37578
  addonId: null,
37184
37579
  access: "create"
37185
37580
  },
37581
+ "streamBroker.reportStreamSignal": {
37582
+ capName: "stream-broker",
37583
+ capScope: "system",
37584
+ addonId: null,
37585
+ access: "create"
37586
+ },
37186
37587
  "streamBroker.restartProfile": {
37187
37588
  capName: "stream-broker",
37188
37589
  capScope: "system",
@@ -37267,6 +37668,12 @@ Object.freeze({
37267
37668
  addonId: null,
37268
37669
  access: "create"
37269
37670
  },
37671
+ "streamSignals.listSignals": {
37672
+ capName: "stream-signals",
37673
+ capScope: "device",
37674
+ addonId: null,
37675
+ access: "view"
37676
+ },
37270
37677
  "switch.setState": {
37271
37678
  capName: "switch",
37272
37679
  capScope: "device",
@@ -38739,11 +39146,21 @@ Object.freeze({
38739
39146
  form: "single",
38740
39147
  optional: false
38741
39148
  }],
39149
+ "nativeObjectDetection.getOptions": [{
39150
+ name: "deviceId",
39151
+ form: "single",
39152
+ optional: false
39153
+ }],
38742
39154
  "nativeObjectDetection.setEnabled": [{
38743
39155
  name: "deviceId",
38744
39156
  form: "single",
38745
39157
  optional: false
38746
39158
  }],
39159
+ "nativeObjectDetection.setSettings": [{
39160
+ name: "deviceId",
39161
+ form: "single",
39162
+ optional: false
39163
+ }],
38747
39164
  "navigation.getFeatures": [{
38748
39165
  name: "deviceId",
38749
39166
  form: "single",
@@ -39093,6 +39510,11 @@ Object.freeze({
39093
39510
  form: "single",
39094
39511
  optional: false
39095
39512
  }],
39513
+ "pipelineAnalytics.readLongTermSeries": [{
39514
+ name: "deviceId",
39515
+ form: "single",
39516
+ optional: false
39517
+ }],
39096
39518
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
39097
39519
  name: "deviceId",
39098
39520
  form: "single",
@@ -39283,6 +39705,11 @@ Object.freeze({
39283
39705
  form: "single",
39284
39706
  optional: false
39285
39707
  }],
39708
+ "pipelineRunner.requestOccupancyBurst": [{
39709
+ name: "deviceId",
39710
+ form: "single",
39711
+ optional: false
39712
+ }],
39286
39713
  "pipelineRunner.runDetailSubtree": [{
39287
39714
  name: "deviceId",
39288
39715
  form: "single",
@@ -39639,6 +40066,11 @@ Object.freeze({
39639
40066
  form: "single",
39640
40067
  optional: false
39641
40068
  }],
40069
+ "streamBroker.reportStreamSignal": [{
40070
+ name: "deviceId",
40071
+ form: "single",
40072
+ optional: false
40073
+ }],
39642
40074
  "streamBroker.restartProfile": [{
39643
40075
  name: "deviceId",
39644
40076
  form: "single",