@camstack/addon-remote-storage 1.2.100 → 1.2.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  let node_crypto = require("node:crypto");
24
24
  let node_path = require("node:path");
25
25
  node_path = __toESM(node_path);
26
- //#region ../types/dist/event-category-ZyX6jcse.mjs
26
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
27
27
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
28
28
  EventCategory["SystemBoot"] = "system.boot";
29
29
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -640,6 +640,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
640
640
  * pull-reconcile from the provider's `getStatus` on reconnect. */
641
641
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
642
642
  EventCategory["BackupCompleted"] = "backup.completed";
643
+ /**
644
+ * A whole backup RUN finished — every destination attempted, win or lose.
645
+ *
646
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
647
+ * a progress UI and the wrong one for a notification: an operator with three
648
+ * destinations would be told three times. And a run where two of three
649
+ * destinations succeeded is not a clean success — a single "backup
650
+ * completed" that hid the failed one would be a lie, so the count of each is
651
+ * carried here and the message says both.
652
+ *
653
+ * Emitted by the backup orchestrator only after the destination loop, so a
654
+ * run that dies during the BUILD phase produces no completion at all.
655
+ */
656
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
643
657
  EventCategory["BackupRestored"] = "backup.restored";
644
658
  EventCategory["NotificationDispatched"] = "notification.dispatched";
