@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.
@@ -6,7 +6,7 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-BKQ3OOVN.js";
9
+ } from "./chunk-R6PC7Y5F.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
@@ -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 && parameters) {
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, parameters } = tool;
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 && parameters && toolFn) {
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 && parameters) {
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
- if (id && name && parameters && toolFn) {
3211
- const result = await toolFn(JSON.parse(parameters));
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, parameters: parameters2 } = tool;
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 && parameters2 && toolFn) {
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 && parameters2) {
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, parameters: parameters2 } = tool;
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 && parameters2 && toolFn) {
6932
+ if (id && name && toolFn) {
6929
6933
  try {
6930
6934
  const result = await toolFn(JSON.parse(parameters2));
6931
6935
  this.pushToolMessages(messages, {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-BKQ3OOVN.js";
5
+ } from "./chunk-R6PC7Y5F.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -7,7 +7,7 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-BKQ3OOVN.js";
10
+ } from "./chunk-R6PC7Y5F.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-IPZQZ3JV.js";
6
- import "./chunk-BKQ3OOVN.js";
5
+ } from "./chunk-TE2BC3P4.js";
6
+ import "./chunk-R6PC7Y5F.js";
7
7
  import "./chunk-QZAVSLFW.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
package/dist/index.js CHANGED
@@ -4,12 +4,12 @@ import {
4
4
  getEffectiveApiKey,
5
5
  getOpenWeatherKey,
6
6
  getSerperKey
7
- } from "./chunk-UZSJIKOL.js";
7
+ } from "./chunk-IZFEZ3UT.js";
8
8
  import {
9
9
  ConfigStore
10
10
  } from "./chunk-VFQF2JIT.js";
11
- import "./chunk-VGFZ6AA3.js";
12
- import "./chunk-IPZQZ3JV.js";
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-BKQ3OOVN.js";
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.18230+84a90f5c4",
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.18230+84a90f5c4",
12373
- "@bike4mind/mcp": "1.25.1-fix-allow-empty-tool-parameters.18230+84a90f5c4",
12374
- "@bike4mind/services": "2.43.1-fix-allow-empty-tool-parameters.18230+84a90f5c4",
12375
- "@bike4mind/utils": "2.3.1-fix-allow-empty-tool-parameters.18230+84a90f5c4",
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: "84a90f5c4950d7592316baf2a65466025f26eef4"
12392
+ gitHead: "28e872d1c37191626443350aea9001612017375c"
12393
12393
  };
12394
12394
 
12395
12395
  // src/config/constants.ts
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  findMostSimilarMemento,
4
4
  getRelevantMementos
5
- } from "./chunk-UZSJIKOL.js";
6
- import "./chunk-BKQ3OOVN.js";
5
+ } from "./chunk-IZFEZ3UT.js";
6
+ import "./chunk-R6PC7Y5F.js";
7
7
  import "./chunk-QZAVSLFW.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
@@ -132,7 +132,7 @@ import {
132
132
  validateMermaidSyntax,
133
133
  warmUpSettingsCache,
134
134
  withRetry
135
- } from "./chunk-BKQ3OOVN.js";
135
+ } from "./chunk-R6PC7Y5F.js";
136
136
  import "./chunk-QZAVSLFW.js";
137
137
  import {
138
138
  Logger,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  SubtractCreditsSchema,
4
4
  subtractCredits
5
- } from "./chunk-VGFZ6AA3.js";
6
- import "./chunk-BKQ3OOVN.js";
5
+ } from "./chunk-RYYR733I.js";
6
+ import "./chunk-R6PC7Y5F.js";
7
7
  import "./chunk-QZAVSLFW.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
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.18230+84a90f5c4",
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.18230+84a90f5c4",
111
- "@bike4mind/mcp": "1.25.1-fix-allow-empty-tool-parameters.18230+84a90f5c4",
112
- "@bike4mind/services": "2.43.1-fix-allow-empty-tool-parameters.18230+84a90f5c4",
113
- "@bike4mind/utils": "2.3.1-fix-allow-empty-tool-parameters.18230+84a90f5c4",
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": "84a90f5c4950d7592316baf2a65466025f26eef4"
130
+ "gitHead": "28e872d1c37191626443350aea9001612017375c"
131
131
  }