@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.
@@ -44,7 +44,7 @@ let crypto$10 = __toESM(crypto$1, 1);
44
44
  crypto$1 = __toESM(crypto$1);
45
45
  let node_fs = require("node:fs");
46
46
  let node_path = require("node:path");
47
- //#region ../types/dist/event-category-ZyX6jcse.mjs
47
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
48
48
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
49
49
  EventCategory["SystemBoot"] = "system.boot";
50
50
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -661,6 +661,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
661
661
  * pull-reconcile from the provider's `getStatus` on reconnect. */
662
662
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
663
663
  EventCategory["BackupCompleted"] = "backup.completed";
664
+ /**
665
+ * A whole backup RUN finished — every destination attempted, win or lose.
666
+ *
667
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
668
+ * a progress UI and the wrong one for a notification: an operator with three
669
+ * destinations would be told three times. And a run where two of three
670
+ * destinations succeeded is not a clean success — a single "backup
671
+ * completed" that hid the failed one would be a lie, so the count of each is
672
+ * carried here and the message says both.
673
+ *
674
+ * Emitted by the backup orchestrator only after the destination loop, so a
675
+ * run that dies during the BUILD phase produces no completion at all.
676
+ */
677
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
664
678
  EventCategory["BackupRestored"] = "backup.restored";
665
679
  EventCategory["NotificationDispatched"] = "notification.dispatched";
