@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.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-FSLFHRYF.js";
5
+ } from "./chunk-PV6PZFPC.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@bike4mind/cli",
6
- version: "0.2.31-fix-builtin-tool-chaining.19587+cfe012f40",
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-builtin-tool-chaining.19587+cfe012f40",
118
- "@bike4mind/mcp": "1.31.1-fix-builtin-tool-chaining.19587+cfe012f40",
119
- "@bike4mind/services": "2.50.1-fix-builtin-tool-chaining.19587+cfe012f40",
120
- "@bike4mind/utils": "2.7.1-fix-builtin-tool-chaining.19587+cfe012f40",
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: "cfe012f40cbb8c48961039203516d1bbe3cd7a4c"
141
+ gitHead: "32ae3877cab15da7e7aae6be3ff3479b7e10011a"
142
142
  };
143
143
 
144
144
  // src/utils/updateChecker.ts
@@ -6,7 +6,7 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-FSLFHRYF.js";
9
+ } from "./chunk-PV6PZFPC.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
@@ -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
- await this.complete(model, messages, {
3065
- ...options,
3066
- _internal: {
3067
- ...options._internal,
3068
- toolCallCount: toolCallCount + 1
3069
- }
3070
- }, cb, toolsUsed);
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
- await this.complete(model, messages, {
3189
- ...options,
3190
- _internal: {
3191
- ...options._internal,
3192
- // Preserve enableIdleTimeout, idleTimeoutMs
3193
- toolCallCount: toolCallCount + 1
3194
- }
3195
- }, cb, toolsUsed);
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
- await this.complete(model, messages, {
6969
- ...options,
6970
- _internal: {
6971
- ...options._internal,
6972
- toolCallCount: toolCallCount + 1
6973
- }
6974
- }, callback, toolsUsed);
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
- await this.complete(model, messages, {
7348
- ...options,
7349
- _internal: {
7350
- ...options._internal,
7351
- toolCallCount: toolCallCount + 1
7352
- }
7353
- }, callback, toolsUsed);
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
- await this.complete(model, messages, {
7366
- ...options,
7367
- _internal: {
7368
- ...options._internal,
7369
- toolCallCount: toolCallCount + 1
7370
- }
7371
- }, callback, toolsUsed);
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
- await this.complete(model, messages, {
7483
- ...options,
7484
- _internal: {
7485
- ...options._internal,
7486
- toolCallCount: toolCallCount + 1
7487
- }
7488
- }, callback, toolsUsed);
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], {
@@ -7,7 +7,7 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-FSLFHRYF.js";
10
+ } from "./chunk-PV6PZFPC.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
@@ -3,7 +3,7 @@ import {
3
3
  fetchLatestVersion,
4
4
  forceCheckForUpdate,
5
5
  package_default
6
- } from "../chunk-R425MHXS.js";
6
+ } from "../chunk-AR653ZD5.js";
7
7
 
8
8
  // src/commands/doctorCommand.ts
9
9
  import { execSync } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  forceCheckForUpdate,
4
4
  package_default
5
- } from "../chunk-R425MHXS.js";
5
+ } from "../chunk-AR653ZD5.js";
6
6
 
7
7
  // src/commands/updateCommand.ts
8
8
  import { execSync } from "child_process";
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-L34KEZJO.js";
6
- import "./chunk-FSLFHRYF.js";
5
+ } from "./chunk-S6AUIWWB.js";
6
+ import "./chunk-PV6PZFPC.js";
7
7
  import "./chunk-PLA2VBQW.js";
8
8
  import "./chunk-PFBYGCOW.js";
9
9
  export {
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import "./chunk-GQGOWACU.js";
3
- import "./chunk-A5YKMZCL.js";
4
- import "./chunk-L34KEZJO.js";
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-DTYEU6DM.js";
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-R425MHXS.js";
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-FSLFHRYF.js";
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, 1-2 iterations
18806
- - medium: Balanced exploration, 3-5 iterations (default)
18807
- - very_thorough: Comprehensive analysis, 8-10+ iterations`
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",
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  findMostSimilarMemento,
4
4
  getRelevantMementos
5
- } from "./chunk-DTYEU6DM.js";
6
- import "./chunk-FSLFHRYF.js";
5
+ } from "./chunk-DQHCE3TN.js";
6
+ import "./chunk-PV6PZFPC.js";
7
7
  import "./chunk-PLA2VBQW.js";
8
8
  import "./chunk-PFBYGCOW.js";
9
9
  export {
@@ -139,7 +139,7 @@ import {
139
139
  validateUrlForFetch,
140
140
  warmUpSettingsCache,
141
141
  withRetry
142
- } from "./chunk-FSLFHRYF.js";
142
+ } from "./chunk-PV6PZFPC.js";
143
143
  import {
144
144
  buildRateLimitLogEntry,
145
145
  isNearLimit,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  SubtractCreditsSchema,
4
4
  subtractCredits
5
- } from "./chunk-A5YKMZCL.js";
6
- import "./chunk-FSLFHRYF.js";
5
+ } from "./chunk-4P27WV34.js";
6
+ import "./chunk-PV6PZFPC.js";
7
7
  import "./chunk-PLA2VBQW.js";
8
8
  import "./chunk-PFBYGCOW.js";
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.31-fix-builtin-tool-chaining.19587+cfe012f40",
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-builtin-tool-chaining.19587+cfe012f40",
115
- "@bike4mind/mcp": "1.31.1-fix-builtin-tool-chaining.19587+cfe012f40",
116
- "@bike4mind/services": "2.50.1-fix-builtin-tool-chaining.19587+cfe012f40",
117
- "@bike4mind/utils": "2.7.1-fix-builtin-tool-chaining.19587+cfe012f40",
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": "cfe012f40cbb8c48961039203516d1bbe3cd7a4c"
138
+ "gitHead": "32ae3877cab15da7e7aae6be3ff3479b7e10011a"
139
139
  }