@camstack/addon-pipeline-orchestrator 1.1.12 → 1.1.13

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.
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.1.13",
21
+ version: "1.1.15",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_orchestrator_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.1.13",
36
+ version: "1.1.14",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_pipeline_orchestrator_widgets",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.1.13",
39
+ version: "1.1.15",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -99,7 +99,7 @@ async function r() {
99
99
  }
100
100
  },
101
101
  "@camstack/ui-library": {
102
- version: "1.1.13",
102
+ version: "1.1.14",
103
103
  scope: "default",
104
104
  shareConfig: {
105
105
  singleton: !0,
package/dist/index.js CHANGED
@@ -14730,6 +14730,7 @@ var pipelineOrchestratorCapability = {
14730
14730
  name: "pipeline-orchestrator",
14731
14731
  scope: "system",
14732
14732
  mode: "singleton",
14733
+ nodeIdMode: "data",
14733
14734
  exposesDeviceSettings: true,
14734
14735
  methods: {
14735
14736
  /**
@@ -22825,6 +22826,18 @@ function balance(input) {
22825
22826
  };
22826
22827
  }
22827
22828
  /**
22829
+ * Decide whether a manual per-device decoder pin may be honored.
22830
+ *
22831
+ * A pin to a node OUTSIDE `enabledDecoderNodes` must NOT be honored blindly —
22832
+ * that is how video decode reaches a node that is not eligible to decode (e.g.
22833
+ * a node whose shm frame ring the broker cannot read, or one an operator
22834
+ * disabled). A pin to an ENABLED node is honored; anything else falls through
22835
+ * to the auto-balance path (which filters by `enabledDecoderNodes`).
22836
+ */
22837
+ function isDecoderPinHonored(pinnedNodeId, enabledDecoderNodes) {
22838
+ return enabledDecoderNodes.includes(pinnedNodeId);
22839
+ }
22840
+ /**
22828
22841
  * Choose decoder node. Priority: manual pin → co-located with pipeline → capacity.
22829
22842
  */
22830
22843
  function balanceDecoder(input) {
@@ -24480,8 +24493,15 @@ var PipelineOrchestratorAddon = class PipelineOrchestratorAddon extends BaseAddo
24480
24493
  */
24481
24494
  async resolveDecoderNode(deviceId, pipelineNodeId) {
24482
24495
  const pinned = (await this.ctx.settings?.readDeviceStore(deviceId) ?? {})["decoderNodeId"];
24483
- if (typeof pinned === "string" && pinned !== "auto") return pinned;
24484
24496
  const enabledDecoderNodes = this.enabledDecoderNodes;
24497
+ if (typeof pinned === "string" && pinned !== "auto") {
24498
+ if (isDecoderPinHonored(pinned, enabledDecoderNodes)) return pinned;
24499
+ this.ctx.logger.warn("decoder pin targets a node not in enabledDecoderNodes — ignoring pin, auto-balancing instead", { tags: {
24500
+ deviceId,
24501
+ pinned,
24502
+ enabledDecoderNodes: enabledDecoderNodes.join(",")
24503
+ } });
24504
+ }
24485
24505
  return balanceDecoder({
24486
24506
  decoderNodes: (await this.collectAgentLoad()).filter((load) => enabledDecoderNodes.includes(load.nodeId)),
24487
24507
  pipelineNodeId
package/dist/index.mjs CHANGED
@@ -14726,6 +14726,7 @@ var pipelineOrchestratorCapability = {
14726
14726
  name: "pipeline-orchestrator",
14727
14727
  scope: "system",
14728
14728
  mode: "singleton",
14729
+ nodeIdMode: "data",
14729
14730
  exposesDeviceSettings: true,
14730
14731
  methods: {
14731
14732
  /**
@@ -22821,6 +22822,18 @@ function balance(input) {
22821
22822
  };
22822
22823
  }
22823
22824
  /**
22825
+ * Decide whether a manual per-device decoder pin may be honored.
22826
+ *
22827
+ * A pin to a node OUTSIDE `enabledDecoderNodes` must NOT be honored blindly —
22828
+ * that is how video decode reaches a node that is not eligible to decode (e.g.
22829
+ * a node whose shm frame ring the broker cannot read, or one an operator
22830
+ * disabled). A pin to an ENABLED node is honored; anything else falls through
22831
+ * to the auto-balance path (which filters by `enabledDecoderNodes`).
22832
+ */
22833
+ function isDecoderPinHonored(pinnedNodeId, enabledDecoderNodes) {
22834
+ return enabledDecoderNodes.includes(pinnedNodeId);
22835
+ }
22836
+ /**
22824
22837
  * Choose decoder node. Priority: manual pin → co-located with pipeline → capacity.
22825
22838
  */
22826
22839
  function balanceDecoder(input) {
@@ -24476,8 +24489,15 @@ var PipelineOrchestratorAddon = class PipelineOrchestratorAddon extends BaseAddo
24476
24489
  */
24477
24490
  async resolveDecoderNode(deviceId, pipelineNodeId) {
24478
24491
  const pinned = (await this.ctx.settings?.readDeviceStore(deviceId) ?? {})["decoderNodeId"];
24479
- if (typeof pinned === "string" && pinned !== "auto") return pinned;
24480
24492
  const enabledDecoderNodes = this.enabledDecoderNodes;
24493
+ if (typeof pinned === "string" && pinned !== "auto") {
24494
+ if (isDecoderPinHonored(pinned, enabledDecoderNodes)) return pinned;
24495
+ this.ctx.logger.warn("decoder pin targets a node not in enabledDecoderNodes — ignoring pin, auto-balancing instead", { tags: {
24496
+ deviceId,
24497
+ pinned,
24498
+ enabledDecoderNodes: enabledDecoderNodes.join(",")
24499
+ } });
24500
+ }
24481
24501
  return balanceDecoder({
24482
24502
  decoderNodes: (await this.collectAgentLoad()).filter((load) => enabledDecoderNodes.includes(load.nodeId)),
24483
24503
  pipelineNodeId
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Bll07XmJ.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CcKcmOK0.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-pipeline-orchestrator",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "Hub-side camera-to-agent load balancer — tracks runner capacity and dispatches attachCamera calls to the optimal pipeline-runner instance",
5
5
  "keywords": [
6
6
  "camstack",