@bike4mind/cli 0.2.31-fix-builtin-tool-chaining.19587 → 0.2.31-fix-delegate-tool-thoroughness-docs.19587
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-A5YKMZCL.js → chunk-4P27WV34.js} +1 -1
- package/dist/{chunk-R425MHXS.js → chunk-AR653ZD5.js} +6 -6
- package/dist/{chunk-DTYEU6DM.js → chunk-DQHCE3TN.js} +1 -1
- package/dist/{chunk-FSLFHRYF.js → chunk-PV6PZFPC.js} +136 -43
- package/dist/{chunk-L34KEZJO.js → chunk-S6AUIWWB.js} +1 -1
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/updateCommand.js +1 -1
- package/dist/{create-ANNX773L.js → create-PVJSCD5H.js} +2 -2
- package/dist/index.js +8 -8
- package/dist/{mementoService-CTI5BP37.js → mementoService-RDPCVXWF.js} +2 -2
- package/dist/{src-4VPFAKJW.js → src-DCF72PTU.js} +1 -1
- package/dist/{subtractCredits-7VTNTUYS.js → subtractCredits-K4PWRUF4.js} +2 -2
- package/package.json +6 -6
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.31-fix-
|
|
6
|
+
version: "0.2.31-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -114,10 +114,10 @@ var package_default = {
|
|
|
114
114
|
},
|
|
115
115
|
devDependencies: {
|
|
116
116
|
"@bike4mind/agents": "0.1.0",
|
|
117
|
-
"@bike4mind/common": "2.52.1-fix-
|
|
118
|
-
"@bike4mind/mcp": "1.31.1-fix-
|
|
119
|
-
"@bike4mind/services": "2.50.1-fix-
|
|
120
|
-
"@bike4mind/utils": "2.7.1-fix-
|
|
117
|
+
"@bike4mind/common": "2.52.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
118
|
+
"@bike4mind/mcp": "1.31.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
119
|
+
"@bike4mind/services": "2.50.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
120
|
+
"@bike4mind/utils": "2.7.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
121
121
|
"@types/better-sqlite3": "^7.6.13",
|
|
122
122
|
"@types/diff": "^5.0.9",
|
|
123
123
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -138,7 +138,7 @@ var package_default = {
|
|
|
138
138
|
optionalDependencies: {
|
|
139
139
|
"@vscode/ripgrep": "^1.17.0"
|
|
140
140
|
},
|
|
141
|
-
gitHead: "
|
|
141
|
+
gitHead: "32ae3877cab15da7e7aae6be3ff3479b7e10011a"
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
// src/utils/updateChecker.ts
|
|
@@ -3054,20 +3054,38 @@ IMPORTANT! Only when someone asks, remember that you are specifically the ${mode
|
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
3056
|
await cb(["\n\n"], { toolsUsed });
|
|
3057
|
+
const hasMcpTool = func.some((tool) => {
|
|
3058
|
+
if (!tool?.name)
|
|
3059
|
+
return false;
|
|
3060
|
+
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
3061
|
+
});
|
|
3057
3062
|
this.logger.info("[Tool Execution] Making recursive call after tool execution", {
|
|
3058
3063
|
model,
|
|
3059
3064
|
toolCallIteration: toolCallCount + 1,
|
|
3060
3065
|
messageCountAfter: messages.length,
|
|
3061
3066
|
toolsExecuted: func.filter((t) => t?.name).map((t) => t.name),
|
|
3067
|
+
hasMcpTool,
|
|
3068
|
+
willKeepTools: hasMcpTool,
|
|
3062
3069
|
totalToolsUsed: toolsUsed.length
|
|
3063
3070
|
});
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
+
if (hasMcpTool) {
|
|
3072
|
+
await this.complete(model, messages, {
|
|
3073
|
+
...options,
|
|
3074
|
+
_internal: {
|
|
3075
|
+
...options._internal,
|
|
3076
|
+
toolCallCount: toolCallCount + 1
|
|
3077
|
+
}
|
|
3078
|
+
}, cb, toolsUsed);
|
|
3079
|
+
} else {
|
|
3080
|
+
await this.complete(model, messages, {
|
|
3081
|
+
...options,
|
|
3082
|
+
tools: void 0,
|
|
3083
|
+
_internal: {
|
|
3084
|
+
...options._internal,
|
|
3085
|
+
toolCallCount: toolCallCount + 1
|
|
3086
|
+
}
|
|
3087
|
+
}, cb, toolsUsed);
|
|
3088
|
+
}
|
|
3071
3089
|
} else {
|
|
3072
3090
|
const thinkingBlocks = this.getThinkingBlocks();
|
|
3073
3091
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback with ${thinkingBlocks?.length || 0} thinking blocks`);
|
|
@@ -3177,22 +3195,41 @@ IMPORTANT! Only when someone asks, remember that you are specifically the ${mode
|
|
|
3177
3195
|
});
|
|
3178
3196
|
}
|
|
3179
3197
|
}
|
|
3198
|
+
const hasMcpTool = func.some((tool) => {
|
|
3199
|
+
if (!tool?.name)
|
|
3200
|
+
return false;
|
|
3201
|
+
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
3202
|
+
});
|
|
3180
3203
|
this.logger.info("[Tool Execution] Making recursive call after tool execution (non-streaming)", {
|
|
3181
3204
|
model,
|
|
3182
3205
|
toolCallIteration: toolCallCount + 1,
|
|
3183
3206
|
messageCountAfter: messages.length,
|
|
3184
3207
|
toolsExecuted: func.filter((t) => t?.name).map((t) => t.name),
|
|
3208
|
+
hasMcpTool,
|
|
3209
|
+
willKeepTools: hasMcpTool,
|
|
3185
3210
|
totalToolsUsed: toolsUsed.length
|
|
3186
3211
|
});
|
|
3187
3212
|
await cb(["\n\n"], { toolsUsed });
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3213
|
+
if (hasMcpTool) {
|
|
3214
|
+
await this.complete(model, messages, {
|
|
3215
|
+
...options,
|
|
3216
|
+
_internal: {
|
|
3217
|
+
...options._internal,
|
|
3218
|
+
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
3219
|
+
toolCallCount: toolCallCount + 1
|
|
3220
|
+
}
|
|
3221
|
+
}, cb, toolsUsed);
|
|
3222
|
+
} else {
|
|
3223
|
+
await this.complete(model, messages, {
|
|
3224
|
+
...options,
|
|
3225
|
+
tools: void 0,
|
|
3226
|
+
_internal: {
|
|
3227
|
+
...options._internal,
|
|
3228
|
+
// Preserve enableIdleTimeout, idleTimeoutMs
|
|
3229
|
+
toolCallCount: toolCallCount + 1
|
|
3230
|
+
}
|
|
3231
|
+
}, cb, toolsUsed);
|
|
3232
|
+
}
|
|
3196
3233
|
} else {
|
|
3197
3234
|
const thinkingBlocks = this.getThinkingBlocks();
|
|
3198
3235
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback with ${thinkingBlocks?.length || 0} thinking blocks`);
|
|
@@ -6965,13 +7002,29 @@ var OpenAIBackend = class {
|
|
|
6965
7002
|
}
|
|
6966
7003
|
}
|
|
6967
7004
|
}
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
7005
|
+
const hasMcpTool = func.some((tool) => {
|
|
7006
|
+
if (!tool?.name)
|
|
7007
|
+
return false;
|
|
7008
|
+
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
7009
|
+
});
|
|
7010
|
+
if (hasMcpTool) {
|
|
7011
|
+
await this.complete(model, messages, {
|
|
7012
|
+
...options,
|
|
7013
|
+
_internal: {
|
|
7014
|
+
...options._internal,
|
|
7015
|
+
toolCallCount: toolCallCount + 1
|
|
7016
|
+
}
|
|
7017
|
+
}, callback, toolsUsed);
|
|
7018
|
+
} else {
|
|
7019
|
+
await this.complete(model, messages, {
|
|
7020
|
+
...options,
|
|
7021
|
+
tools: void 0,
|
|
7022
|
+
_internal: {
|
|
7023
|
+
...options._internal,
|
|
7024
|
+
toolCallCount: toolCallCount + 1
|
|
7025
|
+
}
|
|
7026
|
+
}, callback, toolsUsed);
|
|
7027
|
+
}
|
|
6975
7028
|
} else {
|
|
6976
7029
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback`);
|
|
6977
7030
|
await callback([null], {
|
|
@@ -7344,13 +7397,25 @@ var XAIBackend = class {
|
|
|
7344
7397
|
name: toolCall.function.name,
|
|
7345
7398
|
parameters: toolCall.function.arguments
|
|
7346
7399
|
}, result.toString());
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
...options
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7400
|
+
const isMcpTool = options.tools?.find((t) => t.toolSchema.name === toolCall.function.name)?._isMcpTool;
|
|
7401
|
+
if (isMcpTool) {
|
|
7402
|
+
await this.complete(model, messages, {
|
|
7403
|
+
...options,
|
|
7404
|
+
_internal: {
|
|
7405
|
+
...options._internal,
|
|
7406
|
+
toolCallCount: toolCallCount + 1
|
|
7407
|
+
}
|
|
7408
|
+
}, callback, toolsUsed);
|
|
7409
|
+
} else {
|
|
7410
|
+
await this.complete(model, messages, {
|
|
7411
|
+
...options,
|
|
7412
|
+
tools: void 0,
|
|
7413
|
+
_internal: {
|
|
7414
|
+
...options._internal,
|
|
7415
|
+
toolCallCount: toolCallCount + 1
|
|
7416
|
+
}
|
|
7417
|
+
}, callback, toolsUsed);
|
|
7418
|
+
}
|
|
7354
7419
|
return;
|
|
7355
7420
|
} catch (error) {
|
|
7356
7421
|
if (error instanceof PermissionDeniedError) {
|
|
@@ -7362,13 +7427,25 @@ var XAIBackend = class {
|
|
|
7362
7427
|
name: toolCall.function.name,
|
|
7363
7428
|
parameters: toolCall.function.arguments
|
|
7364
7429
|
}, `Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
...options
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7430
|
+
const isMcpToolError = options.tools?.find((t) => t.toolSchema.name === toolCall.function.name)?._isMcpTool;
|
|
7431
|
+
if (isMcpToolError) {
|
|
7432
|
+
await this.complete(model, messages, {
|
|
7433
|
+
...options,
|
|
7434
|
+
_internal: {
|
|
7435
|
+
...options._internal,
|
|
7436
|
+
toolCallCount: toolCallCount + 1
|
|
7437
|
+
}
|
|
7438
|
+
}, callback, toolsUsed);
|
|
7439
|
+
} else {
|
|
7440
|
+
await this.complete(model, messages, {
|
|
7441
|
+
...options,
|
|
7442
|
+
tools: void 0,
|
|
7443
|
+
_internal: {
|
|
7444
|
+
...options._internal,
|
|
7445
|
+
toolCallCount: toolCallCount + 1
|
|
7446
|
+
}
|
|
7447
|
+
}, callback, toolsUsed);
|
|
7448
|
+
}
|
|
7372
7449
|
return;
|
|
7373
7450
|
}
|
|
7374
7451
|
}
|
|
@@ -7479,13 +7556,29 @@ var XAIBackend = class {
|
|
|
7479
7556
|
}
|
|
7480
7557
|
}
|
|
7481
7558
|
}
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7559
|
+
const hasMcpTool = func.some((tool) => {
|
|
7560
|
+
if (!tool?.name)
|
|
7561
|
+
return false;
|
|
7562
|
+
return options.tools?.find((t) => t.toolSchema.name === tool.name)?._isMcpTool;
|
|
7563
|
+
});
|
|
7564
|
+
if (hasMcpTool) {
|
|
7565
|
+
await this.complete(model, messages, {
|
|
7566
|
+
...options,
|
|
7567
|
+
_internal: {
|
|
7568
|
+
...options._internal,
|
|
7569
|
+
toolCallCount: toolCallCount + 1
|
|
7570
|
+
}
|
|
7571
|
+
}, callback, toolsUsed);
|
|
7572
|
+
} else {
|
|
7573
|
+
await this.complete(model, messages, {
|
|
7574
|
+
...options,
|
|
7575
|
+
tools: void 0,
|
|
7576
|
+
_internal: {
|
|
7577
|
+
...options._internal,
|
|
7578
|
+
toolCallCount: toolCallCount + 1
|
|
7579
|
+
}
|
|
7580
|
+
}, callback, toolsUsed);
|
|
7581
|
+
}
|
|
7489
7582
|
} else {
|
|
7490
7583
|
this.logger.debug(`[Tool Execution] executeTools=false, passing tool calls to callback`);
|
|
7491
7584
|
await callback([null], {
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./chunk-GQGOWACU.js";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-4P27WV34.js";
|
|
4
|
+
import "./chunk-S6AUIWWB.js";
|
|
5
5
|
import "./chunk-BPFEGDC7.js";
|
|
6
6
|
import "./chunk-BDQBOLYG.js";
|
|
7
7
|
import {
|
|
8
8
|
getEffectiveApiKey,
|
|
9
9
|
getOpenWeatherKey,
|
|
10
10
|
getSerperKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DQHCE3TN.js";
|
|
12
12
|
import {
|
|
13
13
|
ConfigStore,
|
|
14
14
|
logger
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
checkForUpdate,
|
|
18
18
|
package_default
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AR653ZD5.js";
|
|
20
20
|
import {
|
|
21
21
|
selectActiveBackgroundAgents,
|
|
22
22
|
useCliStore
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
OpenAIBackend,
|
|
33
33
|
OpenAIImageService,
|
|
34
34
|
XAIImageService
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-PV6PZFPC.js";
|
|
36
36
|
import {
|
|
37
37
|
AiEvents,
|
|
38
38
|
ApiKeyEvents,
|
|
@@ -18802,9 +18802,9 @@ ${agentDescriptions}
|
|
|
18802
18802
|
type: "string",
|
|
18803
18803
|
enum: ["quick", "medium", "very_thorough"],
|
|
18804
18804
|
description: `How thoroughly to execute:
|
|
18805
|
-
- quick: Fast lookup,
|
|
18806
|
-
- medium: Balanced exploration
|
|
18807
|
-
- very_thorough: Comprehensive analysis,
|
|
18805
|
+
- quick: Fast lookup, fewest iterations
|
|
18806
|
+
- medium: Balanced exploration (default)
|
|
18807
|
+
- very_thorough: Comprehensive analysis, maximum iterations`
|
|
18808
18808
|
},
|
|
18809
18809
|
variables: {
|
|
18810
18810
|
type: "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.31-fix-
|
|
3
|
+
"version": "0.2.31-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@bike4mind/agents": "0.1.0",
|
|
114
|
-
"@bike4mind/common": "2.52.1-fix-
|
|
115
|
-
"@bike4mind/mcp": "1.31.1-fix-
|
|
116
|
-
"@bike4mind/services": "2.50.1-fix-
|
|
117
|
-
"@bike4mind/utils": "2.7.1-fix-
|
|
114
|
+
"@bike4mind/common": "2.52.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
115
|
+
"@bike4mind/mcp": "1.31.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
116
|
+
"@bike4mind/services": "2.50.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
117
|
+
"@bike4mind/utils": "2.7.1-fix-delegate-tool-thoroughness-docs.19587+32ae3877c",
|
|
118
118
|
"@types/better-sqlite3": "^7.6.13",
|
|
119
119
|
"@types/diff": "^5.0.9",
|
|
120
120
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"optionalDependencies": {
|
|
136
136
|
"@vscode/ripgrep": "^1.17.0"
|
|
137
137
|
},
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "32ae3877cab15da7e7aae6be3ff3479b7e10011a"
|
|
139
139
|
}
|