@bike4mind/cli 0.2.21-fix-allow-empty-tool-parameters.18230 → 0.2.21-fix-allow-empty-tool-parameters.18231
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/{chunk-UZSJIKOL.js → chunk-IZFEZ3UT.js} +1 -1
- package/dist/{chunk-BKQ3OOVN.js → chunk-R6PC7Y5F.js} +18 -14
- package/dist/{chunk-VGFZ6AA3.js → chunk-RYYR733I.js} +1 -1
- package/dist/{chunk-IPZQZ3JV.js → chunk-TE2BC3P4.js} +1 -1
- package/dist/{create-NIBOJCLG.js → create-ZOQDBJNR.js} +2 -2
- package/dist/index.js +10 -10
- package/dist/{mementoService-BFH3L5HQ.js → mementoService-J3JLN7L7.js} +2 -2
- package/dist/{src-WXIDZNUW.js → src-434JFWL5.js} +1 -1
- package/dist/{subtractCredits-UPWGHCRL.js → subtractCredits-5ABLM7L7.js} +2 -2
- package/package.json +6 -6
|
@@ -3160,15 +3160,16 @@ var BaseBedrockBackend = class {
|
|
|
3160
3160
|
if (func.some((f) => f.name)) {
|
|
3161
3161
|
for await (const tool of func) {
|
|
3162
3162
|
const { name, parameters } = tool;
|
|
3163
|
-
if (name
|
|
3164
|
-
toolsUsed.push({ name, arguments: parameters });
|
|
3163
|
+
if (name) {
|
|
3164
|
+
toolsUsed.push({ name, arguments: parameters || "{}" });
|
|
3165
3165
|
}
|
|
3166
3166
|
}
|
|
3167
3167
|
if (options.executeTools !== false) {
|
|
3168
3168
|
for await (const tool of func) {
|
|
3169
|
-
const { id, name
|
|
3169
|
+
const { id, name } = tool;
|
|
3170
|
+
const parameters = tool.parameters || "{}";
|
|
3170
3171
|
const toolFn = options.tools?.find((tool2) => tool2.toolSchema.name === name)?.toolFn;
|
|
3171
|
-
if (id && name &&
|
|
3172
|
+
if (id && name && toolFn) {
|
|
3172
3173
|
const result = await toolFn(JSON.parse(parameters));
|
|
3173
3174
|
await handleToolResultStreaming(name, result, async (results) => {
|
|
3174
3175
|
await callback(results, { inputTokens, outputTokens, toolsUsed });
|
|
@@ -3202,13 +3203,14 @@ var BaseBedrockBackend = class {
|
|
|
3202
3203
|
const toolChoice = chunk?.choices.find((choice) => choice.statusEndReason === ChoiceEndReason.TOOL_USE);
|
|
3203
3204
|
if (toolChoice?.tool) {
|
|
3204
3205
|
const { id, name, parameters } = toolChoice.tool;
|
|
3205
|
-
if (name
|
|
3206
|
-
toolsUsed.push({ name, arguments: parameters });
|
|
3206
|
+
if (name) {
|
|
3207
|
+
toolsUsed.push({ name, arguments: parameters || "{}" });
|
|
3207
3208
|
}
|
|
3208
3209
|
if (options.executeTools !== false) {
|
|
3209
3210
|
const toolFn = options.tools?.find((tool) => tool.toolSchema.name === name)?.toolFn;
|
|
3210
|
-
|
|
3211
|
-
|
|
3211
|
+
const safeParameters = parameters || "{}";
|
|
3212
|
+
if (id && name && toolFn) {
|
|
3213
|
+
const result = await toolFn(JSON.parse(safeParameters));
|
|
3212
3214
|
await handleToolResultStreaming(name, result, async (results) => {
|
|
3213
3215
|
await callback(results, { inputTokens, outputTokens, toolsUsed });
|
|
3214
3216
|
});
|
|
@@ -6399,9 +6401,10 @@ var OpenAIBackend = class {
|
|
|
6399
6401
|
}
|
|
6400
6402
|
if (options.executeTools !== false) {
|
|
6401
6403
|
for await (const tool of func) {
|
|
6402
|
-
const { id, name
|
|
6404
|
+
const { id, name } = tool;
|
|
6405
|
+
const parameters2 = tool.parameters || "{}";
|
|
6403
6406
|
const toolFn = options.tools?.find((tool2) => tool2.toolSchema.name === name)?.toolFn;
|
|
6404
|
-
if (id && name &&
|
|
6407
|
+
if (id && name && toolFn) {
|
|
6405
6408
|
try {
|
|
6406
6409
|
this.logger.debug("Using tool:", name);
|
|
6407
6410
|
this.logger.debug("Tool arguments:", parameters2);
|
|
@@ -6914,18 +6917,19 @@ var XAIBackend = class {
|
|
|
6914
6917
|
if (func.length > 0) {
|
|
6915
6918
|
for await (const tool of func) {
|
|
6916
6919
|
const { name, parameters: parameters2 } = tool;
|
|
6917
|
-
if (name
|
|
6920
|
+
if (name) {
|
|
6918
6921
|
toolsUsed.push({
|
|
6919
6922
|
name,
|
|
6920
|
-
arguments: parameters2
|
|
6923
|
+
arguments: parameters2 || "{}"
|
|
6921
6924
|
});
|
|
6922
6925
|
}
|
|
6923
6926
|
}
|
|
6924
6927
|
if (options.executeTools !== false) {
|
|
6925
6928
|
for await (const tool of func) {
|
|
6926
|
-
const { id, name
|
|
6929
|
+
const { id, name } = tool;
|
|
6930
|
+
const parameters2 = tool.parameters || "{}";
|
|
6927
6931
|
const toolFn = options.tools?.find((tool2) => tool2.toolSchema.name === name)?.toolFn;
|
|
6928
|
-
if (id && name &&
|
|
6932
|
+
if (id && name && toolFn) {
|
|
6929
6933
|
try {
|
|
6930
6934
|
const result = await toolFn(JSON.parse(parameters2));
|
|
6931
6935
|
this.pushToolMessages(messages, {
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getEffectiveApiKey,
|
|
5
5
|
getOpenWeatherKey,
|
|
6
6
|
getSerperKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IZFEZ3UT.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfigStore
|
|
10
10
|
} from "./chunk-VFQF2JIT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RYYR733I.js";
|
|
12
|
+
import "./chunk-TE2BC3P4.js";
|
|
13
13
|
import {
|
|
14
14
|
BFLImageService,
|
|
15
15
|
BaseStorage,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
OpenAIBackend,
|
|
22
22
|
OpenAIImageService,
|
|
23
23
|
XAIImageService
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-R6PC7Y5F.js";
|
|
25
25
|
import {
|
|
26
26
|
AiEvents,
|
|
27
27
|
ApiKeyEvents,
|
|
@@ -12262,7 +12262,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
12262
12262
|
// package.json
|
|
12263
12263
|
var package_default = {
|
|
12264
12264
|
name: "@bike4mind/cli",
|
|
12265
|
-
version: "0.2.21-fix-allow-empty-tool-parameters.
|
|
12265
|
+
version: "0.2.21-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
12266
12266
|
type: "module",
|
|
12267
12267
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
12268
12268
|
license: "UNLICENSED",
|
|
@@ -12369,10 +12369,10 @@ var package_default = {
|
|
|
12369
12369
|
},
|
|
12370
12370
|
devDependencies: {
|
|
12371
12371
|
"@bike4mind/agents": "0.1.0",
|
|
12372
|
-
"@bike4mind/common": "2.45.1-fix-allow-empty-tool-parameters.
|
|
12373
|
-
"@bike4mind/mcp": "1.25.1-fix-allow-empty-tool-parameters.
|
|
12374
|
-
"@bike4mind/services": "2.43.1-fix-allow-empty-tool-parameters.
|
|
12375
|
-
"@bike4mind/utils": "2.3.1-fix-allow-empty-tool-parameters.
|
|
12372
|
+
"@bike4mind/common": "2.45.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
12373
|
+
"@bike4mind/mcp": "1.25.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
12374
|
+
"@bike4mind/services": "2.43.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
12375
|
+
"@bike4mind/utils": "2.3.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
12376
12376
|
"@types/better-sqlite3": "^7.6.13",
|
|
12377
12377
|
"@types/diff": "^5.0.9",
|
|
12378
12378
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -12389,7 +12389,7 @@ var package_default = {
|
|
|
12389
12389
|
optionalDependencies: {
|
|
12390
12390
|
"@vscode/ripgrep": "^1.17.0"
|
|
12391
12391
|
},
|
|
12392
|
-
gitHead: "
|
|
12392
|
+
gitHead: "28e872d1c37191626443350aea9001612017375c"
|
|
12393
12393
|
};
|
|
12394
12394
|
|
|
12395
12395
|
// src/config/constants.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.21-fix-allow-empty-tool-parameters.
|
|
3
|
+
"version": "0.2.21-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@bike4mind/agents": "0.1.0",
|
|
110
|
-
"@bike4mind/common": "2.45.1-fix-allow-empty-tool-parameters.
|
|
111
|
-
"@bike4mind/mcp": "1.25.1-fix-allow-empty-tool-parameters.
|
|
112
|
-
"@bike4mind/services": "2.43.1-fix-allow-empty-tool-parameters.
|
|
113
|
-
"@bike4mind/utils": "2.3.1-fix-allow-empty-tool-parameters.
|
|
110
|
+
"@bike4mind/common": "2.45.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
111
|
+
"@bike4mind/mcp": "1.25.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
112
|
+
"@bike4mind/services": "2.43.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
113
|
+
"@bike4mind/utils": "2.3.1-fix-allow-empty-tool-parameters.18231+28e872d1c",
|
|
114
114
|
"@types/better-sqlite3": "^7.6.13",
|
|
115
115
|
"@types/diff": "^5.0.9",
|
|
116
116
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"optionalDependencies": {
|
|
128
128
|
"@vscode/ripgrep": "^1.17.0"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "28e872d1c37191626443350aea9001612017375c"
|
|
131
131
|
}
|