@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
@@ -502,7 +502,7 @@ async function importScryptedCatalogModel(input, deps) {
502
502
  }
503
503
  }
504
504
  //#endregion
505
- //#region ../types/dist/event-category-ZyX6jcse.mjs
505
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
506
506
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
507
507
  EventCategory["SystemBoot"] = "system.boot";
508
508
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1119,6 +1119,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1119
1119
  * pull-reconcile from the provider's `getStatus` on reconnect. */
1120
1120
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
1121
1121
  EventCategory["BackupCompleted"] = "backup.completed";
1122
+ /**
1123
+ * A whole backup RUN finished — every destination attempted, win or lose.
1124
+ *
1125
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
1126
+ * a progress UI and the wrong one for a notification: an operator with three
1127
+ * destinations would be told three times. And a run where two of three
1128
+ * destinations succeeded is not a clean success — a single "backup
1129
+ * completed" that hid the failed one would be a lie, so the count of each is
1130
+ * carried here and the message says both.
1131
+ *
1132
+ * Emitted by the backup orchestrator only after the destination loop, so a
1133
+ * run that dies during the BUILD phase produces no completion at all.
1134
+ */
1135
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
1122
1136
  EventCategory["BackupRestored"] = "backup.restored";
1123
1137
  EventCategory["NotificationDispatched"] = "notification.dispatched";
