@ai-sdk/langchain 2.0.320 → 2.0.321

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,15 @@
1
1
  # @ai-sdk/langchain
2
2
 
3
+ ## 2.0.321
4
+
5
+ ### Patch Changes
6
+
7
+ - 842eea4: Harden LangChain tool argument JSON parsing against prototype pollution while preserving the fallback for invalid arguments.
8
+ - Updated dependencies [52803fb]
9
+ - Updated dependencies [a0f7494]
10
+ - Updated dependencies [a48e8a9]
11
+ - ai@6.0.313
12
+
3
13
  ## 2.0.320
4
14
 
5
15
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1015,7 +1015,7 @@ function processLangGraphEvent(event, state, controller) {
1015
1015
  const functionData = tc.function;
1016
1016
  let args;
1017
1017
  try {
1018
- args = (functionData == null ? void 0 : functionData.arguments) ? JSON.parse(functionData.arguments) : {};
1018
+ args = (functionData == null ? void 0 : functionData.arguments) ? (0, import_provider_utils.secureJsonParse)(functionData.arguments) : {};
1019
1019
  } catch (e) {
1020
1020
  args = {};
1021
1021
  }