@bike4mind/cli 0.2.30-fix-model-ranking.19186 → 0.2.30-ja-fix-normalize-tool-parameters.19181

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-C3K7SH2V.js";
4
+ } from "./chunk-LQRI6AKT.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
7
7
  var ARTIFACT_TAG_REGEX = /<artifact\s+(.*?)>([\s\S]*?)<\/artifact>/gi;
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-MXDH363V.js";
9
+ } from "./chunk-TYGSWGIE.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-C3K7SH2V.js";
14
+ } from "./chunk-LQRI6AKT.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
17
17
  import { z } from "zod";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-MXDH363V.js";
5
+ } from "./chunk-TYGSWGIE.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -12,7 +12,7 @@ import {
12
12
  TextGenerationUsageTransaction,
13
13
  TransferCreditTransaction,
14
14
  VideoGenerationUsageTransaction
15
- } from "./chunk-C3K7SH2V.js";
15
+ } from "./chunk-LQRI6AKT.js";
16
16
 
17
17
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
18
18
  import { z } from "zod";
@@ -171,20 +171,6 @@ var ChatModels;
171
171
  })(ChatModels || (ChatModels = {}));
172
172
  var CHAT_MODELS = Object.values(ChatModels);
173
173
  var supportedChatModels = z.nativeEnum(ChatModels);
174
- var REASONING_SUPPORTED_MODELS = /* @__PURE__ */ new Set([
175
- ChatModels.O1,
176
- ChatModels.O3_MINI,
177
- ChatModels.O3,
178
- ChatModels.O4_MINI,
179
- ChatModels.GPT5,
180
- ChatModels.GPT5_MINI,
181
- ChatModels.GPT5_NANO,
182
- ChatModels.GPT5_CHAT_LATEST,
183
- ChatModels.GPT5_1,
184
- ChatModels.GPT5_1_CHAT_LATEST,
185
- ChatModels.GPT5_2,
186
- ChatModels.GPT5_2_CHAT_LATEST
187
- ]);
188
174
  var SpeechToTextModels;
189
175
  (function(SpeechToTextModels2) {
190
176
  SpeechToTextModels2["WHISPER_1"] = "whisper-1";
@@ -8609,7 +8595,6 @@ export {
8609
8595
  ChatModels,
8610
8596
  CHAT_MODELS,
8611
8597
  supportedChatModels,
8612
- REASONING_SUPPORTED_MODELS,
8613
8598
  SpeechToTextModels,
8614
8599
  SPEECH_TO_TEXT_MODELS,
8615
8600
  supportedSpeechToTextModels,
@@ -7,11 +7,11 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-MXDH363V.js";
10
+ } from "./chunk-TYGSWGIE.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
14
- } from "./chunk-C3K7SH2V.js";
14
+ } from "./chunk-LQRI6AKT.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/fabFileService/create.js
17
17
  import { z } from "zod";
@@ -7,7 +7,6 @@ import {
7
7
  ModelBackend,
8
8
  OpenAIEmbeddingModel,
9
9
  PermissionDeniedError,
10
- REASONING_SUPPORTED_MODELS,
11
10
  SpeechToTextModels,
12
11
  SupportedFabFileMimeTypes,
13
12
  VIDEO_SIZE_CONSTRAINTS,
@@ -16,7 +15,7 @@ import {
16
15
  dayjsConfig_default,
17
16
  extractSnippetMeta,
18
17
  settingsMap
19
- } from "./chunk-C3K7SH2V.js";
18
+ } from "./chunk-LQRI6AKT.js";
20
19
  import {
21
20
  Logger
22
21
  } from "./chunk-OCYRD7D6.js";
@@ -2493,13 +2492,7 @@ var AnthropicBackend = class {
2493
2492
  const rawTools = options.tools;
2494
2493
  const normalizedTools = Array.isArray(rawTools) ? rawTools : rawTools ? [rawTools] : void 0;
2495
2494
  options.tools = normalizedTools;
2496
- let system = this.consolidateSystemMessages(messages);
2497
- if (system) {
2498
- system += `
2499
- IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
2500
- } else {
2501
- system = `IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
2502
- }
2495
+ const system = this.consolidateSystemMessages(messages);
2503
2496
  let filteredMessages = ensureToolPairingIntegrity(this.filterRelevantMessages(messages), this.logger);
2504
2497
  const countToolBlocks = (msgs) => {
2505
2498
  let useCount = 0;
@@ -3858,10 +3851,7 @@ var AnthropicBedrockBackend = class extends BaseBedrockBackend {
3858
3851
  }
3859
3852
  return { ...m, content: "" };
3860
3853
  }).filter((m) => m.content !== "" && (Array.isArray(m.content) ? m.content.length > 0 : true));
