@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.
@@ -1,6 +1,6 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import * as path from "node:path";
3
- //#region ../types/dist/event-category-ZyX6jcse.mjs
3
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -617,6 +617,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
617
617
  * pull-reconcile from the provider's `getStatus` on reconnect. */
618
618
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
619
619
  EventCategory["BackupCompleted"] = "backup.completed";
620
+ /**
621
+ * A whole backup RUN finished — every destination attempted, win or lose.
622
+ *
623
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
624
+ * a progress UI and the wrong one for a notification: an operator with three
625
+ * destinations would be told three times. And a run where two of three
626
+ * destinations succeeded is not a clean success — a single "backup
627
+ * completed" that hid the failed one would be a lie, so the count of each is
628
+ * carried here and the message says both.
629
+ *
630
+ * Emitted by the backup orchestrator only after the destination loop, so a
631
+ * run that dies during the BUILD phase produces no completion at all.
632
+ */
633
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
620
634
  EventCategory["BackupRestored"] = "backup.restored";
621
635
  EventCategory["NotificationDispatched"] = "notification.dispatched";
622
636
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5347,7 +5361,7 @@ var ZodIssueCode = {
5347
5361
  var ZodFirstPartyTypeKind;
5348
5362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5349
5363
  //#endregion
5350
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5364
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5351
5365
  /**
5352
5366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5353
5367
  * window to float samples (D455).
@@ -11475,6 +11489,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11475
11489
  auth: "admin"
11476
11490
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11477
11491
  DeviceType.Camera;
11492
+ /**
11493
+ * The signals a device can emit to WAKE its own stream.
11494
+ *
11495
+ * A camera whose stream is built on demand sleeps until something asks for it,
11496
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11497
+ * puller holds a session open for ever, and treating that as demand would keep
11498
+ * a battery camera awake for ever, which is the whole thing the battery is for
11499
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11500
+ * itself, with no stream running.
11501
+ *
11502
+ * ## The vocabulary is the PROVIDER'S, not ours
11503
+ *
11504
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11505
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11506
+ * Reolink offers motion and camera-native detection; another provider may offer
11507
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11508
+ * yet. A fixed enum here would mean every new signal is a framework release.
11509
+ *
11510
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11511
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11512
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11513
+ * binding — but both answer "what drives the detection pipeline", which is a
11514
+ * different question from "what may wake a sleeping stream". A camera can do
11515
+ * the first and not be trusted with the second, and the operator picks per
11516
+ * camera. Two questions, two authorities.
11517
+ *
11518
+ * ## Availability is not permission
11519
+ *
11520
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11521
+ * wakes the stream is the operator's per-camera choice, held by the broker
11522
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11523
+ * provider declaring a signal is not a provider enabling it.
11524
+ */
11525
+ /** One signal a device can emit. */
11526
+ var StreamSignalSchema = object({
11527
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11528
+ code: string().min(1),
11529
+ /** What an operator reads in the picker. The provider's own wording. */
11530
+ label: string().min(1),
11531
+ /**
11532
+ * Whether the provider recommends this signal ON when a camera is first set
11533
+ * up. A provider knows which of its signals are cheap and reliable; an
11534
+ * operator should not have to discover that by trial. Reolink recommends
11535
+ * both of its own.
11536
+ */
11537
+ recommended: boolean()
11538
+ });
11539
+ object({
11540
+ signals: array(StreamSignalSchema),
11541
+ lastFetchedAt: number()
11542
+ });
11543
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11478
11544
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11479
11545
  var StreamFormatSchema = _enum([
11480
11546
  "webrtc",
@@ -11871,6 +11937,22 @@ var EgressTranscodeSchema = object({
11871
11937
  camStreamId: string().nullable()
11872
11938
  });
11873
11939
  method(object({
11940
+ deviceId: number().int().nonnegative(),
11941
+ /** The provider's signal code. */
11942
+ code: string().min(1),
11943
+ /** Ms epoch. Absent ⇒ now. */
11944
+ at: number().optional()
11945
+ }), object({
11946
+ /** Whether the broker acted on it, and if not, why. */
11947
+ accepted: boolean(),
11948
+ reason: _enum([
11949
+ "woke",
11950
+ "hold-extended",
11951
+ "not-enabled",
11952
+ "no-consumer",
11953
+ "unknown-code"
11954
+ ])
11955
+ }), { kind: "mutation" }), method(object({
11874
11956
  deviceId: number().int().nonnegative(),
11875
11957
  camStreamId: string().min(1),
11876
11958
  kind: CamStreamKindSchema,
@@ -12125,6 +12207,16 @@ var PickStreamRequirementsSchema = object({
12125
12207
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12126
12208
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12127
12209
  minHeight: number().int().positive().optional(),
12210
+ /**
12211
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12212
+ *
12213
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12214
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12215
+ * Without this the ceiling had to be re-implemented by every caller — and
12216
+ * one caller implementing it privately is how a second scoring authority
12217
+ * gets born.
12218
+ */
12219
+ maxHeight: number().int().positive().optional(),
12128
12220
  /** Minimum horizontal resolution. */
12129
12221
  minWidth: number().int().positive().optional(),
12130
12222
  /**
@@ -12141,7 +12233,22 @@ var PickStreamRequirementsSchema = object({
12141
12233
  * transcoded" guard: if the device is already serving the consumer's
12142
12234
  * codec end-to-end, there's nothing to optimise.
12143
12235
  */
12144
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12236
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12237
+ /**
12238
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12239
+ * understanding that it will be transcoded.
12240
+ *
12241
+ * Default `false` — today's behaviour, and the right one for a bypass
12242
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12243
+ * ask the larger question: "what is the best stream for me, transcoding if
12244
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12245
+ * does not, so a passthrough is never lost to a transcode; the answer says
12246
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12247
+ *
12248
+ * This is what lets one picker serve both the bypass and the full source
12249
+ * choice, instead of a consumer scoring privately when the bypass misses.
12250
+ */
12251
+ allowTranscode: boolean().optional()
12145
12252
  }).readonly();
12146
12253
  var PickStreamPreferencesSchema = object({
12147
12254
  /**
@@ -12155,12 +12262,32 @@ var PickStreamPreferencesSchema = object({
12155
12262
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12156
12263
  * memory-constrained consumers / Apple Home guest sessions).
12157
12264
  */
12158
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12265
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12266
+ /**
12267
+ * The height the consumer actually wants to DELIVER.
12268
+ *
12269
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12270
+ * above the target wins, and only if nothing reaches it does the tallest
12271
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12272
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12273
+ * express that: it says "as big as possible", which is a different wish.
12274
+ *
12275
+ * Ignored when absent, so every existing caller keeps its ordering.
12276
+ */
12277
+ targetHeight: number().int().positive().optional()
12159
12278
  }).readonly();
12160
12279
  var PickedCamStreamSchema = object({
12161
12280
  camStreamId: string(),
12162
12281
  codec: string().optional(),
12163
12282
  resolution: CamStreamResolutionSchema.optional(),
12283
+ /**
12284
+ * Whether serving this stream requires a decode + re-encode.
12285
+ *
12286
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12287
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12288
+ * not ask cannot be handed a cost it never agreed to pay.
12289
+ */
12290
+ transcodes: boolean(),
12164
12291
  /** One-line explanation of why this stream won — for logs / debug UI. */
12165
12292
  reason: string()
12166
12293
  });
@@ -16349,6 +16476,8 @@ var NcSystemEventKindSchema = _enum([
16349
16476
  "device-enabled",
16350
16477
  "device-battery-low",
16351
16478
  "device-battery-normal",
16479
+ "device-consumable-low",
16480
+ "device-consumable-normal",
16352
16481
  "stream-online",
16353
16482
  "stream-offline",
16354
16483
  "node-online",
@@ -16367,6 +16496,7 @@ var NcSystemEventKindSchema = _enum([
16367
16496
  "addon-updated",
16368
16497
  "server-updated",
16369
16498
  "export-completed",
16499
+ "backup-completed",
16370
16500
  "camera-online",
16371
16501
  "camera-offline",
16372
16502
  "camera-disabled",
@@ -17689,6 +17819,48 @@ var NcAlarmConfigSchema = object({
17689
17819
  settings: NcAlarmSettingsSchema,
17690
17820
  coverage: array(NcAlarmModeCoverageSchema)
17691
17821
  });
17822
+ /**
17823
+ * ONE rule's demand on ONE camera's clip ring.
17824
+ *
17825
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
17826
+ * camera, so the answer stays a faithful description of the rules and the
17827
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
17828
+ * lives. A camera that appears in no ask is being told **nothing** — which is
17829
+ * a different thing from never having been told, and only the envelope
17830
+ * (`rulesLoaded`) can tell those apart.
17831
+ */
17832
+ var NcClipRetentionAskSchema = object({
17833
+ /**
17834
+ * The camera this ask is about. **Absent = every camera**, which is what a
17835
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
17836
+ * asking everywhere.
17837
+ */
17838
+ deviceId: number().int().nonnegative().optional(),
17839
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
17840
+ * needs nothing produces no ask at all. */
17841
+ seconds: number().min(0).max(60),
17842
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
17843
+ * assigned, which is what the cut defaults to. */
17844
+ profile: CamProfileSchema.optional(),
17845
+ /** Who is asking — so a retention the operator did not expect names a rule. */
17846
+ ruleId: string(),
17847
+ ruleName: string(),
17848
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
17849
+ reason: _enum(["window", "occupancy"])
17850
+ });
17851
+ /**
17852
+ * The whole answer, with the one bit that keeps absence from reading as zero.
17853
+ *
17854
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
17855
+ * once. A centre that is up but has not read its rules yet answers with an
17856
+ * empty ask list that means nothing at all — applying it would drop every
17857
+ * camera's ring to zero for the first events after a restart, which is the
17858
+ * footage this mechanism exists to keep.
17859
+ */
17860
+ var NcClipRetentionPlanSchema = object({
17861
+ rulesLoaded: boolean(),
17862
+ asks: array(NcClipRetentionAskSchema).readonly()
17863
+ });
17692
17864
  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 }), {
17693
17865
  kind: "mutation",
17694
17866
  auth: "admin",
@@ -17709,7 +17881,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17709
17881
  }), object({ success: literal(true) }), {
17710
17882
  kind: "mutation",
17711
17883
  auth: "admin"
17712
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17884
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17713
17885
  deviceId: number().int(),
17714
17886
  muted: boolean()
17715
17887
  }), object({ success: literal(true) }), {
@@ -20243,6 +20415,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20243
20415
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20244
20416
  framesMatched: number().int()
20245
20417
  })).readonly() });
20418
+ /**
20419
+ * The long-term series a camera produces. A closed union so a typo cannot
20420
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20421
+ * is an alias of this, not a second list.
20422
+ */
20423
+ var AnalyticsLtsSeriesSchema = _enum([
20424
+ "motion",
20425
+ "audio-dbfs",
20426
+ "battery",
20427
+ "occupancy"
20428
+ ]);
20429
+ /**
20430
+ * One closed 5-minute bucket of a long-term series.
20431
+ *
20432
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20433
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20434
+ * that exists at all was measured; a bucket that is absent was not, which is a
20435
+ * different claim from zero and the reason this is a sparse series.
20436
+ */
20437
+ var LtsBucketSchema = object({
20438
+ scope: string(),
20439
+ bucketStart: number().int(),
20440
+ samples: number().int().nonnegative(),
20441
+ sum: number(),
20442
+ min: number(),
20443
+ max: number()
20444
+ });
20246
20445
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20247
20446
  deviceId: number(),
20248
20447
  trackId: string()
@@ -20289,6 +20488,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20289
20488
  kinds: array(string()).optional(),
20290
20489
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20291
20490
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20491
+ deviceId: number(),
20492
+ series: AnalyticsLtsSeriesSchema,
20493
+ /** Omit for EVERY scope of this series in the range. */
20494
+ scope: string().optional(),
20495
+ from: number(),
20496
+ to: number(),
20497
+ limit: number().int().positive().optional()
20498
+ }), array(LtsBucketSchema).readonly()), method(object({
20292
20499
  deviceId: number(),
20293
20500
  since: number(),
20294
20501
  until: number(),
@@ -20907,6 +21114,14 @@ var MotionSourceEnum = _enum([
20907
21114
  */
20908
21115
  var MotionSourcesSchema = array(MotionSourceEnum);
20909
21116
  /**
21117
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21118
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21119
+ * than a second spelling of the same two ideas — the value an operator picks
21120
+ * here is the value that comes back on the track, the overlay and the debug
21121
+ * row.
21122
+ */
21123
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21124
+ /**
20910
21125
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
20911
21126
  * so cap-side consumers (the orchestrator forward, the runner addon's
20912
21127
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21057,6 +21272,35 @@ var RunnerCameraConfigSchema = object({
21057
21272
  * events; the orchestrator forwards to `reportMotion`.
21058
21273
  */
21059
21274
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21275
+ /**
21276
+ * WHICH root detector runs for this camera. The detection counterpart of
21277
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21278
+ * of sources the system understands, vendor-agnostic, owned here.
21279
+ *
21280
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21281
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21282
+ * here. Its boxes reach post-analysis on the same
21283
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21284
+ * track gets the same tracker, the same overlay and the same detail
21285
+ * subtree (face / plate / embedding).
21286
+ *
21287
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21288
+ * run, and that is where a camera with a usable onboard detector buys back
21289
+ * its share of the accelerator. It saves the root inference, not the decode
21290
+ * — the detail subtree still needs pixels to cut crops from.
21291
+ *
21292
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21293
+ * step at all (there is nothing to track), and the cap that knows this says
21294
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21295
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21296
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21297
+ * worth exactly what it already is — a wake signal with a class.
21298
+ *
21299
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21300
+ * vendor never turns a detector on for the operator, and neither does a
21301
+ * default.
21302
+ */
21303
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21060
21304
  pipelineEnabled: boolean().default(true),
21061
21305
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21062
21306
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21238,7 +21482,47 @@ var RunnerLocalMetricsSchema = object({
21238
21482
  queueDepth: number(),
21239
21483
  frameLazy: FrameLazyMetricsSchema.optional()
21240
21484
  });
21485
+ /**
21486
+ * Pipeline Runner capability — runtime detection workhorse.
21487
+ *
21488
+ * One instance per node. Receives camera assignments from
21489
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21490
+ * decoded frames, drains motion + detection queues, calls the local
21491
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21492
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21493
+ * the bus.
21494
+ *
21495
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21496
+ * runner has zero knowledge of other agents, no global state, and never
21497
+ * makes assignment decisions itself.
21498
+ */
21499
+ /**
21500
+ * Why a runner declined to look at a camera out of band. Named rather than a
21501
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21502
+ * already mid-session and one already bursting are four different facts, and a
21503
+ * caller told only "no" cannot tell a protection from a bug.
21504
+ */
21505
+ var OccupancyBurstRefusalSchema = _enum([
21506
+ "not-attached",
21507
+ "battery-asleep",
21508
+ "not-watching",
21509
+ "already-bursting"
21510
+ ]);
21241
21511
  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({
21512
+ deviceId: number(),
21513
+ /** How many frames to collect. The caller sizes this against what its
21514
+ * own confirmation needs; the runner clamps it to the field's range. */
21515
+ frames: number().int().positive().optional(),
21516
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21517
+ * defend — the periodic one at least has a timer to point at. */
21518
+ reason: string()
21519
+ }), object({
21520
+ started: boolean(),
21521
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21522
+ }), {
21523
+ auth: "admin",
21524
+ kind: "mutation"
21525
+ }), method(object({
21242
21526
  handle: FrameHandleSchema,
21243
21527
  bbox: NativeCropBboxSchema,
21244
21528
  maxWidth: number().int().positive().optional(),
@@ -23668,10 +23952,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23668
23952
  }), boolean()), method(object({
23669
23953
  deviceId: number().int().nonnegative(),
23670
23954
  sessionId: string()
23671
- }), object({ pendingRenegotiation: object({
23672
- target: WebrtcStreamTargetSchema,
23673
- epoch: number()
23674
- }).nullable() }));
23955
+ }), object({
23956
+ pendingRenegotiation: object({
23957
+ target: WebrtcStreamTargetSchema,
23958
+ epoch: number()
23959
+ }).nullable(),
23960
+ /**
23961
+ * Whether the session still EXISTS.
23962
+ *
23963
+ * A consumer that holds a resource for the life of a session needs to
23964
+ * be able to ask, because a session does not always end the way it
23965
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
23966
+ * sent `SessionDisconnected`, so the Alexa exporter's
23967
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
23968
+ * H.264 transcode kept running for NOBODY for more than twenty
23969
+ * minutes. The WebRTC session had logged `WebRTC session closed`
23970
+ * minutes earlier — the broker knew; the holder had no way to ask.
23971
+ *
23972
+ * `false` for a session id the provider has never heard of, which is
23973
+ * the same answer as "it ended": either way nothing is holding it up.
23974
+ */
23975
+ alive: boolean()
23976
+ }));
23675
23977
  object({
23676
23978
  /** All accessory children of the parent. */
23677
23979
  childDeviceIds: array(number()).readonly(),
@@ -26749,7 +27051,7 @@ var NativeDetectionSchema = object({
26749
27051
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26750
27052
  confidence: number().min(0).max(1).optional()
26751
27053
  });
26752
- object({
27054
+ var NativeObjectDetectionStatusSchema = object({
26753
27055
  /**
26754
27056
  * Last observed instance per class. Missing entries mean the class
26755
27057
  * is supported but nothing has been seen since the provider started.
@@ -26766,14 +27068,56 @@ object({
26766
27068
  supportedClasses: array(NativeObjectClassEnum).readonly(),
26767
27069
  /**
26768
27070
  * Whether forwarding of onboard AI detections is enabled for this device.
26769
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
26770
- * churn the tracker, so forwarding stays off until the operator enables it.
27071
+ *
27072
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27073
+ * camera runs — that is the operator's choice, and it is made where every
27074
+ * other detection choice is made. `geometry` on
27075
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27076
+ * choice would buy this particular camera.
26771
27077
  */
26772
27078
  enabled: boolean()
26773
- }).extend({
27079
+ });
27080
+ /**
27081
+ * WHEN a camera's onboard detections carry geometry.
27082
+ *
27083
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27084
+ * a detection is a trackable subject whenever the camera sees one.
27085
+ * - `while-streaming` — only while some stream of this camera is already open.
27086
+ * The boxes ride the video's own side-channel rather than a feed of their
27087
+ * own, so they cost nothing and they exist only when something is pulling.
27088
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27089
+ * radio drain, but a camera that is awake is awake precisely because
27090
+ * something is in front of it, and its stream is already being pulled.
27091
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27092
+ * pipeline needs geometry to make a subject, so such a push reaches the
27093
+ * tracker as motion and no further.
27094
+ *
27095
+ * Reported and not inferred, because the operator's question in front of the
27096
+ * picker is "what do I get", and these are three different answers (D14: the
27097
+ * derived form is only as honest as `getOptions`).
27098
+ */
27099
+ var NativeObjectGeometryEnum = _enum([
27100
+ "boxed",
27101
+ "while-streaming",
27102
+ "flag-only"
27103
+ ]);
27104
+ var NativeObjectDetectionOptionsSchema = object({
27105
+ /** Classes this firmware can detect — the same list the status reports. */
27106
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27107
+ /** What a detection from this camera carries. */
27108
+ geometry: NativeObjectGeometryEnum
27109
+ });
27110
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27111
+ NativeObjectDetectionStatusSchema.extend({
26774
27112
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
26775
27113
  lastFetchedAt: number() });
26776
- DeviceType.Camera, method(object({
27114
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27115
+ deviceId: number(),
27116
+ settings: NativeObjectDetectionSettingsPatchSchema
27117
+ }), _void(), {
27118
+ kind: "mutation",
27119
+ auth: "admin"
27120
+ }), method(object({
26777
27121
  deviceId: number(),
26778
27122
  enabled: boolean()
26779
27123
  }), _void(), {
@@ -30572,7 +30916,28 @@ var PerScopeBreakdownSchema = object({
30572
30916
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30573
30917
  totalObjects: number().int().nonnegative(),
30574
30918
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30575
- byClass: record(string(), number().int().nonnegative())
30919
+ byClass: record(string(), number().int().nonnegative()),
30920
+ /**
30921
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
30922
+ * present but not going anywhere (a parked car, a bin, a statue).
30923
+ *
30924
+ * The operator's question about a scene has two halves and they answer
30925
+ * different things: "what is parked here" is stable for hours and must not
30926
+ * flap, while "who is walking through" is the thing an alert is about. One
30927
+ * number could only serve one of them, and `totalObjects` served the first
30928
+ * badly — a passer-by moved it and every occupancy rule saw a change.
30929
+ *
30930
+ * `standing + transient === totalObjects`, always. The total keeps its old
30931
+ * meaning exactly, so no rule written against it changes behaviour.
30932
+ *
30933
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
30934
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
30935
+ * parked objects here" about a camera whose lot is full.
30936
+ */
30937
+ standingObjects: number().int().nonnegative().optional(),
30938
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
30939
+ * same absence rule. */
30940
+ transientObjects: number().int().nonnegative().optional()
30576
30941
  });
30577
30942
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30578
30943
  zoneId: string(),
@@ -33511,12 +33876,24 @@ Object.freeze({
33511
33876
  addonId: null,
33512
33877
  access: "create"
33513
33878
  },
33879
+ "nativeObjectDetection.getOptions": {
33880
+ capName: "native-object-detection",
33881
+ capScope: "device",
33882
+ addonId: null,
33883
+ access: "view"
33884
+ },
33514
33885
  "nativeObjectDetection.setEnabled": {
33515
33886
  capName: "native-object-detection",
33516
33887
  capScope: "device",
33517
33888
  addonId: null,
33518
33889
  access: "create"
33519
33890
  },
33891
+ "nativeObjectDetection.setSettings": {
33892
+ capName: "native-object-detection",
33893
+ capScope: "device",
33894
+ addonId: null,
33895
+ access: "create"
33896
+ },
33520
33897
  "navigation.getFeatures": {
33521
33898
  capName: "navigation",
33522
33899
  capScope: "device",
@@ -33781,6 +34158,12 @@ Object.freeze({
33781
34158
  addonId: null,
33782
34159
  access: "view"
33783
34160
  },
34161
+ "notificationRules.getClipRetentionAsks": {
34162
+ capName: "notification-rules",
34163
+ capScope: "system",
34164
+ addonId: null,
34165
+ access: "view"
34166
+ },
33784
34167
  "notificationRules.getConditionCatalog": {
33785
34168
  capName: "notification-rules",
33786
34169
  capScope: "system",
@@ -34291,6 +34674,12 @@ Object.freeze({
34291
34674
  addonId: null,
34292
34675
  access: "create"
34293
34676
  },
34677
+ "pipelineAnalytics.readLongTermSeries": {
34678
+ capName: "pipeline-analytics",
34679
+ capScope: "device",
34680
+ addonId: null,
34681
+ access: "view"
34682
+ },
34294
34683
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34295
34684
  capName: "pipeline-analytics",
34296
34685
  capScope: "device",
@@ -34963,6 +35352,12 @@ Object.freeze({
34963
35352
  addonId: null,
34964
35353
  access: "create"
34965
35354
  },
35355
+ "pipelineRunner.requestOccupancyBurst": {
35356
+ capName: "pipeline-runner",
35357
+ capScope: "system",
35358
+ addonId: null,
35359
+ access: "create"
35360
+ },
34966
35361
  "pipelineRunner.runDetailSubtree": {
34967
35362
  capName: "pipeline-runner",
34968
35363
  capScope: "system",
@@ -36175,6 +36570,12 @@ Object.freeze({
36175
36570
  addonId: null,
36176
36571
  access: "create"
36177
36572
  },
36573
+ "streamBroker.reportStreamSignal": {
36574
+ capName: "stream-broker",
36575
+ capScope: "system",
36576
+ addonId: null,
36577
+ access: "create"
36578
+ },
36178
36579
  "streamBroker.restartProfile": {
36179
36580
  capName: "stream-broker",
36180
36581
  capScope: "system",
@@ -36259,6 +36660,12 @@ Object.freeze({
36259
36660
  addonId: null,
36260
36661
  access: "create"
36261
36662
  },
36663
+ "streamSignals.listSignals": {
36664
+ capName: "stream-signals",
36665
+ capScope: "device",
36666
+ addonId: null,
36667
+ access: "view"
36668
+ },
36262
36669
  "switch.setState": {
36263
36670
  capName: "switch",
36264
36671
  capScope: "device",
@@ -37731,11 +38138,21 @@ Object.freeze({
37731
38138
  form: "single",
37732
38139
  optional: false
37733
38140
  }],
38141
+ "nativeObjectDetection.getOptions": [{
38142
+ name: "deviceId",
38143
+ form: "single",
38144
+ optional: false
38145
+ }],
37734
38146
  "nativeObjectDetection.setEnabled": [{
37735
38147
  name: "deviceId",
37736
38148
  form: "single",
37737
38149
  optional: false
37738
38150
  }],
38151
+ "nativeObjectDetection.setSettings": [{
38152
+ name: "deviceId",
38153
+ form: "single",
38154
+ optional: false
38155
+ }],
37739
38156
  "navigation.getFeatures": [{
37740
38157
  name: "deviceId",
37741
38158
  form: "single",
@@ -38085,6 +38502,11 @@ Object.freeze({
38085
38502
  form: "single",
38086
38503
  optional: false
38087
38504
  }],
38505
+ "pipelineAnalytics.readLongTermSeries": [{
38506
+ name: "deviceId",
38507
+ form: "single",
38508
+ optional: false
38509
+ }],
38088
38510
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38089
38511
  name: "deviceId",
38090
38512
  form: "single",
@@ -38275,6 +38697,11 @@ Object.freeze({
38275
38697
  form: "single",
38276
38698
  optional: false
38277
38699
  }],
38700
+ "pipelineRunner.requestOccupancyBurst": [{
38701
+ name: "deviceId",
38702
+ form: "single",
38703
+ optional: false
38704
+ }],
38278
38705
  "pipelineRunner.runDetailSubtree": [{
38279
38706
  name: "deviceId",
38280
38707
  form: "single",
@@ -38631,6 +39058,11 @@ Object.freeze({
38631
39058
  form: "single",
38632
39059
  optional: false
38633
39060
  }],
39061
+ "streamBroker.reportStreamSignal": [{
39062
+ name: "deviceId",
39063
+ form: "single",
39064
+ optional: false
39065
+ }],
38634
39066
  "streamBroker.restartProfile": [{
38635
39067
  name: "deviceId",
38636
39068
  form: "single",