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