@camstack/addon-pipeline 1.2.187 → 1.2.189

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 (36) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/detection-pipeline/index.js +5 -5
  4. package/dist/detection-pipeline/index.mjs +4 -4
  5. package/dist/{dist-e2OKAUGI.js → dist-CKr6Q6Qu.js} +45 -1
  6. package/dist/{dist-HWdaHLLK.mjs → dist-CxYG8IUX.mjs} +45 -1
  7. package/dist/{lazy-sharp-AJ7newgl.js → lazy-sharp-D-HdRPo5.js} +1 -1
  8. package/dist/{local-frame-registry-Cl1VUpx_.js → local-frame-registry-B4Bd4tnU.js} +1 -1
  9. package/dist/{local-frame-registry-Bki81rM0.mjs → local-frame-registry-DP5yyEWE.mjs} +1 -1
  10. package/dist/motion-wasm/index.js +2 -2
  11. package/dist/motion-wasm/index.mjs +1 -1
  12. package/dist/{node-Dw6FrDFS.js → node-CmRTB9W4.js} +1 -1
  13. package/dist/{node-CwSBH-3M.mjs → node-DhccO0of.mjs} +1 -1
  14. package/dist/pipeline-runner/index.js +62 -8
  15. package/dist/pipeline-runner/index.mjs +61 -7
  16. package/dist/{process-memory-einpgBTr.js → process-memory-BW7XFoPY.js} +1 -1
  17. package/dist/{process-memory-CnTmyk9s.mjs → process-memory-L6mHI28P.mjs} +1 -1
  18. package/dist/recorder/index.js +3 -2
  19. package/dist/recorder/index.mjs +3 -2
  20. package/dist/{segment-demux-js-CyCdXcFZ.js → segment-demux-js-BTSHcSwg.js} +1 -1
  21. package/dist/{segment-demux-js-CuNHMubE.mjs → segment-demux-js-D2zZJQU4.mjs} +1 -1
  22. package/dist/session-decode/decode-worker-child.js +2 -2
  23. package/dist/session-decode/decode-worker-child.mjs +1 -1
  24. package/dist/stream-broker/_stub.js +2 -2
  25. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CWa6ONcK.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BttlkJ1n.mjs} +3 -3
  26. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BC1EK38M.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BFlcZNb6.mjs} +1 -1
  27. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D5XwN-xi.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-ZzdpzejS.mjs} +1 -1
  28. package/dist/stream-broker/demux-worker-child.js +1 -1
  29. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  30. package/dist/stream-broker/{hostInit-DUqxWCSo.mjs → hostInit-BlXTzO4s.mjs} +3 -3
  31. package/dist/stream-broker/index.js +3 -3
  32. package/dist/stream-broker/index.mjs +3 -3
  33. package/dist/stream-broker/remoteEntry.js +1 -1
  34. package/dist/{worker-protocol-DN1y2Vyk.mjs → worker-protocol-Br-omhiX.mjs} +1 -1
  35. package/dist/{worker-protocol-Bva8nEZO.js → worker-protocol-C8ZBUm08.js} +1 -1
  36. package/package.json +1 -1
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-e2OKAUGI.js");
6
- const require_process_memory = require("../process-memory-einpgBTr.js");
5
+ const require_dist = require("../dist-CKr6Q6Qu.js");
6
+ const require_process_memory = require("../process-memory-BW7XFoPY.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_dist.__toESM(node_fs);
9
9
  let node_path = require("node:path");
@@ -1,6 +1,6 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { A as audioAnalysisCapability, It as hydrateSchema, S as PoolMemoryWatchdog, _t as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, jt as BaseAddon, n as AUDIO_BACKEND_CHOICES, nt as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL, wt as errMsg } from "../dist-HWdaHLLK.mjs";
3
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-CnTmyk9s.mjs";
2
+ import { A as audioAnalysisCapability, It as hydrateSchema, S as PoolMemoryWatchdog, _t as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, jt as BaseAddon, n as AUDIO_BACKEND_CHOICES, nt as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL, wt as errMsg } from "../dist-CxYG8IUX.mjs";
3
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-L6mHI28P.mjs";
4
4
  import * as fs from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  import { downloadFile } from "@camstack/system/addon-utils";
@@ -2,12 +2,12 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-e2OKAUGI.js");
6
- const require_node = require("../node-Dw6FrDFS.js");
7
- const require_local_frame_registry = require("../local-frame-registry-Cl1VUpx_.js");
8
- const require_lazy_sharp = require("../lazy-sharp-AJ7newgl.js");
5
+ const require_dist = require("../dist-CKr6Q6Qu.js");
6
+ const require_node = require("../node-CmRTB9W4.js");
7
+ const require_local_frame_registry = require("../local-frame-registry-B4Bd4tnU.js");
8
+ const require_lazy_sharp = require("../lazy-sharp-D-HdRPo5.js");
9
9
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
10
- const require_process_memory = require("../process-memory-einpgBTr.js");
10
+ const require_process_memory = require("../process-memory-BW7XFoPY.js");
11
11
  let node_fs = require("node:fs");
12
12
  node_fs = require_dist.__toESM(node_fs);
13
13
  let node_path = require("node:path");
@@ -1,10 +1,10 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { Bt as nodePin, Ft as createEvent, It as hydrateSchema, Kt as array, O as YAMNET_TO_MACRO, Q as inferModelProvider, Qt as object, S as PoolMemoryWatchdog, St as supportedRuntimes$1, Vt as parseJsonUnknown, W as detectionPipelineCapability, Wt as sleep, Y as evaluateZoneRules, _t as resolvePoolMemoryPolicy, at as overlayClusterStepSettings, c as DEFAULT_CLUSTER_STEP_MODELS, ct as pickClusterStepSettings, dt as pipelineExecutorCapability, en as string, et as loadContributionCapability, ht as resolveClusterStepModelId, jt as BaseAddon, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, q as enumerateInferenceDevices, st as pickClusterStepModels, t as APPLE_SA_TO_MACRO, tn as union, wt as errMsg, yt as runtimeDevices$1, z as defaultDeviceFor$1 } from "../dist-HWdaHLLK.mjs";
3
- import { a as readProcessCost } from "../node-CwSBH-3M.mjs";
4
- import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep, t as localFrameRegistry, u as landmarkPrecisionVerdict } from "../local-frame-registry-Bki81rM0.mjs";
2
+ import { Bt as nodePin, Ft as createEvent, It as hydrateSchema, Kt as array, O as YAMNET_TO_MACRO, Q as inferModelProvider, Qt as object, S as PoolMemoryWatchdog, St as supportedRuntimes$1, Vt as parseJsonUnknown, W as detectionPipelineCapability, Wt as sleep, Y as evaluateZoneRules, _t as resolvePoolMemoryPolicy, at as overlayClusterStepSettings, c as DEFAULT_CLUSTER_STEP_MODELS, ct as pickClusterStepSettings, dt as pipelineExecutorCapability, en as string, et as loadContributionCapability, ht as resolveClusterStepModelId, jt as BaseAddon, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, q as enumerateInferenceDevices, st as pickClusterStepModels, t as APPLE_SA_TO_MACRO, tn as union, wt as errMsg, yt as runtimeDevices$1, z as defaultDeviceFor$1 } from "../dist-CxYG8IUX.mjs";
3
+ import { a as readProcessCost } from "../node-DhccO0of.mjs";
4
+ import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep, t as localFrameRegistry, u as landmarkPrecisionVerdict } from "../local-frame-registry-DP5yyEWE.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
6
  import { n as startEventLoopStallMonitor } from "../event-loop-stall-monitor-DXLNBMkY.mjs";