645
659
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5370,7 +5384,7 @@ var ZodIssueCode = {
5370
5384
  var ZodFirstPartyTypeKind;
5371
5385
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5372
5386
  //#endregion
5373
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5387
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5374
5388
  /**
5375
5389
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5376
5390
  * window to float samples (D455).
@@ -11498,6 +11512,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11498
11512
  auth: "admin"
11499
11513
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11500
11514
  DeviceType.Camera;
11515
+ /**
11516
+ * The signals a device can emit to WAKE its own stream.
11517
+ *
11518
+ * A camera whose stream is built on demand sleeps until something asks for it,
11519
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11520
+ * puller holds a session open for ever, and treating that as demand would keep
11521
+ * a battery camera awake for ever, which is the whole thing the battery is for
11522
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11523
+ * itself, with no stream running.
11524
+ *
11525
+ * ## The vocabulary is the PROVIDER'S, not ours
11526
+ *
11527
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11528
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11529
+ * Reolink offers motion and camera-native detection; another provider may offer
11530
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11531
+ * yet. A fixed enum here would mean every new signal is a framework release.
11532
+ *
11533
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11534
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11535
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11536
+ * binding — but both answer "what drives the detection pipeline", which is a
11537
+ * different question from "what may wake a sleeping stream". A camera can do
11538
+ * the first and not be trusted with the second, and the operator picks per
11539
+ * camera. Two questions, two authorities.
11540
+ *
11541
+ * ## Availability is not permission
11542
+ *
11543
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11544
+ * wakes the stream is the operator's per-camera choice, held by the broker
11545
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11546
+ * provider declaring a signal is not a provider enabling it.
11547
+ */
11548
+ /** One signal a device can emit. */
11549
+ var StreamSignalSchema = object({
11550
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11551
+ code: string().min(1),
11552
+ /** What an operator reads in the picker. The provider's own wording. */
11553
+ label: string().min(1),
11554
+ /**
11555
+ * Whether the provider recommends this signal ON when a camera is first set
11556
+ * up. A provider knows which of its signals are cheap and reliable; an
11557
+ * operator should not have to discover that by trial. Reolink recommends
11558
+ * both of its own.
11559
+ */
11560
+ recommended: boolean()
11561
+ });
11562
+ object({
11563
+ signals: array(StreamSignalSchema),
11564
+ lastFetchedAt: number()
11565
+ });
11566
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11501
11567
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11502
11568
  var StreamFormatSchema = _enum([
11503
11569
  "webrtc",
@@ -11894,6 +11960,22 @@ var EgressTranscodeSchema = object({
11894
11960
  camStreamId: string().nullable()
11895
11961
  });
11896
11962
  method(object({
11963
+ deviceId: number().int().nonnegative(),
11964
+ /** The provider's signal code. */
11965
+ code: string().min(1),
11966
+ /** Ms epoch. Absent ⇒ now. */
11967
+ at: number().optional()
11968
+ }), object({
11969
+ /** Whether the broker acted on it, and if not, why. */
11970
+ accepted: boolean(),
11971
+ reason: _enum([
11972
+ "woke",
11973
+ "hold-extended",
11974
+ "not-enabled",
11975
+ "no-consumer",
11976
+ "unknown-code"
11977
+ ])
11978
+ }), { kind: "mutation" }), method(object({
11897
11979
  deviceId: number().int().nonnegative(),
11898
11980
  camStreamId: string().min(1),
11899
11981
  kind: CamStreamKindSchema,
@@ -12148,6 +12230,16 @@ var PickStreamRequirementsSchema = object({
12148
12230
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12149
12231
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12150
12232
  minHeight: number().int().positive().optional(),
12233
+ /**
12234
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12235
+ *
12236
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12237
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12238
+ * Without this the ceiling had to be re-implemented by every caller — and
12239
+ * one caller implementing it privately is how a second scoring authority
12240
+ * gets born.
12241
+ */
12242
+ maxHeight: number().int().positive().optional(),
12151
12243
  /** Minimum horizontal resolution. */
12152
12244
  minWidth: number().int().positive().optional(),
12153
12245
  /**
@@ -12164,7 +12256,22 @@ var PickStreamRequirementsSchema = object({
12164
12256
  * transcoded" guard: if the device is already serving the consumer's
12165
12257
  * codec end-to-end, there's nothing to optimise.
12166
12258
  */
12167
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12259
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12260
+ /**
12261
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12262
+ * understanding that it will be transcoded.
12263
+ *
12264
+ * Default `false` — today's behaviour, and the right one for a bypass
12265
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12266
+ * ask the larger question: "what is the best stream for me, transcoding if
12267
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12268
+ * does not, so a passthrough is never lost to a transcode; the answer says
12269
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12270
+ *
12271
+ * This is what lets one picker serve both the bypass and the full source
12272
+ * choice, instead of a consumer scoring privately when the bypass misses.
12273
+ */
12274
+ allowTranscode: boolean().optional()
12168
12275
  }).readonly();
12169
12276
  var PickStreamPreferencesSchema = object({
12170
12277
  /**
@@ -12178,12 +12285,32 @@ var PickStreamPreferencesSchema = object({
12178
12285
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12179
12286
  * memory-constrained consumers / Apple Home guest sessions).
12180
12287
  */
12181
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12288
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12289
+ /**
12290
+ * The height the consumer actually wants to DELIVER.
12291
+ *
12292
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12293
+ * above the target wins, and only if nothing reaches it does the tallest
12294
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12295
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12296
+ * express that: it says "as big as possible", which is a different wish.
12297
+ *
12298
+ * Ignored when absent, so every existing caller keeps its ordering.
12299
+ */
12300
+ targetHeight: number().int().positive().optional()
12182
12301
  }).readonly();
12183
12302
  var PickedCamStreamSchema = object({
12184
12303
  camStreamId: string(),
12185
12304
  codec: string().optional(),
12186
12305
  resolution: CamStreamResolutionSchema.optional(),
12306
+ /**
12307
+ * Whether serving this stream requires a decode + re-encode.
12308
+ *
12309
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12310
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12311
+ * not ask cannot be handed a cost it never agreed to pay.
12312
+ */
12313
+ transcodes: boolean(),
12187
12314
  /** One-line explanation of why this stream won — for logs / debug UI. */
12188
12315
  reason: string()
12189
12316
  });
@@ -16372,6 +16499,8 @@ var NcSystemEventKindSchema = _enum([
16372
16499
  "device-enabled",
16373
16500
  "device-battery-low",
16374
16501
  "device-battery-normal",
16502
+ "device-consumable-low",
16503
+ "device-consumable-normal",
16375
16504
  "stream-online",
16376
16505
  "stream-offline",
16377
16506
  "node-online",
@@ -16390,6 +16519,7 @@ var NcSystemEventKindSchema = _enum([
16390
16519
  "addon-updated",
16391
16520
  "server-updated",
16392
16521
  "export-completed",
16522
+ "backup-completed",
16393
16523
  "camera-online",
16394
16524
  "camera-offline",
16395
16525
  "camera-disabled",
@@ -17712,6 +17842,48 @@ var NcAlarmConfigSchema = object({
17712
17842
  settings: NcAlarmSettingsSchema,
17713
17843
  coverage: array(NcAlarmModeCoverageSchema)
17714
17844
  });
17845
+ /**
17846
+ * ONE rule's demand on ONE camera's clip ring.
17847
+ *
17848
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17849
+ * camera, so the answer stays a faithful description of the rules and the
17850
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17851
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17852
+ * a different thing from never having been told, and only the envelope
17853
+ * (`rulesLoaded`) can tell those apart.
17854
+ */
17855
+ var NcClipRetentionAskSchema = object({
17856
+ /**
17857
+ * The camera this ask is about. **Absent = every camera**, which is what a
17858
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17859
+ * asking everywhere.
17860
+ */
17861
+ deviceId: number().int().nonnegative().optional(),
17862
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17863
+ * needs nothing produces no ask at all. */
17864
+ seconds: number().min(0).max(60),
17865
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17866
+ * assigned, which is what the cut defaults to. */
17867
+ profile: CamProfileSchema.optional(),
17868
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17869
+ ruleId: string(),
17870
+ ruleName: string(),
17871
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17872
+ reason: _enum(["window", "occupancy"])
17873
+ });
17874
+ /**
17875
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17876
+ *
17877
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
17878
+ * once. A centre that is up but has not read its rules yet answers with an
17879
+ * empty ask list that means nothing at all — applying it would drop every
17880
+ * camera's ring to zero for the first events after a restart, which is the
17881
+ * footage this mechanism exists to keep.
17882
+ */
17883
+ var NcClipRetentionPlanSchema = object({
17884
+ rulesLoaded: boolean(),
17885
+ asks: array(NcClipRetentionAskSchema).readonly()
17886
+ });
17715
17887
  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 }), {
17716
17888
  kind: "mutation",
17717
17889
  auth: "admin",
@@ -17732,7 +17904,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17732
17904
  }), object({ success: literal(true) }), {
17733
17905
  kind: "mutation",
17734
17906
  auth: "admin"
17735
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17907
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17736
17908
  deviceId: number().int(),
17737
17909
  muted: boolean()
17738
17910
  }), object({ success: literal(true) }), {
@@ -20266,6 +20438,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20266
20438
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20267
20439
  framesMatched: number().int()
20268
20440
  })).readonly() });
20441
+ /**
20442
+ * The long-term series a camera produces. A closed union so a typo cannot
20443
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20444
+ * is an alias of this, not a second list.
20445
+ */
20446
+ var AnalyticsLtsSeriesSchema = _enum([
20447
+ "motion",
20448
+ "audio-dbfs",
20449
+ "battery",
20450
+ "occupancy"
20451
+ ]);
20452
+ /**
20453
+ * One closed 5-minute bucket of a long-term series.
20454
+ *
20455
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20456
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20457
+ * that exists at all was measured; a bucket that is absent was not, which is a
20458
+ * different claim from zero and the reason this is a sparse series.
20459
+ */
20460
+ var LtsBucketSchema = object({
20461
+ scope: string(),
20462
+ bucketStart: number().int(),
20463
+ samples: number().int().nonnegative(),
20464
+ sum: number(),
20465
+ min: number(),
20466
+ max: number()
20467
+ });
20269
20468
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20270
20469
  deviceId: number(),
20271
20470
  trackId: string()
@@ -20312,6 +20511,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20312
20511
  kinds: array(string()).optional(),
20313
20512
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20314
20513
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20514
+ deviceId: number(),
20515
+ series: AnalyticsLtsSeriesSchema,
20516
+ /** Omit for EVERY scope of this series in the range. */
20517
+ scope: string().optional(),
20518
+ from: number(),
20519
+ to: number(),
20520
+ limit: number().int().positive().optional()
20521
+ }), array(LtsBucketSchema).readonly()), method(object({
20315
20522
  deviceId: number(),
20316
20523
  since: number(),
20317
20524
  until: number(),
@@ -20930,6 +21137,14 @@ var MotionSourceEnum = _enum([
20930
21137
  */
20931
21138
  var MotionSourcesSchema = array(MotionSourceEnum);
20932
21139
  /**
21140
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21141
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21142
+ * than a second spelling of the same two ideas — the value an operator picks
21143
+ * here is the value that comes back on the track, the overlay and the debug
21144
+ * row.
21145
+ */
21146
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21147
+ /**
20933
21148
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
20934
21149
  * so cap-side consumers (the orchestrator forward, the runner addon's
20935
21150
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21080,6 +21295,35 @@ var RunnerCameraConfigSchema = object({
21080
21295
  * events; the orchestrator forwards to `reportMotion`.
21081
21296
  */
21082
21297
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21298
+ /**
21299
+ * WHICH root detector runs for this camera. The detection counterpart of
21300
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21301
+ * of sources the system understands, vendor-agnostic, owned here.
21302
+ *
21303
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21304
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21305
+ * here. Its boxes reach post-analysis on the same
21306
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21307
+ * track gets the same tracker, the same overlay and the same detail
21308
+ * subtree (face / plate / embedding).
21309
+ *
21310
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21311
+ * run, and that is where a camera with a usable onboard detector buys back
21312
+ * its share of the accelerator. It saves the root inference, not the decode
21313
+ * — the detail subtree still needs pixels to cut crops from.
21314
+ *
21315
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21316
+ * step at all (there is nothing to track), and the cap that knows this says
21317
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21318
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21319
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21320
+ * worth exactly what it already is — a wake signal with a class.
21321
+ *
21322
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21323
+ * vendor never turns a detector on for the operator, and neither does a
21324
+ * default.
21325
+ */
21326
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21083
21327
  pipelineEnabled: boolean().default(true),
21084
21328
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21085
21329
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21261,7 +21505,47 @@ var RunnerLocalMetricsSchema = object({
21261
21505
  queueDepth: number(),
21262
21506
  frameLazy: FrameLazyMetricsSchema.optional()
21263
21507
  });
21508
+ /**
21509
+ * Pipeline Runner capability — runtime detection workhorse.
21510
+ *
21511
+ * One instance per node. Receives camera assignments from
21512
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21513
+ * decoded frames, drains motion + detection queues, calls the local
21514
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21515
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21516
+ * the bus.
21517
+ *
21518
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21519
+ * runner has zero knowledge of other agents, no global state, and never
21520
+ * makes assignment decisions itself.
21521
+ */
21522
+ /**
21523
+ * Why a runner declined to look at a camera out of band. Named rather than a
21524
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21525
+ * already mid-session and one already bursting are four different facts, and a
21526
+ * caller told only "no" cannot tell a protection from a bug.
21527
+ */
21528
+ var OccupancyBurstRefusalSchema = _enum([
21529
+ "not-attached",
21530
+ "battery-asleep",
21531
+ "not-watching",
21532
+ "already-bursting"
21533
+ ]);
21264
21534
  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({
21535
+ deviceId: number(),
21536
+ /** How many frames to collect. The caller sizes this against what its
21537
+ * own confirmation needs; the runner clamps it to the field's range. */
21538
+ frames: number().int().positive().optional(),
21539
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21540
+ * defend — the periodic one at least has a timer to point at. */
21541
+ reason: string()
21542
+ }), object({
21543
+ started: boolean(),
21544
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21545
+ }), {
21546
+ auth: "admin",
21547
+ kind: "mutation"
21548
+ }), method(object({
21265
21549
  handle: FrameHandleSchema,
21266
21550
  bbox: NativeCropBboxSchema,
21267
21551
  maxWidth: number().int().positive().optional(),
@@ -23691,10 +23975,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23691
23975
  }), boolean()), method(object({
23692
23976
  deviceId: number().int().nonnegative(),
23693
23977
  sessionId: string()
23694
- }), object({ pendingRenegotiation: object({
23695
- target: WebrtcStreamTargetSchema,
23696
- epoch: number()
23697
- }).nullable() }));
23978
+ }), object({
23979
+ pendingRenegotiation: object({
23980
+ target: WebrtcStreamTargetSchema,
23981
+ epoch: number()
23982
+ }).nullable(),
23983
+ /**
23984
+ * Whether the session still EXISTS.
23985
+ *
23986
+ * A consumer that holds a resource for the life of a session needs to
23987
+ * be able to ask, because a session does not always end the way it
23988
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
23989
+ * sent `SessionDisconnected`, so the Alexa exporter's
23990
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
23991
+ * H.264 transcode kept running for NOBODY for more than twenty
23992
+ * minutes. The WebRTC session had logged `WebRTC session closed`
23993
+ * minutes earlier — the broker knew; the holder had no way to ask.
23994
+ *
23995
+ * `false` for a session id the provider has never heard of, which is
23996
+ * the same answer as "it ended": either way nothing is holding it up.
23997
+ */
23998
+ alive: boolean()
23999
+ }));
23698
24000
  object({
23699
24001
  /** All accessory children of the parent. */
23700
24002
  childDeviceIds: array(number()).readonly(),
@@ -26772,7 +27074,7 @@ var NativeDetectionSchema = object({
26772
27074
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26773
27075
  confidence: number().min(0).max(1).optional()
26774
27076
  });
26775
- object({
27077
+ var NativeObjectDetectionStatusSchema = object({
26776
27078
  /**
26777
27079
  * Last observed instance per class. Missing entries mean the class
26778
27080
  * is supported but nothing has been seen since the provider started.
@@ -26789,14 +27091,56 @@ object({
26789
27091
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26790
27092
  /**
26791
27093
  * Whether forwarding of onboard AI detections is enabled for this device.
26792
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26793
- * churn the tracker, so forwarding stays off until the operator enables it.
27094
+ *
27095
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27096
+ * camera runs — that is the operator's choice, and it is made where every
27097
+ * other detection choice is made. `geometry` on
27098
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27099
+ * choice would buy this particular camera.
26794
27100
  */
26795
27101
  enabled: boolean()
26796
- }).extend({
27102
+ });
27103
+ /**
27104
+ * WHEN a camera's onboard detections carry geometry.
27105
+ *
27106
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27107
+ * a detection is a trackable subject whenever the camera sees one.
27108
+ * - `while-streaming` — only while some stream of this camera is already open.
27109
+ * The boxes ride the video's own side-channel rather than a feed of their
27110
+ * own, so they cost nothing and they exist only when something is pulling.
27111
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27112
+ * radio drain, but a camera that is awake is awake precisely because
27113
+ * something is in front of it, and its stream is already being pulled.
27114
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27115
+ * pipeline needs geometry to make a subject, so such a push reaches the
27116
+ * tracker as motion and no further.
27117
+ *
27118
+ * Reported and not inferred, because the operator's question in front of the
27119
+ * picker is "what do I get", and these are three different answers (D14: the
27120
+ * derived form is only as honest as `getOptions`).
27121
+ */
27122
+ var NativeObjectGeometryEnum = _enum([
27123
+ "boxed",
27124
+ "while-streaming",
27125
+ "flag-only"
27126
+ ]);
27127
+ var NativeObjectDetectionOptionsSchema = object({
27128
+ /** Classes this firmware can detect — the same list the status reports. */
27129
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27130
+ /** What a detection from this camera carries. */
27131
+ geometry: NativeObjectGeometryEnum
27132
+ });
27133
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27134
+ NativeObjectDetectionStatusSchema.extend({
26797
27135
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26798
27136
  lastFetchedAt: number() });
26799
- DeviceType.Camera, method(object({
27137
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27138
+ deviceId: number(),
27139
+ settings: NativeObjectDetectionSettingsPatchSchema
27140
+ }), _void(), {
27141
+ kind: "mutation",
27142
+ auth: "admin"
27143
+ }), method(object({
26800
27144
  deviceId: number(),
26801
27145
  enabled: boolean()
26802
27146
  }), _void(), {
@@ -30595,7 +30939,28 @@ var PerScopeBreakdownSchema = object({
30595
30939
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30596
30940
  totalObjects: number().int().nonnegative(),
30597
30941
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30598
- byClass: record(string(), number().int().nonnegative())
30942
+ byClass: record(string(), number().int().nonnegative()),
30943
+ /**
30944
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
30945
+ * present but not going anywhere (a parked car, a bin, a statue).
30946
+ *
30947
+ * The operator's question about a scene has two halves and they answer
30948
+ * different things: "what is parked here" is stable for hours and must not
30949
+ * flap, while "who is walking through" is the thing an alert is about. One
30950
+ * number could only serve one of them, and `totalObjects` served the first
30951
+ * badly — a passer-by moved it and every occupancy rule saw a change.
30952
+ *
30953
+ * `standing + transient === totalObjects`, always. The total keeps its old
30954
+ * meaning exactly, so no rule written against it changes behaviour.
30955
+ *
30956
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
30957
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
30958
+ * parked objects here" about a camera whose lot is full.
30959
+ */
30960
+ standingObjects: number().int().nonnegative().optional(),
30961
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
30962
+ * same absence rule. */
30963
+ transientObjects: number().int().nonnegative().optional()
30599
30964
  });
30600
30965
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30601
30966
  zoneId: string(),
@@ -33534,12 +33899,24 @@ Object.freeze({
33534
33899
  addonId: null,
33535
33900
  access: "create"
33536
33901
  },
33902
+ "nativeObjectDetection.getOptions": {
33903
+ capName: "native-object-detection",
33904
+ capScope: "device",
33905
+ addonId: null,
33906
+ access: "view"
33907
+ },
33537
33908
  "nativeObjectDetection.setEnabled": {
33538
33909
  capName: "native-object-detection",
33539
33910
  capScope: "device",
33540
33911
  addonId: null,
33541
33912
  access: "create"
33542
33913
  },
33914
+ "nativeObjectDetection.setSettings": {
33915
+ capName: "native-object-detection",
33916
+ capScope: "device",
33917
+ addonId: null,
33918
+ access: "create"
33919
+ },
33543
33920
  "navigation.getFeatures": {
33544
33921
  capName: "navigation",
33545
33922
  capScope: "device",
@@ -33804,6 +34181,12 @@ Object.freeze({
33804
34181
  addonId: null,
33805
34182
  access: "view"
33806
34183
  },
34184
+ "notificationRules.getClipRetentionAsks": {
34185
+ capName: "notification-rules",
34186
+ capScope: "system",
34187
+ addonId: null,
34188
+ access: "view"
34189
+ },
33807
34190
  "notificationRules.getConditionCatalog": {
33808
34191
  capName: "notification-rules",
33809
34192
  capScope: "system",
@@ -34314,6 +34697,12 @@ Object.freeze({
34314
34697
  addonId: null,
34315
34698
  access: "create"
34316
34699
  },
34700
+ "pipelineAnalytics.readLongTermSeries": {
34701
+ capName: "pipeline-analytics",
34702
+ capScope: "device",
34703
+ addonId: null,
34704
+ access: "view"
34705
+ },
34317
34706
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34318
34707
  capName: "pipeline-analytics",
34319
34708
  capScope: "device",
@@ -34986,6 +35375,12 @@ Object.freeze({
34986
35375
  addonId: null,
34987
35376
  access: "create"
34988
35377
  },
35378
+ "pipelineRunner.requestOccupancyBurst": {
35379
+ capName: "pipeline-runner",
35380
+ capScope: "system",
35381
+ addonId: null,
35382
+ access: "create"
35383
+ },
34989
35384
  "pipelineRunner.runDetailSubtree": {
34990
35385
  capName: "pipeline-runner",
34991
35386
  capScope: "system",
@@ -36198,6 +36593,12 @@ Object.freeze({
36198
36593
  addonId: null,
36199
36594
  access: "create"
36200
36595
  },
36596
+ "streamBroker.reportStreamSignal": {
36597
+ capName: "stream-broker",
36598
+ capScope: "system",
36599
+ addonId: null,
36600
+ access: "create"
36601
+ },
36201
36602
  "streamBroker.restartProfile": {
36202
36603
  capName: "stream-broker",
36203
36604
  capScope: "system",
@@ -36282,6 +36683,12 @@ Object.freeze({
36282
36683
  addonId: null,
36283
36684
  access: "create"
36284
36685
  },
36686
+ "streamSignals.listSignals": {
36687
+ capName: "stream-signals",
36688
+ capScope: "device",
36689
+ addonId: null,
36690
+ access: "view"
36691
+ },
36285
36692
  "switch.setState": {
36286
36693
  capName: "switch",
36287
36694
  capScope: "device",
@@ -37754,11 +38161,21 @@ Object.freeze({
37754
38161
  form: "single",
37755
38162
  optional: false
37756
38163
  }],
38164
+ "nativeObjectDetection.getOptions": [{
38165
+ name: "deviceId",
38166
+ form: "single",
38167
+ optional: false
38168
+ }],
37757
38169
  "nativeObjectDetection.setEnabled": [{
37758
38170
  name: "deviceId",
37759
38171
  form: "single",
37760
38172
  optional: false
37761
38173
  }],
38174
+ "nativeObjectDetection.setSettings": [{
38175
+ name: "deviceId",
38176
+ form: "single",
38177
+ optional: false
38178
+ }],
37762
38179
  "navigation.getFeatures": [{
37763
38180
  name: "deviceId",
37764
38181
  form: "single",
@@ -38108,6 +38525,11 @@ Object.freeze({
38108
38525
  form: "single",
38109
38526
  optional: false
38110
38527
  }],
38528
+ "pipelineAnalytics.readLongTermSeries": [{
38529
+ name: "deviceId",
38530
+ form: "single",
38531
+ optional: false
38532
+ }],
38111
38533
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38112
38534
  name: "deviceId",
38113
38535
  form: "single",
@@ -38298,6 +38720,11 @@ Object.freeze({
38298
38720
  form: "single",
38299
38721
  optional: false
38300
38722
  }],
38723
+ "pipelineRunner.requestOccupancyBurst": [{
38724
+ name: "deviceId",
38725
+ form: "single",
38726
+ optional: false
38727
+ }],
38301
38728
  "pipelineRunner.runDetailSubtree": [{
38302
38729
  name: "deviceId",
38303
38730
  form: "single",
@@ -38654,6 +39081,11 @@ Object.freeze({
38654
39081
  form: "single",
38655
39082
  optional: false
38656
39083
  }],
39084
+ "streamBroker.reportStreamSignal": [{
39085
+ name: "deviceId",
39086
+ form: "single",
39087
+ optional: false
39088
+ }],
38657
39089
  "streamBroker.restartProfile": [{
38658
39090
  name: "deviceId",
38659
39091
  form: "single",