@camstack/addon-pipeline 1.2.375 → 1.2.601

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 (34) 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-DF5qs8u4.mjs → custom-model-catalog-CK9GK3N5.mjs} +2 -2
  4. package/dist/{custom-model-catalog-gbLoUFki.js → custom-model-catalog-DgyafyuW.js} +2 -2
  5. package/dist/detection-pipeline/index.js +4 -4
  6. package/dist/detection-pipeline/index.mjs +4 -4
  7. package/dist/{dist-QyeZXkAO.mjs → dist-BaHsDOWa.mjs} +391 -22
  8. package/dist/{dist-C0Mg8e3I.js → dist-BqI10eLV.js} +396 -21
  9. package/dist/{model-catalogs-CIE4Dz4x.mjs → model-catalogs-DM5sVj1T.mjs} +1 -1
  10. package/dist/{model-catalogs-BTuX-P0k.js → model-catalogs-DhGVt_sH.js} +1 -1
  11. package/dist/motion-wasm/index.js +1 -1
  12. package/dist/motion-wasm/index.mjs +1 -1
  13. package/dist/{node-ndjp9DQO.mjs → node-B0a0dXhg.mjs} +38 -3
  14. package/dist/{node-CifGKjsd.js → node-CgwqjGz0.js} +42 -1
  15. package/dist/pipeline-runner/index.js +4 -4
  16. package/dist/pipeline-runner/index.mjs +4 -4
  17. package/dist/{process-memory-BMfSP5-i.js → process-memory-C0zbWvwD.js} +1 -1
  18. package/dist/{process-memory-CaMI-Ry2.mjs → process-memory-sfdcLVkW.mjs} +1 -1
  19. package/dist/recorder/index.js +343 -516
  20. package/dist/recorder/index.mjs +343 -516
  21. package/dist/{segment-demux-js-LhwVw18z.js → segment-demux-js-B9lL2VCC.js} +1 -1
  22. package/dist/{segment-demux-js-CLXBgUTo.mjs → segment-demux-js-BB4CUAB5.mjs} +1 -1
  23. package/dist/stream-broker/_stub.js +2 -2
  24. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B4MD_B4k.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CbN9DjoK.mjs} +3 -3
  25. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvMrdOCD.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Boq8JqyD.mjs} +1 -1
  26. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B25q1OKG.mjs +26 -0
  27. package/dist/stream-broker/demux-worker-child.js +1 -1
  28. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  29. package/dist/stream-broker/{hostInit-DBDp5YHD.mjs → hostInit-BSYHAfPt.mjs} +3 -3
  30. package/dist/stream-broker/index.js +10 -9
  31. package/dist/stream-broker/index.mjs +10 -9
  32. package/dist/stream-broker/remoteEntry.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JVFs9LgI.mjs +0 -26
@@ -1,8 +1,8 @@
1
- import { An as errMsg, Cn as Fmp4BoxSplitter, Dn as isSoftwareDecode, wn as buildFfmpegArgs } from "./dist-QyeZXkAO.mjs";
1
+ import { An as errMsg, Cn as Fmp4BoxSplitter, Dn as isSoftwareDecode, wn as buildFfmpegArgs } from "./dist-BaHsDOWa.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { realpathSync } from "node:fs";
4
4
  import path from "node:path";
5
- import { execFile } from "node:child_process";
5
+ import { execFile, spawn } from "node:child_process";
6
6
  import "node:zlib";
7
7
  import { readFile } from "node:fs/promises";
8
8
  process.platform, process.env["SystemRoot"];
@@ -614,6 +614,41 @@ var Fmp4FragmentPlane = class {
614
614
  }
615
615
  };
