@camstack/addon-model-studio 1.1.130 → 1.1.132

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.
Files changed (23) hide show
  1. package/dist/{MotionZonesSettings-C0ZZHN5q.mjs → MotionZonesSettings-BJdGAJWf.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-D4uGl7zT.mjs → PrivacyMaskSettings-DDhVbn_Y.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-BKYzMLFb.mjs → SceneMonitorEditor-FI63V5ql.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CGKDpBk2.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DtLTKuOQ.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DIGAz53v.mjs +26 -0
  7. package/dist/addon-model-studio.css +1 -1
  8. package/dist/{hostInit-BihGjZ1F.mjs → hostInit-CexeRvrD.mjs} +3 -3
  9. package/dist/model-studio.addon.js +469 -37
  10. package/dist/model-studio.addon.mjs +469 -37
  11. package/dist/{player-overlays-CMrYqFCL.mjs → player-overlays-bZG9h6O2.mjs} +1 -1
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-JVBuLbSa.mjs → responsive-DT6S57fY.mjs} +1 -1
  14. package/dist/{square-BCP4gOno.mjs → square-CTAukwzX.mjs} +1 -1
  15. package/dist/{trash-2-CeqN21XB.mjs → trash-2-C08NQ081.mjs} +1 -1
  16. package/dist/{use-device-snapshot-UOdeTQpP.mjs → use-device-snapshot-Be2Q6jle.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-B5isrrh9.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BV_S8-Wd.mjs} +1 -1
  18. package/package.json +2 -2
  19. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CXCz80XV.mjs +0 -26
  20. package/python/__pycache__/convert.cpython-314.pyc +0 -0
  21. package/python/__pycache__/convert_lib.cpython-312.pyc +0 -0
  22. package/python/__pycache__/convert_lib.cpython-314.pyc +0 -0
  23. package/python/__tests__/__pycache__/test_convert_lib.cpython-314.pyc +0 -0
@@ -523,7 +523,7 @@ async function importScryptedCatalogModel(input, deps) {
523
523
  }
524
524
  }
525
525
  //#endregion
526
- //#region ../types/dist/event-category-ZyX6jcse.mjs
526
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
527
527
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
528
528
  EventCategory["SystemBoot"] = "system.boot";
529
529
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1140,6 +1140,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1140
1140
  * pull-reconcile from the provider's `getStatus` on reconnect. */
1141
1141
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
1142
1142
  EventCategory["BackupCompleted"] = "backup.completed";
1143
+ /**
1144
+ * A whole backup RUN finished — every destination attempted, win or lose.
1145
+ *
1146
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
1147
+ * a progress UI and the wrong one for a notification: an operator with three
1148
+ * destinations would be told three times. And a run where two of three
1149
+ * destinations succeeded is not a clean success — a single "backup
1150
+ * completed" that hid the failed one would be a lie, so the count of each is
1151
+ * carried here and the message says both.
1152
+ *
1153
+ * Emitted by the backup orchestrator only after the destination loop, so a
1154
+ * run that dies during the BUILD phase produces no completion at all.
1155
+ */
1156
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
1143
1157
  EventCategory["BackupRestored"] = "backup.restored";
1144
1158
  EventCategory["NotificationDispatched"] = "notification.dispatched";
