@camstack/addon-mqtt-broker 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.
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-ZyX6jcse.mjs
42
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -656,6 +656,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
656
656
  * pull-reconcile from the provider's `getStatus` on reconnect. */
657
657
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
658
658
  EventCategory["BackupCompleted"] = "backup.completed";
659
+ /**
660
+ * A whole backup RUN finished — every destination attempted, win or lose.
661
+ *
662
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
663
+ * a progress UI and the wrong one for a notification: an operator with three
664
+ * destinations would be told three times. And a run where two of three
665
+ * destinations succeeded is not a clean success — a single "backup
666
+ * completed" that hid the failed one would be a lie, so the count of each is
667
+ * carried here and the message says both.
668
+ *
669
+ * Emitted by the backup orchestrator only after the destination loop, so a
670
+ * run that dies during the BUILD phase produces no completion at all.
671
+ */
672
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
659
673
  EventCategory["BackupRestored"] = "backup.restored";
660
674
  EventCategory["NotificationDispatched"] = "notification.dispatched";
661
675
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5386,7 +5400,7 @@ var ZodIssueCode = {
5386
5400
  var ZodFirstPartyTypeKind;
5387
5401
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5388
5402
  //#endregion
5389
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5403
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5390
5404
  /**
5391
5405
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5392
5406
  * window to float samples (D455).
@@ -11563,6 +11577,58 @@ var brokerCapability = {
11563
11577
  }
11564
11578
  };
11565
11579
  DeviceType.Camera;
11580
+ /**
11581
+ * The signals a device can emit to WAKE its own stream.
11582
+ *
11583
+ * A camera whose stream is built on demand sleeps until something asks for it,
11584
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11585
+ * puller holds a session open for ever, and treating that as demand would keep
11586
+ * a battery camera awake for ever, which is the whole thing the battery is for
11587
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11588
+ * itself, with no stream running.
11589
+ *
11590
+ * ## The vocabulary is the PROVIDER'S, not ours
11591
+ *
11592
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11593
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11594
+ * Reolink offers motion and camera-native detection; another provider may offer
11595
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11596
+ * yet. A fixed enum here would mean every new signal is a framework release.
11597
+ *
11598
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11599
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11600
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11601
+ * binding — but both answer "what drives the detection pipeline", which is a
11602
+ * different question from "what may wake a sleeping stream". A camera can do
11603
+ * the first and not be trusted with the second, and the operator picks per
11604
+ * camera. Two questions, two authorities.
11605
+ *
11606
+ * ## Availability is not permission
11607
+ *
11608
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11609
+ * wakes the stream is the operator's per-camera choice, held by the broker
11610
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11611
+ * provider declaring a signal is not a provider enabling it.
11612
+ */
11613
+ /** One signal a device can emit. */
11614
+ var StreamSignalSchema = object({
11615
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11616
+ code: string().min(1),
11617
+ /** What an operator reads in the picker. The provider's own wording. */
11618
+ label: string().min(1),
11619
+ /**
11620
+ * Whether the provider recommends this signal ON when a camera is first set
11621
+ * up. A provider knows which of its signals are cheap and reliable; an
11622
+ * operator should not have to discover that by trial. Reolink recommends
11623
+ * both of its own.
11624
+ */
11625
+ recommended: boolean()
11626
+ });
11627
+ object({
11628
+ signals: array(StreamSignalSchema),
11629
+ lastFetchedAt: number()
11630
+ });
11631
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11566
11632
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11567
11633
  var StreamFormatSchema = _enum([
11568
11634
  "webrtc",
@@ -11959,6 +12025,22 @@ var EgressTranscodeSchema = object({
11959
12025
  camStreamId: string().nullable()
11960
12026
  });
11961
12027
  method(object({
12028
+ deviceId: number().int().nonnegative(),
12029
+ /** The provider's signal code. */
12030
+ code: string().min(1),
12031
+ /** Ms epoch. Absent ⇒ now. */
12032
+ at: number().optional()
12033
+ }), object({
12034
+ /** Whether the broker acted on it, and if not, why. */
12035
+ accepted: boolean(),
12036
+ reason: _enum([
12037
+ "woke",
12038
+ "hold-extended",
12039
+ "not-enabled",
12040
+ "no-consumer",
12041
+ "unknown-code"
12042
+ ])
12043
+ }), { kind: "mutation" }), method(object({
11962
12044
  deviceId: number().int().nonnegative(),
11963
12045
  camStreamId: string().min(1),
11964
12046
  kind: CamStreamKindSchema,
@@ -12213,6 +12295,16 @@ var PickStreamRequirementsSchema = object({
12213
12295
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12214
12296
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12215
12297
  minHeight: number().int().positive().optional(),
12298
+ /**
12299
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12300
+ *
12301
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12302
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12303
+ * Without this the ceiling had to be re-implemented by every caller — and
12304
+ * one caller implementing it privately is how a second scoring authority
12305
+ * gets born.
12306
+ */
12307
+ maxHeight: number().int().positive().optional(),
12216
12308
  /** Minimum horizontal resolution. */
12217
12309
  minWidth: number().int().positive().optional(),
12218
12310
  /**
@@ -12229,7 +12321,22 @@ var PickStreamRequirementsSchema = object({
12229
12321
  * transcoded" guard: if the device is already serving the consumer's
12230
12322
  * codec end-to-end, there's nothing to optimise.
12231
12323
  */
12232
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12324
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12325
+ /**
12326
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12327
+ * understanding that it will be transcoded.
12328
+ *
12329
+ * Default `false` — today's behaviour, and the right one for a bypass
12330
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12331
+ * ask the larger question: "what is the best stream for me, transcoding if
12332
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12333
+ * does not, so a passthrough is never lost to a transcode; the answer says
12334
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12335
+ *
12336
+ * This is what lets one picker serve both the bypass and the full source
12337
+ * choice, instead of a consumer scoring privately when the bypass misses.
12338
+ */
12339
+ allowTranscode: boolean().optional()
12233
12340
  }).readonly();
12234
12341
  var PickStreamPreferencesSchema = object({
12235
12342
  /**
@@ -12243,12 +12350,32 @@ var PickStreamPreferencesSchema = object({
12243
12350
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12244
12351
  * memory-constrained consumers / Apple Home guest sessions).
12245
12352
  */
12246
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12353
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12354
+ /**
12355
+ * The height the consumer actually wants to DELIVER.
12356
+ *
12357
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12358
+ * above the target wins, and only if nothing reaches it does the tallest
12359
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12360
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12361
+ * express that: it says "as big as possible", which is a different wish.
12362
+ *
12363
+ * Ignored when absent, so every existing caller keeps its ordering.
12364
+ */
12365
+ targetHeight: number().int().positive().optional()
12247
12366
  }).readonly();
12248
12367
  var PickedCamStreamSchema = object({
12249
12368
  camStreamId: string(),
12250
12369
  codec: string().optional(),
12251
12370
  resolution: CamStreamResolutionSchema.optional(),
12371
+ /**
12372
+ * Whether serving this stream requires a decode + re-encode.
12373
+ *
12374
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12375
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12376
+ * not ask cannot be handed a cost it never agreed to pay.
12377
+ */
12378
+ transcodes: boolean(),
12252
12379
  /** One-line explanation of why this stream won — for logs / debug UI. */
12253
12380
  reason: string()
12254
12381
  });
@@ -16456,6 +16583,8 @@ var NcSystemEventKindSchema = _enum([
16456
16583
  "device-enabled",
16457
16584
  "device-battery-low",
16458
16585
  "device-battery-normal",
16586
+ "device-consumable-low",
16587
+ "device-consumable-normal",
16459
16588
  "stream-online",
16460
16589
  "stream-offline",
16461
16590
  "node-online",
@@ -16474,6 +16603,7 @@ var NcSystemEventKindSchema = _enum([
16474
16603
  "addon-updated",
16475
16604
  "server-updated",
16476
16605
  "export-completed",
16606
+ "backup-completed",
16477
16607
  "camera-online",
16478
16608
  "camera-offline",
16479
16609
  "camera-disabled",
@@ -17796,6 +17926,48 @@ var NcAlarmConfigSchema = object({
17796
17926
  settings: NcAlarmSettingsSchema,
17797
17927
  coverage: array(NcAlarmModeCoverageSchema)
17798
17928
  });
17929
+ /**
17930
+ * ONE rule's demand on ONE camera's clip ring.
17931
+ *
17932
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17933
+ * camera, so the answer stays a faithful description of the rules and the
17934
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17935
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17936
+ * a different thing from never having been told, and only the envelope
17937
+ * (`rulesLoaded`) can tell those apart.
17938
+ */
17939
+ var NcClipRetentionAskSchema = object({
17940
+ /**
17941
+ * The camera this ask is about. **Absent = every camera**, which is what a
17942
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17943
+ * asking everywhere.
17944
+ */
17945
+ deviceId: number().int().nonnegative().optional(),
17946
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17947
+ * needs nothing produces no ask at all. */
17948
+ seconds: number().min(0).max(60),
17949
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17950
+ * assigned, which is what the cut defaults to. */
17951
+ profile: CamProfileSchema.optional(),
17952
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17953
+ ruleId: string(),
17954
+ ruleName: string(),
17955
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17956
+ reason: _enum(["window", "occupancy"])
17957
+ });
17958
+ /**
17959
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17960
+ *
17961
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
17962
+ * once. A centre that is up but has not read its rules yet answers with an
17963
+ * empty ask list that means nothing at all — applying it would drop every
17964
+ * camera's ring to zero for the first events after a restart, which is the
17965
+ * footage this mechanism exists to keep.
17966
+ */
17967
+ var NcClipRetentionPlanSchema = object({
17968
+ rulesLoaded: boolean(),
17969
+ asks: array(NcClipRetentionAskSchema).readonly()
17970
+ });
17799
17971
  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 }), {
17800
17972
  kind: "mutation",
17801
17973
  auth: "admin",
@@ -17816,7 +17988,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17816
17988
  }), object({ success: literal(true) }), {
17817
17989
  kind: "mutation",
17818
17990
  auth: "admin"
17819
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17991
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17820
17992
  deviceId: number().int(),
17821
17993
  muted: boolean()
17822
17994
  }), object({ success: literal(true) }), {
@@ -20350,6 +20522,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20350
20522
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20351
20523
  framesMatched: number().int()
20352
20524
  })).readonly() });
20525
+ /**
20526
+ * The long-term series a camera produces. A closed union so a typo cannot
20527
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20528
+ * is an alias of this, not a second list.
20529
+ */
20530
+ var AnalyticsLtsSeriesSchema = _enum([
20531
+ "motion",
20532
+ "audio-dbfs",
20533
+ "battery",
20534
+ "occupancy"
20535
+ ]);
20536
+ /**
20537
+ * One closed 5-minute bucket of a long-term series.
20538
+ *
20539
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20540
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20541
+ * that exists at all was measured; a bucket that is absent was not, which is a
20542
+ * different claim from zero and the reason this is a sparse series.
20543
+ */
20544
+ var LtsBucketSchema = object({
20545
+ scope: string(),
20546
+ bucketStart: number().int(),
20547
+ samples: number().int().nonnegative(),
20548
+ sum: number(),
20549
+ min: number(),
20550
+ max: number()
20551
+ });
20353
20552
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20354
20553
  deviceId: number(),
20355
20554
  trackId: string()
@@ -20396,6 +20595,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20396
20595
  kinds: array(string()).optional(),
20397
20596
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20398
20597
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20598
+ deviceId: number(),
20599
+ series: AnalyticsLtsSeriesSchema,
20600
+ /** Omit for EVERY scope of this series in the range. */
20601
+ scope: string().optional(),
20602
+ from: number(),
20603
+ to: number(),
20604
+ limit: number().int().positive().optional()
20605
+ }), array(LtsBucketSchema).readonly()), method(object({
20399
20606
  deviceId: number(),
20400
20607
  since: number(),
20401
20608
  until: number(),
@@ -21014,6 +21221,14 @@ var MotionSourceEnum = _enum([
21014
21221
  */
21015
21222
  var MotionSourcesSchema = array(MotionSourceEnum);
21016
21223
  /**
21224
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21225
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21226
+ * than a second spelling of the same two ideas — the value an operator picks
21227
+ * here is the value that comes back on the track, the overlay and the debug
21228
+ * row.
21229
+ */
21230
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21231
+ /**
21017
21232
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21018
21233
  * so cap-side consumers (the orchestrator forward, the runner addon's
21019
21234
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21164,6 +21379,35 @@ var RunnerCameraConfigSchema = object({
21164
21379
  * events; the orchestrator forwards to `reportMotion`.
21165
21380
  */
21166
21381
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21382
+ /**
21383
+ * WHICH root detector runs for this camera. The detection counterpart of
21384
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21385
+ * of sources the system understands, vendor-agnostic, owned here.
21386
+ *
21387
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21388
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21389
+ * here. Its boxes reach post-analysis on the same
21390
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21391
+ * track gets the same tracker, the same overlay and the same detail
21392
+ * subtree (face / plate / embedding).
21393
+ *
21394
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21395
+ * run, and that is where a camera with a usable onboard detector buys back
21396
+ * its share of the accelerator. It saves the root inference, not the decode
21397
+ * — the detail subtree still needs pixels to cut crops from.
21398
+ *
21399
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21400
+ * step at all (there is nothing to track), and the cap that knows this says
21401
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21402
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21403
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21404
+ * worth exactly what it already is — a wake signal with a class.
21405
+ *
21406
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21407
+ * vendor never turns a detector on for the operator, and neither does a
21408
+ * default.
21409
+ */
21410
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21167
21411
  pipelineEnabled: boolean().default(true),
21168
21412
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21169
21413
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21345,7 +21589,47 @@ var RunnerLocalMetricsSchema = object({
21345
21589
  queueDepth: number(),
21346
21590
  frameLazy: FrameLazyMetricsSchema.optional()
21347
21591
  });
21592
+ /**
21593
+ * Pipeline Runner capability — runtime detection workhorse.
21594
+ *
21595
+ * One instance per node. Receives camera assignments from
21596
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21597
+ * decoded frames, drains motion + detection queues, calls the local
21598
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21599
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21600
+ * the bus.
21601
+ *
21602
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21603
+ * runner has zero knowledge of other agents, no global state, and never
21604
+ * makes assignment decisions itself.
21605
+ */
21606
+ /**
21607
+ * Why a runner declined to look at a camera out of band. Named rather than a
21608
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21609
+ * already mid-session and one already bursting are four different facts, and a
21610
+ * caller told only "no" cannot tell a protection from a bug.
21611
+ */
21612
+ var OccupancyBurstRefusalSchema = _enum([
21613
+ "not-attached",
21614
+ "battery-asleep",
21615
+ "not-watching",
21616
+ "already-bursting"
21617
+ ]);
21348
21618
  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({
21619
+ deviceId: number(),
21620
+ /** How many frames to collect. The caller sizes this against what its
21621
+ * own confirmation needs; the runner clamps it to the field's range. */
21622
+ frames: number().int().positive().optional(),
21623
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21624
+ * defend — the periodic one at least has a timer to point at. */
21625
+ reason: string()
21626
+ }), object({
21627
+ started: boolean(),
21628
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21629
+ }), {
21630
+ auth: "admin",
21631
+ kind: "mutation"
21632
+ }), method(object({
21349
21633
  handle: FrameHandleSchema,
21350
21634
  bbox: NativeCropBboxSchema,
21351
21635
  maxWidth: number().int().positive().optional(),
@@ -23715,10 +23999,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23715
23999
  }), boolean()), method(object({
23716
24000
  deviceId: number().int().nonnegative(),
23717
24001
  sessionId: string()
23718
- }), object({ pendingRenegotiation: object({
23719
- target: WebrtcStreamTargetSchema,
23720
- epoch: number()
23721
- }).nullable() }));
24002
+ }), object({
24003
+ pendingRenegotiation: object({
24004
+ target: WebrtcStreamTargetSchema,
24005
+ epoch: number()
24006
+ }).nullable(),
24007
+ /**
24008
+ * Whether the session still EXISTS.
24009
+ *
24010
+ * A consumer that holds a resource for the life of a session needs to
24011
+ * be able to ask, because a session does not always end the way it
24012
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24013
+ * sent `SessionDisconnected`, so the Alexa exporter's
24014
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24015
+ * H.264 transcode kept running for NOBODY for more than twenty
24016
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24017
+ * minutes earlier — the broker knew; the holder had no way to ask.
24018
+ *
24019
+ * `false` for a session id the provider has never heard of, which is
24020
+ * the same answer as "it ended": either way nothing is holding it up.
24021
+ */
24022
+ alive: boolean()
24023
+ }));
23722
24024
  object({
23723
24025
  /** All accessory children of the parent. */
23724
24026
  childDeviceIds: array(number()).readonly(),
@@ -26796,7 +27098,7 @@ var NativeDetectionSchema = object({
26796
27098
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26797
27099
  confidence: number().min(0).max(1).optional()
26798
27100
  });
26799
- object({
27101
+ var NativeObjectDetectionStatusSchema = object({
26800
27102
  /**
26801
27103
  * Last observed instance per class. Missing entries mean the class
26802
27104
  * is supported but nothing has been seen since the provider started.
@@ -26813,14 +27115,56 @@ object({
26813
27115
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26814
27116
  /**
26815
27117
  * Whether forwarding of onboard AI detections is enabled for this device.
26816
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26817
- * churn the tracker, so forwarding stays off until the operator enables it.
27118
+ *
27119
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27120
+ * camera runs — that is the operator's choice, and it is made where every
27121
+ * other detection choice is made. `geometry` on
27122
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27123
+ * choice would buy this particular camera.
26818
27124
  */
26819
27125
  enabled: boolean()
26820
- }).extend({
27126
+ });
27127
+ /**
27128
+ * WHEN a camera's onboard detections carry geometry.
27129
+ *
27130
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27131
+ * a detection is a trackable subject whenever the camera sees one.
27132
+ * - `while-streaming` — only while some stream of this camera is already open.
27133
+ * The boxes ride the video's own side-channel rather than a feed of their
27134
+ * own, so they cost nothing and they exist only when something is pulling.
27135
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27136
+ * radio drain, but a camera that is awake is awake precisely because
27137
+ * something is in front of it, and its stream is already being pulled.
27138
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27139
+ * pipeline needs geometry to make a subject, so such a push reaches the
27140
+ * tracker as motion and no further.
27141
+ *
27142
+ * Reported and not inferred, because the operator's question in front of the
27143
+ * picker is "what do I get", and these are three different answers (D14: the
27144
+ * derived form is only as honest as `getOptions`).
27145
+ */
27146
+ var NativeObjectGeometryEnum = _enum([
27147
+ "boxed",
27148
+ "while-streaming",
27149
+ "flag-only"
27150
+ ]);
27151
+ var NativeObjectDetectionOptionsSchema = object({
27152
+ /** Classes this firmware can detect — the same list the status reports. */
27153
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27154
+ /** What a detection from this camera carries. */
27155
+ geometry: NativeObjectGeometryEnum
27156
+ });
27157
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27158
+ NativeObjectDetectionStatusSchema.extend({
26821
27159
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26822
27160
  lastFetchedAt: number() });
26823
- DeviceType.Camera, method(object({
27161
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27162
+ deviceId: number(),
27163
+ settings: NativeObjectDetectionSettingsPatchSchema
27164
+ }), _void(), {
27165
+ kind: "mutation",
27166
+ auth: "admin"
27167
+ }), method(object({
26824
27168
  deviceId: number(),
26825
27169
  enabled: boolean()
26826
27170
  }), _void(), {
@@ -30619,7 +30963,28 @@ var PerScopeBreakdownSchema = object({
30619
30963
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30620
30964
  totalObjects: number().int().nonnegative(),
30621
30965
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30622
- byClass: record(string(), number().int().nonnegative())
30966
+ byClass: record(string(), number().int().nonnegative()),
30967
+ /**
30968
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
30969
+ * present but not going anywhere (a parked car, a bin, a statue).
30970
+ *
30971
+ * The operator's question about a scene has two halves and they answer
30972
+ * different things: "what is parked here" is stable for hours and must not
30973
+ * flap, while "who is walking through" is the thing an alert is about. One
30974
+ * number could only serve one of them, and `totalObjects` served the first
30975
+ * badly — a passer-by moved it and every occupancy rule saw a change.
30976
+ *
30977
+ * `standing + transient === totalObjects`, always. The total keeps its old
30978
+ * meaning exactly, so no rule written against it changes behaviour.
30979
+ *
30980
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
30981
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
30982
+ * parked objects here" about a camera whose lot is full.
30983
+ */
30984
+ standingObjects: number().int().nonnegative().optional(),
30985
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
30986
+ * same absence rule. */
30987
+ transientObjects: number().int().nonnegative().optional()
30623
30988
  });
30624
30989
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30625
30990
  zoneId: string(),
@@ -33558,12 +33923,24 @@ Object.freeze({
33558
33923
  addonId: null,
33559
33924
  access: "create"
33560
33925
  },
33926
+ "nativeObjectDetection.getOptions": {
33927
+ capName: "native-object-detection",
33928
+ capScope: "device",
33929
+ addonId: null,
33930
+ access: "view"
33931
+ },
33561
33932
  "nativeObjectDetection.setEnabled": {
33562
33933
  capName: "native-object-detection",
33563
33934
  capScope: "device",
33564
33935
  addonId: null,
33565
33936
  access: "create"
33566
33937
  },
33938
+ "nativeObjectDetection.setSettings": {
33939
+ capName: "native-object-detection",
33940
+ capScope: "device",
33941
+ addonId: null,
33942
+ access: "create"
33943
+ },
33567
33944
  "navigation.getFeatures": {
33568
33945
  capName: "navigation",
33569
33946
  capScope: "device",
@@ -33828,6 +34205,12 @@ Object.freeze({
33828
34205
  addonId: null,
33829
34206
  access: "view"
33830
34207
  },
34208
+ "notificationRules.getClipRetentionAsks": {
34209
+ capName: "notification-rules",
34210
+ capScope: "system",
34211
+ addonId: null,
34212
+ access: "view"
34213
+ },
33831
34214
  "notificationRules.getConditionCatalog": {
33832
34215
  capName: "notification-rules",
33833
34216
  capScope: "system",
@@ -34338,6 +34721,12 @@ Object.freeze({
34338
34721
  addonId: null,
34339
34722
  access: "create"
34340
34723
  },
34724
+ "pipelineAnalytics.readLongTermSeries": {
34725
+ capName: "pipeline-analytics",
34726
+ capScope: "device",
34727
+ addonId: null,
34728
+ access: "view"
34729
+ },
34341
34730
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34342
34731
  capName: "pipeline-analytics",
34343
34732
  capScope: "device",
@@ -35010,6 +35399,12 @@ Object.freeze({
35010
35399
  addonId: null,
35011
35400
  access: "create"
35012
35401
  },
35402
+ "pipelineRunner.requestOccupancyBurst": {
35403
+ capName: "pipeline-runner",
35404
+ capScope: "system",
35405
+ addonId: null,
35406
+ access: "create"
35407
+ },
35013
35408
  "pipelineRunner.runDetailSubtree": {
35014
35409
  capName: "pipeline-runner",
35015
35410
  capScope: "system",
@@ -36222,6 +36617,12 @@ Object.freeze({
36222
36617
  addonId: null,
36223
36618
  access: "create"
36224
36619
  },
36620
+ "streamBroker.reportStreamSignal": {
36621
+ capName: "stream-broker",
36622
+ capScope: "system",
36623
+ addonId: null,
36624
+ access: "create"
36625
+ },
36225
36626
  "streamBroker.restartProfile": {
36226
36627
  capName: "stream-broker",
36227
36628
  capScope: "system",
@@ -36306,6 +36707,12 @@ Object.freeze({
36306
36707
  addonId: null,
36307
36708
  access: "create"
36308
36709
  },
36710
+ "streamSignals.listSignals": {
36711
+ capName: "stream-signals",
36712
+ capScope: "device",
36713
+ addonId: null,
36714
+ access: "view"
36715
+ },
36309
36716
  "switch.setState": {
36310
36717
  capName: "switch",
36311
36718
  capScope: "device",
@@ -37778,11 +38185,21 @@ Object.freeze({
37778
38185
  form: "single",
37779
38186
  optional: false
37780
38187
  }],
38188
+ "nativeObjectDetection.getOptions": [{
38189
+ name: "deviceId",
38190
+ form: "single",
38191
+ optional: false
38192
+ }],
37781
38193
  "nativeObjectDetection.setEnabled": [{
37782
38194
  name: "deviceId",
37783
38195
  form: "single",
37784
38196
  optional: false
37785
38197
  }],
38198
+ "nativeObjectDetection.setSettings": [{
38199
+ name: "deviceId",
38200
+ form: "single",
38201
+ optional: false
38202
+ }],
37786
38203
  "navigation.getFeatures": [{
37787
38204
  name: "deviceId",
37788
38205
  form: "single",
@@ -38132,6 +38549,11 @@ Object.freeze({
38132
38549
  form: "single",
38133
38550
  optional: false
38134
38551
  }],
38552
+ "pipelineAnalytics.readLongTermSeries": [{
38553
+ name: "deviceId",
38554
+ form: "single",
38555
+ optional: false
38556
+ }],
38135
38557
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38136
38558
  name: "deviceId",
38137
38559
  form: "single",
@@ -38322,6 +38744,11 @@ Object.freeze({
38322
38744
  form: "single",
38323
38745
  optional: false
38324
38746
  }],
38747
+ "pipelineRunner.requestOccupancyBurst": [{
38748
+ name: "deviceId",
38749
+ form: "single",
38750
+ optional: false
38751
+ }],
38325
38752
  "pipelineRunner.runDetailSubtree": [{
38326
38753
  name: "deviceId",
38327
38754
  form: "single",
@@ -38678,6 +39105,11 @@ Object.freeze({
38678
39105
  form: "single",
38679
39106
  optional: false
38680
39107
  }],
39108
+ "streamBroker.reportStreamSignal": [{
39109
+ name: "deviceId",
39110
+ form: "single",
39111
+ optional: false
39112
+ }],
38681
39113
  "streamBroker.restartProfile": [{
38682
39114
  name: "deviceId",
38683
39115
  form: "single",