ai 4.3.4 → 4.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 +6 -0
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
@@ -7524,6 +7524,7 @@ var MCPClient = class {
|
|
7524
7524
|
async tools({
|
7525
7525
|
schemas = "automatic"
|
7526
7526
|
} = {}) {
|
7527
|
+
var _a17;
|
7527
7528
|
const tools = {};
|
7528
7529
|
try {
|
7529
7530
|
const listToolsResult = await this.listTools();
|
@@ -7531,14 +7532,18 @@ var MCPClient = class {
|
|
7531
7532
|
if (schemas !== "automatic" && !(name17 in schemas)) {
|
7532
7533
|
continue;
|
7533
7534
|
}
|
7534
|
-
const parameters = schemas === "automatic" ? (0, import_ui_utils10.jsonSchema)(
|
7535
|
+
const parameters = schemas === "automatic" ? (0, import_ui_utils10.jsonSchema)({
|
7536
|
+
...inputSchema,
|
7537
|
+
properties: (_a17 = inputSchema.properties) != null ? _a17 : {},
|
7538
|
+
additionalProperties: false
|
7539
|
+
}) : schemas[name17].parameters;
|
7535
7540
|
const self = this;
|
7536
7541
|
const toolWithExecute = tool({
|
7537
7542
|
description,
|
7538
7543
|
parameters,
|
7539
7544
|
execute: async (args, options) => {
|
7540
|
-
var
|
7541
|
-
(
|
7545
|
+
var _a18;
|
7546
|
+
(_a18 = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a18.throwIfAborted();
|
7542
7547
|
return self.callTool({
|
7543
7548
|
name: name17,
|
7544
7549
|
args,
|