1124
1138
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5849,7 +5863,7 @@ var ZodIssueCode = {
5849
5863
  var ZodFirstPartyTypeKind;
5850
5864
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5851
5865
  //#endregion
5852
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5866
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5853
5867
  /**
5854
5868
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5855
5869
  * window to float samples (D455).
@@ -7789,6 +7803,28 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7789
7803
  DeviceRole["GenericNotifier"] = "generic-notifier";
7790
7804
  return DeviceRole;
7791
7805
  }({});
7806
+ /**
7807
+ * Identity — preserves literal types for downstream inference.
7808
+ *
7809
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
7810
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
7811
+ * the broader unions declared on `CustomActionSpec`'s default generics.
7812
+ * Shape validity is enforced separately by the `customAction(...)` helper
7813
+ * whose return type is already a `CustomActionSpec<...>`.
7814
+ */
7815
+ function defineCustomActions(spec) {
7816
+ return spec;
7817
+ }
7818
+ function customAction(input, output, options) {
7819
+ return {
7820
+ input,
7821
+ output,
7822
+ kind: options?.kind ?? "query",
7823
+ auth: options?.auth ?? "protected",
7824
+ scope: options?.scope ?? { kind: "system" },
7825
+ ...options?.caller ? { caller: "required" } : {}
7826
+ };
7827
+ }
7792
7828
  var StaticDirOutputSchema = object({ staticDir: string() });
7793
7829
  var VersionOutputSchema = object({ version: string() });
7794
7830
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -12054,6 +12090,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
12054
12090
  auth: "admin"
12055
12091
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
12056
12092
  DeviceType.Camera;
12093
+ /**
12094
+ * The signals a device can emit to WAKE its own stream.
12095
+ *
12096
+ * A camera whose stream is built on demand sleeps until something asks for it,
12097
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
12098
+ * puller holds a session open for ever, and treating that as demand would keep
12099
+ * a battery camera awake for ever, which is the whole thing the battery is for
12100
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
12101
+ * itself, with no stream running.
12102
+ *
12103
+ * ## The vocabulary is the PROVIDER'S, not ours
12104
+ *
12105
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
12106
+ * names each signal with a `code` it chooses and a `label` an operator reads.
12107
+ * Reolink offers motion and camera-native detection; another provider may offer
12108
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12109
+ * yet. A fixed enum here would mean every new signal is a framework release.
12110
+ *
12111
+ * It is deliberately NOT derived from the caps a device already binds. Whether
12112
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
12113
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12114
+ * binding — but both answer "what drives the detection pipeline", which is a
12115
+ * different question from "what may wake a sleeping stream". A camera can do
12116
+ * the first and not be trusted with the second, and the operator picks per
12117
+ * camera. Two questions, two authorities.
12118
+ *
12119
+ * ## Availability is not permission
12120
+ *
12121
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
12122
+ * wakes the stream is the operator's per-camera choice, held by the broker
12123
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
12124
+ * provider declaring a signal is not a provider enabling it.
12125
+ */
12126
+ /** One signal a device can emit. */
12127
+ var StreamSignalSchema = object({
12128
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12129
+ code: string().min(1),
12130
+ /** What an operator reads in the picker. The provider's own wording. */
12131
+ label: string().min(1),
12132
+ /**
12133
+ * Whether the provider recommends this signal ON when a camera is first set
12134
+ * up. A provider knows which of its signals are cheap and reliable; an
12135
+ * operator should not have to discover that by trial. Reolink recommends
12136
+ * both of its own.
12137
+ */
12138
+ recommended: boolean()
12139
+ });
12140
+ object({
12141
+ signals: array(StreamSignalSchema),
12142
+ lastFetchedAt: number()
12143
+ });
12144
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
12057
12145
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12058
12146
  var StreamFormatSchema = _enum([
12059
12147
  "webrtc",
@@ -12450,6 +12538,22 @@ var EgressTranscodeSchema = object({
12450
12538
  camStreamId: string().nullable()
12451
12539
  });
12452
12540
  method(object({
12541
+ deviceId: number().int().nonnegative(),
12542
+ /** The provider's signal code. */
12543
+ code: string().min(1),
12544
+ /** Ms epoch. Absent ⇒ now. */
12545
+ at: number().optional()
12546
+ }), object({
12547
+ /** Whether the broker acted on it, and if not, why. */
12548
+ accepted: boolean(),
12549
+ reason: _enum([
12550
+ "woke",
12551
+ "hold-extended",
12552
+ "not-enabled",
12553
+ "no-consumer",
12554
+ "unknown-code"
12555
+ ])
12556
+ }), { kind: "mutation" }), method(object({
12453
12557
  deviceId: number().int().nonnegative(),
12454
12558
  camStreamId: string().min(1),
12455
12559
  kind: CamStreamKindSchema,
@@ -12704,6 +12808,16 @@ var PickStreamRequirementsSchema = object({
12704
12808
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12705
12809
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12706
12810
  minHeight: number().int().positive().optional(),
12811
+ /**
12812
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12813
+ *
12814
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12815
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12816
+ * Without this the ceiling had to be re-implemented by every caller — and
12817
+ * one caller implementing it privately is how a second scoring authority
12818
+ * gets born.
12819
+ */
12820
+ maxHeight: number().int().positive().optional(),
12707
12821
  /** Minimum horizontal resolution. */
12708
12822
  minWidth: number().int().positive().optional(),
12709
12823
  /**
@@ -12720,7 +12834,22 @@ var PickStreamRequirementsSchema = object({
12720
12834
  * transcoded" guard: if the device is already serving the consumer's
12721
12835
  * codec end-to-end, there's nothing to optimise.
12722
12836
  */
12723
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12837
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12838
+ /**
12839
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12840
+ * understanding that it will be transcoded.
12841
+ *
12842
+ * Default `false` — today's behaviour, and the right one for a bypass
12843
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12844
+ * ask the larger question: "what is the best stream for me, transcoding if
12845
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12846
+ * does not, so a passthrough is never lost to a transcode; the answer says
12847
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12848
+ *
12849
+ * This is what lets one picker serve both the bypass and the full source
12850
+ * choice, instead of a consumer scoring privately when the bypass misses.
12851
+ */
12852
+ allowTranscode: boolean().optional()
12724
12853
  }).readonly();
12725
12854
  var PickStreamPreferencesSchema = object({
12726
12855
  /**
@@ -12734,12 +12863,32 @@ var PickStreamPreferencesSchema = object({
12734
12863
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12735
12864
  * memory-constrained consumers / Apple Home guest sessions).
12736
12865
  */
12737
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12866
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12867
+ /**
12868
+ * The height the consumer actually wants to DELIVER.
12869
+ *
12870
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12871
+ * above the target wins, and only if nothing reaches it does the tallest
12872
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12873
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12874
+ * express that: it says "as big as possible", which is a different wish.
12875
+ *
12876
+ * Ignored when absent, so every existing caller keeps its ordering.
12877
+ */
12878
+ targetHeight: number().int().positive().optional()
12738
12879
  }).readonly();
12739
12880
  var PickedCamStreamSchema = object({
12740
12881
  camStreamId: string(),
12741
12882
  codec: string().optional(),
12742
12883
  resolution: CamStreamResolutionSchema.optional(),
12884
+ /**
12885
+ * Whether serving this stream requires a decode + re-encode.
12886
+ *
12887
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12888
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12889
+ * not ask cannot be handed a cost it never agreed to pay.
12890
+ */
12891
+ transcodes: boolean(),
12743
12892
  /** One-line explanation of why this stream won — for logs / debug UI. */
12744
12893
  reason: string()
12745
12894
  });
@@ -12857,28 +13006,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12857
13006
  content: string()
12858
13007
  })) }), { auth: "admin" });
