@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.
@@ -77,7 +77,7 @@ function createApiDeviceGateway(deps) {
77
77
  };
78
78
  }
79
79
  //#endregion
80
- //#region ../types/dist/event-category-ZyX6jcse.mjs
80
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
81
81
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
82
82
  EventCategory["SystemBoot"] = "system.boot";
83
83
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -694,6 +694,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
694
694
  * pull-reconcile from the provider's `getStatus` on reconnect. */
695
695
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
696
696
  EventCategory["BackupCompleted"] = "backup.completed";
697
+ /**
698
+ * A whole backup RUN finished — every destination attempted, win or lose.
699
+ *
700
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
701
+ * a progress UI and the wrong one for a notification: an operator with three
702
+ * destinations would be told three times. And a run where two of three
703
+ * destinations succeeded is not a clean success — a single "backup
704
+ * completed" that hid the failed one would be a lie, so the count of each is
705
+ * carried here and the message says both.
706
+ *
707
+ * Emitted by the backup orchestrator only after the destination loop, so a
708
+ * run that dies during the BUILD phase produces no completion at all.
709
+ */
710
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
697
711
  EventCategory["BackupRestored"] = "backup.restored";
698
712
  EventCategory["NotificationDispatched"] = "notification.dispatched";
699
713
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5424,7 +5438,7 @@ var ZodIssueCode = {
5424
5438
  var ZodFirstPartyTypeKind;
5425
5439
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5426
5440
  //#endregion
5427
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5441
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5428
5442
  /**
5429
5443
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5430
5444
  * window to float samples (D455).
@@ -7305,6 +7319,28 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7305
7319
  DeviceRole["GenericNotifier"] = "generic-notifier";
7306
7320
  return DeviceRole;
7307
7321
  }({});
7322
+ /**
7323
+ * Identity — preserves literal types for downstream inference.
7324
+ *
7325
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
7326
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
7327
+ * the broader unions declared on `CustomActionSpec`'s default generics.
7328
+ * Shape validity is enforced separately by the `customAction(...)` helper
7329
+ * whose return type is already a `CustomActionSpec<...>`.
7330
+ */
7331
+ function defineCustomActions(spec) {
7332
+ return spec;
7333
+ }
7334
+ function customAction(input, output, options) {
7335
+ return {
7336
+ input,
7337
+ output,
7338
+ kind: options?.kind ?? "query",
7339
+ auth: options?.auth ?? "protected",
7340
+ scope: options?.scope ?? { kind: "system" },
7341
+ ...options?.caller ? { caller: "required" } : {}
7342
+ };
7343
+ }
7308
7344
  var StaticDirOutputSchema = object({ staticDir: string() });
7309
7345
  var VersionOutputSchema = object({ version: string() });
7310
7346
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -11707,6 +11743,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11707
11743
  auth: "admin"
11708
11744
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11709
11745
  DeviceType.Camera;
11746
+ /**
11747
+ * The signals a device can emit to WAKE its own stream.
11748
+ *
11749
+ * A camera whose stream is built on demand sleeps until something asks for it,
11750
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11751
+ * puller holds a session open for ever, and treating that as demand would keep
11752
+ * a battery camera awake for ever, which is the whole thing the battery is for
11753
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11754
+ * itself, with no stream running.
11755
+ *
11756
+ * ## The vocabulary is the PROVIDER'S, not ours
11757
+ *
11758
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11759
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11760
+ * Reolink offers motion and camera-native detection; another provider may offer
11761
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11762
+ * yet. A fixed enum here would mean every new signal is a framework release.
11763
+ *
11764
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11765
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11766
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11767
+ * binding — but both answer "what drives the detection pipeline", which is a
11768
+ * different question from "what may wake a sleeping stream". A camera can do
11769
+ * the first and not be trusted with the second, and the operator picks per
11770
+ * camera. Two questions, two authorities.
11771
+ *
11772
+ * ## Availability is not permission
11773
+ *
11774
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11775
+ * wakes the stream is the operator's per-camera choice, held by the broker
11776
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11777
+ * provider declaring a signal is not a provider enabling it.
11778
+ */
11779
+ /** One signal a device can emit. */
11780
+ var StreamSignalSchema = object({
11781
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11782
+ code: string().min(1),
11783
+ /** What an operator reads in the picker. The provider's own wording. */
11784
+ label: string().min(1),
11785
+ /**
11786
+ * Whether the provider recommends this signal ON when a camera is first set
11787
+ * up. A provider knows which of its signals are cheap and reliable; an
11788
+ * operator should not have to discover that by trial. Reolink recommends
11789
+ * both of its own.
11790
+ */
11791
+ recommended: boolean()
11792
+ });
11793
+ object({
11794
+ signals: array(StreamSignalSchema),
11795
+ lastFetchedAt: number()
11796
+ });
11797
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11710
11798
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11711
11799
  var StreamFormatSchema = _enum([
11712
11800
  "webrtc",
@@ -12103,6 +12191,22 @@ var EgressTranscodeSchema = object({
12103
12191
  camStreamId: string().nullable()
12104
12192
  });
12105
12193
  method(object({
12194
+ deviceId: number().int().nonnegative(),
12195
+ /** The provider's signal code. */
12196
+ code: string().min(1),
12197
+ /** Ms epoch. Absent ⇒ now. */
12198
+ at: number().optional()
12199
+ }), object({
12200
+ /** Whether the broker acted on it, and if not, why. */
12201
+ accepted: boolean(),
12202
+ reason: _enum([
12203
+ "woke",
12204
+ "hold-extended",
12205
+ "not-enabled",
12206
+ "no-consumer",
12207
+ "unknown-code"
12208
+ ])
12209
+ }), { kind: "mutation" }), method(object({
12106
12210
  deviceId: number().int().nonnegative(),
12107
12211
  camStreamId: string().min(1),
12108
12212
  kind: CamStreamKindSchema,
@@ -12357,6 +12461,16 @@ var PickStreamRequirementsSchema = object({
12357
12461
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12358
12462
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12359
12463
  minHeight: number().int().positive().optional(),
12464
+ /**
12465
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12466
+ *
12467
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12468
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12469
+ * Without this the ceiling had to be re-implemented by every caller — and
12470
+ * one caller implementing it privately is how a second scoring authority
12471
+ * gets born.
12472
+ */
12473
+ maxHeight: number().int().positive().optional(),
12360
12474
  /** Minimum horizontal resolution. */
12361
12475
  minWidth: number().int().positive().optional(),
12362
12476
  /**
@@ -12373,7 +12487,22 @@ var PickStreamRequirementsSchema = object({
12373
12487
  * transcoded" guard: if the device is already serving the consumer's
12374
12488
  * codec end-to-end, there's nothing to optimise.
12375
12489
  */
12376
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12490
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12491
+ /**
12492
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12493
+ * understanding that it will be transcoded.
12494
+ *
12495
+ * Default `false` — today's behaviour, and the right one for a bypass
12496
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12497
+ * ask the larger question: "what is the best stream for me, transcoding if
12498
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12499
+ * does not, so a passthrough is never lost to a transcode; the answer says
12500
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12501
+ *
12502
+ * This is what lets one picker serve both the bypass and the full source
12503
+ * choice, instead of a consumer scoring privately when the bypass misses.
12504
+ */
12505
+ allowTranscode: boolean().optional()
12377
12506
  }).readonly();
12378
12507
  var PickStreamPreferencesSchema = object({
12379
12508
  /**
@@ -12387,12 +12516,32 @@ var PickStreamPreferencesSchema = object({
12387
12516
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12388
12517
  * memory-constrained consumers / Apple Home guest sessions).
12389
12518
  */
12390
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12519
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12520
+ /**
12521
+ * The height the consumer actually wants to DELIVER.
12522
+ *
12523
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12524
+ * above the target wins, and only if nothing reaches it does the tallest
12525
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12526
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12527
+ * express that: it says "as big as possible", which is a different wish.
12528
+ *
12529
+ * Ignored when absent, so every existing caller keeps its ordering.
12530
+ */
12531
+ targetHeight: number().int().positive().optional()
12391
12532
  }).readonly();
12392
12533
  var PickedCamStreamSchema = object({
12393
12534
  camStreamId: string(),
12394
12535
  codec: string().optional(),
12395
12536
  resolution: CamStreamResolutionSchema.optional(),
12537
+ /**
12538
+ * Whether serving this stream requires a decode + re-encode.
12539
+ *
12540
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12541
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12542
+ * not ask cannot be handed a cost it never agreed to pay.
12543
+ */
12544
+ transcodes: boolean(),
12396
12545
  /** One-line explanation of why this stream won — for logs / debug UI. */
12397
12546
  reason: string()
12398
12547
  });
@@ -12510,28 +12659,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12510
12659
  content: string()
12511
12660
  })) }), { auth: "admin" });
