@camstack/addon-export-google 0.1.65 → 0.1.67

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.
@@ -73,7 +73,7 @@ function createApiDeviceGateway(deps) {
73
73
  };
74
74
  }
75
75
  //#endregion
76
- //#region ../types/dist/event-category-ZyX6jcse.mjs
76
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
77
77
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
78
78
  EventCategory["SystemBoot"] = "system.boot";
79
79
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -690,6 +690,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
690
690
  * pull-reconcile from the provider's `getStatus` on reconnect. */
691
691
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
692
692
  EventCategory["BackupCompleted"] = "backup.completed";
693
+ /**
694
+ * A whole backup RUN finished — every destination attempted, win or lose.
695
+ *
696
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
697
+ * a progress UI and the wrong one for a notification: an operator with three
698
+ * destinations would be told three times. And a run where two of three
699
+ * destinations succeeded is not a clean success — a single "backup
700
+ * completed" that hid the failed one would be a lie, so the count of each is
701
+ * carried here and the message says both.
702
+ *
703
+ * Emitted by the backup orchestrator only after the destination loop, so a
704
+ * run that dies during the BUILD phase produces no completion at all.
705
+ */
706
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
693
707
  EventCategory["BackupRestored"] = "backup.restored";
694
708
  EventCategory["NotificationDispatched"] = "notification.dispatched";