12859
13008
  /**
12860
- * Identity — preserves literal types for downstream inference.
12861
- *
12862
- * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
12863
- * TypeScript does not widen each entry's literal `kind`/`auth` fields to
12864
- * the broader unions declared on `CustomActionSpec`'s default generics.
12865
- * Shape validity is enforced separately by the `customAction(...)` helper
12866
- * whose return type is already a `CustomActionSpec<...>`.
12867
- */
12868
- function defineCustomActions(spec) {
12869
- return spec;
12870
- }
12871
- function customAction(input, output, options) {
12872
- return {
12873
- input,
12874
- output,
12875
- kind: options?.kind ?? "query",
12876
- auth: options?.auth ?? "protected",
12877
- scope: options?.scope ?? { kind: "system" },
12878
- ...options?.caller ? { caller: "required" } : {}
12879
- };
12880
- }
12881
- /**
12882
13009
  * `custom-model-registry` — collection cap exposing operator-registered
12883
13010
  * custom detection models. Each provider (today: `addon-model-studio`)
12884
13011
  * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
@@ -16972,6 +17099,8 @@ var NcSystemEventKindSchema = _enum([
16972
17099
  "device-enabled",
16973
17100
  "device-battery-low",
16974
17101
  "device-battery-normal",
17102
+ "device-consumable-low",
17103
+ "device-consumable-normal",
16975
17104
  "stream-online",
16976
17105
  "stream-offline",
16977
17106
  "node-online",
@@ -16990,6 +17119,7 @@ var NcSystemEventKindSchema = _enum([
16990
17119
  "addon-updated",
16991
17120
  "server-updated",
16992
17121
  "export-completed",
17122
+ "backup-completed",
16993
17123
  "camera-online",
16994
17124
  "camera-offline",
16995
17125
  "camera-disabled",
@@ -18312,6 +18442,48 @@ var NcAlarmConfigSchema = object({
18312
18442
  settings: NcAlarmSettingsSchema,
18313
18443
  coverage: array(NcAlarmModeCoverageSchema)
18314
18444
  });
18445
+ /**
18446
+ * ONE rule's demand on ONE camera's clip ring.
18447
+ *
18448
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
18449
+ * camera, so the answer stays a faithful description of the rules and the
18450
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
18451
+ * lives. A camera that appears in no ask is being told **nothing** — which is
18452
+ * a different thing from never having been told, and only the envelope
18453
+ * (`rulesLoaded`) can tell those apart.
18454
+ */
18455
+ var NcClipRetentionAskSchema = object({
18456
+ /**
18457
+ * The camera this ask is about. **Absent = every camera**, which is what a
18458
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
18459
+ * asking everywhere.
18460
+ */
18461
+ deviceId: number().int().nonnegative().optional(),
18462
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
18463
+ * needs nothing produces no ask at all. */
18464
+ seconds: number().min(0).max(60),
18465
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
18466
+ * assigned, which is what the cut defaults to. */
18467
+ profile: CamProfileSchema.optional(),
18468
+ /** Who is asking — so a retention the operator did not expect names a rule. */
18469
+ ruleId: string(),
18470
+ ruleName: string(),
18471
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
18472
+ reason: _enum(["window", "occupancy"])
18473
+ });
18474
+ /**
18475
+ * The whole answer, with the one bit that keeps absence from reading as zero.
18476
+ *
18477
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18478
+ * once. A centre that is up but has not read its rules yet answers with an
18479
+ * empty ask list that means nothing at all — applying it would drop every
18480
+ * camera's ring to zero for the first events after a restart, which is the
18481
+ * footage this mechanism exists to keep.
18482
+ */
18483
+ var NcClipRetentionPlanSchema = object({
18484
+ rulesLoaded: boolean(),
18485
+ asks: array(NcClipRetentionAskSchema).readonly()
18486
+ });
18315
18487
  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 }), {
18316
18488
  kind: "mutation",
18317
18489
  auth: "admin",
@@ -18332,7 +18504,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
18332
18504
  }), object({ success: literal(true) }), {
18333
18505
  kind: "mutation",
18334
18506
  auth: "admin"
18335
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18507
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18336
18508
  deviceId: number().int(),
18337
18509
  muted: boolean()
18338
18510
  }), object({ success: literal(true) }), {
@@ -20866,6 +21038,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20866
21038
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20867
21039
  framesMatched: number().int()
20868
21040
  })).readonly() });