3861
- let systemMessage = messages.filter((m) => m.role === "system" && m.content).map((m) => typeof m.content === "string" ? m.content : JSON.stringify(m.content)).join("\n");
3862
- const modelIdentity = `IMPORTANT! Only when someone asks, remember that you are specifically the ${model} model.`;
3863
- systemMessage = systemMessage ? `${systemMessage}
3864
- ${modelIdentity}` : modelIdentity;
3854
+ const systemMessage = messages.filter((m) => m.role === "system" && m.content).map((m) => typeof m.content === "string" ? m.content : JSON.stringify(m.content)).join("\n");
3865
3855
  console.log(`[AnthropicBedrockBackend] Preparing payload for model: ${model}`);
3866
3856
  const hasVendorPrefix = model.includes(":") || model.startsWith("global.") || model.startsWith("us.");
3867
3857
  const modelId = hasVendorPrefix ? model : `anthropic.${model}`;
@@ -6577,20 +6567,20 @@ var OpenAIBackend = class {
6577
6567
  stream: true,
6578
6568
  ...options.maxTokens && { max_completion_tokens: options.maxTokens }
6579
6569
  });
6580
- if (REASONING_SUPPORTED_MODELS.has(model)) {
6581
- let reasoningEffort;
6582
- if (options.reasoningEffort) {
6583
- reasoningEffort = options.reasoningEffort;
6584
- this.logger.debug(`Using explicit reasoning effort: ${reasoningEffort}`);
6585
- } else if (options.complexity && effortMap[options.complexity]) {
6586
- reasoningEffort = isGPT5_1Model || isGPT5_2Model ? effortMap_GPT5_1_2[options.complexity] : effortMap[options.complexity];
6587
- this.logger.debug(`Auto-classified reasoning effort from complexity '${options.complexity}': ${reasoningEffort}`);
6588
- }
6589
- if (reasoningEffort) {
6590
- Object.assign(parameters, {
6591
- reasoning_effort: reasoningEffort
6592
- });
6593
- }
6570
+ let reasoningEffort;
6571
+ if (options.reasoningEffort) {
6572
+ reasoningEffort = options.reasoningEffort;
6573
+ this.logger.debug(`Using explicit reasoning effort: ${reasoningEffort}`);
6574
+ } else if (options.complexity && effortMap[options.complexity]) {
6575
+ reasoningEffort = isGPT5_1Model || isGPT5_2Model ? effortMap_GPT5_1_2[options.complexity] : effortMap[options.complexity];
6576
+ this.logger.debug(`Auto-classified reasoning effort from complexity '${options.complexity}': ${reasoningEffort}`);
6577
+ }
6578
+ if (reasoningEffort) {
6579
+ Object.assign(parameters, {
6580
+ reasoning: {
6581
+ effort: reasoningEffort
6582
+ }
6583
+ });
6594
6584
  }
6595
6585
  } else {
6596
6586
  const useStreaming = options.stream && (!options.n || options.n === 1);
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-POB3ZXPL.js";
6
- import "./chunk-MXDH363V.js";
7
- import "./chunk-C3K7SH2V.js";
5
+ } from "./chunk-RZE53KST.js";
6
+ import "./chunk-TYGSWGIE.js";
7
+ import "./chunk-LQRI6AKT.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
10
10
  createFabFile,
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  getEffectiveApiKey,
6
6
  getOpenWeatherKey,
7
7
  getSerperKey
8
- } from "./chunk-J3QZCFJ4.js";
8
+ } from "./chunk-CPAGTKIM.js";
9
9
  import "./chunk-RUI6HNLO.js";
