@iqai/adk 0.3.3 → 0.3.5

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,17 @@
1
1
  # @iqai/adk
2
2
 
3
+ ## 0.3.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8ce3a6f: Fixes ai sdk tool response converstion issue
8
+
9
+ ## 0.3.4
10
+
11
+ ### Patch Changes
12
+
13
+ - f365669: Fixes ai sdk tool response converstion
14
+
3
15
  ## 0.3.3
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1774,11 +1774,20 @@ var AiSdkLlm = (_class6 = class extends BaseLlm {
1774
1774
  (part) => part.functionResponse
1775
1775
  );
1776
1776
  const contentParts2 = functionResponses.map((part) => {
1777
+ let output;
1778
+ const response = part.functionResponse.response;
1779
+ if (response === void 0 || response === null) {
1780
+ output = { type: "json", value: null };
1781
+ } else if (typeof response === "string") {
1782
+ output = { type: "text", value: response };
1783
+ } else {
1784
+ output = { type: "json", value: response };
1785
+ }
1777
1786
  return {
1778
1787
  type: "tool-result",
1779
1788
  toolCallId: part.functionResponse.id,
1780
1789
  toolName: part.functionResponse.name || "unknown",
1781
- output: part.functionResponse.response
1790
+ output
1782
1791
  };
1783
1792
  });
1784
1793
  return {
package/dist/index.mjs CHANGED
@@ -1774,11 +1774,20 @@ var AiSdkLlm = class extends BaseLlm {
1774
1774
  (part) => part.functionResponse
1775
1775
  );
1776
1776
  const contentParts2 = functionResponses.map((part) => {
1777
+ let output;
1778
+ const response = part.functionResponse.response;
1779
+ if (response === void 0 || response === null) {
1780
+ output = { type: "json", value: null };
1781
+ } else if (typeof response === "string") {
1782
+ output = { type: "text", value: response };
1783
+ } else {
1784
+ output = { type: "json", value: response };
1785
+ }
1777
1786
  return {
1778
1787
  type: "tool-result",
1779
1788
  toolCallId: part.functionResponse.id,
1780
1789
  toolName: part.functionResponse.name || "unknown",
1781
- output: part.functionResponse.response
1790
+ output
1782
1791
  };
1783
1792
  });
1784
1793
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iqai/adk",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Agent Development Kit for TypeScript with multi-provider LLM support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",