695
709
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5420,7 +5434,7 @@ var ZodIssueCode = {
5420
5434
  var ZodFirstPartyTypeKind;
5421
5435
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5422
5436
  //#endregion
5423
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5437
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5424
5438
  /**
5425
5439
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5426
5440
  * window to float samples (D455).
@@ -7301,6 +7315,28 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7301
7315
  DeviceRole["GenericNotifier"] = "generic-notifier";
7302
7316
  return DeviceRole;
7303
7317
  }({});
7318
+ /**
7319
+ * Identity — preserves literal types for downstream inference.
7320
+ *
7321
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
7322
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
7323
+ * the broader unions declared on `CustomActionSpec`'s default generics.
7324
+ * Shape validity is enforced separately by the `customAction(...)` helper
7325
+ * whose return type is already a `CustomActionSpec<...>`.
7326
+ */
7327
+ function defineCustomActions(spec) {
7328
+ return spec;
7329
+ }
7330
+ function customAction(input, output, options) {
7331
+ return {
7332
+ input,
7333
+ output,
7334
+ kind: options?.kind ?? "query",
7335
+ auth: options?.auth ?? "protected",
7336
+ scope: options?.scope ?? { kind: "system" },
7337
+ ...options?.caller ? { caller: "required" } : {}
7338
+ };
7339
+ }
7304
7340
  var StaticDirOutputSchema = object({ staticDir: string() });
7305
7341
  var VersionOutputSchema = object({ version: string() });
7306
7342
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -11703,6 +11739,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11703
11739
  auth: "admin"
11704
11740
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11705
11741
  DeviceType.Camera;
11742
+ /**
11743
+ * The signals a device can emit to WAKE its own stream.
11744
+ *
11745
+ * A camera whose stream is built on demand sleeps until something asks for it,
11746
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11747
+ * puller holds a session open for ever, and treating that as demand would keep
11748
+ * a battery camera awake for ever, which is the whole thing the battery is for
11749
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11750
+ * itself, with no stream running.
11751
+ *
11752
+ * ## The vocabulary is the PROVIDER'S, not ours
11753
+ *
11754
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11755
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11756
+ * Reolink offers motion and camera-native detection; another provider may offer
11757
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11758
+ * yet. A fixed enum here would mean every new signal is a framework release.
11759
+ *
11760
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11761
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11762
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11763
+ * binding — but both answer "what drives the detection pipeline", which is a
11764
+ * different question from "what may wake a sleeping stream". A camera can do
11765
+ * the first and not be trusted with the second, and the operator picks per
11766
+ * camera. Two questions, two authorities.
11767
+ *
11768
+ * ## Availability is not permission
11769
+ *
11770
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11771
+ * wakes the stream is the operator's per-camera choice, held by the broker
11772
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11773
+ * provider declaring a signal is not a provider enabling it.
11774
+ */
11775
+ /** One signal a device can emit. */
11776
+ var StreamSignalSchema = object({
11777
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11778
+ code: string().min(1),
11779
+ /** What an operator reads in the picker. The provider's own wording. */
11780
+ label: string().min(1),
11781
+ /**
11782
+ * Whether the provider recommends this signal ON when a camera is first set
11783
+ * up. A provider knows which of its signals are cheap and reliable; an
11784
+ * operator should not have to discover that by trial. Reolink recommends
11785
+ * both of its own.
11786
+ */
11787
+ recommended: boolean()
11788
+ });
11789
+ object({
11790
+ signals: array(StreamSignalSchema),
11791
+ lastFetchedAt: number()
11792
+ });
11793
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11706
11794
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11707
11795
  var StreamFormatSchema = _enum([
11708
11796
  "webrtc",
@@ -12099,6 +12187,22 @@ var EgressTranscodeSchema = object({
12099
12187
  camStreamId: string().nullable()
12100
12188
  });
12101
12189
  method(object({
12190
+ deviceId: number().int().nonnegative(),
12191
+ /** The provider's signal code. */
12192
+ code: string().min(1),
12193
+ /** Ms epoch. Absent ⇒ now. */
12194
+ at: number().optional()
12195
+ }), object({
12196
+ /** Whether the broker acted on it, and if not, why. */
12197
+ accepted: boolean(),
12198
+ reason: _enum([
12199
+ "woke",
12200
+ "hold-extended",
12201
+ "not-enabled",
12202
+ "no-consumer",
12203
+ "unknown-code"
12204
+ ])
12205
+ }), { kind: "mutation" }), method(object({
12102
12206
  deviceId: number().int().nonnegative(),
12103
12207
  camStreamId: string().min(1),
12104
12208
  kind: CamStreamKindSchema,
@@ -12353,6 +12457,16 @@ var PickStreamRequirementsSchema = object({
12353
12457
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12354
12458
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12355
12459
  minHeight: number().int().positive().optional(),
12460
+ /**
12461
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12462
+ *
12463
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12464
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12465
+ * Without this the ceiling had to be re-implemented by every caller — and
12466
+ * one caller implementing it privately is how a second scoring authority
12467
+ * gets born.
12468
+ */
12469
+ maxHeight: number().int().positive().optional(),
12356
12470
  /** Minimum horizontal resolution. */
12357
12471
  minWidth: number().int().positive().optional(),
12358
12472
  /**
@@ -12369,7 +12483,22 @@ var PickStreamRequirementsSchema = object({
12369
12483
  * transcoded" guard: if the device is already serving the consumer's
12370
12484
  * codec end-to-end, there's nothing to optimise.
12371
12485
  */
12372
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12486
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12487
+ /**
12488
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12489
+ * understanding that it will be transcoded.
12490
+ *
12491
+ * Default `false` — today's behaviour, and the right one for a bypass
12492
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12493
+ * ask the larger question: "what is the best stream for me, transcoding if
12494
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12495
+ * does not, so a passthrough is never lost to a transcode; the answer says
12496
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12497
+ *
12498
+ * This is what lets one picker serve both the bypass and the full source
12499
+ * choice, instead of a consumer scoring privately when the bypass misses.
12500
+ */
12501
+ allowTranscode: boolean().optional()
12373
12502
  }).readonly();
12374
12503
  var PickStreamPreferencesSchema = object({
12375
12504
  /**
@@ -12383,12 +12512,32 @@ var PickStreamPreferencesSchema = object({
12383
12512
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12384
12513
  * memory-constrained consumers / Apple Home guest sessions).
12385
12514
  */
12386
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12515
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12516
+ /**
12517
+ * The height the consumer actually wants to DELIVER.
12518
+ *
12519
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12520
+ * above the target wins, and only if nothing reaches it does the tallest
12521
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12522
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12523
+ * express that: it says "as big as possible", which is a different wish.
12524
+ *
12525
+ * Ignored when absent, so every existing caller keeps its ordering.
12526
+ */
12527
+ targetHeight: number().int().positive().optional()
12387
12528
  }).readonly();
12388
12529
  var PickedCamStreamSchema = object({
12389
12530
  camStreamId: string(),
12390
12531
  codec: string().optional(),
12391
12532
  resolution: CamStreamResolutionSchema.optional(),
12533
+ /**
12534
+ * Whether serving this stream requires a decode + re-encode.
12535
+ *
12536
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12537
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12538
+ * not ask cannot be handed a cost it never agreed to pay.
12539
+ */
12540
+ transcodes: boolean(),
12392
12541
  /** One-line explanation of why this stream won — for logs / debug UI. */
12393
12542
  reason: string()
12394
12543
  });
@@ -12506,28 +12655,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12506
12655
  content: string()
12507
12656
  })) }), { auth: "admin" });