666
680
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5391,7 +5405,7 @@ var ZodIssueCode = {
5391
5405
  var ZodFirstPartyTypeKind;
5392
5406
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5393
5407
  //#endregion
5394
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5408
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5395
5409
  /**
5396
5410
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5397
5411
  * window to float samples (D455).
@@ -11568,6 +11582,58 @@ var brokerCapability = {
11568
11582
  }
11569
11583
  };
11570
11584
  DeviceType.Camera;
11585
+ /**
11586
+ * The signals a device can emit to WAKE its own stream.
11587
+ *
11588
+ * A camera whose stream is built on demand sleeps until something asks for it,
11589
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11590
+ * puller holds a session open for ever, and treating that as demand would keep
11591
+ * a battery camera awake for ever, which is the whole thing the battery is for
11592
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11593
+ * itself, with no stream running.
11594
+ *
11595
+ * ## The vocabulary is the PROVIDER'S, not ours
11596
+ *
11597
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11598
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11599
+ * Reolink offers motion and camera-native detection; another provider may offer
11600
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11601
+ * yet. A fixed enum here would mean every new signal is a framework release.
11602
+ *
11603
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11604
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11605
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11606
+ * binding — but both answer "what drives the detection pipeline", which is a
11607
+ * different question from "what may wake a sleeping stream". A camera can do
11608
+ * the first and not be trusted with the second, and the operator picks per
11609
+ * camera. Two questions, two authorities.
11610
+ *
11611
+ * ## Availability is not permission
11612
+ *
11613
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11614
+ * wakes the stream is the operator's per-camera choice, held by the broker
11615
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11616
+ * provider declaring a signal is not a provider enabling it.
11617
+ */
11618
+ /** One signal a device can emit. */
11619
+ var StreamSignalSchema = object({
11620
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11621
+ code: string().min(1),
11622
+ /** What an operator reads in the picker. The provider's own wording. */
11623
+ label: string().min(1),
11624
+ /**
11625
+ * Whether the provider recommends this signal ON when a camera is first set
11626
+ * up. A provider knows which of its signals are cheap and reliable; an
11627
+ * operator should not have to discover that by trial. Reolink recommends
11628
+ * both of its own.
11629
+ */
11630
+ recommended: boolean()
11631
+ });
11632
+ object({
11633
+ signals: array(StreamSignalSchema),
11634
+ lastFetchedAt: number()
11635
+ });
11636
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11571
11637
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11572
11638
  var StreamFormatSchema = _enum([
11573
11639
  "webrtc",
@@ -11964,6 +12030,22 @@ var EgressTranscodeSchema = object({
11964
12030
  camStreamId: string().nullable()
11965
12031
  });
11966
12032
  method(object({
12033
+ deviceId: number().int().nonnegative(),
12034
+ /** The provider's signal code. */
12035
+ code: string().min(1),
12036
+ /** Ms epoch. Absent ⇒ now. */
12037
+ at: number().optional()
12038
+ }), object({
12039
+ /** Whether the broker acted on it, and if not, why. */
12040
+ accepted: boolean(),
12041
+ reason: _enum([
12042
+ "woke",
12043
+ "hold-extended",
12044
+ "not-enabled",
12045
+ "no-consumer",
12046
+ "unknown-code"
12047
+ ])
12048
+ }), { kind: "mutation" }), method(object({
11967
12049
  deviceId: number().int().nonnegative(),
11968
12050
  camStreamId: string().min(1),
11969
12051
  kind: CamStreamKindSchema,
@@ -12218,6 +12300,16 @@ var PickStreamRequirementsSchema = object({
12218
12300
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12219
12301
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12220
12302
  minHeight: number().int().positive().optional(),
12303
+ /**
12304
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12305
+ *
12306
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12307
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12308
+ * Without this the ceiling had to be re-implemented by every caller — and
12309
+ * one caller implementing it privately is how a second scoring authority
12310
+ * gets born.
12311
+ */
12312
+ maxHeight: number().int().positive().optional(),
12221
12313
  /** Minimum horizontal resolution. */
12222
12314
  minWidth: number().int().positive().optional(),
12223
12315
  /**
@@ -12234,7 +12326,22 @@ var PickStreamRequirementsSchema = object({
12234
12326
  * transcoded" guard: if the device is already serving the consumer's
12235
12327
  * codec end-to-end, there's nothing to optimise.
12236
12328
  */
12237
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12329
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12330
+ /**
12331
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12332
+ * understanding that it will be transcoded.
12333
+ *
12334
+ * Default `false` — today's behaviour, and the right one for a bypass
12335
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12336
+ * ask the larger question: "what is the best stream for me, transcoding if
12337
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12338
+ * does not, so a passthrough is never lost to a transcode; the answer says
12339
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12340
+ *
12341
+ * This is what lets one picker serve both the bypass and the full source
12342
+ * choice, instead of a consumer scoring privately when the bypass misses.
12343
+ */
12344
+ allowTranscode: boolean().optional()
12238
12345
  }).readonly();
12239
12346
  var PickStreamPreferencesSchema = object({
12240
12347
  /**
@@ -12248,12 +12355,32 @@ var PickStreamPreferencesSchema = object({
12248
12355
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12249
12356
  * memory-constrained consumers / Apple Home guest sessions).
12250
12357
  */
12251
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12358
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12359
+ /**
12360
+ * The height the consumer actually wants to DELIVER.
12361
+ *
12362
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12363
+ * above the target wins, and only if nothing reaches it does the tallest
12364
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12365
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12366
+ * express that: it says "as big as possible", which is a different wish.
12367
+ *
12368
+ * Ignored when absent, so every existing caller keeps its ordering.
12369
+ */
12370
+ targetHeight: number().int().positive().optional()
12252
12371
  }).readonly();
12253
12372
  var PickedCamStreamSchema = object({
12254
12373
  camStreamId: string(),
12255
12374
  codec: string().optional(),
12256
12375
  resolution: CamStreamResolutionSchema.optional(),
12376
+ /**
12377
+ * Whether serving this stream requires a decode + re-encode.
12378
+ *
12379
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12380
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12381
+ * not ask cannot be handed a cost it never agreed to pay.
12382
+ */
12383
+ transcodes: boolean(),
12257
12384
  /** One-line explanation of why this stream won — for logs / debug UI. */
12258
12385
  reason: string()
12259
12386
  });
@@ -16461,6 +16588,8 @@ var NcSystemEventKindSchema = _enum([
16461
16588
  "device-enabled",
16462
16589
  "device-battery-low",
16463
16590
  "device-battery-normal",
16591
+ "device-consumable-low",
16592
+ "device-consumable-normal",
16464
16593
  "stream-online",
16465
16594
  "stream-offline",
16466
16595
  "node-online",
@@ -16479,6 +16608,7 @@ var NcSystemEventKindSchema = _enum([
16479
16608
  "addon-updated",
16480
16609
  "server-updated",
16481
16610
  "export-completed",
16611
+ "backup-completed",
16482
16612
  "camera-online",
16483
16613
  "camera-offline",
16484
16614
  "camera-disabled",
@@ -17801,6 +17931,48 @@ var NcAlarmConfigSchema = object({
17801
17931
  settings: NcAlarmSettingsSchema,
17802
17932
  coverage: array(NcAlarmModeCoverageSchema)
17803
17933
  });
17934
+ /**
17935
+ * ONE rule's demand on ONE camera's clip ring.
17936
+ *
17937
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17938
+ * camera, so the answer stays a faithful description of the rules and the
17939
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17940
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17941
+ * a different thing from never having been told, and only the envelope
17942
+ * (`rulesLoaded`) can tell those apart.
17943
+ */
17944
+ var NcClipRetentionAskSchema = object({
17945
+ /**
17946
+ * The camera this ask is about. **Absent = every camera**, which is what a
17947
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17948
+ * asking everywhere.
17949
+ */
17950
+ deviceId: number().int().nonnegative().optional(),
17951
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17952
+ * needs nothing produces no ask at all. */
17953
+ seconds: number().min(0).max(60),
17954
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17955
+ * assigned, which is what the cut defaults to. */
17956
+ profile: CamProfileSchema.optional(),
17957
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17958
+ ruleId: string(),
17959
+ ruleName: string(),
17960
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17961
+ reason: _enum(["window", "occupancy"])
17962
+ });
17963
+ /**
17964
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17965
+ *
17966
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
17967
+ * once. A centre that is up but has not read its rules yet answers with an
17968
+ * empty ask list that means nothing at all — applying it would drop every
17969
+ * camera's ring to zero for the first events after a restart, which is the
17970
+ * footage this mechanism exists to keep.
17971
+ */
17972
+ var NcClipRetentionPlanSchema = object({
17973
+ rulesLoaded: boolean(),
17974
+ asks: array(NcClipRetentionAskSchema).readonly()
17975
+ });
17804
17976
  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 }), {
17805
17977
  kind: "mutation",
17806
17978
  auth: "admin",
@@ -17821,7 +17993,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17821
17993
  }), object({ success: literal(true) }), {
17822
17994
  kind: "mutation",
17823
17995
  auth: "admin"
17824
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17996
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17825
17997
  deviceId: number().int(),
17826
17998
  muted: boolean()
17827
17999
  }), object({ success: literal(true) }), {
@@ -20355,6 +20527,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20355
20527
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20356
20528
  framesMatched: number().int()
20357
20529
  })).readonly() });
20530
+ /**
20531
+ * The long-term series a camera produces. A closed union so a typo cannot
20532
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20533
+ * is an alias of this, not a second list.
20534
+ */
20535
+ var AnalyticsLtsSeriesSchema = _enum([
20536
+ "motion",
20537
+ "audio-dbfs",
20538
+ "battery",
20539
+ "occupancy"
20540
+ ]);
20541
+ /**
20542
+ * One closed 5-minute bucket of a long-term series.
20543
+ *
20544
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20545
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20546
+ * that exists at all was measured; a bucket that is absent was not, which is a
20547
+ * different claim from zero and the reason this is a sparse series.
20548
+ */
20549
+ var LtsBucketSchema = object({
20550
+ scope: string(),
20551
+ bucketStart: number().int(),
20552
+ samples: number().int().nonnegative(),
20553
+ sum: number(),
20554
+ min: number(),
20555
+ max: number()
20556
+ });
20358
20557
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20359
20558
  deviceId: number(),
20360
20559
  trackId: string()
@@ -20401,6 +20600,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20401
20600
  kinds: array(string()).optional(),
20402
20601
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20403
20602
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20603
+ deviceId: number(),
20604
+ series: AnalyticsLtsSeriesSchema,
20605
+ /** Omit for EVERY scope of this series in the range. */
20606
+ scope: string().optional(),
20607
+ from: number(),
20608
+ to: number(),
20609
+ limit: number().int().positive().optional()
20610
+ }), array(LtsBucketSchema).readonly()), method(object({
20404
20611
  deviceId: number(),
20405
20612
  since: number(),
20406
20613
  until: number(),
@@ -21019,6 +21226,14 @@ var MotionSourceEnum = _enum([
21019
21226
  */
21020
21227
  var MotionSourcesSchema = array(MotionSourceEnum);
21021
21228
  /**
21229
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21230
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21231
+ * than a second spelling of the same two ideas — the value an operator picks
21232
+ * here is the value that comes back on the track, the overlay and the debug
21233
+ * row.
21234
+ */
21235
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21236
+ /**
21022
21237
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21023
21238
  * so cap-side consumers (the orchestrator forward, the runner addon's
21024
21239
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21169,6 +21384,35 @@ var RunnerCameraConfigSchema = object({
21169
21384
  * events; the orchestrator forwards to `reportMotion`.
21170
21385
  */
21171
21386
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21387
+ /**
21388
+ * WHICH root detector runs for this camera. The detection counterpart of
21389
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21390
+ * of sources the system understands, vendor-agnostic, owned here.
21391
+ *
21392
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21393
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21394
+ * here. Its boxes reach post-analysis on the same
21395
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21396
+ * track gets the same tracker, the same overlay and the same detail
21397
+ * subtree (face / plate / embedding).
21398
+ *
21399
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21400
+ * run, and that is where a camera with a usable onboard detector buys back
21401
+ * its share of the accelerator. It saves the root inference, not the decode
21402
+ * — the detail subtree still needs pixels to cut crops from.
21403
+ *
21404
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21405
+ * step at all (there is nothing to track), and the cap that knows this says
21406
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21407
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21408
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21409
+ * worth exactly what it already is — a wake signal with a class.
21410
+ *
21411
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21412
+ * vendor never turns a detector on for the operator, and neither does a
21413
+ * default.
21414
+ */
21415
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21172
21416
  pipelineEnabled: boolean().default(true),
21173
21417
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21174
21418
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21350,7 +21594,47 @@ var RunnerLocalMetricsSchema = object({
21350
21594
  queueDepth: number(),
21351
21595
  frameLazy: FrameLazyMetricsSchema.optional()
21352
21596
  });
21597
+ /**
21598
+ * Pipeline Runner capability — runtime detection workhorse.
21599
+ *
21600
+ * One instance per node. Receives camera assignments from
21601
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21602
+ * decoded frames, drains motion + detection queues, calls the local
21603
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21604
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21605
+ * the bus.
21606
+ *
21607
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21608
+ * runner has zero knowledge of other agents, no global state, and never
21609
+ * makes assignment decisions itself.
21610
+ */
21611
+ /**
21612
+ * Why a runner declined to look at a camera out of band. Named rather than a
21613
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21614
+ * already mid-session and one already bursting are four different facts, and a
21615
+ * caller told only "no" cannot tell a protection from a bug.
21616
+ */
21617
+ var OccupancyBurstRefusalSchema = _enum([
21618
+ "not-attached",
21619
+ "battery-asleep",
21620
+ "not-watching",
21621
+ "already-bursting"
21622
+ ]);
21353
21623
  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({
21624
+ deviceId: number(),
21625
+ /** How many frames to collect. The caller sizes this against what its
21626
+ * own confirmation needs; the runner clamps it to the field's range. */
21627
+ frames: number().int().positive().optional(),
21628
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21629
+ * defend — the periodic one at least has a timer to point at. */
21630
+ reason: string()
21631
+ }), object({
21632
+ started: boolean(),
21633
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21634
+ }), {
21635
+ auth: "admin",
21636
+ kind: "mutation"
21637
+ }), method(object({
21354
21638
  handle: FrameHandleSchema,
21355
21639
  bbox: NativeCropBboxSchema,
21356
21640
  maxWidth: number().int().positive().optional(),
@@ -23720,10 +24004,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23720
24004
  }), boolean()), method(object({
23721
24005
  deviceId: number().int().nonnegative(),
23722
24006
  sessionId: string()
23723
- }), object({ pendingRenegotiation: object({
23724
- target: WebrtcStreamTargetSchema,
23725
- epoch: number()
23726
- }).nullable() }));
24007
+ }), object({
24008
+ pendingRenegotiation: object({
24009
+ target: WebrtcStreamTargetSchema,
24010
+ epoch: number()
24011
+ }).nullable(),
24012
+ /**
24013
+ * Whether the session still EXISTS.
24014
+ *
24015
+ * A consumer that holds a resource for the life of a session needs to
24016
+ * be able to ask, because a session does not always end the way it
24017
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24018
+ * sent `SessionDisconnected`, so the Alexa exporter's
24019
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24020
+ * H.264 transcode kept running for NOBODY for more than twenty
24021
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24022
+ * minutes earlier — the broker knew; the holder had no way to ask.
24023
+ *
24024
+ * `false` for a session id the provider has never heard of, which is
24025
+ * the same answer as "it ended": either way nothing is holding it up.
24026
+ */
24027
+ alive: boolean()
24028
+ }));
23727
24029
  object({
23728
24030
  /** All accessory children of the parent. */
23729
24031
  childDeviceIds: array(number()).readonly(),
@@ -26801,7 +27103,7 @@ var NativeDetectionSchema = object({
26801
27103
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26802
27104
  confidence: number().min(0).max(1).optional()
26803
27105
  });
26804
- object({
27106
+ var NativeObjectDetectionStatusSchema = object({
26805
27107
  /**
26806
27108
  * Last observed instance per class. Missing entries mean the class
26807
27109
  * is supported but nothing has been seen since the provider started.
@@ -26818,14 +27120,56 @@ object({
26818
27120
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26819
27121
  /**
26820
27122
  * Whether forwarding of onboard AI detections is enabled for this device.
26821
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26822
- * churn the tracker, so forwarding stays off until the operator enables it.
27123
+ *
27124
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27125
+ * camera runs — that is the operator's choice, and it is made where every
27126
+ * other detection choice is made. `geometry` on
27127
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27128
+ * choice would buy this particular camera.
26823
27129
  */
26824
27130
  enabled: boolean()
26825
- }).extend({
27131
+ });
27132
+ /**
27133
+ * WHEN a camera's onboard detections carry geometry.
27134
+ *
27135
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27136
+ * a detection is a trackable subject whenever the camera sees one.
27137
+ * - `while-streaming` — only while some stream of this camera is already open.
27138
+ * The boxes ride the video's own side-channel rather than a feed of their
27139
+ * own, so they cost nothing and they exist only when something is pulling.
27140
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27141
+ * radio drain, but a camera that is awake is awake precisely because
27142
+ * something is in front of it, and its stream is already being pulled.
27143
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27144
+ * pipeline needs geometry to make a subject, so such a push reaches the
27145
+ * tracker as motion and no further.
27146
+ *
27147
+ * Reported and not inferred, because the operator's question in front of the
27148
+ * picker is "what do I get", and these are three different answers (D14: the
27149
+ * derived form is only as honest as `getOptions`).
27150
+ */
27151
+ var NativeObjectGeometryEnum = _enum([
27152
+ "boxed",
27153
+ "while-streaming",
27154
+ "flag-only"
27155
+ ]);
27156
+ var NativeObjectDetectionOptionsSchema = object({
27157
+ /** Classes this firmware can detect — the same list the status reports. */
27158
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27159
+ /** What a detection from this camera carries. */
27160
+ geometry: NativeObjectGeometryEnum
27161
+ });
27162
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27163
+ NativeObjectDetectionStatusSchema.extend({
26826
27164
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26827
27165
  lastFetchedAt: number() });
26828
- DeviceType.Camera, method(object({
27166
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27167
+ deviceId: number(),
27168
+ settings: NativeObjectDetectionSettingsPatchSchema
27169
+ }), _void(), {
27170
+ kind: "mutation",
27171
+ auth: "admin"
27172
+ }), method(object({
26829
27173
  deviceId: number(),
26830
27174
  enabled: boolean()
26831
27175
  }), _void(), {
@@ -30624,7 +30968,28 @@ var PerScopeBreakdownSchema = object({
30624
30968
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30625
30969
  totalObjects: number().int().nonnegative(),
30626
30970
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30627
- byClass: record(string(), number().int().nonnegative())
30971
+ byClass: record(string(), number().int().nonnegative()),
30972
+ /**
30973
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
30974
+ * present but not going anywhere (a parked car, a bin, a statue).
30975
+ *
30976
+ * The operator's question about a scene has two halves and they answer
30977
+ * different things: "what is parked here" is stable for hours and must not
30978
+ * flap, while "who is walking through" is the thing an alert is about. One
30979
+ * number could only serve one of them, and `totalObjects` served the first
30980
+ * badly — a passer-by moved it and every occupancy rule saw a change.
30981
+ *
30982
+ * `standing + transient === totalObjects`, always. The total keeps its old
30983
+ * meaning exactly, so no rule written against it changes behaviour.
30984
+ *
30985
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
30986
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
30987
+ * parked objects here" about a camera whose lot is full.
30988
+ */
30989
+ standingObjects: number().int().nonnegative().optional(),
30990
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
30991
+ * same absence rule. */
30992
+ transientObjects: number().int().nonnegative().optional()
30628
30993
  });
30629
30994
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30630
30995
  zoneId: string(),
@@ -33563,12 +33928,24 @@ Object.freeze({
33563
33928
  addonId: null,
33564
33929
  access: "create"
33565
33930
  },
33931
+ "nativeObjectDetection.getOptions": {
33932
+ capName: "native-object-detection",
33933
+ capScope: "device",
33934
+ addonId: null,
33935
+ access: "view"
33936
+ },
33566
33937
  "nativeObjectDetection.setEnabled": {
33567
33938
  capName: "native-object-detection",
33568
33939
  capScope: "device",
33569
33940
  addonId: null,
33570
33941
  access: "create"
33571
33942
  },
33943
+ "nativeObjectDetection.setSettings": {
33944
+ capName: "native-object-detection",
33945
+ capScope: "device",
33946
+ addonId: null,
33947
+ access: "create"
33948
+ },
33572
33949
  "navigation.getFeatures": {
33573
33950
  capName: "navigation",
33574
33951
  capScope: "device",
@@ -33833,6 +34210,12 @@ Object.freeze({
33833
34210
  addonId: null,
33834
34211
  access: "view"
33835
34212
  },
34213
+ "notificationRules.getClipRetentionAsks": {
34214
+ capName: "notification-rules",
34215
+ capScope: "system",
34216
+ addonId: null,
34217
+ access: "view"
34218
+ },
33836
34219
  "notificationRules.getConditionCatalog": {
33837
34220
  capName: "notification-rules",
33838
34221
  capScope: "system",
@@ -34343,6 +34726,12 @@ Object.freeze({
34343
34726
  addonId: null,
34344
34727
  access: "create"
34345
34728
  },
34729
+ "pipelineAnalytics.readLongTermSeries": {
34730
+ capName: "pipeline-analytics",
34731
+ capScope: "device",
34732
+ addonId: null,
34733
+ access: "view"
34734
+ },
34346
34735
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34347
34736
  capName: "pipeline-analytics",
34348
34737
  capScope: "device",
@@ -35015,6 +35404,12 @@ Object.freeze({
35015
35404
  addonId: null,
35016
35405
  access: "create"
35017
35406
  },
35407
+ "pipelineRunner.requestOccupancyBurst": {
35408
+ capName: "pipeline-runner",
35409
+ capScope: "system",
35410
+ addonId: null,
35411
+ access: "create"
35412
+ },
35018
35413
  "pipelineRunner.runDetailSubtree": {
35019
35414
  capName: "pipeline-runner",
35020
35415
  capScope: "system",
@@ -36227,6 +36622,12 @@ Object.freeze({
36227
36622
  addonId: null,
36228
36623
  access: "create"
36229
36624
  },
36625
+ "streamBroker.reportStreamSignal": {
36626
+ capName: "stream-broker",
36627
+ capScope: "system",
36628
+ addonId: null,
36629
+ access: "create"
36630
+ },
36230
36631
  "streamBroker.restartProfile": {
36231
36632
  capName: "stream-broker",
36232
36633
  capScope: "system",
@@ -36311,6 +36712,12 @@ Object.freeze({
36311
36712
  addonId: null,
36312
36713
  access: "create"
36313
36714
  },
36715
+ "streamSignals.listSignals": {
36716
+ capName: "stream-signals",
36717
+ capScope: "device",
36718
+ addonId: null,
36719
+ access: "view"
36720
+ },
36314
36721
  "switch.setState": {
36315
36722
  capName: "switch",
36316
36723
  capScope: "device",
@@ -37783,11 +38190,21 @@ Object.freeze({
37783
38190
  form: "single",
37784
38191
  optional: false
37785
38192
  }],
38193
+ "nativeObjectDetection.getOptions": [{
38194
+ name: "deviceId",
38195
+ form: "single",
38196
+ optional: false
38197
+ }],
37786
38198
  "nativeObjectDetection.setEnabled": [{
37787
38199
  name: "deviceId",
37788
38200
  form: "single",
37789
38201
  optional: false
37790
38202
  }],
38203
+ "nativeObjectDetection.setSettings": [{
38204
+ name: "deviceId",
38205
+ form: "single",
38206
+ optional: false
38207
+ }],
37791
38208
  "navigation.getFeatures": [{
37792
38209
  name: "deviceId",
37793
38210
  form: "single",
@@ -38137,6 +38554,11 @@ Object.freeze({
38137
38554
  form: "single",
38138
38555
  optional: false
38139
38556
  }],
38557
+ "pipelineAnalytics.readLongTermSeries": [{
38558
+ name: "deviceId",
38559
+ form: "single",
38560
+ optional: false
38561
+ }],
38140
38562
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38141
38563
  name: "deviceId",
38142
38564
  form: "single",
@@ -38327,6 +38749,11 @@ Object.freeze({
38327
38749
  form: "single",
38328
38750
  optional: false
38329
38751
  }],
38752
+ "pipelineRunner.requestOccupancyBurst": [{
38753
+ name: "deviceId",
38754
+ form: "single",
38755
+ optional: false
38756
+ }],
38330
38757
  "pipelineRunner.runDetailSubtree": [{
38331
38758
  name: "deviceId",
38332
38759
  form: "single",
@@ -38683,6 +39110,11 @@ Object.freeze({
38683
39110
  form: "single",
38684
39111
  optional: false
38685
39112
  }],
39113
+ "streamBroker.reportStreamSignal": [{
39114
+ name: "deviceId",
39115
+ form: "single",
39116
+ optional: false
39117
+ }],
38686
39118
  "streamBroker.restartProfile": [{
38687
39119
  name: "deviceId",
38688
39120
  form: "single",