@camstack/addon-decoder-nodeav 1.2.101 → 1.2.103

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/index.js +447 -15
  2. package/dist/index.mjs +447 -15
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  let node_crypto = require("node:crypto");
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).
@@ -11527,6 +11541,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11527
11541
  auth: "admin"
11528
11542
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11529
11543
  DeviceType.Camera;
11544
+ /**
11545
+ * The signals a device can emit to WAKE its own stream.
11546
+ *
11547
+ * A camera whose stream is built on demand sleeps until something asks for it,
11548
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11549
+ * puller holds a session open for ever, and treating that as demand would keep
11550
+ * a battery camera awake for ever, which is the whole thing the battery is for
11551
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11552
+ * itself, with no stream running.
11553
+ *
11554
+ * ## The vocabulary is the PROVIDER'S, not ours
11555
+ *
11556
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11557
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11558
+ * Reolink offers motion and camera-native detection; another provider may offer
11559
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11560
+ * yet. A fixed enum here would mean every new signal is a framework release.
11561
+ *
11562
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11563
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11564
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11565
+ * binding — but both answer "what drives the detection pipeline", which is a
11566
+ * different question from "what may wake a sleeping stream". A camera can do
11567
+ * the first and not be trusted with the second, and the operator picks per
11568
+ * camera. Two questions, two authorities.
11569
+ *
11570
+ * ## Availability is not permission
11571
+ *
11572
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11573
+ * wakes the stream is the operator's per-camera choice, held by the broker
11574
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11575
+ * provider declaring a signal is not a provider enabling it.
11576
+ */
11577
+ /** One signal a device can emit. */
11578
+ var StreamSignalSchema = object({
11579
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11580
+ code: string().min(1),
11581
+ /** What an operator reads in the picker. The provider's own wording. */
11582
+ label: string().min(1),
11583
+ /**
11584
+ * Whether the provider recommends this signal ON when a camera is first set
11585
+ * up. A provider knows which of its signals are cheap and reliable; an
11586
+ * operator should not have to discover that by trial. Reolink recommends
11587
+ * both of its own.
11588
+ */
11589
+ recommended: boolean()
11590
+ });
11591
+ object({
11592
+ signals: array(StreamSignalSchema),
11593
+ lastFetchedAt: number()
11594
+ });
11595
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11530
11596
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11531
11597
  var StreamFormatSchema = _enum([
11532
11598
  "webrtc",
@@ -11923,6 +11989,22 @@ var EgressTranscodeSchema = object({
11923
11989
  camStreamId: string().nullable()
11924
11990
  });
11925
11991
  method(object({
11992
+ deviceId: number().int().nonnegative(),
11993
+ /** The provider's signal code. */
11994
+ code: string().min(1),
11995
+ /** Ms epoch. Absent ⇒ now. */
11996
+ at: number().optional()
11997
+ }), object({
11998
+ /** Whether the broker acted on it, and if not, why. */
11999
+ accepted: boolean(),
12000
+ reason: _enum([
12001
+ "woke",
12002
+ "hold-extended",
12003
+ "not-enabled",
12004
+ "no-consumer",
12005
+ "unknown-code"
12006
+ ])
12007
+ }), { kind: "mutation" }), method(object({
11926
12008
  deviceId: number().int().nonnegative(),
11927
12009
  camStreamId: string().min(1),
11928
12010
  kind: CamStreamKindSchema,
@@ -12177,6 +12259,16 @@ var PickStreamRequirementsSchema = object({
12177
12259
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12178
12260
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12179
12261
  minHeight: number().int().positive().optional(),
12262
+ /**
12263
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12264
+ *
12265
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12266
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12267
+ * Without this the ceiling had to be re-implemented by every caller — and
12268
+ * one caller implementing it privately is how a second scoring authority
12269
+ * gets born.
12270
+ */
12271
+ maxHeight: number().int().positive().optional(),
12180
12272
  /** Minimum horizontal resolution. */
12181
12273
  minWidth: number().int().positive().optional(),
12182
12274
  /**
@@ -12193,7 +12285,22 @@ var PickStreamRequirementsSchema = object({
12193
12285
  * transcoded" guard: if the device is already serving the consumer's
12194
12286
  * codec end-to-end, there's nothing to optimise.
12195
12287
  */
12196
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12288
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12289
+ /**
12290
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12291
+ * understanding that it will be transcoded.
12292
+ *
12293
+ * Default `false` — today's behaviour, and the right one for a bypass
12294
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12295
+ * ask the larger question: "what is the best stream for me, transcoding if
12296
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12297
+ * does not, so a passthrough is never lost to a transcode; the answer says
12298
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12299
+ *
12300
+ * This is what lets one picker serve both the bypass and the full source
12301
+ * choice, instead of a consumer scoring privately when the bypass misses.
12302
+ */
12303
+ allowTranscode: boolean().optional()
12197
12304
  }).readonly();
12198
12305
  var PickStreamPreferencesSchema = object({
12199
12306
  /**
@@ -12207,12 +12314,32 @@ var PickStreamPreferencesSchema = object({
12207
12314
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12208
12315
  * memory-constrained consumers / Apple Home guest sessions).
12209
12316
  */
12210
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12317
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12318
+ /**
12319
+ * The height the consumer actually wants to DELIVER.
12320
+ *
12321
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12322
+ * above the target wins, and only if nothing reaches it does the tallest
12323
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12324
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12325
+ * express that: it says "as big as possible", which is a different wish.
12326
+ *
12327
+ * Ignored when absent, so every existing caller keeps its ordering.
12328
+ */
12329
+ targetHeight: number().int().positive().optional()
12211
12330
  }).readonly();
12212
12331
  var PickedCamStreamSchema = object({
12213
12332
  camStreamId: string(),
12214
12333
  codec: string().optional(),
12215
12334
  resolution: CamStreamResolutionSchema.optional(),
12335
+ /**
12336
+ * Whether serving this stream requires a decode + re-encode.
12337
+ *
12338
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12339
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12340
+ * not ask cannot be handed a cost it never agreed to pay.
12341
+ */
12342
+ transcodes: boolean(),
12216
12343
  /** One-line explanation of why this stream won — for logs / debug UI. */
12217
12344
  reason: string()
12218
12345
  });
@@ -16494,6 +16621,8 @@ var NcSystemEventKindSchema = _enum([
16494
16621
  "device-enabled",
16495
16622
  "device-battery-low",
16496
16623
  "device-battery-normal",
16624
+ "device-consumable-low",
16625
+ "device-consumable-normal",
16497
16626
  "stream-online",
16498
16627
  "stream-offline",
16499
16628
  "node-online",
@@ -16512,6 +16641,7 @@ var NcSystemEventKindSchema = _enum([
16512
16641
  "addon-updated",
16513
16642
  "server-updated",
16514
16643
  "export-completed",
16644
+ "backup-completed",
16515
16645
  "camera-online",
16516
16646
  "camera-offline",
16517
16647
  "camera-disabled",
@@ -17834,6 +17964,48 @@ var NcAlarmConfigSchema = object({
17834
17964
  settings: NcAlarmSettingsSchema,
17835
17965
  coverage: array(NcAlarmModeCoverageSchema)
17836
17966
  });
17967
+ /**
17968
+ * ONE rule's demand on ONE camera's clip ring.
17969
+ *
17970
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17971
+ * camera, so the answer stays a faithful description of the rules and the
17972
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17973
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17974
+ * a different thing from never having been told, and only the envelope
17975
+ * (`rulesLoaded`) can tell those apart.
17976
+ */
17977
+ var NcClipRetentionAskSchema = object({
17978
+ /**
17979
+ * The camera this ask is about. **Absent = every camera**, which is what a
17980
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17981
+ * asking everywhere.
17982
+ */
17983
+ deviceId: number().int().nonnegative().optional(),
17984
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17985
+ * needs nothing produces no ask at all. */
17986
+ seconds: number().min(0).max(60),
17987
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17988
+ * assigned, which is what the cut defaults to. */
17989
+ profile: CamProfileSchema.optional(),
17990
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17991
+ ruleId: string(),
17992
+ ruleName: string(),
17993
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17994
+ reason: _enum(["window", "occupancy"])
17995
+ });
17996
+ /**
17997
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17998
+ *
17999
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18000
+ * once. A centre that is up but has not read its rules yet answers with an
18001
+ * empty ask list that means nothing at all — applying it would drop every
18002
+ * camera's ring to zero for the first events after a restart, which is the
18003
+ * footage this mechanism exists to keep.
18004
+ */
18005
+ var NcClipRetentionPlanSchema = object({
18006
+ rulesLoaded: boolean(),
18007
+ asks: array(NcClipRetentionAskSchema).readonly()
18008
+ });
17837
18009
  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 }), {
17838
18010
  kind: "mutation",
17839
18011
  auth: "admin",
@@ -17854,7 +18026,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17854
18026
  }), object({ success: literal(true) }), {
17855
18027
  kind: "mutation",
17856
18028
  auth: "admin"
17857
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18029
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17858
18030
  deviceId: number().int(),
17859
18031
  muted: boolean()
17860
18032
  }), object({ success: literal(true) }), {
@@ -20388,6 +20560,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20388
20560
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20389
20561
  framesMatched: number().int()
20390
20562
  })).readonly() });
20563
+ /**
20564
+ * The long-term series a camera produces. A closed union so a typo cannot
20565
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20566
+ * is an alias of this, not a second list.
20567
+ */
20568
+ var AnalyticsLtsSeriesSchema = _enum([
20569
+ "motion",
20570
+ "audio-dbfs",
20571
+ "battery",
20572
+ "occupancy"
20573
+ ]);
20574
+ /**
20575
+ * One closed 5-minute bucket of a long-term series.
20576
+ *
20577
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20578
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20579
+ * that exists at all was measured; a bucket that is absent was not, which is a
20580
+ * different claim from zero and the reason this is a sparse series.
20581
+ */
20582
+ var LtsBucketSchema = object({
20583
+ scope: string(),
20584
+ bucketStart: number().int(),
20585
+ samples: number().int().nonnegative(),
20586
+ sum: number(),
20587
+ min: number(),
20588
+ max: number()
20589
+ });
20391
20590
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20392
20591
  deviceId: number(),
20393
20592
  trackId: string()
@@ -20434,6 +20633,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20434
20633
  kinds: array(string()).optional(),
20435
20634
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20436
20635
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20636
+ deviceId: number(),
20637
+ series: AnalyticsLtsSeriesSchema,
20638
+ /** Omit for EVERY scope of this series in the range. */
20639
+ scope: string().optional(),
20640
+ from: number(),
20641
+ to: number(),
20642
+ limit: number().int().positive().optional()
20643
+ }), array(LtsBucketSchema).readonly()), method(object({
20437
20644
  deviceId: number(),
20438
20645
  since: number(),
20439
20646
  until: number(),
@@ -21052,6 +21259,14 @@ var MotionSourceEnum = _enum([
21052
21259
  */
21053
21260
  var MotionSourcesSchema = array(MotionSourceEnum);
21054
21261
  /**
21262
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21263
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21264
+ * than a second spelling of the same two ideas — the value an operator picks
21265
+ * here is the value that comes back on the track, the overlay and the debug
21266
+ * row.
21267
+ */
21268
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21269
+ /**
21055
21270
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21056
21271
  * so cap-side consumers (the orchestrator forward, the runner addon's
21057
21272
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21202,6 +21417,35 @@ var RunnerCameraConfigSchema = object({
21202
21417
  * events; the orchestrator forwards to `reportMotion`.
21203
21418
  */
21204
21419
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21420
+ /**
21421
+ * WHICH root detector runs for this camera. The detection counterpart of
21422
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21423
+ * of sources the system understands, vendor-agnostic, owned here.
21424
+ *
21425
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21426
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21427
+ * here. Its boxes reach post-analysis on the same
21428
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21429
+ * track gets the same tracker, the same overlay and the same detail
21430
+ * subtree (face / plate / embedding).
21431
+ *
21432
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21433
+ * run, and that is where a camera with a usable onboard detector buys back
21434
+ * its share of the accelerator. It saves the root inference, not the decode
21435
+ * — the detail subtree still needs pixels to cut crops from.
21436
+ *
21437
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21438
+ * step at all (there is nothing to track), and the cap that knows this says
21439
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21440
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21441
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21442
+ * worth exactly what it already is — a wake signal with a class.
21443
+ *
21444
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21445
+ * vendor never turns a detector on for the operator, and neither does a
21446
+ * default.
21447
+ */
21448
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21205
21449
  pipelineEnabled: boolean().default(true),
21206
21450
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21207
21451
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21383,7 +21627,47 @@ var RunnerLocalMetricsSchema = object({
21383
21627
  queueDepth: number(),
21384
21628
  frameLazy: FrameLazyMetricsSchema.optional()
21385
21629
  });
21630
+ /**
21631
+ * Pipeline Runner capability — runtime detection workhorse.
21632
+ *
21633
+ * One instance per node. Receives camera assignments from
21634
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21635
+ * decoded frames, drains motion + detection queues, calls the local
21636
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21637
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21638
+ * the bus.
21639
+ *
21640
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21641
+ * runner has zero knowledge of other agents, no global state, and never
21642
+ * makes assignment decisions itself.
21643
+ */
21644
+ /**
21645
+ * Why a runner declined to look at a camera out of band. Named rather than a
21646
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21647
+ * already mid-session and one already bursting are four different facts, and a
21648
+ * caller told only "no" cannot tell a protection from a bug.
21649
+ */
21650
+ var OccupancyBurstRefusalSchema = _enum([
21651
+ "not-attached",
21652
+ "battery-asleep",
21653
+ "not-watching",
21654
+ "already-bursting"
21655
+ ]);
21386
21656
  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({
21657
+ deviceId: number(),
21658
+ /** How many frames to collect. The caller sizes this against what its
21659
+ * own confirmation needs; the runner clamps it to the field's range. */
21660
+ frames: number().int().positive().optional(),
21661
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21662
+ * defend — the periodic one at least has a timer to point at. */
21663
+ reason: string()
21664
+ }), object({
21665
+ started: boolean(),
21666
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21667
+ }), {
21668
+ auth: "admin",
21669
+ kind: "mutation"
21670
+ }), method(object({
21387
21671
  handle: FrameHandleSchema,
21388
21672
  bbox: NativeCropBboxSchema,
21389
21673
  maxWidth: number().int().positive().optional(),
@@ -23753,10 +24037,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23753
24037
  }), boolean()), method(object({
23754
24038
  deviceId: number().int().nonnegative(),
23755
24039
  sessionId: string()
23756
- }), object({ pendingRenegotiation: object({
23757
- target: WebrtcStreamTargetSchema,
23758
- epoch: number()
23759
- }).nullable() }));
24040
+ }), object({
24041
+ pendingRenegotiation: object({
24042
+ target: WebrtcStreamTargetSchema,
24043
+ epoch: number()
24044
+ }).nullable(),
24045
+ /**
24046
+ * Whether the session still EXISTS.
24047
+ *
24048
+ * A consumer that holds a resource for the life of a session needs to
24049
+ * be able to ask, because a session does not always end the way it
24050
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24051
+ * sent `SessionDisconnected`, so the Alexa exporter's
24052
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24053
+ * H.264 transcode kept running for NOBODY for more than twenty
24054
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24055
+ * minutes earlier — the broker knew; the holder had no way to ask.
24056
+ *
24057
+ * `false` for a session id the provider has never heard of, which is
24058
+ * the same answer as "it ended": either way nothing is holding it up.
24059
+ */
24060
+ alive: boolean()
24061
+ }));
23760
24062
  object({
23761
24063
  /** All accessory children of the parent. */
23762
24064
  childDeviceIds: array(number()).readonly(),
@@ -26834,7 +27136,7 @@ var NativeDetectionSchema = object({
26834
27136
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26835
27137
  confidence: number().min(0).max(1).optional()
26836
27138
  });
26837
- object({
27139
+ var NativeObjectDetectionStatusSchema = object({
26838
27140
  /**
26839
27141
  * Last observed instance per class. Missing entries mean the class
26840
27142
  * is supported but nothing has been seen since the provider started.
@@ -26851,14 +27153,56 @@ object({
26851
27153
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26852
27154
  /**
26853
27155
  * Whether forwarding of onboard AI detections is enabled for this device.
26854
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26855
- * churn the tracker, so forwarding stays off until the operator enables it.
27156
+ *
27157
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27158
+ * camera runs — that is the operator's choice, and it is made where every
27159
+ * other detection choice is made. `geometry` on
27160
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27161
+ * choice would buy this particular camera.
26856
27162
  */
26857
27163
  enabled: boolean()
26858
- }).extend({
27164
+ });
27165
+ /**
27166
+ * WHEN a camera's onboard detections carry geometry.
27167
+ *
27168
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27169
+ * a detection is a trackable subject whenever the camera sees one.
27170
+ * - `while-streaming` — only while some stream of this camera is already open.
27171
+ * The boxes ride the video's own side-channel rather than a feed of their
27172
+ * own, so they cost nothing and they exist only when something is pulling.
27173
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27174
+ * radio drain, but a camera that is awake is awake precisely because
27175
+ * something is in front of it, and its stream is already being pulled.
27176
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27177
+ * pipeline needs geometry to make a subject, so such a push reaches the
27178
+ * tracker as motion and no further.
27179
+ *
27180
+ * Reported and not inferred, because the operator's question in front of the
27181
+ * picker is "what do I get", and these are three different answers (D14: the
27182
+ * derived form is only as honest as `getOptions`).
27183
+ */
27184
+ var NativeObjectGeometryEnum = _enum([
27185
+ "boxed",
27186
+ "while-streaming",
27187
+ "flag-only"
27188
+ ]);
27189
+ var NativeObjectDetectionOptionsSchema = object({
27190
+ /** Classes this firmware can detect — the same list the status reports. */
27191
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27192
+ /** What a detection from this camera carries. */
27193
+ geometry: NativeObjectGeometryEnum
27194
+ });
27195
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27196
+ NativeObjectDetectionStatusSchema.extend({
26859
27197
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26860
27198
  lastFetchedAt: number() });
26861
- DeviceType.Camera, method(object({
27199
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27200
+ deviceId: number(),
27201
+ settings: NativeObjectDetectionSettingsPatchSchema
27202
+ }), _void(), {
27203
+ kind: "mutation",
27204
+ auth: "admin"
27205
+ }), method(object({
26862
27206
  deviceId: number(),
26863
27207
  enabled: boolean()
26864
27208
  }), _void(), {
@@ -30657,7 +31001,28 @@ var PerScopeBreakdownSchema = object({
30657
31001
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30658
31002
  totalObjects: number().int().nonnegative(),
30659
31003
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30660
- byClass: record(string(), number().int().nonnegative())
31004
+ byClass: record(string(), number().int().nonnegative()),
31005
+ /**
31006
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31007
+ * present but not going anywhere (a parked car, a bin, a statue).
31008
+ *
31009
+ * The operator's question about a scene has two halves and they answer
31010
+ * different things: "what is parked here" is stable for hours and must not
31011
+ * flap, while "who is walking through" is the thing an alert is about. One
31012
+ * number could only serve one of them, and `totalObjects` served the first
31013
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31014
+ *
31015
+ * `standing + transient === totalObjects`, always. The total keeps its old
31016
+ * meaning exactly, so no rule written against it changes behaviour.
31017
+ *
31018
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31019
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31020
+ * parked objects here" about a camera whose lot is full.
31021
+ */
31022
+ standingObjects: number().int().nonnegative().optional(),
31023
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31024
+ * same absence rule. */
31025
+ transientObjects: number().int().nonnegative().optional()
30661
31026
  });
30662
31027
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30663
31028
  zoneId: string(),
@@ -33596,12 +33961,24 @@ Object.freeze({
33596
33961
  addonId: null,
33597
33962
  access: "create"
33598
33963
  },
33964
+ "nativeObjectDetection.getOptions": {
33965
+ capName: "native-object-detection",
33966
+ capScope: "device",
33967
+ addonId: null,
33968
+ access: "view"
33969
+ },
33599
33970
  "nativeObjectDetection.setEnabled": {
33600
33971
  capName: "native-object-detection",
33601
33972
  capScope: "device",
33602
33973
  addonId: null,
33603
33974
  access: "create"
33604
33975
  },
33976
+ "nativeObjectDetection.setSettings": {
33977
+ capName: "native-object-detection",
33978
+ capScope: "device",
33979
+ addonId: null,
33980
+ access: "create"
33981
+ },
33605
33982
  "navigation.getFeatures": {
33606
33983
  capName: "navigation",
33607
33984
  capScope: "device",
@@ -33866,6 +34243,12 @@ Object.freeze({
33866
34243
  addonId: null,
33867
34244
  access: "view"
33868
34245
  },
34246
+ "notificationRules.getClipRetentionAsks": {
34247
+ capName: "notification-rules",
34248
+ capScope: "system",
34249
+ addonId: null,
34250
+ access: "view"
34251
+ },
33869
34252
  "notificationRules.getConditionCatalog": {
33870
34253
  capName: "notification-rules",
33871
34254
  capScope: "system",
@@ -34376,6 +34759,12 @@ Object.freeze({
34376
34759
  addonId: null,
34377
34760
  access: "create"
34378
34761
  },
34762
+ "pipelineAnalytics.readLongTermSeries": {
34763
+ capName: "pipeline-analytics",
34764
+ capScope: "device",
34765
+ addonId: null,
34766
+ access: "view"
34767
+ },
34379
34768
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34380
34769
  capName: "pipeline-analytics",
34381
34770
  capScope: "device",
@@ -35048,6 +35437,12 @@ Object.freeze({
35048
35437
  addonId: null,
35049
35438
  access: "create"
35050
35439
  },
35440
+ "pipelineRunner.requestOccupancyBurst": {
35441
+ capName: "pipeline-runner",
35442
+ capScope: "system",
35443
+ addonId: null,
35444
+ access: "create"
35445
+ },
35051
35446
  "pipelineRunner.runDetailSubtree": {
35052
35447
  capName: "pipeline-runner",
35053
35448
  capScope: "system",
@@ -36260,6 +36655,12 @@ Object.freeze({
36260
36655
  addonId: null,
36261
36656
  access: "create"
36262
36657
  },
36658
+ "streamBroker.reportStreamSignal": {
36659
+ capName: "stream-broker",
36660
+ capScope: "system",
36661
+ addonId: null,
36662
+ access: "create"
36663
+ },
36263
36664
  "streamBroker.restartProfile": {
36264
36665
  capName: "stream-broker",
36265
36666
  capScope: "system",
@@ -36344,6 +36745,12 @@ Object.freeze({
36344
36745
  addonId: null,
36345
36746
  access: "create"
36346
36747
  },
36748
+ "streamSignals.listSignals": {
36749
+ capName: "stream-signals",
36750
+ capScope: "device",
36751
+ addonId: null,
36752
+ access: "view"
36753
+ },
36347
36754
  "switch.setState": {
36348
36755
  capName: "switch",
36349
36756
  capScope: "device",
@@ -37816,11 +38223,21 @@ Object.freeze({
37816
38223
  form: "single",
37817
38224
  optional: false
37818
38225
  }],
38226
+ "nativeObjectDetection.getOptions": [{
38227
+ name: "deviceId",
38228
+ form: "single",
38229
+ optional: false
38230
+ }],
37819
38231
  "nativeObjectDetection.setEnabled": [{
37820
38232
  name: "deviceId",
37821
38233
  form: "single",
37822
38234
  optional: false
37823
38235
  }],
38236
+ "nativeObjectDetection.setSettings": [{
38237
+ name: "deviceId",
38238
+ form: "single",
38239
+ optional: false
38240
+ }],
37824
38241
  "navigation.getFeatures": [{
37825
38242
  name: "deviceId",
37826
38243
  form: "single",
@@ -38170,6 +38587,11 @@ Object.freeze({
38170
38587
  form: "single",
38171
38588
  optional: false
38172
38589
  }],
38590
+ "pipelineAnalytics.readLongTermSeries": [{
38591
+ name: "deviceId",
38592
+ form: "single",
38593
+ optional: false
38594
+ }],
38173
38595
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38174
38596
  name: "deviceId",
38175
38597
  form: "single",
@@ -38360,6 +38782,11 @@ Object.freeze({
38360
38782
  form: "single",
38361
38783
  optional: false
38362
38784
  }],
38785
+ "pipelineRunner.requestOccupancyBurst": [{
38786
+ name: "deviceId",
38787
+ form: "single",
38788
+ optional: false
38789
+ }],
38363
38790
  "pipelineRunner.runDetailSubtree": [{
38364
38791
  name: "deviceId",
38365
38792
  form: "single",
@@ -38716,6 +39143,11 @@ Object.freeze({
38716
39143
  form: "single",
38717
39144
  optional: false
38718
39145
  }],
39146
+ "streamBroker.reportStreamSignal": [{
39147
+ name: "deviceId",
39148
+ form: "single",
39149
+ optional: false
39150
+ }],
38719
39151
  "streamBroker.restartProfile": [{
38720
39152
  name: "deviceId",
38721
39153
  form: "single",