616
616
  /**
617
+ * `FfmpegProcess` — the ONE spawn/lifecycle wrapper for a live-media ffmpeg.
618
+ *
619
+ * Extracted from `TranscodeEgress.spawnAttempt`, which was already the most
620
+ * complete of the repo's hand-rolled lifecycles: first-data deadline, hardware
621
+ * →software retry, SIGTERM-then-SIGKILL. This generalises it and adds the two
622
+ * things every copy was missing — a `tags: { deviceId }` on every line, and a
623
+ * bounded restart — so a consumer gets them by construction instead of by
624
+ * remembering.
625
+ *
626
+ * ## What it owns
627
+ *
628
+ * - spawn, with the argv from the ONE builder (`./invocation.js`);
629
+ * - a FIRST-DATA deadline: an ffmpeg that starts but never emits is dead, and
630
+ * nothing downstream can tell that apart from a slow camera;
631
+ * - HARDWARE→SOFTWARE retry, announced at `warn`. A silent downgrade on this
632
+ * hub is a flow bug, not a capability limit — see `docs/design/decode-path.md`;
633
+ * - exit classification (`ok` / `signalled-by-us` / `crashed` / `no-output`);
634
+ * - bounded restart with backoff, and a terminal give-up (never an infinite
635
+ * loop — the same rule `CrashSupervisor` enforces for runners, D6);
636
+ * - SIGTERM then SIGKILL after a grace, gated on the child not having already
637
+ * exited.
638
+ *
639
+ * ## What it does NOT own
640
+ *
641
+ * The output PLUMBING. A consumer attaches to `stdout` / `stderr` itself,
642
+ * because what the bytes mean is the consumer's business: the broker deframes
643
+ * Annex-B into a restreamer, the WebRTC leg regroups access units, HomeKit
644
+ * writes nothing to stdout at all (its output is two RTP sockets). A wrapper
645
+ * that also owned the bytes would need a mode per consumer, which is the same
646
+ * mistake as one builder per consumer.
647
+ */
648
+ function defaultFfmpegSpawn(command, args, options) {
649
+ return spawn(command, args, options ?? {});
650
+ }
651
+ /**
617
652
  * The registry an addon claims its OWN child processes in — the spawn-site
618
653
  * half of `load-contribution.cap.ts`.
619
654
  *
@@ -835,4 +870,4 @@ function physicalRootOf(root, realpath = realpathSync) {
835
870
  }
836
871
  }
837
872
  //#endregion
838
- export { physicalRootOf as a, NO_COST_CLAIM as i, Fmp4FragmentChild as n, probeFfmpegBinary as o, Fmp4FragmentPlane as r, readProcessCost as s, ChildCostRegistry as t };
873
+ export { defaultFfmpegSpawn as a, readProcessCost as c, NO_COST_CLAIM as i, Fmp4FragmentChild as n, physicalRootOf as o, Fmp4FragmentPlane as r, probeFfmpegBinary as s, ChildCostRegistry as t };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-C0Mg8e3I.js");
2
+ const require_dist = require("./dist-BqI10eLV.js");
3
3
  require("node:os");
4
4
  let node_crypto = require("node:crypto");
5
5
  let node_fs = require("node:fs");
@@ -618,6 +618,41 @@ var Fmp4FragmentPlane = class {
618
618
  }
619
619
  };
620
620
  /**
621
+ * `FfmpegProcess` — the ONE spawn/lifecycle wrapper for a live-media ffmpeg.
622
+ *
623
+ * Extracted from `TranscodeEgress.spawnAttempt`, which was already the most
624
+ * complete of the repo's hand-rolled lifecycles: first-data deadline, hardware
625
+ * →software retry, SIGTERM-then-SIGKILL. This generalises it and adds the two
626
+ * things every copy was missing — a `tags: { deviceId }` on every line, and a
627
+ * bounded restart — so a consumer gets them by construction instead of by
628
+ * remembering.
629
+ *
630
+ * ## What it owns
631
+ *
632
+ * - spawn, with the argv from the ONE builder (`./invocation.js`);
633
+ * - a FIRST-DATA deadline: an ffmpeg that starts but never emits is dead, and
634
+ * nothing downstream can tell that apart from a slow camera;
635
+ * - HARDWARE→SOFTWARE retry, announced at `warn`. A silent downgrade on this
636
+ * hub is a flow bug, not a capability limit — see `docs/design/decode-path.md`;
637
+ * - exit classification (`ok` / `signalled-by-us` / `crashed` / `no-output`);
638
+ * - bounded restart with backoff, and a terminal give-up (never an infinite
639
+ * loop — the same rule `CrashSupervisor` enforces for runners, D6);
640
+ * - SIGTERM then SIGKILL after a grace, gated on the child not having already
641
+ * exited.
642
+ *
643
+ * ## What it does NOT own
644
+ *
645
+ * The output PLUMBING. A consumer attaches to `stdout` / `stderr` itself,
646
+ * because what the bytes mean is the consumer's business: the broker deframes
647
+ * Annex-B into a restreamer, the WebRTC leg regroups access units, HomeKit
648
+ * writes nothing to stdout at all (its output is two RTP sockets). A wrapper
649
+ * that also owned the bytes would need a mode per consumer, which is the same
650
+ * mistake as one builder per consumer.
651
+ */
652
+ function defaultFfmpegSpawn(command, args, options) {
653
+ return (0, node_child_process.spawn)(command, args, options ?? {});
654
+ }
655
+ /**
621
656
  * The registry an addon claims its OWN child processes in — the spawn-site
622
657
  * half of `load-contribution.cap.ts`.
623
658
  *
@@ -863,6 +898,12 @@ Object.defineProperty(exports, "NO_COST_CLAIM", {
863
898
  return NO_COST_CLAIM;
864
899
  }
865
900
  });
901
+ Object.defineProperty(exports, "defaultFfmpegSpawn", {
902
+ enumerable: true,
903
+ get: function() {
904
+ return defaultFfmpegSpawn;
905
+ }
906
+ });
866
907
  Object.defineProperty(exports, "physicalRootOf", {
867
908
  enumerable: true,
868
909
  get: function() {
@@ -3,9 +3,9 @@ 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-C0Mg8e3I.js");
7
- const require_node = require("../node-CifGKjsd.js");
8
- const require_custom_model_catalog = require("../custom-model-catalog-gbLoUFki.js");
6
+ const require_dist = require("../dist-BqI10eLV.js");
7
+ const require_node = require("../node-CgwqjGz0.js");
8
+ const require_custom_model_catalog = require("../custom-model-catalog-DgyafyuW.js");
9
9
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
10
10
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
11
11
  const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
@@ -9977,7 +9977,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
9977
9977
  motionSourcesType: Array.isArray(config.motionSources) ? `array(${config.motionSources.length})` : typeof config.motionSources,
9978
9978
  motionStreamId: config.motionStreamId,
9979
9979
  detectionStreamId: config.detectionStreamId,
9980
- keys: Object.keys(config)
9980
+ keys: Reflect.ownKeys(config).filter((k) => typeof k === "string")
9981
9981
  }
9982
9982
  });
9983
9983
  if (this.attached.has(config.deviceId)) this.detachInternal(config.deviceId);
@@ -1,6 +1,6 @@
1
- import { A as NativeLeaseAdmissionSchema, An as errMsg, Bn as defineCustomActions, E as FailureCounters, Et as failureContributionCapability, Ft as loadContributionCapability, In as MODEL_FORMATS, Jt as pickDetailCropConvention, M as NodeBenchRunnerInputSchema, Mn as BaseAddon, P as PIPELINE_RAMP, Pt as linkedStepOf, Rn as createEvent, V as ROOT_SUPPLIABLE_STEP_IDS, Y as allowedSuppliedEffect, Yn as nodePin, Yt as pickNativeLeaseOverride, Zt as pipelineRunnerCapability, _ as DEFAULT_DETAIL_CROP_CONVENTION, a as BackgroundRunRegistry, ar as literal, dn as rootSuppliesOf, er as _enum, fr as EventCategory, gt as deriveRootFaceRefineRect, ir as lazy, j as NativeLeaseSettingsSchema, m as CROP_SUPPLY_SOURCES, mt as deriveDetailCropRect, nr as boolean, nt as buildBenchStepTree, or as number, rt as cameraOwnsMotionViaSensor, sn as resolveModelBoundSetting, sr as object, tr as array, un as resolveRootSupply, ur as string, x as DEVICE_RAMP, y as DEFAULT_NATIVE_LEASE_SETTINGS, zn as customAction } from "../dist-QyeZXkAO.mjs";
2
- import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-ndjp9DQO.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-DF5qs8u4.mjs";
1
+ import { A as NativeLeaseAdmissionSchema, An as errMsg, Bn as defineCustomActions, E as FailureCounters, Et as failureContributionCapability, Ft as loadContributionCapability, In as MODEL_FORMATS, Jt as pickDetailCropConvention, M as NodeBenchRunnerInputSchema, Mn as BaseAddon, P as PIPELINE_RAMP, Pt as linkedStepOf, Rn as createEvent, V as ROOT_SUPPLIABLE_STEP_IDS, Xn as nodePin, Y as allowedSuppliedEffect, Yt as pickNativeLeaseOverride, Zt as pipelineRunnerCapability, _ as DEFAULT_DETAIL_CROP_CONVENTION, a as BackgroundRunRegistry, ar as lazy, cr as object, dn as rootSuppliesOf, dr as string, gt as deriveRootFaceRefineRect, j as NativeLeaseSettingsSchema, m as CROP_SUPPLY_SOURCES, mt as deriveDetailCropRect, nr as array, nt as buildBenchStepTree, or as literal, pr as EventCategory, rr as boolean, rt as cameraOwnsMotionViaSensor, sn as resolveModelBoundSetting, sr as number, tr as _enum, un as resolveRootSupply, x as DEVICE_RAMP, y as DEFAULT_NATIVE_LEASE_SETTINGS, zn as customAction } from "../dist-BaHsDOWa.mjs";
2
+ import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-B0a0dXhg.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-CK9GK3N5.mjs";
4
4
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
6
  import { c as withDetectionIntent, o as preRollRequestOf, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
@@ -9969,7 +9969,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
9969
9969
  motionSourcesType: Array.isArray(config.motionSources) ? `array(${config.motionSources.length})` : typeof config.motionSources,
9970
9970
  motionStreamId: config.motionStreamId,
9971
9971
  detectionStreamId: config.detectionStreamId,
9972
- keys: Object.keys(config)
9972
+ keys: Reflect.ownKeys(config).filter((k) => typeof k === "string")
9973
9973
  }
9974
9974
  });
9975
9975
  if (this.attached.has(config.deviceId)) this.detachInternal(config.deviceId);
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-C0Mg8e3I.js");
2
+ const require_dist = require("./dist-BqI10eLV.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 { Kt as parseProcStatus } from "./dist-QyeZXkAO.mjs";
1
+ import { Kt as parseProcStatus } from "./dist-BaHsDOWa.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