12508
12657
  /**
12509
- * Identity — preserves literal types for downstream inference.
12510
- *
12511
- * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
12512
- * TypeScript does not widen each entry's literal `kind`/`auth` fields to
12513
- * the broader unions declared on `CustomActionSpec`'s default generics.
12514
- * Shape validity is enforced separately by the `customAction(...)` helper
12515
- * whose return type is already a `CustomActionSpec<...>`.
12516
- */
12517
- function defineCustomActions(spec) {
12518
- return spec;
12519
- }
12520
- function customAction(input, output, options) {
12521
- return {
12522
- input,
12523
- output,
12524
- kind: options?.kind ?? "query",
12525
- auth: options?.auth ?? "protected",
12526
- scope: options?.scope ?? { kind: "system" },
12527
- ...options?.caller ? { caller: "required" } : {}
12528
- };
12529
- }
12530
- /**
12531
12658
  * `custom-model-registry` — collection cap exposing operator-registered
12532
12659
  * custom detection models. Each provider (today: `addon-model-studio`)
12533
12660
  * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
@@ -16624,6 +16751,8 @@ var NcSystemEventKindSchema = _enum([
16624
16751
  "device-enabled",
16625
16752
  "device-battery-low",
16626
16753
  "device-battery-normal",
16754
+ "device-consumable-low",
16755
+ "device-consumable-normal",
16627
16756
  "stream-online",
16628
16757
  "stream-offline",
16629
16758
  "node-online",
@@ -16642,6 +16771,7 @@ var NcSystemEventKindSchema = _enum([
16642
16771
  "addon-updated",
16643
16772
  "server-updated",
16644
16773
  "export-completed",
16774
+ "backup-completed",
16645
16775
  "camera-online",
16646
16776
  "camera-offline",
16647
16777
  "camera-disabled",
@@ -17964,6 +18094,48 @@ var NcAlarmConfigSchema = object({
17964
18094
  settings: NcAlarmSettingsSchema,
17965
18095
  coverage: array(NcAlarmModeCoverageSchema)
17966
18096
  });
18097
+ /**
18098
+ * ONE rule's demand on ONE camera's clip ring.
18099
+ *
18100
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
18101
+ * camera, so the answer stays a faithful description of the rules and the
18102
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
18103
+ * lives. A camera that appears in no ask is being told **nothing** — which is
18104
+ * a different thing from never having been told, and only the envelope
18105
+ * (`rulesLoaded`) can tell those apart.
18106
+ */
18107
+ var NcClipRetentionAskSchema = object({
18108
+ /**
18109
+ * The camera this ask is about. **Absent = every camera**, which is what a
18110
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
18111
+ * asking everywhere.
18112
+ */
18113
+ deviceId: number().int().nonnegative().optional(),
18114
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
18115
+ * needs nothing produces no ask at all. */
18116
+ seconds: number().min(0).max(60),
18117
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
18118
+ * assigned, which is what the cut defaults to. */
18119
+ profile: CamProfileSchema.optional(),
18120
+ /** Who is asking — so a retention the operator did not expect names a rule. */
18121
+ ruleId: string(),
18122
+ ruleName: string(),
18123
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
18124
+ reason: _enum(["window", "occupancy"])
18125
+ });
18126
+ /**
18127
+ * The whole answer, with the one bit that keeps absence from reading as zero.
18128
+ *
18129
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18130
+ * once. A centre that is up but has not read its rules yet answers with an
18131
+ * empty ask list that means nothing at all — applying it would drop every
18132
+ * camera's ring to zero for the first events after a restart, which is the
18133
+ * footage this mechanism exists to keep.
18134
+ */
18135
+ var NcClipRetentionPlanSchema = object({
18136
+ rulesLoaded: boolean(),
18137
+ asks: array(NcClipRetentionAskSchema).readonly()
18138
+ });
17967
18139
  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 }), {
17968
18140
  kind: "mutation",
17969
18141
  auth: "admin",
@@ -17984,7 +18156,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17984
18156
  }), object({ success: literal(true) }), {
17985
18157
  kind: "mutation",
17986
18158
  auth: "admin"
17987
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18159
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17988
18160
  deviceId: number().int(),
17989
18161
  muted: boolean()
17990
18162
  }), object({ success: literal(true) }), {
@@ -20534,6 +20706,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20534
20706
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20535
20707
  framesMatched: number().int()
20536
20708
  })).readonly() });
