@camstack/addon-pipeline 1.2.620 → 1.2.622

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 (43) hide show
  1. package/dist/audio-analyzer/index.js +3 -3
  2. package/dist/audio-analyzer/index.mjs +3 -3
  3. package/dist/{custom-model-catalog-YxQheit5.js → custom-model-catalog-CKCK-QcT.js} +7 -7
  4. package/dist/{custom-model-catalog-BW0-xhwJ.mjs → custom-model-catalog-wpMi2U7e.mjs} +7 -7
  5. package/dist/detection-pipeline/index.js +60 -414
  6. package/dist/detection-pipeline/index.mjs +84 -438
  7. package/dist/{dist-mOyFhoa8.mjs → dist-BF60SjmI.mjs} +6855 -1620
  8. package/dist/{dist-CoLjAw2z.js → dist-DUFGDd_2.js} +6866 -1625
  9. package/dist/{model-catalogs-BstZN0ZA.js → model-catalogs-CjTm_0O-.js} +1 -1
  10. package/dist/{model-catalogs-PmNZKpMR.mjs → model-catalogs-CqFDhb0B.mjs} +1 -1
  11. package/dist/motion-wasm/index.js +1 -1
  12. package/dist/motion-wasm/index.mjs +1 -1
  13. package/dist/{node-Qmp6FkS2.mjs → node-DkphOOM2.mjs} +1 -1
  14. package/dist/{node-CzmiyMnw.js → node-DzGVn7bD.js} +1 -1
  15. package/dist/pipeline-runner/index.js +18 -4
  16. package/dist/pipeline-runner/index.mjs +18 -4
  17. package/dist/{process-memory-C5Cw8Cxz.js → process-memory-8kKexHYR.js} +1 -1
  18. package/dist/{process-memory-DXbuHvOX.mjs → process-memory-CBzfdSvC.mjs} +1 -1
  19. package/dist/recorder/index.js +10 -18
  20. package/dist/recorder/index.mjs +10 -18
  21. package/dist/{segment-demux-js-Din-INnw.mjs → segment-demux-js-DQNoNSJt.mjs} +1 -1
  22. package/dist/{segment-demux-js-DGFHiiIf.js → segment-demux-js-DRLQb1pc.js} +1 -1
  23. package/dist/session-decode/decode-worker-main.js +12 -21
  24. package/dist/session-decode/decode-worker-main.mjs +12 -21
  25. package/dist/stream-broker/_stub.js +2 -2
  26. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets--TcGAfJ-.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BmANAxAe.mjs} +2 -2
  27. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-H6RKsaiZ.mjs +26 -0
  28. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CNoWeZHH.mjs +26 -0
  29. package/dist/stream-broker/demux-worker-child.js +1 -1
  30. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  31. package/dist/stream-broker/{hostInit-DOiI--7i.mjs → hostInit-B3hXAfr1.mjs} +2 -2
  32. package/dist/stream-broker/index.js +3 -3
  33. package/dist/stream-broker/index.mjs +3 -3
  34. package/dist/stream-broker/remoteEntry.js +1 -1
  35. package/dist/{worker-protocol-D_NzPcnh.mjs → worker-protocol-DngGEAT2.js} +102 -2
  36. package/dist/{worker-protocol-C-G8qmye.js → worker-protocol-_avq7y8O.mjs} +67 -25
  37. package/package.json +1 -1
  38. package/python/coreml_load_probe.py +105 -15
  39. package/python/openvino_compile_probe.py +72 -18
  40. package/python/test_coreml_load_probe.py +83 -0
  41. package/python/test_openvino_compile_probe.py +114 -0
  42. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BaoBRCJs.mjs +0 -26
  43. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dx-WrMx0.mjs +0 -26
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CoLjAw2z.js");
1
+ const require_dist = require("./dist-DUFGDd_2.js");
2
2
  //#region src/detection-pipeline/registry/model-licenses.ts
3
3
  var COCO_DATA = {
4
4
  name: "COCO 2017",
@@ -1,4 +1,4 @@
1
- import { Gn as hfModelUrl, f as COCO_80_LABELS } from "./dist-mOyFhoa8.mjs";
1
+ import { Kn as hfModelUrl, f as COCO_80_LABELS } from "./dist-BF60SjmI.mjs";
2
2
  //#region src/detection-pipeline/registry/model-licenses.ts
3
3
  var COCO_DATA = {
4
4
  name: "COCO 2017",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-CoLjAw2z.js");
5
+ const require_dist = require("../dist-DUFGDd_2.js");
6
6
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ct as evaluateZoneRules, Gt as motionDetectionCapability, Kn as hydrateSchema, Pn as BaseAddon, jn as DeviceType } from "../dist-mOyFhoa8.mjs";
1
+ import { Fn as BaseAddon, Kt as motionDetectionCapability, Mn as DeviceType, qn as hydrateSchema, wt as evaluateZoneRules } from "../dist-BF60SjmI.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { En as buildFfmpegArgs, Mn as errMsg, Tn as Fmp4BoxSplitter, kn as isSoftwareDecode } from "./dist-mOyFhoa8.mjs";
1
+ import { An as isSoftwareDecode, Dn as buildFfmpegArgs, En as Fmp4BoxSplitter, Nn as errMsg } from "./dist-BF60SjmI.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { realpathSync } from "node:fs";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-CoLjAw2z.js");
2
+ const require_dist = require("./dist-DUFGDd_2.js");
3
3
  require("node:os");