1145
1159
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5870,7 +5884,7 @@ var ZodIssueCode = {
5870
5884
  var ZodFirstPartyTypeKind;
5871
5885
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5872
5886
  //#endregion
5873
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5887
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5874
5888
  /**
5875
5889
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5876
5890
  * window to float samples (D455).
@@ -7810,6 +7824,28 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7810
7824
  DeviceRole["GenericNotifier"] = "generic-notifier";
7811
7825
  return DeviceRole;
7812
7826
  }({});
7827
+ /**
7828
+ * Identity — preserves literal types for downstream inference.
7829
+ *
7830
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
7831
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
7832
+ * the broader unions declared on `CustomActionSpec`'s default generics.
7833
+ * Shape validity is enforced separately by the `customAction(...)` helper
7834
+ * whose return type is already a `CustomActionSpec<...>`.
7835
+ */
7836
+ function defineCustomActions(spec) {
7837
+ return spec;
7838
+ }
7839
+ function customAction(input, output, options) {
7840
+ return {
7841
+ input,
7842
+ output,
7843
+ kind: options?.kind ?? "query",
7844
+ auth: options?.auth ?? "protected",
7845
+ scope: options?.scope ?? { kind: "system" },
7846
+ ...options?.caller ? { caller: "required" } : {}
7847
+ };
7848
+ }
7813
7849
  var StaticDirOutputSchema = object({ staticDir: string() });
7814
7850
  var VersionOutputSchema = object({ version: string() });
7815
7851
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -12075,6 +12111,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
12075
12111
  auth: "admin"
12076
12112
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
12077
12113
  DeviceType.Camera;
12114
+ /**
12115
+ * The signals a device can emit to WAKE its own stream.
12116
+ *
12117
+ * A camera whose stream is built on demand sleeps until something asks for it,
12118
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
12119
+ * puller holds a session open for ever, and treating that as demand would keep
12120
+ * a battery camera awake for ever, which is the whole thing the battery is for
12121
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
12122
+ * itself, with no stream running.
12123
+ *
12124
+ * ## The vocabulary is the PROVIDER'S, not ours
12125
+ *
12126
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
12127
+ * names each signal with a `code` it chooses and a `label` an operator reads.
12128
+ * Reolink offers motion and camera-native detection; another provider may offer
12129
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12130
+ * yet. A fixed enum here would mean every new signal is a framework release.
12131
+ *
12132
+ * It is deliberately NOT derived from the caps a device already binds. Whether
12133
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
12134
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12135
+ * binding — but both answer "what drives the detection pipeline", which is a
12136
+ * different question from "what may wake a sleeping stream". A camera can do
12137
+ * the first and not be trusted with the second, and the operator picks per
12138
+ * camera. Two questions, two authorities.
12139
+ *
12140
+ * ## Availability is not permission
12141
+ *
12142
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
12143
+ * wakes the stream is the operator's per-camera choice, held by the broker
12144
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
12145
+ * provider declaring a signal is not a provider enabling it.
12146
+ */
12147
+ /** One signal a device can emit. */
12148
+ var StreamSignalSchema = object({
12149
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12150
+ code: string().min(1),
12151
+ /** What an operator reads in the picker. The provider's own wording. */
12152
+ label: string().min(1),
12153
+ /**
12154
+ * Whether the provider recommends this signal ON when a camera is first set
12155
+ * up. A provider knows which of its signals are cheap and reliable; an
12156
+ * operator should not have to discover that by trial. Reolink recommends
12157
+ * both of its own.
12158
+ */
12159
+ recommended: boolean()
12160
+ });
12161
+ object({
12162
+ signals: array(StreamSignalSchema),
12163
+ lastFetchedAt: number()
12164
+ });
12165
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
12078
12166
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12079
12167
  var StreamFormatSchema = _enum([
12080
12168
  "webrtc",
@@ -12471,6 +12559,22 @@ var EgressTranscodeSchema = object({
12471
12559
  camStreamId: string().nullable()
12472
12560
  });
12473
12561
  method(object({
12562
+ deviceId: number().int().nonnegative(),
12563
+ /** The provider's signal code. */
12564
+ code: string().min(1),
12565
+ /** Ms epoch. Absent ⇒ now. */
12566
+ at: number().optional()
12567
+ }), object({
12568
+ /** Whether the broker acted on it, and if not, why. */
12569
+ accepted: boolean(),
12570
+ reason: _enum([
12571
+ "woke",
12572
+ "hold-extended",
12573
+ "not-enabled",
12574
+ "no-consumer",
12575
+ "unknown-code"
12576
+ ])
12577
+ }), { kind: "mutation" }), method(object({
12474
12578
  deviceId: number().int().nonnegative(),
12475
12579
  camStreamId: string().min(1),
12476
12580
  kind: CamStreamKindSchema,
@@ -12725,6 +12829,16 @@ var PickStreamRequirementsSchema = object({
12725
12829
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12726
12830
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12727
12831
  minHeight: number().int().positive().optional(),
12832
+ /**
12833
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12834
+ *
12835
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12836
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12837
+ * Without this the ceiling had to be re-implemented by every caller — and
12838
+ * one caller implementing it privately is how a second scoring authority
12839
+ * gets born.
12840
+ */
12841
+ maxHeight: number().int().positive().optional(),
12728
12842
  /** Minimum horizontal resolution. */
12729
12843
  minWidth: number().int().positive().optional(),
12730
12844
  /**
@@ -12741,7 +12855,22 @@ var PickStreamRequirementsSchema = object({
12741
12855
  * transcoded" guard: if the device is already serving the consumer's
12742
12856
  * codec end-to-end, there's nothing to optimise.
12743
12857
  */
12744
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12858
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12859
+ /**
12860
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12861
+ * understanding that it will be transcoded.
12862
+ *
12863
+ * Default `false` — today's behaviour, and the right one for a bypass
12864
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12865
+ * ask the larger question: "what is the best stream for me, transcoding if
12866
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12867
+ * does not, so a passthrough is never lost to a transcode; the answer says
12868
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12869
+ *
12870
+ * This is what lets one picker serve both the bypass and the full source
12871
+ * choice, instead of a consumer scoring privately when the bypass misses.
12872
+ */
12873
+ allowTranscode: boolean().optional()
12745
12874
  }).readonly();
12746
12875
  var PickStreamPreferencesSchema = object({
12747
12876
  /**
@@ -12755,12 +12884,32 @@ var PickStreamPreferencesSchema = object({
12755
12884
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12756
12885
  * memory-constrained consumers / Apple Home guest sessions).
12757
12886
  */
12758
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12887
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12888
+ /**
12889
+ * The height the consumer actually wants to DELIVER.
12890
+ *
12891
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12892
+ * above the target wins, and only if nothing reaches it does the tallest
12893
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12894
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12895
+ * express that: it says "as big as possible", which is a different wish.
12896
+ *
12897
+ * Ignored when absent, so every existing caller keeps its ordering.
12898
+ */
12899
+ targetHeight: number().int().positive().optional()
12759
12900
  }).readonly();
12760
12901
  var PickedCamStreamSchema = object({
12761
12902
  camStreamId: string(),
12762
12903
  codec: string().optional(),
12763
12904
  resolution: CamStreamResolutionSchema.optional(),
12905
+ /**
12906
+ * Whether serving this stream requires a decode + re-encode.
12907
+ *
12908
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12909
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12910
+ * not ask cannot be handed a cost it never agreed to pay.
12911
+ */
12912
+ transcodes: boolean(),
12764
12913
  /** One-line explanation of why this stream won — for logs / debug UI. */
12765
12914
  reason: string()
12766
12915
  });
@@ -12878,28 +13027,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12878
13027
  content: string()
12879
13028
  })) }), { auth: "admin" });