20709
+ /**
20710
+ * The long-term series a camera produces. A closed union so a typo cannot
20711
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20712
+ * is an alias of this, not a second list.
20713
+ */
20714
+ var AnalyticsLtsSeriesSchema = _enum([
20715
+ "motion",
20716
+ "audio-dbfs",
20717
+ "battery",
20718
+ "occupancy"
20719
+ ]);
20720
+ /**
20721
+ * One closed 5-minute bucket of a long-term series.
20722
+ *
20723
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20724
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20725
+ * that exists at all was measured; a bucket that is absent was not, which is a
20726
+ * different claim from zero and the reason this is a sparse series.
20727
+ */
20728
+ var LtsBucketSchema = object({
20729
+ scope: string(),
20730
+ bucketStart: number().int(),
20731
+ samples: number().int().nonnegative(),
20732
+ sum: number(),
20733
+ min: number(),
20734
+ max: number()
20735
+ });
20537
20736
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20538
20737
  deviceId: number(),
20539
20738
  trackId: string()
@@ -20580,6 +20779,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20580
20779
  kinds: array(string()).optional(),
20581
20780
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20582
20781
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20782
+ deviceId: number(),
20783
+ series: AnalyticsLtsSeriesSchema,
20784
+ /** Omit for EVERY scope of this series in the range. */
20785
+ scope: string().optional(),
20786
+ from: number(),
20787
+ to: number(),
20788
+ limit: number().int().positive().optional()
20789
+ }), array(LtsBucketSchema).readonly()), method(object({
20583
20790
  deviceId: number(),
20584
20791
  since: number(),
20585
20792
  until: number(),
@@ -21198,6 +21405,14 @@ var MotionSourceEnum = _enum([
21198
21405
  */
21199
21406
  var MotionSourcesSchema = array(MotionSourceEnum);
21200
21407
  /**
21408
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21409
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21410
+ * than a second spelling of the same two ideas — the value an operator picks
21411
+ * here is the value that comes back on the track, the overlay and the debug
21412
+ * row.
21413
+ */
21414
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21415
+ /**
21201
21416
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21202
21417
  * so cap-side consumers (the orchestrator forward, the runner addon's
21203
21418
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21348,6 +21563,35 @@ var RunnerCameraConfigSchema = object({
21348
21563
  * events; the orchestrator forwards to `reportMotion`.
21349
21564
  */
21350
21565
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21566
+ /**
21567
+ * WHICH root detector runs for this camera. The detection counterpart of
21568
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21569
+ * of sources the system understands, vendor-agnostic, owned here.
21570
+ *
21571
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21572
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21573
+ * here. Its boxes reach post-analysis on the same
21574
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21575
+ * track gets the same tracker, the same overlay and the same detail
21576
+ * subtree (face / plate / embedding).
21577
+ *
21578
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21579
+ * run, and that is where a camera with a usable onboard detector buys back
21580
+ * its share of the accelerator. It saves the root inference, not the decode
21581
+ * — the detail subtree still needs pixels to cut crops from.
21582
+ *
21583
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21584
+ * step at all (there is nothing to track), and the cap that knows this says
21585
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21586
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21587
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21588
+ * worth exactly what it already is — a wake signal with a class.
21589
+ *
21590
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21591
+ * vendor never turns a detector on for the operator, and neither does a
21592
+ * default.
21593
+ */
21594
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21351
21595
  pipelineEnabled: boolean().default(true),
21352
21596
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21353
21597
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21529,7 +21773,47 @@ var RunnerLocalMetricsSchema = object({
21529
21773
  queueDepth: number(),
21530
21774
  frameLazy: FrameLazyMetricsSchema.optional()
21531
21775
  });
21776
+ /**
21777
+ * Pipeline Runner capability — runtime detection workhorse.
21778
+ *
21779
+ * One instance per node. Receives camera assignments from
21780
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21781
+ * decoded frames, drains motion + detection queues, calls the local
21782
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21783
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21784
+ * the bus.
21785
+ *
21786
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21787
+ * runner has zero knowledge of other agents, no global state, and never
21788
+ * makes assignment decisions itself.
21789
+ */
21790
+ /**
21791
+ * Why a runner declined to look at a camera out of band. Named rather than a
21792
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21793
+ * already mid-session and one already bursting are four different facts, and a
21794
+ * caller told only "no" cannot tell a protection from a bug.
21795
+ */
21796
+ var OccupancyBurstRefusalSchema = _enum([
21797
+ "not-attached",
21798
+ "battery-asleep",
21799
+ "not-watching",
21800
+ "already-bursting"
21801
+ ]);
21532
21802
  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({
21803
+ deviceId: number(),
21804
+ /** How many frames to collect. The caller sizes this against what its
21805
+ * own confirmation needs; the runner clamps it to the field's range. */
21806
+ frames: number().int().positive().optional(),
21807
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21808
+ * defend — the periodic one at least has a timer to point at. */
21809
+ reason: string()
21810
+ }), object({
21811
+ started: boolean(),
21812
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21813
+ }), {
21814
+ auth: "admin",
21815
+ kind: "mutation"
21816
+ }), method(object({
21533
21817
  handle: FrameHandleSchema,
21534
21818
  bbox: NativeCropBboxSchema,
21535
21819
  maxWidth: number().int().positive().optional(),
@@ -23899,10 +24183,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23899
24183
  }), boolean()), method(object({
23900
24184
  deviceId: number().int().nonnegative(),
23901
24185
  sessionId: string()
23902
- }), object({ pendingRenegotiation: object({
23903
- target: WebrtcStreamTargetSchema,
23904
- epoch: number()
23905
- }).nullable() }));
24186
+ }), object({
24187
+ pendingRenegotiation: object({
24188
+ target: WebrtcStreamTargetSchema,
24189
+ epoch: number()
24190
+ }).nullable(),
24191
+ /**
24192
+ * Whether the session still EXISTS.
24193
+ *
24194
+ * A consumer that holds a resource for the life of a session needs to
24195
+ * be able to ask, because a session does not always end the way it
24196
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24197
+ * sent `SessionDisconnected`, so the Alexa exporter's
24198
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24199
+ * H.264 transcode kept running for NOBODY for more than twenty
24200
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24201
+ * minutes earlier — the broker knew; the holder had no way to ask.
24202
+ *
24203
+ * `false` for a session id the provider has never heard of, which is
24204
+ * the same answer as "it ended": either way nothing is holding it up.
24205
+ */
24206
+ alive: boolean()
24207
+ }));
23906
24208
  object({
23907
24209
  /** All accessory children of the parent. */
23908
24210
  childDeviceIds: array(number()).readonly(),
@@ -26992,7 +27294,7 @@ var NativeDetectionSchema = object({
26992
27294
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26993
27295
  confidence: number().min(0).max(1).optional()
26994
27296
  });
26995
- object({
27297
+ var NativeObjectDetectionStatusSchema = object({
26996
27298
  /**
26997
27299
  * Last observed instance per class. Missing entries mean the class
26998
27300
  * is supported but nothing has been seen since the provider started.
@@ -27009,14 +27311,56 @@ object({
27009
27311
  supportedClasses: array(NativeObjectClassEnum).readonly(),
27010
27312
  /**
27011
27313
  * Whether forwarding of onboard AI detections is enabled for this device.
27012
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
27013
- * churn the tracker, so forwarding stays off until the operator enables it.
27314
+ *
27315
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27316
+ * camera runs — that is the operator's choice, and it is made where every
27317
+ * other detection choice is made. `geometry` on
27318
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27319
+ * choice would buy this particular camera.
27014
27320
  */
27015
27321
  enabled: boolean()
27016
- }).extend({
27322
+ });
27323
+ /**
27324
+ * WHEN a camera's onboard detections carry geometry.
27325
+ *
27326
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27327
+ * a detection is a trackable subject whenever the camera sees one.
27328
+ * - `while-streaming` — only while some stream of this camera is already open.
27329
+ * The boxes ride the video's own side-channel rather than a feed of their
27330
+ * own, so they cost nothing and they exist only when something is pulling.
27331
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27332
+ * radio drain, but a camera that is awake is awake precisely because
27333
+ * something is in front of it, and its stream is already being pulled.
27334
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27335
+ * pipeline needs geometry to make a subject, so such a push reaches the
27336
+ * tracker as motion and no further.
27337
+ *
27338
+ * Reported and not inferred, because the operator's question in front of the
27339
+ * picker is "what do I get", and these are three different answers (D14: the
27340
+ * derived form is only as honest as `getOptions`).
27341
+ */
27342
+ var NativeObjectGeometryEnum = _enum([
27343
+ "boxed",
27344
+ "while-streaming",
27345
+ "flag-only"
27346
+ ]);
27347
+ var NativeObjectDetectionOptionsSchema = object({
27348
+ /** Classes this firmware can detect — the same list the status reports. */
27349
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27350
+ /** What a detection from this camera carries. */
27351
+ geometry: NativeObjectGeometryEnum
27352
+ });
27353
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27354
+ NativeObjectDetectionStatusSchema.extend({
27017
27355
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
27018
27356
  lastFetchedAt: number() });
27019
- DeviceType.Camera, method(object({
27357
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27358
+ deviceId: number(),
27359
+ settings: NativeObjectDetectionSettingsPatchSchema
27360
+ }), _void(), {
27361
+ kind: "mutation",
27362
+ auth: "admin"
27363
+ }), method(object({
27020
27364
  deviceId: number(),
27021
27365
  enabled: boolean()
27022
27366
  }), _void(), {
@@ -30822,7 +31166,28 @@ var PerScopeBreakdownSchema = object({
30822
31166
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30823
31167
  totalObjects: number().int().nonnegative(),
30824
31168
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30825
- byClass: record(string(), number().int().nonnegative())
31169
+ byClass: record(string(), number().int().nonnegative()),
31170
+ /**
31171
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31172
+ * present but not going anywhere (a parked car, a bin, a statue).
31173
+ *
31174
+ * The operator's question about a scene has two halves and they answer
31175
+ * different things: "what is parked here" is stable for hours and must not
31176
+ * flap, while "who is walking through" is the thing an alert is about. One
31177
+ * number could only serve one of them, and `totalObjects` served the first
31178
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31179
+ *
31180
+ * `standing + transient === totalObjects`, always. The total keeps its old
31181
+ * meaning exactly, so no rule written against it changes behaviour.
31182
+ *
31183
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31184
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31185
+ * parked objects here" about a camera whose lot is full.
31186
+ */
31187
+ standingObjects: number().int().nonnegative().optional(),
31188
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31189
+ * same absence rule. */
31190
+ transientObjects: number().int().nonnegative().optional()
30826
31191
  });
30827
31192
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30828
31193
  zoneId: string(),
@@ -33761,12 +34126,24 @@ Object.freeze({
33761
34126
  addonId: null,
33762
34127
  access: "create"
33763
34128
  },
34129
+ "nativeObjectDetection.getOptions": {
34130
+ capName: "native-object-detection",
34131
+ capScope: "device",
34132
+ addonId: null,
34133
+ access: "view"
34134
+ },
33764
34135
  "nativeObjectDetection.setEnabled": {
33765
34136
  capName: "native-object-detection",
33766
34137
  capScope: "device",
33767
34138
  addonId: null,
33768
34139
  access: "create"
33769
34140
  },
34141
+ "nativeObjectDetection.setSettings": {
34142
+ capName: "native-object-detection",
34143
+ capScope: "device",
34144
+ addonId: null,
34145
+ access: "create"
34146
+ },
33770
34147
  "navigation.getFeatures": {
33771
34148
  capName: "navigation",
33772
34149
  capScope: "device",
@@ -34031,6 +34408,12 @@ Object.freeze({
34031
34408
  addonId: null,
34032
34409
  access: "view"
34033
34410
  },
34411
+ "notificationRules.getClipRetentionAsks": {
34412
+ capName: "notification-rules",
34413
+ capScope: "system",
34414
+ addonId: null,
34415
+ access: "view"
34416
+ },
34034
34417
  "notificationRules.getConditionCatalog": {
34035
34418
  capName: "notification-rules",
34036
34419
  capScope: "system",
@@ -34541,6 +34924,12 @@ Object.freeze({
34541
34924
  addonId: null,
34542
34925
  access: "create"
34543
34926
  },
34927
+ "pipelineAnalytics.readLongTermSeries": {
34928
+ capName: "pipeline-analytics",
34929
+ capScope: "device",
34930
+ addonId: null,
34931
+ access: "view"
34932
+ },
34544
34933
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34545
34934
  capName: "pipeline-analytics",
34546
34935
  capScope: "device",
@@ -35213,6 +35602,12 @@ Object.freeze({
35213
35602
  addonId: null,
35214
35603
  access: "create"
35215
35604
  },
35605
+ "pipelineRunner.requestOccupancyBurst": {
35606
+ capName: "pipeline-runner",
35607
+ capScope: "system",
35608
+ addonId: null,
35609
+ access: "create"
35610
+ },
35216
35611
  "pipelineRunner.runDetailSubtree": {
35217
35612
  capName: "pipeline-runner",
35218
35613
  capScope: "system",
@@ -36425,6 +36820,12 @@ Object.freeze({
36425
36820
  addonId: null,
36426
36821
  access: "create"
36427
36822
  },
36823
+ "streamBroker.reportStreamSignal": {
36824
+ capName: "stream-broker",
36825
+ capScope: "system",
36826
+ addonId: null,
36827
+ access: "create"
36828
+ },
36428
36829
  "streamBroker.restartProfile": {
36429
36830
  capName: "stream-broker",
36430
36831
  capScope: "system",
@@ -36509,6 +36910,12 @@ Object.freeze({
36509
36910
  addonId: null,
36510
36911
  access: "create"
36511
36912
  },
36913
+ "streamSignals.listSignals": {
36914
+ capName: "stream-signals",
36915
+ capScope: "device",
36916
+ addonId: null,
36917
+ access: "view"
36918
+ },
36512
36919
  "switch.setState": {
36513
36920
  capName: "switch",
36514
36921
  capScope: "device",
@@ -37981,11 +38388,21 @@ Object.freeze({
37981
38388
  form: "single",
37982
38389
  optional: false
37983
38390
  }],
38391
+ "nativeObjectDetection.getOptions": [{
38392
+ name: "deviceId",
38393
+ form: "single",
38394
+ optional: false
38395
+ }],
37984
38396
  "nativeObjectDetection.setEnabled": [{
37985
38397
  name: "deviceId",
37986
38398
  form: "single",
37987
38399
  optional: false
37988
38400
  }],
38401
+ "nativeObjectDetection.setSettings": [{
38402
+ name: "deviceId",
38403
+ form: "single",
38404
+ optional: false
38405
+ }],
37989
38406
  "navigation.getFeatures": [{
37990
38407
  name: "deviceId",
37991
38408
  form: "single",
@@ -38335,6 +38752,11 @@ Object.freeze({
38335
38752
  form: "single",
38336
38753
  optional: false
38337
38754
  }],
38755
+ "pipelineAnalytics.readLongTermSeries": [{
38756
+ name: "deviceId",
38757
+ form: "single",
38758
+ optional: false
38759
+ }],
38338
38760
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38339
38761
  name: "deviceId",
38340
38762
  form: "single",
@@ -38525,6 +38947,11 @@ Object.freeze({
38525
38947
  form: "single",
38526
38948
  optional: false
38527
38949
  }],
38950
+ "pipelineRunner.requestOccupancyBurst": [{
38951
+ name: "deviceId",
38952
+ form: "single",
38953
+ optional: false
38954
+ }],
38528
38955
  "pipelineRunner.runDetailSubtree": [{
38529
38956
  name: "deviceId",
38530
38957
  form: "single",
@@ -38881,6 +39308,11 @@ Object.freeze({
38881
39308
  form: "single",
38882
39309
  optional: false
38883
39310
  }],
39311
+ "streamBroker.reportStreamSignal": [{
39312
+ name: "deviceId",
39313
+ form: "single",
39314
+ optional: false
39315
+ }],
38884
39316
  "streamBroker.restartProfile": [{
38885
39317
  name: "deviceId",
38886
39318
  form: "single",