12512
12661
  /**
12513
- * Identity — preserves literal types for downstream inference.
12514
- *
12515
- * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
12516
- * TypeScript does not widen each entry's literal `kind`/`auth` fields to
12517
- * the broader unions declared on `CustomActionSpec`'s default generics.
12518
- * Shape validity is enforced separately by the `customAction(...)` helper
12519
- * whose return type is already a `CustomActionSpec<...>`.
12520
- */
12521
- function defineCustomActions(spec) {
12522
- return spec;
12523
- }
12524
- function customAction(input, output, options) {
12525
- return {
12526
- input,
12527
- output,
12528
- kind: options?.kind ?? "query",
12529
- auth: options?.auth ?? "protected",
12530
- scope: options?.scope ?? { kind: "system" },
12531
- ...options?.caller ? { caller: "required" } : {}
12532
- };
12533
- }
12534
- /**
12535
12662
  * `custom-model-registry` — collection cap exposing operator-registered
12536
12663
  * custom detection models. Each provider (today: `addon-model-studio`)
12537
12664
  * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
@@ -16628,6 +16755,8 @@ var NcSystemEventKindSchema = _enum([
16628
16755
  "device-enabled",
16629
16756
  "device-battery-low",
16630
16757
  "device-battery-normal",
16758
+ "device-consumable-low",
16759
+ "device-consumable-normal",
16631
16760
  "stream-online",
16632
16761
  "stream-offline",
16633
16762
  "node-online",
@@ -16646,6 +16775,7 @@ var NcSystemEventKindSchema = _enum([
16646
16775
  "addon-updated",
16647
16776
  "server-updated",
16648
16777
  "export-completed",
16778
+ "backup-completed",
16649
16779
  "camera-online",
16650
16780
  "camera-offline",
16651
16781
  "camera-disabled",
@@ -17968,6 +18098,48 @@ var NcAlarmConfigSchema = object({
17968
18098
  settings: NcAlarmSettingsSchema,
17969
18099
  coverage: array(NcAlarmModeCoverageSchema)
17970
18100
  });
18101
+ /**
18102
+ * ONE rule's demand on ONE camera's clip ring.
18103
+ *
18104
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
18105
+ * camera, so the answer stays a faithful description of the rules and the
18106
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
18107
+ * lives. A camera that appears in no ask is being told **nothing** — which is
18108
+ * a different thing from never having been told, and only the envelope
18109
+ * (`rulesLoaded`) can tell those apart.
18110
+ */
18111
+ var NcClipRetentionAskSchema = object({
18112
+ /**
18113
+ * The camera this ask is about. **Absent = every camera**, which is what a
18114
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
18115
+ * asking everywhere.
18116
+ */
18117
+ deviceId: number().int().nonnegative().optional(),
18118
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
18119
+ * needs nothing produces no ask at all. */
18120
+ seconds: number().min(0).max(60),
18121
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
18122
+ * assigned, which is what the cut defaults to. */
18123
+ profile: CamProfileSchema.optional(),
18124
+ /** Who is asking — so a retention the operator did not expect names a rule. */
18125
+ ruleId: string(),
18126
+ ruleName: string(),
18127
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
18128
+ reason: _enum(["window", "occupancy"])
18129
+ });
18130
+ /**
18131
+ * The whole answer, with the one bit that keeps absence from reading as zero.
18132
+ *
18133
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18134
+ * once. A centre that is up but has not read its rules yet answers with an
18135
+ * empty ask list that means nothing at all — applying it would drop every
18136
+ * camera's ring to zero for the first events after a restart, which is the
18137
+ * footage this mechanism exists to keep.
18138
+ */
18139
+ var NcClipRetentionPlanSchema = object({
18140
+ rulesLoaded: boolean(),
18141
+ asks: array(NcClipRetentionAskSchema).readonly()
18142
+ });
17971
18143
  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 }), {
17972
18144
  kind: "mutation",
17973
18145
  auth: "admin",
@@ -17988,7 +18160,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
17988
18160
  }), object({ success: literal(true) }), {
17989
18161
  kind: "mutation",
17990
18162
  auth: "admin"
17991
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18163
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
17992
18164
  deviceId: number().int(),
17993
18165
  muted: boolean()
17994
18166
  }), object({ success: literal(true) }), {
@@ -20538,6 +20710,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20538
20710
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20539
20711
  framesMatched: number().int()
20540
20712
  })).readonly() });