12880
13029
  /**
12881
- * Identity — preserves literal types for downstream inference.
12882
- *
12883
- * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
12884
- * TypeScript does not widen each entry's literal `kind`/`auth` fields to
12885
- * the broader unions declared on `CustomActionSpec`'s default generics.
12886
- * Shape validity is enforced separately by the `customAction(...)` helper
12887
- * whose return type is already a `CustomActionSpec<...>`.
12888
- */
12889
- function defineCustomActions(spec) {
12890
- return spec;
12891
- }
12892
- function customAction(input, output, options) {
12893
- return {
12894
- input,
12895
- output,
12896
- kind: options?.kind ?? "query",
12897
- auth: options?.auth ?? "protected",
12898
- scope: options?.scope ?? { kind: "system" },
12899
- ...options?.caller ? { caller: "required" } : {}
12900
- };
12901
- }
12902
- /**
12903
13030
  * `custom-model-registry` — collection cap exposing operator-registered
12904
13031
  * custom detection models. Each provider (today: `addon-model-studio`)
12905
13032
  * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
@@ -16993,6 +17120,8 @@ var NcSystemEventKindSchema = _enum([
16993
17120
  "device-enabled",
16994
17121
  "device-battery-low",
16995
17122
  "device-battery-normal",
17123
+ "device-consumable-low",
17124
+ "device-consumable-normal",
16996
17125
  "stream-online",
16997
17126
  "stream-offline",
16998
17127
  "node-online",
@@ -17011,6 +17140,7 @@ var NcSystemEventKindSchema = _enum([
17011
17140
  "addon-updated",
17012
17141
  "server-updated",
17013
17142
  "export-completed",
17143
+ "backup-completed",
17014
17144
  "camera-online",
17015
17145
  "camera-offline",
17016
17146
  "camera-disabled",
@@ -18333,6 +18463,48 @@ var NcAlarmConfigSchema = object({
18333
18463
  settings: NcAlarmSettingsSchema,
18334
18464
  coverage: array(NcAlarmModeCoverageSchema)
18335
18465
  });
18466
+ /**
18467
+ * ONE rule's demand on ONE camera's clip ring.
18468
+ *
18469
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
18470
+ * camera, so the answer stays a faithful description of the rules and the
18471
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
18472
+ * lives. A camera that appears in no ask is being told **nothing** — which is
18473
+ * a different thing from never having been told, and only the envelope
18474
+ * (`rulesLoaded`) can tell those apart.
18475
+ */
18476
+ var NcClipRetentionAskSchema = object({
18477
+ /**
18478
+ * The camera this ask is about. **Absent = every camera**, which is what a
18479
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
18480
+ * asking everywhere.
18481
+ */
18482
+ deviceId: number().int().nonnegative().optional(),
18483
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
18484
+ * needs nothing produces no ask at all. */
18485
+ seconds: number().min(0).max(60),
18486
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
18487
+ * assigned, which is what the cut defaults to. */
18488
+ profile: CamProfileSchema.optional(),
18489
+ /** Who is asking — so a retention the operator did not expect names a rule. */
18490
+ ruleId: string(),
18491
+ ruleName: string(),
18492
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
18493
+ reason: _enum(["window", "occupancy"])
18494
+ });
18495
+ /**
18496
+ * The whole answer, with the one bit that keeps absence from reading as zero.
18497
+ *
18498
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18499
+ * once. A centre that is up but has not read its rules yet answers with an
18500
+ * empty ask list that means nothing at all — applying it would drop every
18501
+ * camera's ring to zero for the first events after a restart, which is the
18502
+ * footage this mechanism exists to keep.
18503
+ */
18504
+ var NcClipRetentionPlanSchema = object({
18505
+ rulesLoaded: boolean(),
18506
+ asks: array(NcClipRetentionAskSchema).readonly()
18507
+ });
18336
18508
  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 }), {
18337
18509
  kind: "mutation",
18338
18510
  auth: "admin",
@@ -18353,7 +18525,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
18353
18525
  }), object({ success: literal(true) }), {
18354
18526
  kind: "mutation",
18355
18527
  auth: "admin"
18356
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18528
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18357
18529
  deviceId: number().int(),
18358
18530
  muted: boolean()
18359
18531
  }), object({ success: literal(true) }), {
@@ -20887,6 +21059,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20887
21059
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20888
21060
  framesMatched: number().int()
20889
21061
  })).readonly() });