21041
+ /**
21042
+ * The long-term series a camera produces. A closed union so a typo cannot
21043
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
21044
+ * is an alias of this, not a second list.
21045
+ */
21046
+ var AnalyticsLtsSeriesSchema = _enum([
21047
+ "motion",
21048
+ "audio-dbfs",
21049
+ "battery",
21050
+ "occupancy"
21051
+ ]);
21052
+ /**
21053
+ * One closed 5-minute bucket of a long-term series.
21054
+ *
21055
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
21056
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
21057
+ * that exists at all was measured; a bucket that is absent was not, which is a
21058
+ * different claim from zero and the reason this is a sparse series.
21059
+ */
21060
+ var LtsBucketSchema = object({
21061
+ scope: string(),
21062
+ bucketStart: number().int(),
21063
+ samples: number().int().nonnegative(),
21064
+ sum: number(),
21065
+ min: number(),
21066
+ max: number()
21067
+ });
20869
21068
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20870
21069
  deviceId: number(),
20871
21070
  trackId: string()
@@ -20912,6 +21111,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20912
21111
  kinds: array(string()).optional(),
20913
21112
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20914
21113
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
21114
+ deviceId: number(),
21115
+ series: AnalyticsLtsSeriesSchema,
21116
+ /** Omit for EVERY scope of this series in the range. */
21117
+ scope: string().optional(),
21118
+ from: number(),
21119
+ to: number(),
21120
+ limit: number().int().positive().optional()
21121
+ }), array(LtsBucketSchema).readonly()), method(object({
20915
21122
  deviceId: number(),
20916
21123
  since: number(),
20917
21124
  until: number(),
@@ -21530,6 +21737,14 @@ var MotionSourceEnum = _enum([
21530
21737
  */
21531
21738
  var MotionSourcesSchema = array(MotionSourceEnum);
21532
21739
  /**
21740
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
21741
+ * post-analysis already tags every detection with (`DetectionSource`) rather
21742
+ * than a second spelling of the same two ideas — the value an operator picks
21743
+ * here is the value that comes back on the track, the overlay and the debug
21744
+ * row.
21745
+ */
21746
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
21747
+ /**
21533
21748
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21534
21749
  * so cap-side consumers (the orchestrator forward, the runner addon's
21535
21750
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21680,6 +21895,35 @@ var RunnerCameraConfigSchema = object({
21680
21895
  * events; the orchestrator forwards to `reportMotion`.
21681
21896
  */
21682
21897
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21898
+ /**
21899
+ * WHICH root detector runs for this camera. The detection counterpart of
21900
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21901
+ * of sources the system understands, vendor-agnostic, owned here.
21902
+ *
21903
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21904
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21905
+ * here. Its boxes reach post-analysis on the same
21906
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21907
+ * track gets the same tracker, the same overlay and the same detail
21908
+ * subtree (face / plate / embedding).
21909
+ *
21910
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21911
+ * run, and that is where a camera with a usable onboard detector buys back
21912
+ * its share of the accelerator. It saves the root inference, not the decode
21913
+ * — the detail subtree still needs pixels to cut crops from.
21914
+ *
21915
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21916
+ * step at all (there is nothing to track), and the cap that knows this says
21917
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21918
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21919
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21920
+ * worth exactly what it already is — a wake signal with a class.
21921
+ *
21922
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21923
+ * vendor never turns a detector on for the operator, and neither does a
21924
+ * default.
21925
+ */
21926
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21683
21927
  pipelineEnabled: boolean().default(true),
21684
21928
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21685
21929
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21861,7 +22105,47 @@ var RunnerLocalMetricsSchema = object({
21861
22105
  queueDepth: number(),
21862
22106
  frameLazy: FrameLazyMetricsSchema.optional()
21863
22107
  });
22108
+ /**
22109
+ * Pipeline Runner capability — runtime detection workhorse.
22110
+ *
22111
+ * One instance per node. Receives camera assignments from
22112
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
22113
+ * decoded frames, drains motion + detection queues, calls the local
22114
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
22115
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
22116
+ * the bus.
22117
+ *
22118
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
22119
+ * runner has zero knowledge of other agents, no global state, and never
22120
+ * makes assignment decisions itself.
22121
+ */
22122
+ /**
22123
+ * Why a runner declined to look at a camera out of band. Named rather than a
22124
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
22125
+ * already mid-session and one already bursting are four different facts, and a
22126
+ * caller told only "no" cannot tell a protection from a bug.
22127
+ */
22128
+ var OccupancyBurstRefusalSchema = _enum([
22129
+ "not-attached",
22130
+ "battery-asleep",
22131
+ "not-watching",
22132
+ "already-bursting"
22133
+ ]);
21864
22134
  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({
22135
+ deviceId: number(),
22136
+ /** How many frames to collect. The caller sizes this against what its
22137
+ * own confirmation needs; the runner clamps it to the field's range. */
22138
+ frames: number().int().positive().optional(),
22139
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
22140
+ * defend — the periodic one at least has a timer to point at. */
22141
+ reason: string()
22142
+ }), object({
22143
+ started: boolean(),
22144
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
22145
+ }), {
22146
+ auth: "admin",
22147
+ kind: "mutation"
22148
+ }), method(object({
21865
22149
  handle: FrameHandleSchema,
21866
22150
  bbox: NativeCropBboxSchema,
21867
22151
  maxWidth: number().int().positive().optional(),
@@ -24231,10 +24515,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24231
24515
  }), boolean()), method(object({
24232
24516
  deviceId: number().int().nonnegative(),
24233
24517
  sessionId: string()
24234
- }), object({ pendingRenegotiation: object({
24235
- target: WebrtcStreamTargetSchema,
24236
- epoch: number()
24237
- }).nullable() }));
24518
+ }), object({
24519
+ pendingRenegotiation: object({
24520
+ target: WebrtcStreamTargetSchema,
24521
+ epoch: number()
24522
+ }).nullable(),
24523
+ /**
24524
+ * Whether the session still EXISTS.
24525
+ *
24526
+ * A consumer that holds a resource for the life of a session needs to
24527
+ * be able to ask, because a session does not always end the way it
24528
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24529
+ * sent `SessionDisconnected`, so the Alexa exporter's
24530
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24531
+ * H.264 transcode kept running for NOBODY for more than twenty
24532
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24533
+ * minutes earlier — the broker knew; the holder had no way to ask.
24534
+ *
24535
+ * `false` for a session id the provider has never heard of, which is
24536
+ * the same answer as "it ended": either way nothing is holding it up.
24537
+ */
24538
+ alive: boolean()
24539
+ }));
24238
24540
  object({
24239
24541
  /** All accessory children of the parent. */
24240
24542
  childDeviceIds: array(number()).readonly(),
@@ -27312,7 +27614,7 @@ var NativeDetectionSchema = object({
27312
27614
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
27313
27615
  confidence: number().min(0).max(1).optional()
27314
27616
  });
27315
- object({
27617
+ var NativeObjectDetectionStatusSchema = object({
27316
27618
  /**
27317
27619
  * Last observed instance per class. Missing entries mean the class
27318
27620
  * is supported but nothing has been seen since the provider started.
@@ -27329,14 +27631,56 @@ object({
27329
27631
  supportedClasses: array(NativeObjectClassEnum).readonly(),
27330
27632
  /**
27331
27633
  * Whether forwarding of onboard AI detections is enabled for this device.
27332
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
27333
- * churn the tracker, so forwarding stays off until the operator enables it.
27634
+ *
27635
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27636
+ * camera runs — that is the operator's choice, and it is made where every
27637
+ * other detection choice is made. `geometry` on
27638
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27639
+ * choice would buy this particular camera.
27334
27640
  */
27335
27641
  enabled: boolean()
27336
- }).extend({
27642
+ });
27643
+ /**
27644
+ * WHEN a camera's onboard detections carry geometry.
27645
+ *
27646
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27647
+ * a detection is a trackable subject whenever the camera sees one.
27648
+ * - `while-streaming` — only while some stream of this camera is already open.
27649
+ * The boxes ride the video's own side-channel rather than a feed of their
27650
+ * own, so they cost nothing and they exist only when something is pulling.
27651
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27652
+ * radio drain, but a camera that is awake is awake precisely because
27653
+ * something is in front of it, and its stream is already being pulled.
27654
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27655
+ * pipeline needs geometry to make a subject, so such a push reaches the
27656
+ * tracker as motion and no further.
27657
+ *
27658
+ * Reported and not inferred, because the operator's question in front of the
27659
+ * picker is "what do I get", and these are three different answers (D14: the
27660
+ * derived form is only as honest as `getOptions`).
27661
+ */
27662
+ var NativeObjectGeometryEnum = _enum([
27663
+ "boxed",
27664
+ "while-streaming",
27665
+ "flag-only"
27666
+ ]);
27667
+ var NativeObjectDetectionOptionsSchema = object({
27668
+ /** Classes this firmware can detect — the same list the status reports. */
27669
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27670
+ /** What a detection from this camera carries. */
27671
+ geometry: NativeObjectGeometryEnum
27672
+ });
27673
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27674
+ NativeObjectDetectionStatusSchema.extend({
27337
27675
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
27338
27676
  lastFetchedAt: number() });
27339
- DeviceType.Camera, method(object({
27677
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27678
+ deviceId: number(),
27679
+ settings: NativeObjectDetectionSettingsPatchSchema
27680
+ }), _void(), {
27681
+ kind: "mutation",
27682
+ auth: "admin"
27683
+ }), method(object({
27340
27684
  deviceId: number(),
27341
27685
  enabled: boolean()
27342
27686
  }), _void(), {
@@ -31135,7 +31479,28 @@ var PerScopeBreakdownSchema = object({
31135
31479
  /** Total tracked objects in this scope (frame / zone / unzoned). */
31136
31480
  totalObjects: number().int().nonnegative(),
31137
31481
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
31138
- byClass: record(string(), number().int().nonnegative())
31482
+ byClass: record(string(), number().int().nonnegative()),
31483
+ /**
31484
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31485
+ * present but not going anywhere (a parked car, a bin, a statue).
31486
+ *
31487
+ * The operator's question about a scene has two halves and they answer
31488
+ * different things: "what is parked here" is stable for hours and must not
31489
+ * flap, while "who is walking through" is the thing an alert is about. One
31490
+ * number could only serve one of them, and `totalObjects` served the first
31491
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31492
+ *
31493
+ * `standing + transient === totalObjects`, always. The total keeps its old
31494
+ * meaning exactly, so no rule written against it changes behaviour.
31495
+ *
31496
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31497
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31498
+ * parked objects here" about a camera whose lot is full.
31499
+ */
31500
+ standingObjects: number().int().nonnegative().optional(),
31501
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31502
+ * same absence rule. */
31503
+ transientObjects: number().int().nonnegative().optional()
31139
31504
  });
31140
31505
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
31141
31506
  zoneId: string(),
@@ -34074,12 +34439,24 @@ Object.freeze({
34074
34439
  addonId: null,
34075
34440
  access: "create"
34076
34441
  },
34442
+ "nativeObjectDetection.getOptions": {
34443
+ capName: "native-object-detection",
34444
+ capScope: "device",
34445
+ addonId: null,
34446
+ access: "view"
34447
+ },
34077
34448
  "nativeObjectDetection.setEnabled": {
34078
34449
  capName: "native-object-detection",
34079
34450
  capScope: "device",
34080
34451
  addonId: null,
34081
34452
  access: "create"
34082
34453
  },
34454
+ "nativeObjectDetection.setSettings": {
34455
+ capName: "native-object-detection",
34456
+ capScope: "device",
34457
+ addonId: null,
34458
+ access: "create"
34459
+ },
34083
34460
  "navigation.getFeatures": {
34084
34461
  capName: "navigation",
34085
34462
  capScope: "device",
@@ -34344,6 +34721,12 @@ Object.freeze({
34344
34721
  addonId: null,
34345
34722
  access: "view"
34346
34723
  },
34724
+ "notificationRules.getClipRetentionAsks": {
34725
+ capName: "notification-rules",
34726
+ capScope: "system",
34727
+ addonId: null,
34728
+ access: "view"
34729
+ },
34347
34730
  "notificationRules.getConditionCatalog": {
34348
34731
  capName: "notification-rules",
34349
34732
  capScope: "system",
@@ -34854,6 +35237,12 @@ Object.freeze({
34854
35237
  addonId: null,
34855
35238
  access: "create"
34856
35239
  },
35240
+ "pipelineAnalytics.readLongTermSeries": {
35241
+ capName: "pipeline-analytics",
35242
+ capScope: "device",
35243
+ addonId: null,
35244
+ access: "view"
35245
+ },
34857
35246
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34858
35247
  capName: "pipeline-analytics",
34859
35248
  capScope: "device",
@@ -35526,6 +35915,12 @@ Object.freeze({
35526
35915
  addonId: null,
35527
35916
  access: "create"
35528
35917
  },
35918
+ "pipelineRunner.requestOccupancyBurst": {
35919
+ capName: "pipeline-runner",
35920
+ capScope: "system",
35921
+ addonId: null,
35922
+ access: "create"
35923
+ },
35529
35924
  "pipelineRunner.runDetailSubtree": {
35530
35925
  capName: "pipeline-runner",
35531
35926
  capScope: "system",
@@ -36738,6 +37133,12 @@ Object.freeze({
36738
37133
  addonId: null,
36739
37134
  access: "create"
36740
37135
  },
37136
+ "streamBroker.reportStreamSignal": {
37137
+ capName: "stream-broker",
37138
+ capScope: "system",
37139
+ addonId: null,
37140
+ access: "create"
37141
+ },
36741
37142
  "streamBroker.restartProfile": {
36742
37143
  capName: "stream-broker",
36743
37144
  capScope: "system",
@@ -36822,6 +37223,12 @@ Object.freeze({
36822
37223
  addonId: null,
36823
37224
  access: "create"
36824
37225
  },
37226
+ "streamSignals.listSignals": {
37227
+ capName: "stream-signals",
37228
+ capScope: "device",
37229
+ addonId: null,
37230
+ access: "view"
37231
+ },
36825
37232
  "switch.setState": {
36826
37233
  capName: "switch",
36827
37234
  capScope: "device",
@@ -38294,11 +38701,21 @@ Object.freeze({
38294
38701
  form: "single",
38295
38702
  optional: false
38296
38703
  }],
38704
+ "nativeObjectDetection.getOptions": [{
38705
+ name: "deviceId",
38706
+ form: "single",
38707
+ optional: false
38708
+ }],
38297
38709
  "nativeObjectDetection.setEnabled": [{
38298
38710
  name: "deviceId",
38299
38711
  form: "single",
38300
38712
  optional: false
38301
38713
  }],
38714
+ "nativeObjectDetection.setSettings": [{
38715
+ name: "deviceId",
38716
+ form: "single",
38717
+ optional: false
38718
+ }],
38302
38719
  "navigation.getFeatures": [{
38303
38720
  name: "deviceId",
38304
38721
  form: "single",
@@ -38648,6 +39065,11 @@ Object.freeze({
38648
39065
  form: "single",
38649
39066
  optional: false
38650
39067
  }],
39068
+ "pipelineAnalytics.readLongTermSeries": [{
39069
+ name: "deviceId",
39070
+ form: "single",
39071
+ optional: false
39072
+ }],
38651
39073
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38652
39074
  name: "deviceId",
38653
39075
  form: "single",
@@ -38838,6 +39260,11 @@ Object.freeze({
38838
39260
  form: "single",
38839
39261
  optional: false
38840
39262
  }],
39263
+ "pipelineRunner.requestOccupancyBurst": [{
39264
+ name: "deviceId",
39265
+ form: "single",
39266
+ optional: false
39267
+ }],
38841
39268
  "pipelineRunner.runDetailSubtree": [{
38842
39269
  name: "deviceId",
38843
39270
  form: "single",
@@ -39194,6 +39621,11 @@ Object.freeze({
39194
39621
  form: "single",
39195
39622
  optional: false
39196
39623
  }],
39624
+ "streamBroker.reportStreamSignal": [{
39625
+ name: "deviceId",
39626
+ form: "single",
39627
+ optional: false
39628
+ }],
39197
39629
  "streamBroker.restartProfile": [{
39198
39630
  name: "deviceId",
39199
39631
  form: "single",