@mcp-use/agent 2.0.25 → 2.0.26
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/dist/.tsbuildinfo +1 -1
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/langchain.js +1 -1
- package/dist/llm/providers/google.d.ts +2 -6
- package/dist/llm/providers/google.d.ts.map +1 -1
- package/dist/llm/providers/index.d.ts +2 -6
- package/dist/llm/providers/index.d.ts.map +1 -1
- package/dist/llm/toolLoop.d.ts.map +1 -1
- package/dist/llm/types.d.ts +7 -0
- package/dist/llm/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1207,7 +1207,11 @@ function toGeminiContents(messages) {
|
|
|
1207
1207
|
if (m.toolCalls?.length) {
|
|
1208
1208
|
for (const tc of m.toolCalls) {
|
|
1209
1209
|
parts.push({
|
|
1210
|
-
functionCall: { name: tc.name, args: tc.args ?? {} }
|
|
1210
|
+
functionCall: { name: tc.name, args: tc.args ?? {} },
|
|
1211
|
+
// Gemini 3 rejects a replayed tool call without its signature.
|
|
1212
|
+
...tc.thoughtSignature !== void 0 && {
|
|
1213
|
+
thoughtSignature: tc.thoughtSignature
|
|
1214
|
+
}
|
|
1211
1215
|
});
|
|
1212
1216
|
}
|
|
1213
1217
|
}
|
|
@@ -1304,7 +1308,10 @@ async function* streamChat2(params) {
|
|
|
1304
1308
|
index: idx,
|
|
1305
1309
|
toolCallId: id,
|
|
1306
1310
|
toolName: name,
|
|
1307
|
-
args
|
|
1311
|
+
args,
|
|
1312
|
+
...typeof p.thoughtSignature === "string" && {
|
|
1313
|
+
thoughtSignature: p.thoughtSignature
|
|
1314
|
+
}
|
|
1308
1315
|
};
|
|
1309
1316
|
}
|
|
1310
1317
|
}
|
|
@@ -1339,7 +1346,10 @@ async function chat2(params) {
|
|
|
1339
1346
|
toolCalls.push({
|
|
1340
1347
|
id: `call_${toolCalls.length}_${p.functionCall.name ?? "tool"}`,
|
|
1341
1348
|
name: p.functionCall.name ?? "",
|
|
1342
|
-
args: p.functionCall.args && typeof p.functionCall.args === "object" ? p.functionCall.args : {}
|
|
1349
|
+
args: p.functionCall.args && typeof p.functionCall.args === "object" ? p.functionCall.args : {},
|
|
1350
|
+
...typeof p.thoughtSignature === "string" && {
|
|
1351
|
+
thoughtSignature: p.thoughtSignature
|
|
1352
|
+
}
|
|
1343
1353
|
});
|
|
1344
1354
|
}
|
|
1345
1355
|
}
|
|
@@ -2466,7 +2476,10 @@ async function* runToolLoop(params) {
|
|
|
2466
2476
|
pendingToolCalls.push({
|
|
2467
2477
|
id: ev.toolCallId,
|
|
2468
2478
|
name: ev.toolName,
|
|
2469
|
-
args: ev.args
|
|
2479
|
+
args: ev.args,
|
|
2480
|
+
...ev.thoughtSignature !== void 0 && {
|
|
2481
|
+
thoughtSignature: ev.thoughtSignature
|
|
2482
|
+
}
|
|
2470
2483
|
});
|
|
2471
2484
|
}
|
|
2472
2485
|
yield ev;
|
|
@@ -2711,7 +2724,7 @@ function providerConfigFromOptions(provider, model, config) {
|
|
|
2711
2724
|
}
|
|
2712
2725
|
|
|
2713
2726
|
// src/version.ts
|
|
2714
|
-
var VERSION = "2.0.
|
|
2727
|
+
var VERSION = "2.0.26";
|
|
2715
2728
|
function getPackageVersion() {
|
|
2716
2729
|
return VERSION;
|
|
2717
2730
|
}
|