@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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
- //#region ../types/dist/event-category-ZyX6jcse.mjs
2
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -616,6 +616,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
616
616
  * pull-reconcile from the provider's `getStatus` on reconnect. */
617
617
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
618
618
  EventCategory["BackupCompleted"] = "backup.completed";
619
+ /**
620
+ * A whole backup RUN finished — every destination attempted, win or lose.
621
+ *
622
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
623
+ * a progress UI and the wrong one for a notification: an operator with three
624
+ * destinations would be told three times. And a run where two of three
625
+ * destinations succeeded is not a clean success — a single "backup
626
+ * completed" that hid the failed one would be a lie, so the count of each is
627
+ * carried here and the message says both.
628
+ *
629
+ * Emitted by the backup orchestrator only after the destination loop, so a
630
+ * run that dies during the BUILD phase produces no completion at all.
631
+ */
632
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
619
633
  EventCategory["BackupRestored"] = "backup.restored";
620
634
  EventCategory["NotificationDispatched"] = "notification.dispatched";
621
635
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5346,7 +5360,7 @@ var ZodIssueCode = {
5346
5360
  var ZodFirstPartyTypeKind;
5347
5361
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5348
5362
  //#endregion
5349
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5363
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5350
5364
  /**
5351
5365
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5352
5366
  * window to float samples (D455).
@@ -11523,6 +11537,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11523
11537
  auth: "admin"
11524
11538
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11525
11539
  DeviceType.Camera;
11540
+ /**
11541
+ * The signals a device can emit to WAKE its own stream.
11542
+ *
11543
+ * A camera whose stream is built on demand sleeps until something asks for it,
11544
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11545
+ * puller holds a session open for ever, and treating that as demand would keep
11546
+ * a battery camera awake for ever, which is the whole thing the battery is for
11547
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11548
+ * itself, with no stream running.
11549
+ *
11550
+ * ## The vocabulary is the PROVIDER'S, not ours
11551
+ *
11552
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11553
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11554
+ * Reolink offers motion and camera-native detection; another provider may offer
11555
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11556
+ * yet. A fixed enum here would mean every new signal is a framework release.
11557
+ *
11558
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11559
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11560
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11561
+ * binding — but both answer "what drives the detection pipeline", which is a
11562
+ * different question from "what may wake a sleeping stream". A camera can do
11563
+ * the first and not be trusted with the second, and the operator picks per
11564
+ * camera. Two questions, two authorities.
11565
+ *
11566
+ * ## Availability is not permission
11567
+ *
11568
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11569
+ * wakes the stream is the operator's per-camera choice, held by the broker
11570
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11571
+ * provider declaring a signal is not a provider enabling it.
11572
+ */
11573
+ /** One signal a device can emit. */
11574
+ var StreamSignalSchema = object({
11575
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11576
+ code: string().min(1),
11577
+ /** What an operator reads in the picker. The provider's own wording. */
11578
+ label: string().min(1),
11579
+ /**
11580
+ * Whether the provider recommends this signal ON when a camera is first set
11581
+ * up. A provider knows which of its signals are cheap and reliable; an
11582
+ * operator should not have to discover that by trial. Reolink recommends
11583
+ * both of its own.
11584
+ */
11585
+ recommended: boolean()
11586
+ });
11587
+ object({
11588
+ signals: array(StreamSignalSchema),
11589
+ lastFetchedAt: number()
11590
+ });
11591
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11526
11592
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11527
11593
  var StreamFormatSchema = _enum([
11528
11594
  "webrtc",
@@ -11919,6 +11985,22 @@ var EgressTranscodeSchema = object({
11919
11985
  camStreamId: string().nullable()
11920
11986
  });
11921
11987
  method(object({
11988
+ deviceId: number().int().nonnegative(),
11989
+ /** The provider's signal code. */
11990
+ code: string().min(1),
11991
+ /** Ms epoch. Absent ⇒ now. */
11992
+ at: number().optional()
11993
+ }), object({
11994
+ /** Whether the broker acted on it, and if not, why. */
11995
+ accepted: boolean(),
11996
+ reason: _enum([
11997
+ "woke",
11998
+ "hold-extended",
11999
+ "not-enabled",
12000
+ "no-consumer",
12001
+ "unknown-code"
12002
+ ])
12003
+ }), { kind: "mutation" }), method(object({
11922
12004
  deviceId: number().int().nonnegative(),
11923
12005
  camStreamId: string().min(1),
11924
12006
  kind: CamStreamKindSchema,
@@ -12173,6 +12255,16 @@ var PickStreamRequirementsSchema = object({
12173
12255
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12174
12256
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12175
12257
  minHeight: number().int().positive().optional(),
12258
+ /**
12259
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12260
+ *
12261
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12262
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12263
+ * Without this the ceiling had to be re-implemented by every caller — and
12264
+ * one caller implementing it privately is how a second scoring authority
12265
+ * gets born.
12266
+ */
12267
+ maxHeight: number().int().positive().optional(),
12176
12268
  /** Minimum horizontal resolution. */
12177
12269
  minWidth: number().int().positive().optional(),
12178
12270
  /**
@@ -12189,7 +12281,22 @@ var PickStreamRequirementsSchema = object({
12189
12281
  * transcoded" guard: if the device is already serving the consumer's
12190
12282
  * codec end-to-end, there's nothing to optimise.
12191
12283
  */
12192
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12284
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12285
+ /**
12286
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12287
+ * understanding that it will be transcoded.
12288
+ *
12289
+ * Default `false` — today's behaviour, and the right one for a bypass
12290
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12291
+ * ask the larger question: "what is the best stream for me, transcoding if
12292
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12293
+ * does not, so a passthrough is never lost to a transcode; the answer says
12294
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12295
+ *
12296
+ * This is what lets one picker serve both the bypass and the full source
12297
+ * choice, instead of a consumer scoring privately when the bypass misses.
12298
+ */
12299
+ allowTranscode: boolean().optional()
12193
12300
  }).readonly();
12194
12301
  var PickStreamPreferencesSchema = object({
12195
12302
  /**
@@ -12203,12 +12310,32 @@ var PickStreamPreferencesSchema = object({
12203
12310
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12204
12311
  * memory-constrained consumers / Apple Home guest sessions).
12205
12312
  */
12206
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12313
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12314
+ /**
12315
+ * The height the consumer actually wants to DELIVER.
12316
+ *
12317
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12318
+ * above the target wins, and only if nothing reaches it does the tallest
12319
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12320
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12321
+ * express that: it says "as big as possible", which is a different wish.
12322
+ *
12323
+ * Ignored when absent, so every existing caller keeps its ordering.
12324
+ */
12325
+ targetHeight: number().int().positive().optional()
12207
12326
  }).readonly();
12208
12327
  var PickedCamStreamSchema = object({
12209
12328
  camStreamId: string(),
12210
12329
  codec: string().optional(),
12211
12330
  resolution: CamStreamResolutionSchema.optional(),
12331
+ /**
12332
+ * Whether serving this stream requires a decode + re-encode.
12333
+ *
12334
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12335
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12336
+ * not ask cannot be handed a cost it never agreed to pay.
12337
+ */
12338
+ transcodes: boolean(),
12212
12339
  /** One-line explanation of why this stream won — for logs / debug UI. */
12213
12340
  reason: string()
12214
12341
  });
@@ -16490,6 +16617,8 @@ var NcSystemEventKindSchema = _enum([
16490
16617
  "device-enabled",
16491
16618
  "device-battery-low",
16492
16619
  "device-battery-normal",
16620
+ "device-consumable-low",
16621
+ "device-consumable-normal",
16493
16622
  "stream-online",
16494
16623
  "stream-offline",
16495
16624
  "node-online",
@@ -16508,6 +16637,7 @@ var NcSystemEventKindSchema = _enum([
16508
16637
  "addon-updated",
16509
16638
  "server-updated",
16510
16639
  "export-completed",
16640
+ "backup-completed",
16511
16641
  "camera-online",
16512
16642
  "camera-offline",
16513
16643
  "camera-disabled",
@@ -17830,6 +17960,48 @@ var NcAlarmConfigSchema = object({
17830
17960
  settings: NcAlarmSettingsSchema,
17831
17961
  coverage: array(NcAlarmModeCoverageSchema)
17832
17962
  });
17963
+ /**
17964
+ * ONE rule's demand on ONE camera's clip ring.
17965
+ *
17966
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17967
+ * camera, so the answer stays a faithful description of the rules and the
17968
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17969
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17970
+ * a different thing from never having been told, and only the envelope
17971
+ * (`rulesLoaded`) can tell those apart.
17972
+ */
17973
+ var NcClipRetentionAskSchema = object({
17974
+ /**
17975
+ * The camera this ask is about. **Absent = every camera**, which is what a
17976
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17977
+ * asking everywhere.
17978
+ */
17979
+ deviceId: number().int().nonnegative().optional(),
17980
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17981
+ * needs nothing produces no ask at all. */
17982
+ seconds: number().min(0).max(60),
17983
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17984
+ * assigned, which is what the cut defaults to. */
17985
+ profile: CamProfileSchema.optional(),
17986
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17987
+ ruleId: string(),
17988
+ ruleName: string(),
17989
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17990
+ reason: _enum(["window", "occupancy"])
17991
+ });
17992
+ /**
17993
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17994
+ *
17995
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
17996
+ * once. A centre that is up but has not read its rules yet answers with an
17997
+ * empty ask list that means nothing at all — applying it would drop every
17998
+ * camera's ring to zero for the first events after a restart, which is the
17999
+ * footage this mechanism exists to keep.
18000
+ */
18001
+ var NcClipRetentionPlanSchema = object({
18002
+ rulesLoaded: boolean(),
18003
+ asks: array(NcClipRetentionAskSchema).readonly()
18004
+ });
17833
18005
  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 }), {
17834
18006
  kind: "mutation",
17835
18007
  auth: "admin",
@@ -17850,7 +18022,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17850
18022
  }), object({ success: literal(true) }), {
17851
18023
  kind: "mutation",
17852
18024
  auth: "admin"
17853
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18025
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17854
18026
  deviceId: number().int(),
17855
18027
  muted: boolean()
17856
18028
  }), object({ success: literal(true) }), {
@@ -20384,6 +20556,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20384
20556
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20385
20557
  framesMatched: number().int()
20386
20558
  })).readonly() });
20559
+ /**
20560
+ * The long-term series a camera produces. A closed union so a typo cannot
20561
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20562
+ * is an alias of this, not a second list.
20563
+ */
20564
+ var AnalyticsLtsSeriesSchema = _enum([
20565
+ "motion",
20566
+ "audio-dbfs",
20567
+ "battery",
20568
+ "occupancy"
20569
+ ]);
20570
+ /**
20571
+ * One closed 5-minute bucket of a long-term series.
20572
+ *
20573
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20574
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20575
+ * that exists at all was measured; a bucket that is absent was not, which is a
20576
+ * different claim from zero and the reason this is a sparse series.
20577
+ */
20578
+ var LtsBucketSchema = object({
20579
+ scope: string(),
20580
+ bucketStart: number().int(),
20581
+ samples: number().int().nonnegative(),
20582
+ sum: number(),
20583
+ min: number(),
20584
+ max: number()
20585
+ });
20387
20586
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20388
20587
  deviceId: number(),
20389
20588
  trackId: string()
@@ -20430,6 +20629,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20430
20629
  kinds: array(string()).optional(),
20431
20630
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20432
20631
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20632
+ deviceId: number(),
20633
+ series: AnalyticsLtsSeriesSchema,
20634
+ /** Omit for EVERY scope of this series in the range. */
20635
+ scope: string().optional(),
20636
+ from: number(),
20637
+ to: number(),
20638
+ limit: number().int().positive().optional()
20639
+ }), array(LtsBucketSchema).readonly()), method(object({
20433
20640
  deviceId: number(),
20434
20641
  since: number(),
20435
20642
  until: number(),
@@ -21048,6 +21255,14 @@ var MotionSourceEnum = _enum([
21048
21255
  */
21049
21256
  var MotionSourcesSchema = array(MotionSourceEnum);
21050
21257
  /**
21258
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21259
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21260
+ * than a second spelling of the same two ideas — the value an operator picks
21261
+ * here is the value that comes back on the track, the overlay and the debug
21262
+ * row.
21263
+ */
21264
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21265
+ /**
21051
21266
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21052
21267
  * so cap-side consumers (the orchestrator forward, the runner addon's
21053
21268
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21198,6 +21413,35 @@ var RunnerCameraConfigSchema = object({
21198
21413
  * events; the orchestrator forwards to `reportMotion`.
21199
21414
  */
21200
21415
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21416
+ /**
21417
+ * WHICH root detector runs for this camera. The detection counterpart of
21418
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21419
+ * of sources the system understands, vendor-agnostic, owned here.
21420
+ *
21421
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21422
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21423
+ * here. Its boxes reach post-analysis on the same
21424
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21425
+ * track gets the same tracker, the same overlay and the same detail
21426
+ * subtree (face / plate / embedding).
21427
+ *
21428
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21429
+ * run, and that is where a camera with a usable onboard detector buys back
21430
+ * its share of the accelerator. It saves the root inference, not the decode
21431
+ * — the detail subtree still needs pixels to cut crops from.
21432
+ *
21433
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21434
+ * step at all (there is nothing to track), and the cap that knows this says
21435
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21436
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21437
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21438
+ * worth exactly what it already is — a wake signal with a class.
21439
+ *
21440
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21441
+ * vendor never turns a detector on for the operator, and neither does a
21442
+ * default.
21443
+ */
21444
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21201
21445
  pipelineEnabled: boolean().default(true),
21202
21446
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21203
21447
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21379,7 +21623,47 @@ var RunnerLocalMetricsSchema = object({
21379
21623
  queueDepth: number(),
21380
21624
  frameLazy: FrameLazyMetricsSchema.optional()
21381
21625
  });
21626
+ /**
21627
+ * Pipeline Runner capability — runtime detection workhorse.
21628
+ *
21629
+ * One instance per node. Receives camera assignments from
21630
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21631
+ * decoded frames, drains motion + detection queues, calls the local
21632
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21633
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21634
+ * the bus.
21635
+ *
21636
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21637
+ * runner has zero knowledge of other agents, no global state, and never
21638
+ * makes assignment decisions itself.
21639
+ */
21640
+ /**
21641
+ * Why a runner declined to look at a camera out of band. Named rather than a
21642
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21643
+ * already mid-session and one already bursting are four different facts, and a
21644
+ * caller told only "no" cannot tell a protection from a bug.
21645
+ */
21646
+ var OccupancyBurstRefusalSchema = _enum([
21647
+ "not-attached",
21648
+ "battery-asleep",
21649
+ "not-watching",
21650
+ "already-bursting"
21651
+ ]);
21382
21652
  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({
21653
+ deviceId: number(),
21654
+ /** How many frames to collect. The caller sizes this against what its
21655
+ * own confirmation needs; the runner clamps it to the field's range. */
21656
+ frames: number().int().positive().optional(),
21657
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21658
+ * defend — the periodic one at least has a timer to point at. */
21659
+ reason: string()
21660
+ }), object({
21661
+ started: boolean(),
21662
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21663
+ }), {
21664
+ auth: "admin",
21665
+ kind: "mutation"
21666
+ }), method(object({
21383
21667
  handle: FrameHandleSchema,
21384
21668
  bbox: NativeCropBboxSchema,
21385
21669
  maxWidth: number().int().positive().optional(),
@@ -23749,10 +24033,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23749
24033
  }), boolean()), method(object({
23750
24034
  deviceId: number().int().nonnegative(),
23751
24035
  sessionId: string()
23752
- }), object({ pendingRenegotiation: object({
23753
- target: WebrtcStreamTargetSchema,
23754
- epoch: number()
23755
- }).nullable() }));
24036
+ }), object({
24037
+ pendingRenegotiation: object({
24038
+ target: WebrtcStreamTargetSchema,
24039
+ epoch: number()
24040
+ }).nullable(),
24041
+ /**
24042
+ * Whether the session still EXISTS.
24043
+ *
24044
+ * A consumer that holds a resource for the life of a session needs to
24045
+ * be able to ask, because a session does not always end the way it
24046
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24047
+ * sent `SessionDisconnected`, so the Alexa exporter's
24048
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24049
+ * H.264 transcode kept running for NOBODY for more than twenty
24050
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24051
+ * minutes earlier — the broker knew; the holder had no way to ask.
24052
+ *
24053
+ * `false` for a session id the provider has never heard of, which is
24054
+ * the same answer as "it ended": either way nothing is holding it up.
24055
+ */
24056
+ alive: boolean()
24057
+ }));
23756
24058
  object({
23757
24059
  /** All accessory children of the parent. */
23758
24060
  childDeviceIds: array(number()).readonly(),
@@ -26830,7 +27132,7 @@ var NativeDetectionSchema = object({
26830
27132
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26831
27133
  confidence: number().min(0).max(1).optional()
26832
27134
  });
26833
- object({
27135
+ var NativeObjectDetectionStatusSchema = object({
26834
27136
  /**
26835
27137
  * Last observed instance per class. Missing entries mean the class
26836
27138
  * is supported but nothing has been seen since the provider started.
@@ -26847,14 +27149,56 @@ object({
26847
27149
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26848
27150
  /**
26849
27151
  * Whether forwarding of onboard AI detections is enabled for this device.
26850
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26851
- * churn the tracker, so forwarding stays off until the operator enables it.
27152
+ *
27153
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27154
+ * camera runs — that is the operator's choice, and it is made where every
27155
+ * other detection choice is made. `geometry` on
27156
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27157
+ * choice would buy this particular camera.
26852
27158
  */
26853
27159
  enabled: boolean()
26854
- }).extend({
27160
+ });
27161
+ /**
27162
+ * WHEN a camera's onboard detections carry geometry.
27163
+ *
27164
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27165
+ * a detection is a trackable subject whenever the camera sees one.
27166
+ * - `while-streaming` — only while some stream of this camera is already open.
27167
+ * The boxes ride the video's own side-channel rather than a feed of their
27168
+ * own, so they cost nothing and they exist only when something is pulling.
27169
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27170
+ * radio drain, but a camera that is awake is awake precisely because
27171
+ * something is in front of it, and its stream is already being pulled.
27172
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27173
+ * pipeline needs geometry to make a subject, so such a push reaches the
27174
+ * tracker as motion and no further.
27175
+ *
27176
+ * Reported and not inferred, because the operator's question in front of the
27177
+ * picker is "what do I get", and these are three different answers (D14: the
27178
+ * derived form is only as honest as `getOptions`).
27179
+ */
27180
+ var NativeObjectGeometryEnum = _enum([
27181
+ "boxed",
27182
+ "while-streaming",
27183
+ "flag-only"
27184
+ ]);
27185
+ var NativeObjectDetectionOptionsSchema = object({
27186
+ /** Classes this firmware can detect — the same list the status reports. */
27187
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27188
+ /** What a detection from this camera carries. */
27189
+ geometry: NativeObjectGeometryEnum
27190
+ });
27191
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27192
+ NativeObjectDetectionStatusSchema.extend({
26855
27193
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26856
27194
  lastFetchedAt: number() });
26857
- DeviceType.Camera, method(object({
27195
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27196
+ deviceId: number(),
27197
+ settings: NativeObjectDetectionSettingsPatchSchema
27198
+ }), _void(), {
27199
+ kind: "mutation",
27200
+ auth: "admin"
27201
+ }), method(object({
26858
27202
  deviceId: number(),
26859
27203
  enabled: boolean()
26860
27204
  }), _void(), {
@@ -30653,7 +30997,28 @@ var PerScopeBreakdownSchema = object({
30653
30997
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30654
30998
  totalObjects: number().int().nonnegative(),
30655
30999
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30656
- byClass: record(string(), number().int().nonnegative())
31000
+ byClass: record(string(), number().int().nonnegative()),
31001
+ /**
31002
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31003
+ * present but not going anywhere (a parked car, a bin, a statue).
31004
+ *
31005
+ * The operator's question about a scene has two halves and they answer
31006
+ * different things: "what is parked here" is stable for hours and must not
31007
+ * flap, while "who is walking through" is the thing an alert is about. One
31008
+ * number could only serve one of them, and `totalObjects` served the first
31009
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31010
+ *
31011
+ * `standing + transient === totalObjects`, always. The total keeps its old
31012
+ * meaning exactly, so no rule written against it changes behaviour.
31013
+ *
31014
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31015
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31016
+ * parked objects here" about a camera whose lot is full.
31017
+ */
31018
+ standingObjects: number().int().nonnegative().optional(),
31019
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31020
+ * same absence rule. */
31021
+ transientObjects: number().int().nonnegative().optional()
30657
31022
  });
30658
31023
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30659
31024
  zoneId: string(),
@@ -33592,12 +33957,24 @@ Object.freeze({
33592
33957
  addonId: null,
33593
33958
  access: "create"
33594
33959
  },
33960
+ "nativeObjectDetection.getOptions": {
33961
+ capName: "native-object-detection",
33962
+ capScope: "device",
33963
+ addonId: null,
33964
+ access: "view"
33965
+ },
33595
33966
  "nativeObjectDetection.setEnabled": {
33596
33967
  capName: "native-object-detection",
33597
33968
  capScope: "device",
33598
33969
  addonId: null,
33599
33970
  access: "create"
33600
33971
  },
33972
+ "nativeObjectDetection.setSettings": {
33973
+ capName: "native-object-detection",
33974
+ capScope: "device",
33975
+ addonId: null,
33976
+ access: "create"
33977
+ },
33601
33978
  "navigation.getFeatures": {
33602
33979
  capName: "navigation",
33603
33980
  capScope: "device",
@@ -33862,6 +34239,12 @@ Object.freeze({
33862
34239
  addonId: null,
33863
34240
  access: "view"
33864
34241
  },
34242
+ "notificationRules.getClipRetentionAsks": {
34243
+ capName: "notification-rules",
34244
+ capScope: "system",
34245
+ addonId: null,
34246
+ access: "view"
34247
+ },
33865
34248
  "notificationRules.getConditionCatalog": {
33866
34249
  capName: "notification-rules",
33867
34250
  capScope: "system",
@@ -34372,6 +34755,12 @@ Object.freeze({
34372
34755
  addonId: null,
34373
34756
  access: "create"
34374
34757
  },
34758
+ "pipelineAnalytics.readLongTermSeries": {
34759
+ capName: "pipeline-analytics",
34760
+ capScope: "device",
34761
+ addonId: null,
34762
+ access: "view"
34763
+ },
34375
34764
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34376
34765
  capName: "pipeline-analytics",
34377
34766
  capScope: "device",
@@ -35044,6 +35433,12 @@ Object.freeze({
35044
35433
  addonId: null,
35045
35434
  access: "create"
35046
35435
  },
35436
+ "pipelineRunner.requestOccupancyBurst": {
35437
+ capName: "pipeline-runner",
35438
+ capScope: "system",
35439
+ addonId: null,
35440
+ access: "create"
35441
+ },
35047
35442
  "pipelineRunner.runDetailSubtree": {
35048
35443
  capName: "pipeline-runner",
35049
35444
  capScope: "system",
@@ -36256,6 +36651,12 @@ Object.freeze({
36256
36651
  addonId: null,
36257
36652
  access: "create"
36258
36653
  },
36654
+ "streamBroker.reportStreamSignal": {
36655
+ capName: "stream-broker",
36656
+ capScope: "system",
36657
+ addonId: null,
36658
+ access: "create"
36659
+ },
36259
36660
  "streamBroker.restartProfile": {
36260
36661
  capName: "stream-broker",
36261
36662
  capScope: "system",
@@ -36340,6 +36741,12 @@ Object.freeze({
36340
36741
  addonId: null,
36341
36742
  access: "create"
36342
36743
  },
36744
+ "streamSignals.listSignals": {
36745
+ capName: "stream-signals",
36746
+ capScope: "device",
36747
+ addonId: null,
36748
+ access: "view"
36749
+ },
36343
36750
  "switch.setState": {
36344
36751
  capName: "switch",
36345
36752
  capScope: "device",
@@ -37812,11 +38219,21 @@ Object.freeze({
37812
38219
  form: "single",
37813
38220
  optional: false
37814
38221
  }],
38222
+ "nativeObjectDetection.getOptions": [{
38223
+ name: "deviceId",
38224
+ form: "single",
38225
+ optional: false
38226
+ }],
37815
38227
  "nativeObjectDetection.setEnabled": [{
37816
38228
  name: "deviceId",
37817
38229
  form: "single",
37818
38230
  optional: false
37819
38231
  }],
38232
+ "nativeObjectDetection.setSettings": [{
38233
+ name: "deviceId",
38234
+ form: "single",
38235
+ optional: false
38236
+ }],
37820
38237
  "navigation.getFeatures": [{
37821
38238
  name: "deviceId",
37822
38239
  form: "single",
@@ -38166,6 +38583,11 @@ Object.freeze({
38166
38583
  form: "single",
38167
38584
  optional: false
38168
38585
  }],
38586
+ "pipelineAnalytics.readLongTermSeries": [{
38587
+ name: "deviceId",
38588
+ form: "single",
38589
+ optional: false
38590
+ }],
38169
38591
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38170
38592
  name: "deviceId",
38171
38593
  form: "single",
@@ -38356,6 +38778,11 @@ Object.freeze({
38356
38778
  form: "single",
38357
38779
  optional: false
38358
38780
  }],
38781
+ "pipelineRunner.requestOccupancyBurst": [{
38782
+ name: "deviceId",
38783
+ form: "single",
38784
+ optional: false
38785
+ }],
38359
38786
  "pipelineRunner.runDetailSubtree": [{
38360
38787
  name: "deviceId",
38361
38788
  form: "single",
@@ -38712,6 +39139,11 @@ Object.freeze({
38712
39139
  form: "single",
38713
39140
  optional: false
38714
39141
  }],
39142
+ "streamBroker.reportStreamSignal": [{
39143
+ name: "deviceId",
39144
+ form: "single",
39145
+ optional: false
39146
+ }],
38715
39147
  "streamBroker.restartProfile": [{
38716
39148
  name: "deviceId",
38717
39149
  form: "single",