10
10
  import {
11
11
  ConfigStore,
@@ -15,8 +15,8 @@ import {
15
15
  selectActiveBackgroundAgents,
16
16
  useCliStore
17
17
  } from "./chunk-TVW4ZESU.js";
18
- import "./chunk-QESJEZ75.js";
19
- import "./chunk-POB3ZXPL.js";
18
+ import "./chunk-FQ7YLXEB.js";
19
+ import "./chunk-RZE53KST.js";
20
20
  import {
21
21
  BFLImageService,
22
22
  BaseStorage,
@@ -28,7 +28,7 @@ import {
28
28
  OpenAIBackend,
29
29
  OpenAIImageService,
30
30
  XAIImageService
31
- } from "./chunk-MXDH363V.js";
31
+ } from "./chunk-TYGSWGIE.js";
32
32
  import {
33
33
  AiEvents,
34
34
  ApiKeyEvents,
@@ -84,7 +84,7 @@ import {
84
84
  XAI_IMAGE_MODELS,
85
85
  b4mLLMTools,
86
86
  getMcpProviderMetadata
87
- } from "./chunk-C3K7SH2V.js";
87
+ } from "./chunk-LQRI6AKT.js";
88
88
  import {
89
89
  Logger
90
90
  } from "./chunk-OCYRD7D6.js";
@@ -11679,10 +11679,17 @@ var generateMcpTools = async (mcpData) => {
11679
11679
  const providerMetadata = getMcpProviderMetadata(serverName);
11680
11680
  const fallbackDescription = providerMetadata?.defaultToolDescriptions?.[originalToolName] ?? "";
11681
11681
  const rawParameters = rest?.input_schema ?? rest?.inputSchema ?? rest?.parameters;
11682
- const parameters = rawParameters && typeof rawParameters === "object" ? rawParameters : {
11682
+ const rawObj = rawParameters && typeof rawParameters === "object" ? rawParameters : null;
11683
+ if (rawObj && (!rawObj.type || !rawObj.properties)) {
11684
+ Logger.info(`[MCP Schema Fix] ${namespacedToolName}: patching schema \u2014 had type=${JSON.stringify(rawObj.type)}, properties=${JSON.stringify(!!rawObj.properties)}`);
11685
+ }
11686
+ const parameters = rawObj ? {
11687
+ ...rawObj,
11688
+ type: "object",
11689
+ properties: rawObj.properties ?? {}
11690
+ } : {
11683
11691
  type: "object",
11684
- properties: {},
11685
- additionalProperties: true
11692
+ properties: {}
11686
11693
  };
11687
11694
  const optionTools = {
11688
11695
  toolFn: async (args) => {
@@ -14636,7 +14643,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
14636
14643
  // package.json
14637
14644
  var package_default = {
14638
14645
  name: "@bike4mind/cli",
14639
- version: "0.2.30-fix-model-ranking.19186+bf93ed21b",
14646
+ version: "0.2.30-ja-fix-normalize-tool-parameters.19181+2bf54175d",
14640
14647
  type: "module",
14641
14648
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
14642
14649
  license: "UNLICENSED",
@@ -14750,10 +14757,10 @@ var package_default = {
14750
14757
  },
14751
14758
  devDependencies: {
14752
14759
  "@bike4mind/agents": "0.1.0",
14753
- "@bike4mind/common": "2.51.1-fix-model-ranking.19186+bf93ed21b",
14754
- "@bike4mind/mcp": "1.30.1-fix-model-ranking.19186+bf93ed21b",
14755
- "@bike4mind/services": "2.49.1-fix-model-ranking.19186+bf93ed21b",
14756
- "@bike4mind/utils": "2.6.1-fix-model-ranking.19186+bf93ed21b",
14760
+ "@bike4mind/common": "2.51.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
14761
+ "@bike4mind/mcp": "1.30.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
14762
+ "@bike4mind/services": "2.49.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
14763
+ "@bike4mind/utils": "2.6.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
14757
14764
  "@types/better-sqlite3": "^7.6.13",
14758
14765
  "@types/diff": "^5.0.9",
14759
14766
  "@types/jsonwebtoken": "^9.0.4",
@@ -14771,7 +14778,7 @@ var package_default = {
14771
14778
  optionalDependencies: {
14772
14779
  "@vscode/ripgrep": "^1.17.0"
14773
14780
  },
14774
- gitHead: "bf93ed21b1cc484496fb8c38aa0b4170b3c053ae"
14781
+ gitHead: "2bf54175dff034dd863f38e45f926445ee382353"
14775
14782
  };
14776
14783
 
14777
14784
  // src/config/constants.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-C3K7SH2V.js";
4
+ } from "./chunk-LQRI6AKT.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/llmMarkdownGenerator.js
7
7
  var DEFAULT_OPTIONS = {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-C3K7SH2V.js";
4
+ } from "./chunk-LQRI6AKT.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/markdownGenerator.js
7
7
  var DEFAULT_OPTIONS = {
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  findMostSimilarMemento,
4
4
  getRelevantMementos
5
- } from "./chunk-J3QZCFJ4.js";
6
- import "./chunk-MXDH363V.js";
7
- import "./chunk-C3K7SH2V.js";
5
+ } from "./chunk-CPAGTKIM.js";
6
+ import "./chunk-TYGSWGIE.js";
7
+ import "./chunk-LQRI6AKT.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
10
10
  findMostSimilarMemento,
@@ -232,7 +232,6 @@ import {
232
232
  QuestStatusSchema,
233
233
  REASONING_EFFORT_DESCRIPTIONS,
234
234
  REASONING_EFFORT_LABELS,
235
- REASONING_SUPPORTED_MODELS,
236
235
  RESTRICTION_OPERATIONS,
237
236
  RESTRICTION_SUBJECT_TYPES,
238
237
  RapidReplyFallbackBehaviors,
@@ -419,7 +418,7 @@ import {
419
418
  validateReactArtifactV2,
420
419
  validateSvgArtifactV2,
421
420
  wikiMarkupToAdf
422
- } from "./chunk-C3K7SH2V.js";
421
+ } from "./chunk-LQRI6AKT.js";
423
422
  export {
424
423
  ALL_IMAGE_MODELS,
425
424
  ALL_IMAGE_SIZES,
@@ -654,7 +653,6 @@ export {
654
653
  QuestStatusSchema,
655
654
  REASONING_EFFORT_DESCRIPTIONS,
656
655
  REASONING_EFFORT_LABELS,
657
- REASONING_SUPPORTED_MODELS,
658
656
  RESTRICTION_OPERATIONS,
659
657
  RESTRICTION_SUBJECT_TYPES,
660
658
  RapidReplyFallbackBehaviors,
@@ -134,12 +134,12 @@ import {
134
134
  validateMermaidSyntax,
135
135
  warmUpSettingsCache,
136
136
  withRetry
137
- } from "./chunk-MXDH363V.js";
137
+ } from "./chunk-TYGSWGIE.js";
138
138
  import {
139
139
  buildRateLimitLogEntry,
140
140
  isNearLimit,
141
141
  parseRateLimitHeaders
142
- } from "./chunk-C3K7SH2V.js";
142
+ } from "./chunk-LQRI6AKT.js";
143
143
  import {
144
144
  Logger,
145
145
  NotificationDeduplicator,
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  SubtractCreditsSchema,
4
4
  subtractCredits
5
- } from "./chunk-QESJEZ75.js";
6
- import "./chunk-MXDH363V.js";
7
- import "./chunk-C3K7SH2V.js";
5
+ } from "./chunk-FQ7YLXEB.js";
6
+ import "./chunk-TYGSWGIE.js";
7
+ import "./chunk-LQRI6AKT.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
10
10
  SubtractCreditsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.30-fix-model-ranking.19186+bf93ed21b",
3
+ "version": "0.2.30-ja-fix-normalize-tool-parameters.19181+2bf54175d",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -114,10 +114,10 @@
114
114
  },
115
115
  "devDependencies": {
116
116
  "@bike4mind/agents": "0.1.0",
117
- "@bike4mind/common": "2.51.1-fix-model-ranking.19186+bf93ed21b",
118
- "@bike4mind/mcp": "1.30.1-fix-model-ranking.19186+bf93ed21b",
119
- "@bike4mind/services": "2.49.1-fix-model-ranking.19186+bf93ed21b",
120
- "@bike4mind/utils": "2.6.1-fix-model-ranking.19186+bf93ed21b",
117
+ "@bike4mind/common": "2.51.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
118
+ "@bike4mind/mcp": "1.30.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
119
+ "@bike4mind/services": "2.49.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
120
+ "@bike4mind/utils": "2.6.1-ja-fix-normalize-tool-parameters.19181+2bf54175d",
121
121
  "@types/better-sqlite3": "^7.6.13",
122
122
  "@types/diff": "^5.0.9",
123
123
  "@types/jsonwebtoken": "^9.0.4",
@@ -135,5 +135,5 @@
135
135
  "optionalDependencies": {
136
136
  "@vscode/ripgrep": "^1.17.0"
137
137
  },
138
- "gitHead": "bf93ed21b1cc484496fb8c38aa0b4170b3c053ae"
138
+ "gitHead": "2bf54175dff034dd863f38e45f926445ee382353"
139
139
  }