20713
+ /**
20714
+ * The long-term series a camera produces. A closed union so a typo cannot
20715
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20716
+ * is an alias of this, not a second list.
20717
+ */
20718
+ var AnalyticsLtsSeriesSchema = _enum([
20719
+ "motion",
20720
+ "audio-dbfs",
20721
+ "battery",
20722
+ "occupancy"
20723
+ ]);
20724
+ /**
20725
+ * One closed 5-minute bucket of a long-term series.
20726
+ *
20727
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20728
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20729
+ * that exists at all was measured; a bucket that is absent was not, which is a
20730
+ * different claim from zero and the reason this is a sparse series.
20731
+ */
20732
+ var LtsBucketSchema = object({
20733
+ scope: string(),
20734
+ bucketStart: number().int(),
20735
+ samples: number().int().nonnegative(),
20736
+ sum: number(),
20737
+ min: number(),
20738
+ max: number()
20739
+ });
20541
20740
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20542
20741
  deviceId: number(),
20543
20742
  trackId: string()
@@ -20584,6 +20783,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20584
20783
  kinds: array(string()).optional(),
20585
20784
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20586
20785
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20786
+ deviceId: number(),
20787
+ series: AnalyticsLtsSeriesSchema,
20788
+ /** Omit for EVERY scope of this series in the range. */
20789
+ scope: string().optional(),
20790
+ from: number(),
20791
+ to: number(),
20792
+ limit: number().int().positive().optional()
20793
+ }), array(LtsBucketSchema).readonly()), method(object({
20587
20794
  deviceId: number(),
20588
20795
  since: number(),
20589
20796
  until: number(),
@@ -21202,6 +21409,14 @@ var MotionSourceEnum = _enum([
21202
21409
  */
21203
21410
  var MotionSourcesSchema = array(MotionSourceEnum);
21204
21411
  /**
21412
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21413
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21414
+ * than a second spelling of the same two ideas — the value an operator picks
21415
+ * here is the value that comes back on the track, the overlay and the debug
21416
+ * row.
21417
+ */
21418
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21419
+ /**
21205
21420
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21206
21421
  * so cap-side consumers (the orchestrator forward, the runner addon's
21207
21422
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21352,6 +21567,35 @@ var RunnerCameraConfigSchema = object({
21352
21567
  * events; the orchestrator forwards to `reportMotion`.
21353
21568
  */
21354
21569
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21570
+ /**
21571
+ * WHICH root detector runs for this camera. The detection counterpart of
21572
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21573
+ * of sources the system understands, vendor-agnostic, owned here.
21574
+ *
21575
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21576
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21577
+ * here. Its boxes reach post-analysis on the same
21578
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21579
+ * track gets the same tracker, the same overlay and the same detail
21580
+ * subtree (face / plate / embedding).
21581
+ *
21582
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21583
+ * run, and that is where a camera with a usable onboard detector buys back
21584
+ * its share of the accelerator. It saves the root inference, not the decode
21585
+ * — the detail subtree still needs pixels to cut crops from.
21586
+ *
21587
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21588
+ * step at all (there is nothing to track), and the cap that knows this says
21589
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21590
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21591
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21592
+ * worth exactly what it already is — a wake signal with a class.
21593
+ *
21594
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21595
+ * vendor never turns a detector on for the operator, and neither does a
21596
+ * default.
21597
+ */
21598
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21355
21599
  pipelineEnabled: boolean().default(true),
21356
21600
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21357
21601
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21533,7 +21777,47 @@ var RunnerLocalMetricsSchema = object({
21533
21777
  queueDepth: number(),
21534
21778
  frameLazy: FrameLazyMetricsSchema.optional()
21535
21779
  });
21780
+ /**
21781
+ * Pipeline Runner capability — runtime detection workhorse.
21782
+ *
21783
+ * One instance per node. Receives camera assignments from
21784
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21785
+ * decoded frames, drains motion + detection queues, calls the local
21786
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21787
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21788
+ * the bus.
21789
+ *
21790
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21791
+ * runner has zero knowledge of other agents, no global state, and never
21792
+ * makes assignment decisions itself.
21793
+ */
21794
+ /**
21795
+ * Why a runner declined to look at a camera out of band. Named rather than a
21796
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21797
+ * already mid-session and one already bursting are four different facts, and a
21798
+ * caller told only "no" cannot tell a protection from a bug.
21799
+ */
21800
+ var OccupancyBurstRefusalSchema = _enum([
21801
+ "not-attached",
21802
+ "battery-asleep",
21803
+ "not-watching",
21804
+ "already-bursting"
21805
+ ]);
21536
21806
  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({
21807
+ deviceId: number(),
21808
+ /** How many frames to collect. The caller sizes this against what its
21809
+ * own confirmation needs; the runner clamps it to the field's range. */
21810
+ frames: number().int().positive().optional(),
21811
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21812
+ * defend — the periodic one at least has a timer to point at. */
21813
+ reason: string()
21814
+ }), object({
21815
+ started: boolean(),
21816
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21817
+ }), {
21818
+ auth: "admin",
21819
+ kind: "mutation"
21820
+ }), method(object({
21537
21821
  handle: FrameHandleSchema,
21538
21822
  bbox: NativeCropBboxSchema,
21539
21823
  maxWidth: number().int().positive().optional(),
@@ -23903,10 +24187,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23903
24187
  }), boolean()), method(object({
23904
24188
  deviceId: number().int().nonnegative(),
23905
24189
  sessionId: string()
23906
- }), object({ pendingRenegotiation: object({
23907
- target: WebrtcStreamTargetSchema,
23908
- epoch: number()
23909
- }).nullable() }));
24190
+ }), object({
24191
+ pendingRenegotiation: object({
24192
+ target: WebrtcStreamTargetSchema,
24193
+ epoch: number()
24194
+ }).nullable(),
24195
+ /**
24196
+ * Whether the session still EXISTS.
24197
+ *
24198
+ * A consumer that holds a resource for the life of a session needs to
24199
+ * be able to ask, because a session does not always end the way it
24200
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24201
+ * sent `SessionDisconnected`, so the Alexa exporter's
24202
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24203
+ * H.264 transcode kept running for NOBODY for more than twenty
24204
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24205
+ * minutes earlier — the broker knew; the holder had no way to ask.
24206
+ *
24207
+ * `false` for a session id the provider has never heard of, which is
24208
+ * the same answer as "it ended": either way nothing is holding it up.
24209
+ */
24210
+ alive: boolean()
24211
+ }));
23910
24212
  object({
23911
24213
  /** All accessory children of the parent. */
23912
24214
  childDeviceIds: array(number()).readonly(),
@@ -26996,7 +27298,7 @@ var NativeDetectionSchema = object({
26996
27298
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
26997
27299
  confidence: number().min(0).max(1).optional()
26998
27300
  });
26999
- object({
27301
+ var NativeObjectDetectionStatusSchema = object({
27000
27302
  /**
27001
27303
  * Last observed instance per class. Missing entries mean the class
27002
27304
  * is supported but nothing has been seen since the provider started.
@@ -27013,14 +27315,56 @@ object({
27013
27315
  supportedClasses: array(NativeObjectClassEnum).readonly(),
27014
27316
  /**
27015
27317
  * Whether forwarding of onboard AI detections is enabled for this device.
27016
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
27017
- * churn the tracker, so forwarding stays off until the operator enables it.
27318
+ *
27319
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27320
+ * camera runs — that is the operator's choice, and it is made where every
27321
+ * other detection choice is made. `geometry` on
27322
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27323
+ * choice would buy this particular camera.
27018
27324
  */
27019
27325
  enabled: boolean()
27020
- }).extend({
27326
+ });
27327
+ /**
27328
+ * WHEN a camera's onboard detections carry geometry.
27329
+ *
27330
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27331
+ * a detection is a trackable subject whenever the camera sees one.
27332
+ * - `while-streaming` — only while some stream of this camera is already open.
27333
+ * The boxes ride the video's own side-channel rather than a feed of their
27334
+ * own, so they cost nothing and they exist only when something is pulling.
27335
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27336
+ * radio drain, but a camera that is awake is awake precisely because
27337
+ * something is in front of it, and its stream is already being pulled.
27338
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27339
+ * pipeline needs geometry to make a subject, so such a push reaches the
27340
+ * tracker as motion and no further.
27341
+ *
27342
+ * Reported and not inferred, because the operator's question in front of the
27343
+ * picker is "what do I get", and these are three different answers (D14: the
27344
+ * derived form is only as honest as `getOptions`).
27345
+ */
27346
+ var NativeObjectGeometryEnum = _enum([
27347
+ "boxed",
27348
+ "while-streaming",
27349
+ "flag-only"
27350
+ ]);
27351
+ var NativeObjectDetectionOptionsSchema = object({
27352
+ /** Classes this firmware can detect — the same list the status reports. */
27353
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27354
+ /** What a detection from this camera carries. */
27355
+ geometry: NativeObjectGeometryEnum
27356
+ });
27357
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27358
+ NativeObjectDetectionStatusSchema.extend({
27021
27359
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
27022
27360
  lastFetchedAt: number() });
27023
- DeviceType.Camera, method(object({
27361
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27362
+ deviceId: number(),
27363
+ settings: NativeObjectDetectionSettingsPatchSchema
27364
+ }), _void(), {
27365
+ kind: "mutation",
27366
+ auth: "admin"
27367
+ }), method(object({
27024
27368
  deviceId: number(),
27025
27369
  enabled: boolean()
27026
27370
  }), _void(), {
@@ -30826,7 +31170,28 @@ var PerScopeBreakdownSchema = object({
30826
31170
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30827
31171
  totalObjects: number().int().nonnegative(),
30828
31172
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30829
- byClass: record(string(), number().int().nonnegative())
31173
+ byClass: record(string(), number().int().nonnegative()),
31174
+ /**
31175
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31176
+ * present but not going anywhere (a parked car, a bin, a statue).
31177
+ *
31178
+ * The operator's question about a scene has two halves and they answer
31179
+ * different things: "what is parked here" is stable for hours and must not
31180
+ * flap, while "who is walking through" is the thing an alert is about. One
31181
+ * number could only serve one of them, and `totalObjects` served the first
31182
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31183
+ *
31184
+ * `standing + transient === totalObjects`, always. The total keeps its old
31185
+ * meaning exactly, so no rule written against it changes behaviour.
31186
+ *
31187
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31188
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31189
+ * parked objects here" about a camera whose lot is full.
31190
+ */
31191
+ standingObjects: number().int().nonnegative().optional(),
31192
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31193
+ * same absence rule. */
31194
+ transientObjects: number().int().nonnegative().optional()
30830
31195
  });
30831
31196
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30832
31197
  zoneId: string(),
@@ -33765,12 +34130,24 @@ Object.freeze({
33765
34130
  addonId: null,
33766
34131
  access: "create"
33767
34132
  },
34133
+ "nativeObjectDetection.getOptions": {
34134
+ capName: "native-object-detection",
34135
+ capScope: "device",
34136
+ addonId: null,
34137
+ access: "view"
34138
+ },
33768
34139
  "nativeObjectDetection.setEnabled": {
33769
34140
  capName: "native-object-detection",
33770
34141
  capScope: "device",
33771
34142
  addonId: null,
33772
34143
  access: "create"
33773
34144
  },
34145
+ "nativeObjectDetection.setSettings": {
34146
+ capName: "native-object-detection",
34147
+ capScope: "device",
34148
+ addonId: null,
34149
+ access: "create"
34150
+ },
33774
34151
  "navigation.getFeatures": {
33775
34152
  capName: "navigation",
33776
34153
  capScope: "device",
@@ -34035,6 +34412,12 @@ Object.freeze({
34035
34412
  addonId: null,
34036
34413
  access: "view"
34037
34414
  },
34415
+ "notificationRules.getClipRetentionAsks": {
34416
+ capName: "notification-rules",
34417
+ capScope: "system",
34418
+ addonId: null,
34419
+ access: "view"
34420
+ },
34038
34421
  "notificationRules.getConditionCatalog": {
34039
34422
  capName: "notification-rules",
34040
34423
  capScope: "system",
@@ -34545,6 +34928,12 @@ Object.freeze({
34545
34928
  addonId: null,
34546
34929
  access: "create"
34547
34930
  },
34931
+ "pipelineAnalytics.readLongTermSeries": {
34932
+ capName: "pipeline-analytics",
34933
+ capScope: "device",
34934
+ addonId: null,
34935
+ access: "view"
34936
+ },
34548
34937
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34549
34938
  capName: "pipeline-analytics",
34550
34939
  capScope: "device",
@@ -35217,6 +35606,12 @@ Object.freeze({
35217
35606
  addonId: null,
35218
35607
  access: "create"
35219
35608
  },
35609
+ "pipelineRunner.requestOccupancyBurst": {
35610
+ capName: "pipeline-runner",
35611
+ capScope: "system",
35612
+ addonId: null,
35613
+ access: "create"
35614
+ },
35220
35615
  "pipelineRunner.runDetailSubtree": {
35221
35616
  capName: "pipeline-runner",
35222
35617
  capScope: "system",
@@ -36429,6 +36824,12 @@ Object.freeze({
36429
36824
  addonId: null,
36430
36825
  access: "create"
36431
36826
  },
36827
+ "streamBroker.reportStreamSignal": {
36828
+ capName: "stream-broker",
36829
+ capScope: "system",
36830
+ addonId: null,
36831
+ access: "create"
36832
+ },
36432
36833
  "streamBroker.restartProfile": {
36433
36834
  capName: "stream-broker",
36434
36835
  capScope: "system",
@@ -36513,6 +36914,12 @@ Object.freeze({
36513
36914
  addonId: null,
36514
36915
  access: "create"
36515
36916
  },
36917
+ "streamSignals.listSignals": {
36918
+ capName: "stream-signals",
36919
+ capScope: "device",
36920
+ addonId: null,
36921
+ access: "view"
36922
+ },
36516
36923
  "switch.setState": {
36517
36924
  capName: "switch",
36518
36925
  capScope: "device",
@@ -37985,11 +38392,21 @@ Object.freeze({
37985
38392
  form: "single",
37986
38393
  optional: false
37987
38394
  }],
38395
+ "nativeObjectDetection.getOptions": [{
38396
+ name: "deviceId",
38397
+ form: "single",
38398
+ optional: false
38399
+ }],
37988
38400
  "nativeObjectDetection.setEnabled": [{
37989
38401
  name: "deviceId",
37990
38402
  form: "single",
37991
38403
  optional: false
37992
38404
  }],
38405
+ "nativeObjectDetection.setSettings": [{
38406
+ name: "deviceId",
38407
+ form: "single",
38408
+ optional: false
38409
+ }],
37993
38410
  "navigation.getFeatures": [{
37994
38411
  name: "deviceId",
37995
38412
  form: "single",
@@ -38339,6 +38756,11 @@ Object.freeze({
38339
38756
  form: "single",
38340
38757
  optional: false
38341
38758
  }],
38759
+ "pipelineAnalytics.readLongTermSeries": [{
38760
+ name: "deviceId",
38761
+ form: "single",
38762
+ optional: false
38763
+ }],
38342
38764
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38343
38765
  name: "deviceId",
38344
38766
  form: "single",
@@ -38529,6 +38951,11 @@ Object.freeze({
38529
38951
  form: "single",
38530
38952
  optional: false
38531
38953
  }],
38954
+ "pipelineRunner.requestOccupancyBurst": [{
38955
+ name: "deviceId",
38956
+ form: "single",
38957
+ optional: false
38958
+ }],
38532
38959
  "pipelineRunner.runDetailSubtree": [{
38533
38960
  name: "deviceId",
38534
38961
  form: "single",
@@ -38885,6 +39312,11 @@ Object.freeze({
38885
39312
  form: "single",
38886
39313
  optional: false
38887
39314
  }],
39315
+ "streamBroker.reportStreamSignal": [{
39316
+ name: "deviceId",
39317
+ form: "single",
39318
+ optional: false
39319
+ }],
38888
39320
  "streamBroker.restartProfile": [{
38889
39321
  name: "deviceId",
38890
39322
  form: "single",