4
4
  let node_crypto = require("node:crypto");
5
5
  let node_fs = require("node:fs");
@@ -3,9 +3,10 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-emK7D4bc.js");
6
- const require_dist = require("../dist-CoLjAw2z.js");
7
- const require_node = require("../node-CzmiyMnw.js");
8
- const require_custom_model_catalog = require("../custom-model-catalog-YxQheit5.js");
6
+ const require_dist = require("../dist-DUFGDd_2.js");
7
+ const require_node = require("../node-DzGVn7bD.js");
8
+ const require_custom_model_catalog = require("../custom-model-catalog-CKCK-QcT.js");
9
+ const require_worker_protocol = require("../worker-protocol-DngGEAT2.js");
9
10
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
10
11
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
11
12
  const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
@@ -1773,6 +1774,7 @@ function startSessionDecodePump(deps) {
1773
1774
  return child;
1774
1775
  },
1775
1776
  lease: deps.lease,
1777
+ hwaccel: deps.hwaccel,
1776
1778
  logger: deps.logger,
1777
1779
  teardownMode: () => teardownMode,
1778
1780
  onSessionTeardown: (teardown) => {
@@ -4790,7 +4792,7 @@ function readRecoveryRecipe(settings) {
4790
4792
  * The recipe this camera's resolved step tree selects.
4791
4793
  *
4792
4794
  * Reads the ENABLED first-level detector's own settings, which is where
4793
- * `pipelineOrchestrator.setCameraStepOverride` writes a per-camera value. A
4795
+ * `pipelineOrchestrator.setCameraStepSettings` writes a per-camera value. A
4794
4796
  * tree with no enabled detector runs no second pass at all, so the answer
4795
4797
  * there is the shipped rule and it is never used.
4796
4798
  */
@@ -10955,6 +10957,14 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
10955
10957
  */
10956
10958
  resolveSessionLeaseKnobs = () => resolveNativeLeaseKnobs(process.env, this.nativeLease.current());
10957
10959
  /**
10960
+ * The decode hwaccel backends this node's kernel resolver offers (D926),
10961
+ * refreshed on the acquire leg with the lease knobs and read when `start` is
10962
+ * sent. A node whose libva cannot initialise the driver offers no vaapi/qsv,
10963
+ * so its session workers never try them.
10964
+ */
10965
+ sessionHwaccel = new require_worker_protocol.SessionHwaccelSource();
10966
+ resolveSessionHwaccel = () => this.sessionHwaccel.current();
10967
+ /**
10958
10968
  * Refresh the lease knobs before a decode worker is spawned. Awaited on the
10959
10969
  * `acquire` leg of `startGuardedSessionDecode` (which always completes before
10960
10970
  * `startPump` forks), so the spawn sees a value at most one TTL stale rather
@@ -11547,6 +11557,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
11547
11557
  */
11548
11558
  async acquireSessionDecodeRestream(api, deviceId, streamId, tag, hostname, ownerNodeId, detectionIntent) {
11549
11559
  await this.refreshNativeLeaseSettings();
11560
+ await this.sessionHwaccel.refresh(this.ctxIfReady?.kernel.hwaccel);
11550
11561
  return acquireSessionDecodeRestreamFrom(api, this.ctx.logger, {
11551
11562
  deviceId,
11552
11563
  streamId,
@@ -11732,6 +11743,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
11732
11743
  return startSessionDecodePump({
11733
11744
  fork: this.forkDecodeWorkerWithLease,
11734
11745
  lease: this.resolveSessionLeaseKnobs,
11746
+ hwaccel: this.resolveSessionHwaccel,
11735
11747
  onWorkerGone: hooks.onWorkerGone,
11736
11748
  logger: log,
11737
11749
  source,
@@ -11913,6 +11925,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
11913
11925
  return startSessionDecodePump({
11914
11926
  fork: this.forkDecodeWorkerWithLease,
11915
11927
  lease: this.resolveSessionLeaseKnobs,
11928
+ hwaccel: this.resolveSessionHwaccel,
11916
11929
  onWorkerGone: hooks.onWorkerGone,
11917
11930
  logger: log,
11918
11931
  source,
@@ -12782,6 +12795,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
12782
12795
  return startSessionDecodePump({
12783
12796
  fork: this.forkDecodeWorkerWithLease,
12784
12797
  lease: this.resolveSessionLeaseKnobs,
12798
+ hwaccel: this.resolveSessionHwaccel,
12785
12799
  onWorkerGone: hooks.onWorkerGone,
12786
12800
  logger: log,
12787
12801
  source,
@@ -1,6 +1,7 @@
1
- import { A as NativeLeaseAdmissionSchema, Bn as createEvent, Dt as failureContributionCapability, E as FailureCounters, Ft as linkedStepOf, Hn as defineCustomActions, It as loadContributionCapability, M as NodeBenchRunnerInputSchema, Mn as errMsg, P as PIPELINE_RAMP, Pn as BaseAddon, Qn as nodePin, Qt as pipelineRunnerCapability, Rn as MODEL_FORMATS, V as ROOT_SUPPLIABLE_STEP_IDS, Vn as customAction, Xt as pickNativeLeaseOverride, Y as allowedSuppliedEffect, Yt as pickDetailCropConvention, _ as DEFAULT_DETAIL_CROP_CONVENTION, a as BackgroundRunRegistry, ar as boolean, cn as resolveModelBoundSetting, cr as literal, dn as resolveRootSupply, fn as rootSuppliesOf, gt as deriveRootFaceRefineRect, hr as EventCategory, ir as array, j as NativeLeaseSettingsSchema, lr as number, m as CROP_SUPPLY_SOURCES, mt as deriveDetailCropRect, nt as buildBenchStepTree, pr as string, rr as _enum, rt as cameraOwnsMotionViaSensor, sr as lazy, ur as object, x as DEVICE_RAMP, y as DEFAULT_NATIVE_LEASE_SETTINGS } from "../dist-mOyFhoa8.mjs";
2
- import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-Qmp6FkS2.mjs";
3
- import { a as stepsForElectedPool, b as getStepDefinition, d as rootObjectGate, f as localFrameRegistry, h as resolveFrameViewGeometry, i as placeDetailStep, l as resolveDefaultDetectionModel, m as createSessionDecodeCoordinator, p as isSessionDecodeReadGone, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, y as getStep } from "../custom-model-catalog-BW0-xhwJ.mjs";
1
+ import { $n as nodePin, $t as pipelineRunnerCapability, A as NativeLeaseAdmissionSchema, E as FailureCounters, Fn as BaseAddon, Hn as customAction, Lt as linkedStepOf, M as NodeBenchRunnerInputSchema, Nn as errMsg, P as PIPELINE_RAMP, Rt as loadContributionCapability, Un as defineCustomActions, V as ROOT_SUPPLIABLE_STEP_IDS, Vn as createEvent, Xt as pickDetailCropConvention, Y as allowedSuppliedEffect, Zt as pickNativeLeaseOverride, _ as DEFAULT_DETAIL_CROP_CONVENTION, a as BackgroundRunRegistry, ar as array, cr as lazy, dr as object, fn as resolveRootSupply, gr as EventCategory, gt as deriveRootFaceRefineRect, ir as _enum, j as NativeLeaseSettingsSchema, kt as failureContributionCapability, ln as resolveModelBoundSetting, lr as literal, m as CROP_SUPPLY_SOURCES, mr as string, mt as deriveDetailCropRect, nt as buildBenchStepTree, or as boolean, pn as rootSuppliesOf, rt as cameraOwnsMotionViaSensor, ur as number, x as DEVICE_RAMP, y as DEFAULT_NATIVE_LEASE_SETTINGS, zn as MODEL_FORMATS } from "../dist-BF60SjmI.mjs";
2
+ import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-DkphOOM2.mjs";
3
+ import { a as stepsForElectedPool, b as getStepDefinition, d as rootObjectGate, f as localFrameRegistry, h as resolveFrameViewGeometry, i as placeDetailStep, l as resolveDefaultDetectionModel, m as createSessionDecodeCoordinator, p as isSessionDecodeReadGone, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, y as getStep } from "../custom-model-catalog-wpMi2U7e.mjs";
4
+ import { i as SessionHwaccelSource } from "../worker-protocol-_avq7y8O.mjs";
4
5
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
5
6
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
7
  import { c as withDetectionIntent, o as preRollRequestOf, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
@@ -1766,6 +1767,7 @@ function startSessionDecodePump(deps) {
1766
1767
  return child;
1767
1768
  },
1768
1769
  lease: deps.lease,
1770
+ hwaccel: deps.hwaccel,
1769
1771
  logger: deps.logger,
1770
1772
  teardownMode: () => teardownMode,
1771
1773
  onSessionTeardown: (teardown) => {
@@ -4782,7 +4784,7 @@ function readRecoveryRecipe(settings) {
4782
4784
  * The recipe this camera's resolved step tree selects.
4783
4785
  *
4784
4786
  * Reads the ENABLED first-level detector's own settings, which is where
4785
- * `pipelineOrchestrator.setCameraStepOverride` writes a per-camera value. A
4787
+ * `pipelineOrchestrator.setCameraStepSettings` writes a per-camera value. A
4786
4788
  * tree with no enabled detector runs no second pass at all, so the answer
4787
4789
  * there is the shipped rule and it is never used.
4788
4790
  */
@@ -10947,6 +10949,14 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
10947
10949
  */
10948
10950
  resolveSessionLeaseKnobs = () => resolveNativeLeaseKnobs(process.env, this.nativeLease.current());
10949
10951
  /**
10952
+ * The decode hwaccel backends this node's kernel resolver offers (D926),
10953
+ * refreshed on the acquire leg with the lease knobs and read when `start` is
10954
+ * sent. A node whose libva cannot initialise the driver offers no vaapi/qsv,
10955
+ * so its session workers never try them.
10956
+ */
10957
+ sessionHwaccel = new SessionHwaccelSource();
10958
+ resolveSessionHwaccel = () => this.sessionHwaccel.current();
10959
+ /**
10950
10960
  * Refresh the lease knobs before a decode worker is spawned. Awaited on the
10951
10961
  * `acquire` leg of `startGuardedSessionDecode` (which always completes before
10952
10962
  * `startPump` forks), so the spawn sees a value at most one TTL stale rather
@@ -11539,6 +11549,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
11539
11549
  */
11540
11550
  async acquireSessionDecodeRestream(api, deviceId, streamId, tag, hostname, ownerNodeId, detectionIntent) {
11541
11551
  await this.refreshNativeLeaseSettings();
11552
+ await this.sessionHwaccel.refresh(this.ctxIfReady?.kernel.hwaccel);
11542
11553
  return acquireSessionDecodeRestreamFrom(api, this.ctx.logger, {
11543
11554
  deviceId,
11544
11555
  streamId,
@@ -11724,6 +11735,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
11724
11735
  return startSessionDecodePump({
11725
11736
  fork: this.forkDecodeWorkerWithLease,
11726
11737
  lease: this.resolveSessionLeaseKnobs,
11738
+ hwaccel: this.resolveSessionHwaccel,
11727
11739
  onWorkerGone: hooks.onWorkerGone,
11728
11740
  logger: log,
11729
11741
  source,
@@ -11905,6 +11917,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
11905
11917
  return startSessionDecodePump({
11906
11918
  fork: this.forkDecodeWorkerWithLease,
11907
11919
  lease: this.resolveSessionLeaseKnobs,
11920
+ hwaccel: this.resolveSessionHwaccel,
11908
11921
  onWorkerGone: hooks.onWorkerGone,
11909
11922
  logger: log,
11910
11923
  source,
@@ -12774,6 +12787,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
12774
12787
  return startSessionDecodePump({
12775
12788
  fork: this.forkDecodeWorkerWithLease,
12776
12789
  lease: this.resolveSessionLeaseKnobs,
12790
+ hwaccel: this.resolveSessionHwaccel,
12777
12791
  onWorkerGone: hooks.onWorkerGone,
12778
12792
  logger: log,
12779
12793
  source,
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-CoLjAw2z.js");
2
+ const require_dist = require("./dist-DUFGDd_2.js");
3
3
  let node_fs = require("node:fs");
4
4
  node_fs = require_chunk.__toESM(node_fs);
5
5
  let node_child_process = require("node:child_process");
@@ -1,4 +1,4 @@
1
- import { qt as parseProcStatus } from "./dist-mOyFhoa8.mjs";
1
+ import { Jt as parseProcStatus } from "./dist-BF60SjmI.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import { execFile } from "node:child_process";
4
4
  //#region src/shared/node-topology-platform.ts
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-emK7D4bc.js");
6
- const require_dist = require("../dist-CoLjAw2z.js");
7
- const require_node = require("../node-CzmiyMnw.js");
6
+ const require_dist = require("../dist-DUFGDd_2.js");
7
+ const require_node = require("../node-DzGVn7bD.js");
8
8
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
9
9
  const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
10
10
  let node_crypto = require("node:crypto");
@@ -22764,11 +22764,9 @@ var KIND_ORDER = [
22764
22764
  "motion",
22765
22765
  "audio"
22766
22766
  ];
22767
+ /** The ONE overlap rule, shared with every native clip source (D923). */
22767
22768
  function eventOverlapsVisit(event, visit, pad) {
22768
- if (event.timestamp >= visit.startMs && event.timestamp <= visit.endMs) return true;
22769
- const windowStart = event.timestamp - pad.preMs;
22770
- const windowEnd = event.timestamp + pad.postMs;
22771
- return windowStart < visit.endMs && windowEnd > visit.startMs;
22769
+ return require_dist.eventOverlapsClipWindow(event.timestamp, visit, pad);
22772
22770
  }
22773
22771
  function dominantKind(attached) {
22774
22772
  for (const kind of KIND_ORDER) if (attached.some((a) => a.kind === kind)) return kind;
@@ -22790,20 +22788,14 @@ function stillInstantMs(ranges) {
22790
22788
  return Math.floor((best.startMs + best.endMs) / 2);
22791
22789
  }
22792
22790
  /**
22793
- * The distinct object classes attached to a visit, most frequent first,
22794
- * capped at {@link MAX_CLIP_LABELS}. Empty when nothing classified overlapped
22795
- * — the caller then omits the field so a motion/audio-only visit keeps its
22796
- * kind label instead of carrying an empty array every consumer length-checks.
22791
+ * The distinct object classes attached to a visit, most frequent first —
22792
+ * the ONE ranking, shared with every native clip source (D923). Empty when
22793
+ * nothing classified overlapped — the caller then omits the field so a
22794
+ * motion/audio-only visit keeps its kind label instead of carrying an empty
22795
+ * array every consumer length-checks.
22797
22796
  */
22798
22797
  function dominantLabels(attached) {
22799
- const counts = /* @__PURE__ */ new Map();
22800
- for (const a of attached) {
22801
- if (a.kind !== "object") continue;
22802
- const name = a.event.className;
22803
- if (typeof name !== "string" || name.length === 0) continue;
22804
- counts.set(name, (counts.get(name) ?? 0) + 1);
22805
- }
22806
- return [...counts.entries()].toSorted((x, y) => y[1] - x[1]).slice(0, 3).map(([name]) => name);
22798
+ return require_dist.dominantClipLabels(attached.filter((a) => a.kind === "object").map((a) => a.event));
22807
22799
  }
22808
22800
  function visitsToClips(visits, events, pad, vouched) {
22809
22801
  const tagged = [
@@ -1,5 +1,5 @@
1
- import { An as DeviceFeature, B as RECORDING_SOURCE_CAMSTACK_ADDON, Bt as mayWriteToLocation, C as EVENT_PAD_MS, Dn as evaluateSensorEdge, Et as exportSubjectOf, G as VIDEOCLIPS_MAX_OFFER_BYTES, H as RecordingConfigSchema, Hn as defineCustomActions, Ht as migrateLegacyDeviceSignalConfig, It as loadContributionCapability, K as VISIT_MERGE_GAP_MS, Kn as hydrateSchema, Mn as errMsg$1, N as OpsLogEntrySchema, Nt as isFirstLevelMacroClass, Pn as BaseAddon, Qn as nodePin, R as RECORDING_EXPORT_MAX_READ_BYTES, S as EVENT_OWNER_TYPES, T as ExportRecordSchema, Tt as evictionPolicyOfLocation, U as RecordingSignalStatusSchema, Un as defineRecordKinds, Ut as modeMayWrite, Vn as customAction, Vt as memoizePinnedFfmpeg, Z as armRemovalReconcile, _n as storageOccupancyCapability, an as resolveCreateExportSubject, ar as boolean, at as clipExportFailure, dr as preprocess, en as recordingArchiveCapability, er as selectAssignedProfileSlots, fr as record, gn as storageEvictableCapability, hr as EventCategory, ht as deriveRecordingMode, ir as array, jn as DeviceType, kt as gbToBytes, lr as number, mn as startMoverUnderClearance, nn as recordingExportCapability, nr as userError, o as BatteryStatusSchema, ot as clipExportFailureOf, pr as string, pt as deriveBatteryPresence, rn as recordingSignalCapability, rr as _enum, s as CLIP_BROKER_PACED_RATES, sn as resolveLocationMode, tn as recordingCapability, tr as sleep$1, tt as batteryCapability, un as resolveRecordingProfiles, ur as object, v as DEFAULT_EVENTS_BAND_BUFFER_SEC, vt as deviceRemovalHookCapability, wt as evictionPolicyForMode, xn as videoclipsCapability, yn as stripRetiredBandPreBufferSec, z as RECORDING_SOURCE_CAMSTACK, zt as mayReadLocation } from "../dist-mOyFhoa8.mjs";
2
- import { i as NO_COST_CLAIM, o as physicalRootOf, t as ChildCostRegistry } from "../node-Qmp6FkS2.mjs";
1
+ import { $n as nodePin, B as RECORDING_SOURCE_CAMSTACK_ADDON, C as EVENT_PAD_MS, Dt as evictionPolicyOfLocation, Et as evictionPolicyForMode, Fn as BaseAddon, Ft as isFirstLevelMacroClass, G as VIDEOCLIPS_MAX_OFFER_BYTES, Gt as modeMayWrite, H as RecordingConfigSchema, Hn as customAction, Ht as mayWriteToLocation, K as VISIT_MERGE_GAP_MS, Mn as DeviceType, N as OpsLogEntrySchema, Nn as errMsg$1, On as evaluateSensorEdge, Ot as exportSubjectOf, R as RECORDING_EXPORT_MAX_READ_BYTES, Rt as loadContributionCapability, S as EVENT_OWNER_TYPES, Sn as videoclipsCapability, T as ExportRecordSchema, Tt as eventOverlapsClipWindow, U as RecordingSignalStatusSchema, Un as defineCustomActions, Ut as memoizePinnedFfmpeg, Vt as mayReadLocation, Wn as defineRecordKinds, Wt as migrateLegacyDeviceSignalConfig, Z as armRemovalReconcile, _n as storageEvictableCapability, ar as array, at as clipExportFailure, bn as stripRetiredBandPreBufferSec, cn as resolveLocationMode, dn as resolveRecordingProfiles, dr as object, fr as preprocess, gr as EventCategory, hn as startMoverUnderClearance, ht as deriveRecordingMode, in as recordingSignalCapability, ir as _enum, jn as DeviceFeature, jt as gbToBytes, mr as string, nn as recordingCapability, nr as sleep$1, o as BatteryStatusSchema, on as resolveCreateExportSubject, or as boolean, ot as clipExportFailureOf, pr as record, pt as deriveBatteryPresence, qn as hydrateSchema, rn as recordingExportCapability, rr as userError, s as CLIP_BROKER_PACED_RATES, tn as recordingArchiveCapability, tr as selectAssignedProfileSlots, tt as batteryCapability, ur as number, v as DEFAULT_EVENTS_BAND_BUFFER_SEC, vn as storageOccupancyCapability, vt as deviceRemovalHookCapability, yt as dominantClipLabels, z as RECORDING_SOURCE_CAMSTACK } from "../dist-BF60SjmI.mjs";
2
+ import { i as NO_COST_CLAIM, o as physicalRootOf, t as ChildCostRegistry } from "../node-DkphOOM2.mjs";
3
3
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
4
4
  import { d as PREBUFFER_MAX_MS, l as withRecordingIntent, r as RECORDING_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
5
5
  import { randomUUID } from "node:crypto";
@@ -22756,11 +22756,9 @@ var KIND_ORDER = [
22756
22756
  "motion",
22757
22757
  "audio"
22758
22758
  ];
22759
+ /** The ONE overlap rule, shared with every native clip source (D923). */
22759
22760
  function eventOverlapsVisit(event, visit, pad) {
22760
- if (event.timestamp >= visit.startMs && event.timestamp <= visit.endMs) return true;
22761
- const windowStart = event.timestamp - pad.preMs;
22762
- const windowEnd = event.timestamp + pad.postMs;
22763
- return windowStart < visit.endMs && windowEnd > visit.startMs;
22761
+ return eventOverlapsClipWindow(event.timestamp, visit, pad);
22764
22762
  }
22765
22763
  function dominantKind(attached) {
22766
22764
  for (const kind of KIND_ORDER) if (attached.some((a) => a.kind === kind)) return kind;
@@ -22782,20 +22780,14 @@ function stillInstantMs(ranges) {
22782
22780
  return Math.floor((best.startMs + best.endMs) / 2);
22783
22781
  }
22784
22782
  /**
22785
- * The distinct object classes attached to a visit, most frequent first,
22786
- * capped at {@link MAX_CLIP_LABELS}. Empty when nothing classified overlapped
22787
- * — the caller then omits the field so a motion/audio-only visit keeps its
22788
- * kind label instead of carrying an empty array every consumer length-checks.
22783
+ * The distinct object classes attached to a visit, most frequent first —
22784
+ * the ONE ranking, shared with every native clip source (D923). Empty when
22785
+ * nothing classified overlapped — the caller then omits the field so a
22786
+ * motion/audio-only visit keeps its kind label instead of carrying an empty
22787
+ * array every consumer length-checks.
22789
22788
  */
22790
22789
  function dominantLabels(attached) {
22791
- const counts = /* @__PURE__ */ new Map();
22792
- for (const a of attached) {
22793
- if (a.kind !== "object") continue;
22794
- const name = a.event.className;
22795
- if (typeof name !== "string" || name.length === 0) continue;
22796
- counts.set(name, (counts.get(name) ?? 0) + 1);
22797
- }
22798
- return [...counts.entries()].toSorted((x, y) => y[1] - x[1]).slice(0, 3).map(([name]) => name);
22790
+ return dominantClipLabels(attached.filter((a) => a.kind === "object").map((a) => a.event));
22799
22791
  }
22800
22792
  function visitsToClips(visits, events, pad, vouched) {
22801
22793
  const tagged = [
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
2
- import { Mn as errMsg } from "./dist-mOyFhoa8.mjs";
2
+ import { Nn as errMsg } from "./dist-BF60SjmI.mjs";
3
3
  import { spawn } from "node:child_process";
4
4
  //#region src/stream-broker/recorded/avcc-annexb.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-CoLjAw2z.js");
2
+ const require_dist = require("./dist-DUFGDd_2.js");
3
3
  let node_child_process = require("node:child_process");
4
4
  //#region src/stream-broker/recorded/avcc-annexb.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- const require_worker_protocol = require("../worker-protocol-C-G8qmye.js");
1
+ const require_worker_protocol = require("../worker-protocol-DngGEAT2.js");
2
2
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
3
3
  var OutboundSendTracker = class {
4
4
  inFlight = 0;
@@ -2500,23 +2500,6 @@ function buildDemuxerOptions(consumerTag) {
2500
2500
  user_agent: consumerTag
2501
2501
  };
2502
2502
  }
2503
- /** Ordered hwaccel candidates per platform — first successful create() wins, else software. */
2504
- function candidateBackends() {
2505
- switch (process.platform) {
2506
- case "darwin": return ["videotoolbox"];
2507
- case "linux": return [
2508
- "vaapi",
2509
- "qsv",
2510
- "cuda"
2511
- ];
2512
- case "win32": return [
2513
- "d3d11va",
2514
- "dxva2",
2515
- "cuda"
2516
- ];
2517
- default: return [];
2518
- }
2519
- }
2520
2503
  /** Map a canonical backend name to the node-av `AV_HWDEVICE_TYPE_*` constant. */
2521
2504
  function backendToHwDeviceConst(backend, consts) {
2522
2505
  switch (backend) {
@@ -2738,6 +2721,11 @@ var DecodeWorkerChild = class {
2738
2721
  */
2739
2722
  lease = null;
2740
2723
  /**
2724
+ * The hwaccel backends the node's resolver offered on `start` (D926);
2725
+ * `null` = unresolved, the platform order applies.
2726
+ */
2727
+ hwaccelOffer = null;
2728
+ /**
2741
2729
  * DEDICATED full-frame GPU→system download filtergraph
2742
2730
  * (`scale_<be>=iw:ih,hwdownload,format=nv12,format=yuv420p`) used ONLY to
2743
2731
  * materialize a HW surface into a leasable software frame at NATIVE
@@ -2928,7 +2916,7 @@ var DecodeWorkerChild = class {
2928
2916
  }
2929
2917
  switch (message.kind) {
2930
2918
  case "start":
2931
- this.handleStart(message.source, message.opts, message.lease);
2919
+ this.handleStart(message.source, message.opts, message.lease, message.hwaccel);
2932
2920
  return;
2933
2921
  case "pull":
2934
2922
  this.handlePull();
@@ -3076,7 +3064,7 @@ var DecodeWorkerChild = class {
3076
3064
  this.emitStderr(`decode-worker-child: WORKER IS LARGE — rssMb=${rssMb} ageS=${ageS} framesDecoded=${this.framesDecoded}. Siblings normally recycle in ~30s; a worker this size at this age is how the host ran out of memory on 2026-08-05.\n`);
3077
3065
  }
3078
3066
  }
3079
- handleStart(source, opts, lease) {
3067
+ handleStart(source, opts, lease, hwaccel) {
3080
3068
  if (this.started) {
3081
3069
  this.emitStderr("decode-worker-child: duplicate start ignored\n");
3082
3070
  return;
@@ -3084,6 +3072,7 @@ var DecodeWorkerChild = class {
3084
3072
  this.started = true;
3085
3073
  this.deviceId = source.deviceId;
3086
3074
  this.lease = lease;
3075
+ this.hwaccelOffer = hwaccel;
3087
3076
  this.leaseStore = buildLeaseStore(lease, (frameId) => this.settlePreRoll(frameId, "evicted"));
3088
3077
  this.tileStore = buildTileStore(lease.values.tileBudgetMb);
3089
3078
  this.sceneStore = buildTileStore(lease.values.sceneBudgetMb);
@@ -4375,7 +4364,9 @@ var DecodeWorkerChild = class {
4375
4364
  * that backend — otherwise it stays on the software path.
4376
4365
  */
4377
4366
  async ensureHwContext(nav, C) {
4378
- for (const backend of candidateBackends()) {
4367
+ const candidates = require_worker_protocol.sessionDecodeCandidates(process.platform, this.hwaccelOffer);
4368
+ if (candidates.length === 0) return;
4369
+ for (const backend of candidates) {
4379
4370
  const deviceType = backendToHwDeviceConst(backend, C);
4380
4371
  if (deviceType === null) continue;
4381
4372
  const hw = nav.HardwareContext.create(deviceType);
@@ -1,4 +1,4 @@
1
- import { i as formatNativeLeaseKnobs, n as isWorkerRequest, r as logLevelForLine } from "../worker-protocol-D_NzPcnh.mjs";
1
+ import { a as sessionDecodeCandidates, n as isWorkerRequest, o as formatNativeLeaseKnobs, r as logLevelForLine } from "../worker-protocol-_avq7y8O.mjs";
2
2
  import { n as setSharpWarnSink, r as hostExternalEntryUrls, t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  var OutboundSendTracker = class {
4
4
  inFlight = 0;
@@ -2500,23 +2500,6 @@ function buildDemuxerOptions(consumerTag) {
2500
2500
  user_agent: consumerTag
2501
2501
  };
2502
2502
  }
2503
- /** Ordered hwaccel candidates per platform — first successful create() wins, else software. */
2504
- function candidateBackends() {
2505
- switch (process.platform) {
2506
- case "darwin": return ["videotoolbox"];
2507
- case "linux": return [
2508
- "vaapi",
2509
- "qsv",
2510
- "cuda"
2511
- ];
2512
- case "win32": return [
2513
- "d3d11va",
2514
- "dxva2",
2515
- "cuda"
2516
- ];
2517
- default: return [];
2518
- }
2519
- }
2520
2503
  /** Map a canonical backend name to the node-av `AV_HWDEVICE_TYPE_*` constant. */
2521
2504
  function backendToHwDeviceConst(backend, consts) {
2522
2505
  switch (backend) {
@@ -2738,6 +2721,11 @@ var DecodeWorkerChild = class {
2738
2721
  */
2739
2722
  lease = null;
2740
2723
  /**
2724
+ * The hwaccel backends the node's resolver offered on `start` (D926);
2725
+ * `null` = unresolved, the platform order applies.
2726
+ */
2727
+ hwaccelOffer = null;
2728
+ /**
2741
2729
  * DEDICATED full-frame GPU→system download filtergraph
2742
2730
  * (`scale_<be>=iw:ih,hwdownload,format=nv12,format=yuv420p`) used ONLY to
2743
2731
  * materialize a HW surface into a leasable software frame at NATIVE
@@ -2928,7 +2916,7 @@ var DecodeWorkerChild = class {
2928
2916
  }
2929
2917
  switch (message.kind) {
2930
2918
  case "start":
2931
- this.handleStart(message.source, message.opts, message.lease);
2919
+ this.handleStart(message.source, message.opts, message.lease, message.hwaccel);
2932
2920
  return;
2933
2921
  case "pull":
2934
2922
  this.handlePull();
@@ -3076,7 +3064,7 @@ var DecodeWorkerChild = class {
3076
3064
  this.emitStderr(`decode-worker-child: WORKER IS LARGE — rssMb=${rssMb} ageS=${ageS} framesDecoded=${this.framesDecoded}. Siblings normally recycle in ~30s; a worker this size at this age is how the host ran out of memory on 2026-08-05.\n`);
3077
3065
  }
3078
3066
  }
3079
- handleStart(source, opts, lease) {
3067
+ handleStart(source, opts, lease, hwaccel) {
3080
3068
  if (this.started) {
3081
3069
  this.emitStderr("decode-worker-child: duplicate start ignored\n");
3082
3070
  return;
@@ -3084,6 +3072,7 @@ var DecodeWorkerChild = class {
3084
3072
  this.started = true;
3085
3073
  this.deviceId = source.deviceId;
3086
3074
  this.lease = lease;
3075
+ this.hwaccelOffer = hwaccel;
3087
3076
  this.leaseStore = buildLeaseStore(lease, (frameId) => this.settlePreRoll(frameId, "evicted"));
3088
3077
  this.tileStore = buildTileStore(lease.values.tileBudgetMb);
3089
3078
  this.sceneStore = buildTileStore(lease.values.sceneBudgetMb);
@@ -4375,7 +4364,9 @@ var DecodeWorkerChild = class {
4375
4364
  * that backend — otherwise it stays on the software path.
4376
4365
  */
4377
4366
  async ensureHwContext(nav, C) {
4378
- for (const backend of candidateBackends()) {
4367
+ const candidates = sessionDecodeCandidates(process.platform, this.hwaccelOffer);
4368
+ if (candidates.length === 0) return;
4369
+ for (const backend of candidates) {
4379
4370
  const deviceType = backendToHwDeviceConst(backend, C);
4380
4371
  if (deviceType === null) continue;
4381
4372
  const hw = nav.HardwareContext.create(deviceType);
@@ -1,7 +1,7 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dx-WrMx0.mjs";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CNoWeZHH.mjs";
2
2
  import { a as m, i as h, n as g, o as _, r as v, t as y } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
3
3
  import { n as b, r as x, t as S } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
4
- import { t as C } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BaoBRCJs.mjs";
4
+ import { t as C } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-H6RKsaiZ.mjs";
5
5
  import { n as w, t as T } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
6
6
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
7
7
  var E = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), D = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), O = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), k = (e) => {
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.402",
21
+ version: "1.2.404",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_stream_broker_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.318",
36
+ version: "1.2.319",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_stream_broker_widgets",