7
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-CnTmyk9s.mjs";
7
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-L6mHI28P.mjs";
8
8
  import * as fs from "node:fs";
9
9
  import * as path$1 from "node:path";
10
10
  import { dirname, join } from "node:path";
@@ -21542,6 +21542,33 @@ var RecentTracksQueryInput = object({
21542
21542
  */
21543
21543
  classes: array(string()).optional()
21544
21544
  });
21545
+ /**
21546
+ * A Summary (D359): the per-camera session envelope that references tracks.
21547
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
21548
+ * served by the event-media plane by key), null until the first frame with a
21549
+ * member visible has been materialised.
21550
+ */
21551
+ var SummarySchema = object({
21552
+ id: string(),
21553
+ deviceId: number(),
21554
+ openedAt: number(),
21555
+ lastActiveAt: number(),
21556
+ sealedAt: number().nullable(),
21557
+ memberCount: number().int().nonnegative(),
21558
+ groupShotKey: string().nullable()
21559
+ });
21560
+ var SummariesQueryInput = object({
21561
+ deviceIds: array(number()).min(1),
21562
+ since: number().optional(),
21563
+ until: number().optional(),
21564
+ limit: number().int().min(1).max(200).default(50)
21565
+ });
21566
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
21567
+ var SummaryDetailSchema = object({
21568
+ summary: SummarySchema,
21569
+ /** Member track ids, in absorption order. */
21570
+ trackIds: array(string()).readonly()
21571
+ });
21545
21572
  var RecentTracksPageSchema = object({
21546
21573
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
21547
21574
  tracks: array(TrackSchema).readonly(),
@@ -21942,7 +21969,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21942
21969
  * timeline would read as a camera that saw nothing.
21943
21970
  */
21944
21971
  classes: array(string()).optional()
21945
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
21972
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
21946
21973
  kind: "mutation",
21947
21974
  auth: "admin"
21948
21975
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -35592,6 +35619,12 @@ Object.freeze({
35592
35619
  addonId: null,
35593
35620
  access: "view"
35594
35621
  },
35622
+ "pipelineAnalytics.getSummary": {
35623
+ capName: "pipeline-analytics",
35624
+ capScope: "device",
35625
+ addonId: null,
35626
+ access: "view"
35627
+ },
35595
35628
  "pipelineAnalytics.getTrack": {
35596
35629
  capName: "pipeline-analytics",
35597
35630
  capScope: "device",
@@ -35670,6 +35703,12 @@ Object.freeze({
35670
35703
  addonId: null,
35671
35704
  access: "view"
35672
35705
  },
35706
+ "pipelineAnalytics.listSummaries": {
35707
+ capName: "pipeline-analytics",
35708
+ capScope: "device",
35709
+ addonId: null,
35710
+ access: "view"
35711
+ },
35673
35712
  "pipelineAnalytics.listTrackMedia": {
35674
35713
  capName: "pipeline-analytics",
35675
35714
  capScope: "device",
@@ -39365,6 +39404,11 @@ Object.freeze({
39365
39404
  form: "array",
39366
39405
  optional: true
39367
39406
  }],
39407
+ "pipelineAnalytics.listSummaries": [{
39408
+ name: "deviceIds",
39409
+ form: "array",
39410
+ optional: false
39411
+ }],
39368
39412
  "pipelineAnalytics.listTrackMedia": [{
39369
39413
  name: "deviceId",
39370
39414
  form: "single",
@@ -21519,6 +21519,33 @@ var RecentTracksQueryInput = object({
21519
21519
  */
21520
21520
  classes: array(string()).optional()
21521
21521
  });
21522
+ /**
21523
+ * A Summary (D359): the per-camera session envelope that references tracks.
21524
+ * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
21525
+ * served by the event-media plane by key), null until the first frame with a
21526
+ * member visible has been materialised.
21527
+ */
21528
+ var SummarySchema = object({
21529
+ id: string(),
21530
+ deviceId: number(),
21531
+ openedAt: number(),
21532
+ lastActiveAt: number(),
21533
+ sealedAt: number().nullable(),
21534
+ memberCount: number().int().nonnegative(),
21535
+ groupShotKey: string().nullable()
21536
+ });
21537
+ var SummariesQueryInput = object({
21538
+ deviceIds: array(number()).min(1),
21539
+ since: number().optional(),
21540
+ until: number().optional(),
21541
+ limit: number().int().min(1).max(200).default(50)
21542
+ });
21543
+ var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
21544
+ var SummaryDetailSchema = object({
21545
+ summary: SummarySchema,
21546
+ /** Member track ids, in absorption order. */
21547
+ trackIds: array(string()).readonly()
21548
+ });
21522
21549
  var RecentTracksPageSchema = object({
21523
21550
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
21524
21551
  tracks: array(TrackSchema).readonly(),
@@ -21919,7 +21946,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21919
21946
  * timeline would read as a camera that saw nothing.
21920
21947
  */
21921
21948
  classes: array(string()).optional()
21922
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
21949
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
21923
21950
  kind: "mutation",
21924
21951
  auth: "admin"
21925
21952
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -35569,6 +35596,12 @@ Object.freeze({
35569
35596
  addonId: null,
35570
35597
  access: "view"
35571
35598
  },
35599
+ "pipelineAnalytics.getSummary": {
35600
+ capName: "pipeline-analytics",
35601
+ capScope: "device",
35602
+ addonId: null,
35603
+ access: "view"
35604
+ },
35572
35605
  "pipelineAnalytics.getTrack": {
35573
35606
  capName: "pipeline-analytics",
35574
35607
  capScope: "device",
@@ -35647,6 +35680,12 @@ Object.freeze({
35647
35680
  addonId: null,
35648
35681
  access: "view"
35649
35682
  },
35683
+ "pipelineAnalytics.listSummaries": {
35684
+ capName: "pipeline-analytics",
35685
+ capScope: "device",
35686
+ addonId: null,
35687
+ access: "view"
35688
+ },
35650
35689
  "pipelineAnalytics.listTrackMedia": {
35651
35690
  capName: "pipeline-analytics",
35652
35691
  capScope: "device",
@@ -39342,6 +39381,11 @@ Object.freeze({
39342
39381
  form: "array",
39343
39382
  optional: true
39344
39383
  }],
39384
+ "pipelineAnalytics.listSummaries": [{
39385
+ name: "deviceIds",
39386
+ form: "array",
39387
+ optional: false
39388
+ }],
39345
39389
  "pipelineAnalytics.listTrackMedia": [{
39346
39390
  name: "deviceId",
39347
39391
  form: "single",
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-e2OKAUGI.js");
1
+ const require_dist = require("./dist-CKr6Q6Qu.js");
2
2
  let node_path = require("node:path");
3
3
  node_path = require_dist.__toESM(node_path);
4
4
  let node_url = require("node:url");
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-e2OKAUGI.js");
1
+ const require_dist = require("./dist-CKr6Q6Qu.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -1,4 +1,4 @@
1
- import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-HWdaHLLK.mjs";
1
+ import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-CxYG8IUX.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-e2OKAUGI.js");
6
- const require_lazy_sharp = require("../lazy-sharp-AJ7newgl.js");
5
+ const require_dist = require("../dist-CKr6Q6Qu.js");
6
+ const require_lazy_sharp = require("../lazy-sharp-D-HdRPo5.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
9
9
  //#region src/motion-wasm/wasm-motion-detector.ts
@@ -1,4 +1,4 @@
1
- import { It as hydrateSchema, Pt as DeviceType, Y as evaluateZoneRules, it as motionDetectionCapability, jt as BaseAddon } from "../dist-HWdaHLLK.mjs";
1
+ import { It as hydrateSchema, Pt as DeviceType, Y as evaluateZoneRules, it as motionDetectionCapability, jt as BaseAddon } from "../dist-CxYG8IUX.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
- const require_dist = require("./dist-e2OKAUGI.js");
1
+ const require_dist = require("./dist-CKr6Q6Qu.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  let node_fs = require("node:fs");
4
4
  node_fs = require_dist.__toESM(node_fs, 1);
@@ -1,4 +1,4 @@
1
- import { Dt as buildFfmpegArgs, Et as Fmp4BoxSplitter, kt as isSoftwareDecode, wt as errMsg } from "./dist-HWdaHLLK.mjs";
1
+ import { Dt as buildFfmpegArgs, Et as Fmp4BoxSplitter, kt as isSoftwareDecode, wt as errMsg } from "./dist-CxYG8IUX.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import "node:fs";
4
4
  import "node:path";
@@ -2,12 +2,12 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-e2OKAUGI.js");
6
- const require_node = require("../node-Dw6FrDFS.js");
7
- const require_local_frame_registry = require("../local-frame-registry-Cl1VUpx_.js");
8
- const require_worker_protocol = require("../worker-protocol-Bva8nEZO.js");
5
+ const require_dist = require("../dist-CKr6Q6Qu.js");
6
+ const require_node = require("../node-CmRTB9W4.js");
7
+ const require_local_frame_registry = require("../local-frame-registry-B4Bd4tnU.js");
8
+ const require_worker_protocol = require("../worker-protocol-C8ZBUm08.js");
9
9
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
10
- const require_lazy_sharp = require("../lazy-sharp-AJ7newgl.js");
10
+ const require_lazy_sharp = require("../lazy-sharp-D-HdRPo5.js");
11
11
  const require_restream_intent = require("../restream-intent-Cv9x3jmu.js");
12
12
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
13
13
  const require_remote_restream = require("../remote-restream-CO36Sr30.js");
@@ -301,6 +301,16 @@ var DEFAULT_NODE_DECODE_BUDGET_MB = 8192;
301
301
  * `native-lease-config.ts` on why "unset" includes a knob sitting at its
302
302
  * default); anything absent falls back to what the worker ships with.
303
303
  */
304
+ /**
305
+ * How many frames of one camera the runner may have in inference at once:
306
+ * the worker's hold minus one, never below one. The hold evicts oldest-first
307
+ * when a newer marked frame lands, so the (hold)th outstanding ref is the one
308
+ * that makes the first unreadable. See `runner.ts` `maxInflightPerCamera`.
309
+ */
310
+ function maxInflightPerCamera(override) {
311
+ const holdFrames = override.holdFrames ?? require_dist.DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
312
+ return Math.max(1, holdFrames - 1);
313
+ }
304
314
  function decodeWorkerFootprintMb(override) {
305
315
  const budgetMb = override.budgetMb ?? require_dist.DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
306
316
  const holdFrames = override.holdFrames ?? require_dist.DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
@@ -1535,7 +1545,7 @@ function startSessionDecodePump(deps) {
1535
1545
  release: () => image.releaseNativeLease?.(),
1536
1546
  markInferred: () => image.markInferred?.()
1537
1547
  }) : void 0;
1538
- if (deps.frameRegistry && deps.onFrameRef) {
1548
+ if (deps.frameRegistry && deps.onFrameRef && deps.inlineWhen?.() !== true) {
1539
1549
  const capturedAt = Date.now();
1540
1550
  const ref = deps.frameRegistry.register(image, {
1541
1551
  timestamp: frame.timestamp,
@@ -4520,6 +4530,7 @@ var PipelineRunner = class {
4520
4530
  detectionQueue,
4521
4531
  inferenceTimes: [],
4522
4532
  shedFrames: 0,
4533
+ inflight: 0,
4523
4534
  processedCount: 0,
4524
4535
  startTime: Date.now(),
4525
4536
  phase: initialPhase,
@@ -4617,6 +4628,33 @@ var PipelineRunner = class {
4617
4628
  * {@link reserveDetectionFrame}. Kept separate so the ordinary public path
4618
4629
  * cannot accidentally count one source frame twice.
4619
4630
  */
4631
+ /**
4632
+ * True when a frame enqueued NOW would wait for an inference slot before
4633
+ * the executor reads its pixels — the window in which a lazy `frameRef` is
4634
+ * a gamble on the worker's 8-slot hold. The detection queue keeps only the
4635
+ * latest frame, so the queue can never be "deep": the semaphore is the one
4636
+ * live signal (the shm passthrough reads the same one). Asked at enqueue
4637
+ * time so the pump can copy the pixels while the frame is still reserved.
4638
+ */
4639
+ detectionBackpressure(deviceId) {
4640
+ const state = this.cameras.get(deviceId);
4641
+ if (!state) return true;
4642
+ return this.semaphore.available <= 0 || state.inflight >= this.maxInflightPerCamera();
4643
+ }
4644
+ /** The per-camera in-flight cap in force (config, else the shipped hold minus one). */
4645
+ maxInflightPerCamera() {
4646
+ return Math.max(1, this.config.maxInflightPerCamera ?? require_dist.DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames - 1);
4647
+ }
4648
+ /**
4649
+ * Follow a resized native-frame hold. Running inferences are untouched; the
4650
+ * next pick is measured against the new cap.
4651
+ */
4652
+ setMaxInflightPerCamera(cap) {
4653
+ this.config = {
4654
+ ...this.config,
4655
+ maxInflightPerCamera: cap
4656
+ };
4657
+ }
4620
4658
  enqueueReservedDetectionFrame(deviceId, frame, handle) {
4621
4659
  const state = this.cameras.get(deviceId);
4622
4660
  if (!state || state.phase !== "active") return false;
@@ -4900,6 +4938,7 @@ var PipelineRunner = class {
4900
4938
  async processWithSemaphore(deviceId, entry, frameInput, state, streamType) {
4901
4939
  const pickedAt = Date.now();
4902
4940
  const { frame, handle } = entry;
4941
+ state.inflight += 1;
4903
4942
  const enqueuedAt = frame._enqueuedAt ?? pickedAt;
4904
4943
  const rawRelease = await this.semaphore.acquire();
4905
4944
  let released = false;
@@ -4941,6 +4980,7 @@ var PipelineRunner = class {
4941
4980
  } catch {
4942
4981
  frameReleaseReason = "error";
4943
4982
  } finally {
4983
+ state.inflight -= 1;
4944
4984
  release();
4945
4985
  try {
4946
4986
  if (frameReleaseReason === "success" && handle && isContinuousRetainEnabled()) await this.config.hydrateRetainedFrame?.(handle);
@@ -5040,7 +5080,7 @@ var PipelineRunner = class {
5040
5080
  } catch {}
5041
5081
  }
5042
5082
  pickNextDetectionFrame() {
5043
- for (const [deviceId, state] of this.cameras) if (state.registration.detectionMode === "always-on" && state.detectionQueue.size > 0) return {
5083
+ for (const [deviceId, state] of this.cameras) if (state.registration.detectionMode === "always-on" && state.detectionQueue.size > 0 && state.inflight < this.maxInflightPerCamera()) return {
5044
5084
  deviceId,
5045
5085
  entry: state.detectionQueue.dequeue(),
5046
5086
  state
@@ -5053,7 +5093,7 @@ var PipelineRunner = class {
5053
5093
  if (!deviceId) continue;
5054
5094
  const state = this.cameras.get(deviceId);
5055
5095
  if (!state) continue;
5056
- if (state.phase === "active" && state.detectionQueue.size > 0) {
5096
+ if (state.phase === "active" && state.detectionQueue.size > 0 && state.inflight < this.maxInflightPerCamera()) {
5057
5097
  this.defaultRoundRobinIndex = (idx + 1) % this.defaultRoundRobinKeys.length;
5058
5098
  const entry = state.detectionQueue.dequeue();
5059
5099
  if (!entry) continue;
@@ -5783,6 +5823,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
5783
5823
  this.runner = new PipelineRunner({
5784
5824
  maxQueueDepth: this.config.maxQueueDepth,
5785
5825
  maxConcurrentInferences: this.config.maxConcurrentInferences,
5826
+ maxInflightPerCamera: maxInflightPerCamera(this.nativeLease.current()),
5786
5827
  targetLoadPercent: this.config.targetLoadPercent,
5787
5828
  minThrottledFps: this.config.minThrottledFps,
5788
5829
  processFrame: (deviceId, frame, handle) => this.runInference(deviceId, frame, handle),
@@ -5800,6 +5841,14 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
5800
5841
  this.spawnGate = new Semaphore(Math.max(1, this.config.maxConcurrentDecodeSpawns));
5801
5842
  const decodeLimits = this.resolvedNodeDecodeLimits();
5802
5843
  this.lastAppliedDecodeLimits = decodeLimits;
5844
+ this.ctx.logger.info("node decode limits in force", { meta: {
5845
+ reason: "boot",
5846
+ budgetMb: decodeLimits.budgetMb,
5847
+ budgetSource: decodeLimits.budgetSource,
5848
+ maxWorkers: decodeLimits.maxWorkers,
5849
+ maxWorkersSource: decodeLimits.maxWorkersSource,
5850
+ totalMemMb: Math.round(node_os.totalmem() / 1048576)
5851
+ } });
5803
5852
  this.liveWorkers = new LiveDecodeWorkerAdmission({
5804
5853
  limit: decodeLimits.maxWorkers,
5805
5854
  logger: this.ctx.logger,
@@ -7025,6 +7074,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
7025
7074
  async refreshNativeLeaseSettings() {
7026
7075
  await this.nativeLease.refresh(this.ctxIfReady?.api);
7027
7076
  this.liveWorkers?.resizeFootprint(decodeWorkerFootprintMb(this.nativeLease.current()));
7077
+ this.runner?.setMaxInflightPerCamera(maxInflightPerCamera(this.nativeLease.current()));
7028
7078
  await this.nodeLimits?.refresh(this.ctxIfReady?.api);
7029
7079
  this.applyNodeDecodeLimits("lease-refresh");
7030
7080
  }
@@ -7733,6 +7783,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
7733
7783
  },
7734
7784
  ...useLocalFrameRef ? {
7735
7785
  frameRegistry: require_local_frame_registry.localFrameRegistry,
7786
+ inlineWhen: () => runner.detectionBackpressure(config.deviceId),
7787
+ inlineViewSpec: SPLIT_DETECTION_VIEW,
7736
7788
  onFrameRef: async (frame, nativeCrop) => {
7737
7789
  const current = reservation;
7738
7790
  reservation = null;
@@ -8415,6 +8467,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
8415
8467
  },
8416
8468
  ...useLocalFrameRef ? {
8417
8469
  frameRegistry: require_local_frame_registry.localFrameRegistry,
8470
+ inlineWhen: () => runner.detectionBackpressure(config.deviceId),
8471
+ inlineViewSpec: SPLIT_DETECTION_VIEW,
8418
8472
  onFrameRef: (frame, nativeCrop) => {
8419
8473
  if (settled) return false;
8420
8474
  const handle = writeRetainedDetectionFrame(retainedFrames, config.deviceId, frame, this.retention);
@@ -1,7 +1,7 @@
1
- import { B as defineCustomActions, Bt as nodePin, Ft as createEvent, Gt as _enum, H as deriveDetailCropRect, Kt as array, L as customAction, Qt as object, X as failureContributionCapability, Xt as literal, Yt as lazy, Zt as number, _ as FailureCounters, en as string, et as loadContributionCapability, ft as pipelineRunnerCapability, jt as BaseAddon, lt as pickDetailCropConvention, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as boolean, u as DEFAULT_DETAIL_CROP_CONVENTION, ut as pickNativeLeaseOverride, wt as errMsg } from "../dist-HWdaHLLK.mjs";
2
- import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-CwSBH-3M.mjs";
3
- import { c as getStepDefinition, n as resolveFrameViewGeometry, t as localFrameRegistry } from "../local-frame-registry-Bki81rM0.mjs";
4
- import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-DN1y2Vyk.mjs";
1
+ import { B as defineCustomActions, Bt as nodePin, Ft as createEvent, Gt as _enum, H as deriveDetailCropRect, Kt as array, L as customAction, Qt as object, X as failureContributionCapability, Xt as literal, Yt as lazy, Zt as number, _ as FailureCounters, en as string, et as loadContributionCapability, ft as pipelineRunnerCapability, jt as BaseAddon, lt as pickDetailCropConvention, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as boolean, u as DEFAULT_DETAIL_CROP_CONVENTION, ut as pickNativeLeaseOverride, wt as errMsg } from "../dist-CxYG8IUX.mjs";
2
+ import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-DhccO0of.mjs";
3
+ import { c as getStepDefinition, n as resolveFrameViewGeometry, t as localFrameRegistry } from "../local-frame-registry-DP5yyEWE.mjs";
4
+ import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-Br-omhiX.mjs";
5
5
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
6
6
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
7
7
  import { n as withDetectionIntent } from "../restream-intent-B4BXZra7.mjs";
@@ -295,6 +295,16 @@ var DEFAULT_NODE_DECODE_BUDGET_MB = 8192;
295
295
  * `native-lease-config.ts` on why "unset" includes a knob sitting at its
296
296
  * default); anything absent falls back to what the worker ships with.
297
297
  */
298
+ /**
299
+ * How many frames of one camera the runner may have in inference at once:
300
+ * the worker's hold minus one, never below one. The hold evicts oldest-first
301
+ * when a newer marked frame lands, so the (hold)th outstanding ref is the one
302
+ * that makes the first unreadable. See `runner.ts` `maxInflightPerCamera`.
303
+ */
304
+ function maxInflightPerCamera(override) {
305
+ const holdFrames = override.holdFrames ?? DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
306
+ return Math.max(1, holdFrames - 1);
307
+ }
298
308
  function decodeWorkerFootprintMb(override) {
299
309
  const budgetMb = override.budgetMb ?? DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
300
310
  const holdFrames = override.holdFrames ?? DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
@@ -1529,7 +1539,7 @@ function startSessionDecodePump(deps) {
1529
1539
  release: () => image.releaseNativeLease?.(),
1530
1540
  markInferred: () => image.markInferred?.()
1531
1541
  }) : void 0;
1532
- if (deps.frameRegistry && deps.onFrameRef) {
1542
+ if (deps.frameRegistry && deps.onFrameRef && deps.inlineWhen?.() !== true) {
1533
1543
  const capturedAt = Date.now();
1534
1544
  const ref = deps.frameRegistry.register(image, {
1535
1545
  timestamp: frame.timestamp,
@@ -4513,6 +4523,7 @@ var PipelineRunner = class {
4513
4523
  detectionQueue,
4514
4524
  inferenceTimes: [],
4515
4525
  shedFrames: 0,
4526
+ inflight: 0,
4516
4527
  processedCount: 0,
4517
4528
  startTime: Date.now(),
4518
4529
  phase: initialPhase,
@@ -4610,6 +4621,33 @@ var PipelineRunner = class {
4610
4621
  * {@link reserveDetectionFrame}. Kept separate so the ordinary public path
4611
4622
  * cannot accidentally count one source frame twice.
4612
4623
  */
4624
+ /**
4625
+ * True when a frame enqueued NOW would wait for an inference slot before
4626
+ * the executor reads its pixels — the window in which a lazy `frameRef` is
4627
+ * a gamble on the worker's 8-slot hold. The detection queue keeps only the
4628
+ * latest frame, so the queue can never be "deep": the semaphore is the one
4629
+ * live signal (the shm passthrough reads the same one). Asked at enqueue
4630
+ * time so the pump can copy the pixels while the frame is still reserved.
4631
+ */
4632
+ detectionBackpressure(deviceId) {
4633
+ const state = this.cameras.get(deviceId);
4634
+ if (!state) return true;
4635
+ return this.semaphore.available <= 0 || state.inflight >= this.maxInflightPerCamera();
4636
+ }
4637
+ /** The per-camera in-flight cap in force (config, else the shipped hold minus one). */
4638
+ maxInflightPerCamera() {
4639
+ return Math.max(1, this.config.maxInflightPerCamera ?? DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames - 1);
4640
+ }
4641
+ /**
4642
+ * Follow a resized native-frame hold. Running inferences are untouched; the
4643
+ * next pick is measured against the new cap.
4644
+ */
4645
+ setMaxInflightPerCamera(cap) {
4646
+ this.config = {
4647
+ ...this.config,
4648
+ maxInflightPerCamera: cap
4649
+ };
4650
+ }
4613
4651
  enqueueReservedDetectionFrame(deviceId, frame, handle) {
4614
4652
  const state = this.cameras.get(deviceId);
4615
4653
  if (!state || state.phase !== "active") return false;
@@ -4893,6 +4931,7 @@ var PipelineRunner = class {
4893
4931
  async processWithSemaphore(deviceId, entry, frameInput, state, streamType) {
4894
4932
  const pickedAt = Date.now();
4895
4933
  const { frame, handle } = entry;
4934
+ state.inflight += 1;
4896
4935
  const enqueuedAt = frame._enqueuedAt ?? pickedAt;
4897
4936
  const rawRelease = await this.semaphore.acquire();
4898
4937
  let released = false;
@@ -4934,6 +4973,7 @@ var PipelineRunner = class {
4934
4973
  } catch {
4935
4974
  frameReleaseReason = "error";
4936
4975
  } finally {
4976
+ state.inflight -= 1;
4937
4977
  release();
4938
4978
  try {
4939
4979
  if (frameReleaseReason === "success" && handle && isContinuousRetainEnabled()) await this.config.hydrateRetainedFrame?.(handle);
@@ -5033,7 +5073,7 @@ var PipelineRunner = class {
5033
5073
  } catch {}
5034
5074
  }
5035
5075
  pickNextDetectionFrame() {
5036
- for (const [deviceId, state] of this.cameras) if (state.registration.detectionMode === "always-on" && state.detectionQueue.size > 0) return {
5076
+ for (const [deviceId, state] of this.cameras) if (state.registration.detectionMode === "always-on" && state.detectionQueue.size > 0 && state.inflight < this.maxInflightPerCamera()) return {
5037
5077
  deviceId,
5038
5078
  entry: state.detectionQueue.dequeue(),
5039
5079
  state
@@ -5046,7 +5086,7 @@ var PipelineRunner = class {
5046
5086
  if (!deviceId) continue;
5047
5087
  const state = this.cameras.get(deviceId);
5048
5088
  if (!state) continue;
5049
- if (state.phase === "active" && state.detectionQueue.size > 0) {
5089
+ if (state.phase === "active" && state.detectionQueue.size > 0 && state.inflight < this.maxInflightPerCamera()) {
5050
5090
  this.defaultRoundRobinIndex = (idx + 1) % this.defaultRoundRobinKeys.length;
5051
5091
  const entry = state.detectionQueue.dequeue();
5052
5092
  if (!entry) continue;
@@ -5776,6 +5816,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
5776
5816
  this.runner = new PipelineRunner({
5777
5817
  maxQueueDepth: this.config.maxQueueDepth,
5778
5818
  maxConcurrentInferences: this.config.maxConcurrentInferences,
5819
+ maxInflightPerCamera: maxInflightPerCamera(this.nativeLease.current()),
5779
5820
  targetLoadPercent: this.config.targetLoadPercent,
5780
5821
  minThrottledFps: this.config.minThrottledFps,
5781
5822
  processFrame: (deviceId, frame, handle) => this.runInference(deviceId, frame, handle),
@@ -5793,6 +5834,14 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
5793
5834
  this.spawnGate = new Semaphore(Math.max(1, this.config.maxConcurrentDecodeSpawns));
5794
5835
  const decodeLimits = this.resolvedNodeDecodeLimits();
5795
5836
  this.lastAppliedDecodeLimits = decodeLimits;
5837
+ this.ctx.logger.info("node decode limits in force", { meta: {
5838
+ reason: "boot",
5839
+ budgetMb: decodeLimits.budgetMb,
5840
+ budgetSource: decodeLimits.budgetSource,
5841
+ maxWorkers: decodeLimits.maxWorkers,
5842
+ maxWorkersSource: decodeLimits.maxWorkersSource,
5843
+ totalMemMb: Math.round(os.totalmem() / 1048576)
5844
+ } });
5796
5845
  this.liveWorkers = new LiveDecodeWorkerAdmission({
5797
5846
  limit: decodeLimits.maxWorkers,
5798
5847
  logger: this.ctx.logger,
@@ -7018,6 +7067,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
7018
7067
  async refreshNativeLeaseSettings() {
7019
7068
  await this.nativeLease.refresh(this.ctxIfReady?.api);
7020
7069
  this.liveWorkers?.resizeFootprint(decodeWorkerFootprintMb(this.nativeLease.current()));
7070
+ this.runner?.setMaxInflightPerCamera(maxInflightPerCamera(this.nativeLease.current()));
7021
7071
  await this.nodeLimits?.refresh(this.ctxIfReady?.api);
7022
7072
  this.applyNodeDecodeLimits("lease-refresh");
7023
7073
  }
@@ -7726,6 +7776,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
7726
7776
  },
7727
7777
  ...useLocalFrameRef ? {
7728
7778
  frameRegistry: localFrameRegistry,
7779
+ inlineWhen: () => runner.detectionBackpressure(config.deviceId),
7780
+ inlineViewSpec: SPLIT_DETECTION_VIEW,
7729
7781
  onFrameRef: async (frame, nativeCrop) => {
7730
7782
  const current = reservation;
7731
7783
  reservation = null;
@@ -8408,6 +8460,8 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
8408
8460
  },
8409
8461
  ...useLocalFrameRef ? {
8410
8462
  frameRegistry: localFrameRegistry,
8463
+ inlineWhen: () => runner.detectionBackpressure(config.deviceId),
8464
+ inlineViewSpec: SPLIT_DETECTION_VIEW,
8411
8465
  onFrameRef: (frame, nativeCrop) => {
8412
8466
  if (settled) return false;
8413
8467
  const handle = writeRetainedDetectionFrame(retainedFrames, config.deviceId, frame, this.retention);
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-e2OKAUGI.js");
1
+ const require_dist = require("./dist-CKr6Q6Qu.js");
2
2
  let node_fs = require("node:fs");
3
3
  node_fs = require_dist.__toESM(node_fs);
4
4
  let node_child_process = require("node:child_process");
@@ -1,4 +1,4 @@
1
- import { ot as parseProcStatus } from "./dist-HWdaHLLK.mjs";
1
+ import { ot as parseProcStatus } from "./dist-CxYG8IUX.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
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-e2OKAUGI.js");
6
- const require_node = require("../node-Dw6FrDFS.js");
5
+ const require_dist = require("../dist-CKr6Q6Qu.js");
6
+ const require_node = require("../node-CmRTB9W4.js");
7
7
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
8
8
  const require_restream_intent = require("../restream-intent-Cv9x3jmu.js");
9
9
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
@@ -10329,6 +10329,7 @@ Object.freeze({
10329
10329
  "getObjectEvents": { "limit": 1e3 },
10330
10330
  "getSensorEvents": { "limit": 1e3 },
10331
10331
  "listRecentTracks": { "limit": 200 },
10332
+ "listSummaries": { "limit": 50 },
10332
10333
  "reclaimDebugMedia": { "mode": "report" },
10333
10334
  "searchObjectEvents": {
10334
10335
  "limit": 50,