21062
+ /**
21063
+ * The long-term series a camera produces. A closed union so a typo cannot
21064
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
21065
+ * is an alias of this, not a second list.
21066
+ */
21067
+ var AnalyticsLtsSeriesSchema = _enum([
21068
+ "motion",
21069
+ "audio-dbfs",
21070
+ "battery",
21071
+ "occupancy"
21072
+ ]);
21073
+ /**
21074
+ * One closed 5-minute bucket of a long-term series.
21075
+ *
21076
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
21077
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
21078
+ * that exists at all was measured; a bucket that is absent was not, which is a
21079
+ * different claim from zero and the reason this is a sparse series.
21080
+ */
21081
+ var LtsBucketSchema = object({
21082
+ scope: string(),
21083
+ bucketStart: number().int(),
21084
+ samples: number().int().nonnegative(),
21085
+ sum: number(),
21086
+ min: number(),
21087
+ max: number()
21088
+ });
20890
21089
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20891
21090
  deviceId: number(),
20892
21091
  trackId: string()
@@ -20933,6 +21132,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20933
21132
  kinds: array(string()).optional(),
20934
21133
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20935
21134
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
21135
+ deviceId: number(),
21136
+ series: AnalyticsLtsSeriesSchema,
21137
+ /** Omit for EVERY scope of this series in the range. */
21138
+ scope: string().optional(),
21139
+ from: number(),
21140
+ to: number(),
21141
+ limit: number().int().positive().optional()
21142
+ }), array(LtsBucketSchema).readonly()), method(object({
20936
21143
  deviceId: number(),
20937
21144
  since: number(),
20938
21145
  until: number(),
@@ -21551,6 +21758,14 @@ var MotionSourceEnum = _enum([
21551
21758
  */
21552
21759
  var MotionSourcesSchema = array(MotionSourceEnum);
21553
21760
  /**
21761
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21762
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21763
+ * than a second spelling of the same two ideas — the value an operator picks
21764
+ * here is the value that comes back on the track, the overlay and the debug
21765
+ * row.
21766
+ */
21767
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21768
+ /**
21554
21769
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21555
21770
  * so cap-side consumers (the orchestrator forward, the runner addon's
21556
21771
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21701,6 +21916,35 @@ var RunnerCameraConfigSchema = object({
21701
21916
  * events; the orchestrator forwards to `reportMotion`.
21702
21917
  */
21703
21918
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21919
+ /**
21920
+ * WHICH root detector runs for this camera. The detection counterpart of
21921
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21922
+ * of sources the system understands, vendor-agnostic, owned here.
21923
+ *
21924
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21925
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21926
+ * here. Its boxes reach post-analysis on the same
21927
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21928
+ * track gets the same tracker, the same overlay and the same detail
21929
+ * subtree (face / plate / embedding).
21930
+ *
21931
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21932
+ * run, and that is where a camera with a usable onboard detector buys back
21933
+ * its share of the accelerator. It saves the root inference, not the decode
21934
+ * — the detail subtree still needs pixels to cut crops from.
21935
+ *
21936
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21937
+ * step at all (there is nothing to track), and the cap that knows this says
21938
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21939
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21940
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21941
+ * worth exactly what it already is — a wake signal with a class.
21942
+ *
21943
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21944
+ * vendor never turns a detector on for the operator, and neither does a
21945
+ * default.
21946
+ */
21947
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21704
21948
  pipelineEnabled: boolean().default(true),
21705
21949
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21706
21950
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21882,7 +22126,47 @@ var RunnerLocalMetricsSchema = object({
21882
22126
  queueDepth: number(),
21883
22127
  frameLazy: FrameLazyMetricsSchema.optional()
21884
22128
  });
22129
+ /**
22130
+ * Pipeline Runner capability — runtime detection workhorse.
22131
+ *
22132
+ * One instance per node. Receives camera assignments from
22133
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
22134
+ * decoded frames, drains motion + detection queues, calls the local
22135
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
22136
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
22137
+ * the bus.
22138
+ *
22139
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
22140
+ * runner has zero knowledge of other agents, no global state, and never
22141
+ * makes assignment decisions itself.
22142
+ */
22143
+ /**
22144
+ * Why a runner declined to look at a camera out of band. Named rather than a
22145
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
22146
+ * already mid-session and one already bursting are four different facts, and a
22147
+ * caller told only "no" cannot tell a protection from a bug.
22148
+ */
22149
+ var OccupancyBurstRefusalSchema = _enum([
22150
+ "not-attached",
22151
+ "battery-asleep",
22152
+ "not-watching",
22153
+ "already-bursting"
22154
+ ]);
21885
22155
  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({
22156
+ deviceId: number(),
22157
+ /** How many frames to collect. The caller sizes this against what its
22158
+ * own confirmation needs; the runner clamps it to the field's range. */
22159
+ frames: number().int().positive().optional(),
22160
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
22161
+ * defend — the periodic one at least has a timer to point at. */
22162
+ reason: string()
22163
+ }), object({
22164
+ started: boolean(),
22165
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
22166
+ }), {
22167
+ auth: "admin",
22168
+ kind: "mutation"
22169
+ }), method(object({
21886
22170
  handle: FrameHandleSchema,
21887
22171
  bbox: NativeCropBboxSchema,
21888
22172
  maxWidth: number().int().positive().optional(),
@@ -24252,10 +24536,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24252
24536
  }), boolean()), method(object({
24253
24537
  deviceId: number().int().nonnegative(),
24254
24538
  sessionId: string()
24255
- }), object({ pendingRenegotiation: object({
24256
- target: WebrtcStreamTargetSchema,
24257
- epoch: number()
24258
- }).nullable() }));
24539
+ }), object({
24540
+ pendingRenegotiation: object({
24541
+ target: WebrtcStreamTargetSchema,
24542
+ epoch: number()
24543
+ }).nullable(),
24544
+ /**
24545
+ * Whether the session still EXISTS.
24546
+ *
24547
+ * A consumer that holds a resource for the life of a session needs to
24548
+ * be able to ask, because a session does not always end the way it
24549
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24550
+ * sent `SessionDisconnected`, so the Alexa exporter's
24551
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24552
+ * H.264 transcode kept running for NOBODY for more than twenty
24553
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24554
+ * minutes earlier — the broker knew; the holder had no way to ask.
24555
+ *
24556
+ * `false` for a session id the provider has never heard of, which is
24557
+ * the same answer as "it ended": either way nothing is holding it up.
24558
+ */
24559
+ alive: boolean()
24560
+ }));
24259
24561
  object({
24260
24562
  /** All accessory children of the parent. */
24261
24563
  childDeviceIds: array(number()).readonly(),
@@ -27333,7 +27635,7 @@ var NativeDetectionSchema = object({
27333
27635
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
27334
27636
  confidence: number().min(0).max(1).optional()
27335
27637
  });
27336
- object({
27638
+ var NativeObjectDetectionStatusSchema = object({
27337
27639
  /**
27338
27640
  * Last observed instance per class. Missing entries mean the class
27339
27641
  * is supported but nothing has been seen since the provider started.
@@ -27350,14 +27652,56 @@ object({
27350
27652
  supportedClasses: array(NativeObjectClassEnum).readonly(),
27351
27653
  /**
27352
27654
  * Whether forwarding of onboard AI detections is enabled for this device.
27353
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
27354
- * churn the tracker, so forwarding stays off until the operator enables it.
27655
+ *
27656
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27657
+ * camera runs — that is the operator's choice, and it is made where every
27658
+ * other detection choice is made. `geometry` on
27659
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27660
+ * choice would buy this particular camera.
27355
27661
  */
27356
27662
  enabled: boolean()
27357
- }).extend({
27663
+ });
27664
+ /**
27665
+ * WHEN a camera's onboard detections carry geometry.
27666
+ *
27667
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27668
+ * a detection is a trackable subject whenever the camera sees one.
27669
+ * - `while-streaming` — only while some stream of this camera is already open.
27670
+ * The boxes ride the video's own side-channel rather than a feed of their
27671
+ * own, so they cost nothing and they exist only when something is pulling.
27672
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27673
+ * radio drain, but a camera that is awake is awake precisely because
27674
+ * something is in front of it, and its stream is already being pulled.
27675
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27676
+ * pipeline needs geometry to make a subject, so such a push reaches the
27677
+ * tracker as motion and no further.
27678
+ *
27679
+ * Reported and not inferred, because the operator's question in front of the
27680
+ * picker is "what do I get", and these are three different answers (D14: the
27681
+ * derived form is only as honest as `getOptions`).
27682
+ */
27683
+ var NativeObjectGeometryEnum = _enum([
27684
+ "boxed",
27685
+ "while-streaming",
27686
+ "flag-only"
27687
+ ]);
27688
+ var NativeObjectDetectionOptionsSchema = object({
27689
+ /** Classes this firmware can detect — the same list the status reports. */
27690
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27691
+ /** What a detection from this camera carries. */
27692
+ geometry: NativeObjectGeometryEnum
27693
+ });
27694
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27695
+ NativeObjectDetectionStatusSchema.extend({
27358
27696
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
27359
27697
  lastFetchedAt: number() });
27360
- DeviceType.Camera, method(object({
27698
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27699
+ deviceId: number(),
27700
+ settings: NativeObjectDetectionSettingsPatchSchema
27701
+ }), _void(), {
27702
+ kind: "mutation",
27703
+ auth: "admin"
27704
+ }), method(object({
27361
27705
  deviceId: number(),
27362
27706
  enabled: boolean()
27363
27707
  }), _void(), {
@@ -31156,7 +31500,28 @@ var PerScopeBreakdownSchema = object({
31156
31500
  /** Total tracked objects in this scope (frame / zone / unzoned). */
31157
31501
  totalObjects: number().int().nonnegative(),
31158
31502
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
31159
- byClass: record(string(), number().int().nonnegative())
31503
+ byClass: record(string(), number().int().nonnegative()),
31504
+ /**
31505
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31506
+ * present but not going anywhere (a parked car, a bin, a statue).
31507
+ *
31508
+ * The operator's question about a scene has two halves and they answer
31509
+ * different things: "what is parked here" is stable for hours and must not
31510
+ * flap, while "who is walking through" is the thing an alert is about. One
31511
+ * number could only serve one of them, and `totalObjects` served the first
31512
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31513
+ *
31514
+ * `standing + transient === totalObjects`, always. The total keeps its old
31515
+ * meaning exactly, so no rule written against it changes behaviour.
31516
+ *
31517
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31518
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31519
+ * parked objects here" about a camera whose lot is full.
31520
+ */
31521
+ standingObjects: number().int().nonnegative().optional(),
31522
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31523
+ * same absence rule. */
31524
+ transientObjects: number().int().nonnegative().optional()
31160
31525
  });
31161
31526
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
31162
31527
  zoneId: string(),
@@ -34095,12 +34460,24 @@ Object.freeze({
34095
34460
  addonId: null,
34096
34461
  access: "create"
34097
34462
  },
34463
+ "nativeObjectDetection.getOptions": {
34464
+ capName: "native-object-detection",
34465
+ capScope: "device",
34466
+ addonId: null,
34467
+ access: "view"
34468
+ },
34098
34469
  "nativeObjectDetection.setEnabled": {
34099
34470
  capName: "native-object-detection",
34100
34471
  capScope: "device",
34101
34472
  addonId: null,
34102
34473
  access: "create"
34103
34474
  },
34475
+ "nativeObjectDetection.setSettings": {
34476
+ capName: "native-object-detection",
34477
+ capScope: "device",
34478
+ addonId: null,
34479
+ access: "create"
34480
+ },
34104
34481
  "navigation.getFeatures": {
34105
34482
  capName: "navigation",
34106
34483
  capScope: "device",
@@ -34365,6 +34742,12 @@ Object.freeze({
34365
34742
  addonId: null,
34366
34743
  access: "view"
34367
34744
  },
34745
+ "notificationRules.getClipRetentionAsks": {
34746
+ capName: "notification-rules",
34747
+ capScope: "system",
34748
+ addonId: null,
34749
+ access: "view"
34750
+ },
34368
34751
  "notificationRules.getConditionCatalog": {
34369
34752
  capName: "notification-rules",
34370
34753
  capScope: "system",
@@ -34875,6 +35258,12 @@ Object.freeze({
34875
35258
  addonId: null,
34876
35259
  access: "create"
34877
35260
  },
35261
+ "pipelineAnalytics.readLongTermSeries": {
35262
+ capName: "pipeline-analytics",
35263
+ capScope: "device",
35264
+ addonId: null,
35265
+ access: "view"
35266
+ },
34878
35267
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34879
35268
  capName: "pipeline-analytics",
34880
35269
  capScope: "device",
@@ -35547,6 +35936,12 @@ Object.freeze({
35547
35936
  addonId: null,
35548
35937
  access: "create"
35549
35938
  },
35939
+ "pipelineRunner.requestOccupancyBurst": {
35940
+ capName: "pipeline-runner",
35941
+ capScope: "system",
35942
+ addonId: null,
35943
+ access: "create"
35944
+ },
35550
35945
  "pipelineRunner.runDetailSubtree": {
35551
35946
  capName: "pipeline-runner",
35552
35947
  capScope: "system",
@@ -36759,6 +37154,12 @@ Object.freeze({
36759
37154
  addonId: null,
36760
37155
  access: "create"
36761
37156
  },
37157
+ "streamBroker.reportStreamSignal": {
37158
+ capName: "stream-broker",
37159
+ capScope: "system",
37160
+ addonId: null,
37161
+ access: "create"
37162
+ },
36762
37163
  "streamBroker.restartProfile": {
36763
37164
  capName: "stream-broker",
36764
37165
  capScope: "system",
@@ -36843,6 +37244,12 @@ Object.freeze({
36843
37244
  addonId: null,
36844
37245
  access: "create"
36845
37246
  },
37247
+ "streamSignals.listSignals": {
37248
+ capName: "stream-signals",
37249
+ capScope: "device",
37250
+ addonId: null,
37251
+ access: "view"
37252
+ },
36846
37253
  "switch.setState": {
36847
37254
  capName: "switch",
36848
37255
  capScope: "device",
@@ -38315,11 +38722,21 @@ Object.freeze({
38315
38722
  form: "single",
38316
38723
  optional: false
38317
38724
  }],
38725
+ "nativeObjectDetection.getOptions": [{
38726
+ name: "deviceId",
38727
+ form: "single",
38728
+ optional: false
38729
+ }],
38318
38730
  "nativeObjectDetection.setEnabled": [{
38319
38731
  name: "deviceId",
38320
38732
  form: "single",
38321
38733
  optional: false
38322
38734
  }],
38735
+ "nativeObjectDetection.setSettings": [{
38736
+ name: "deviceId",
38737
+ form: "single",
38738
+ optional: false
38739
+ }],
38323
38740
  "navigation.getFeatures": [{
38324
38741
  name: "deviceId",
38325
38742
  form: "single",
@@ -38669,6 +39086,11 @@ Object.freeze({
38669
39086
  form: "single",
38670
39087
  optional: false
38671
39088
  }],
39089
+ "pipelineAnalytics.readLongTermSeries": [{
39090
+ name: "deviceId",
39091
+ form: "single",
39092
+ optional: false
39093
+ }],
38672
39094
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38673
39095
  name: "deviceId",
38674
39096
  form: "single",
@@ -38859,6 +39281,11 @@ Object.freeze({
38859
39281
  form: "single",
38860
39282
  optional: false
38861
39283
  }],
39284
+ "pipelineRunner.requestOccupancyBurst": [{
39285
+ name: "deviceId",
39286
+ form: "single",
39287
+ optional: false
39288
+ }],
38862
39289
  "pipelineRunner.runDetailSubtree": [{
38863
39290
  name: "deviceId",
38864
39291
  form: "single",
@@ -39215,6 +39642,11 @@ Object.freeze({
39215
39642
  form: "single",
39216
39643
  optional: false
39217
39644
  }],
39645
+ "streamBroker.reportStreamSignal": [{
39646
+ name: "deviceId",
39647
+ form: "single",
39648
+ optional: false
39649
+ }],
39218
39650
  "streamBroker.restartProfile": [{
39219
39651
  name: "deviceId",
39220
39652
  form: "single",