@codemation/core-nodes-ocr 0.2.4 → 0.2.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @codemation/core-nodes-ocr
2
2
 
3
+ ## 0.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`3317947`](https://github.com/MadeRelevant/codemation/commit/33179472db68b2f4fc1a15961ac389df25d8cb6f), [`d4c7aca`](https://github.com/MadeRelevant/codemation/commit/d4c7aca5248352b82313efb16d5792cc24875005)]:
8
+ - @codemation/core@0.13.2
9
+
10
+ ## 0.2.5
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`2fcb715`](https://github.com/MadeRelevant/codemation/commit/2fcb7153d9c732b2f846b8a8d1cc5626b4363fa6)]:
15
+ - @codemation/core@0.13.1
16
+
3
17
  ## 0.2.4
4
18
 
5
19
  ### Patch Changes
@@ -507,10 +507,13 @@ var HttpRequestExecutor = class {
507
507
  var HttpBodyBuilder = class {
508
508
  async build(spec, item, ctx) {
509
509
  if (!spec || spec.kind === "none") return;
510
- if (spec.kind === "json") return {
511
- body: JSON.stringify(spec.data),
512
- contentType: "application/json"
513
- };
510
+ if (spec.kind === "json") {
511
+ if (typeof spec.data === "string") throw new Error("HttpRequest body kind:\"json\" expects a serializable object for \"data\", but received a string. Pass the object directly (e.g. { a: 1 }), not a pre-stringified JSON string (JSON.stringify(...)).");
512
+ return {
513
+ body: JSON.stringify(spec.data),
514
+ contentType: "application/json"
515
+ };
516
+ }
514
517
  if (spec.kind === "form") {
515
518
  const params = new URLSearchParams();
516
519
  for (const [key, value] of Object.entries(spec.data)) params.append(key, value);
@@ -15752,14 +15755,17 @@ let AIAgentNode = class AIAgentNode$1 {
15752
15755
  });
15753
15756
  }
15754
15757
  /**
15755
- * Detects whether a tool config is backed by a `defineHumanApprovalNode` marker
15756
- * and returns the HITL behavior config, or `undefined` when not a HITL tool.
15758
+ * Resolves the HITL behavior for a tool binding, or `undefined` when it is not a HITL tool.
15759
+ * A binding is HITL if either the backing node carries a `defineHumanApprovalNode` marker or the
15760
+ * binding sets a per-binding `onRejected` via `asTool(..., { onRejected })`. The per-binding value
15761
+ * wins over the node marker, so two tools backed by the same node can reject differently.
15757
15762
  */
15758
15763
  resolveHumanApprovalBehavior(config) {
15759
15764
  if (!this.isNodeBackedToolConfig(config)) return void 0;
15760
15765
  const marker$3 = config.node.humanApprovalToolBehavior;
15761
- if (marker$3 === void 0) return void 0;
15762
- return { onRejected: marker$3.onRejected ?? "return" };
15766
+ const perBinding = config.onRejected;
15767
+ if (marker$3 === void 0 && perBinding === void 0) return void 0;
15768
+ return { onRejected: perBinding ?? marker$3?.onRejected ?? "return" };
15763
15769
  }
15764
15770
  /**
15765
15771
  * Invoke a text turn using the merged tool set from item-scoped tools (coordinator-managed)