@bike4mind/cli 0.2.29-ja-fix-github-slack-notify-non-subscriber-filtering.18913 → 0.2.29-ja-feat-slack-direct-react-agent.18922

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.
@@ -7,7 +7,7 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-RMXZWMAY.js";
10
+ } from "./chunk-I6UMBQ3N.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
@@ -6843,6 +6843,24 @@ var OpenAIBackend = class {
6843
6843
  tool_calls: msg.tool_calls
6844
6844
  };
6845
6845
  }
6846
+ if (msg.role === "assistant" && Array.isArray(msg.content)) {
6847
+ const contentTypes = msg.content.map((b) => b.type);
6848
+ if (contentTypes.includes("tool_use")) {
6849
+ this.logger.error("[OpenAI formatMessages] Anthropic tool_use blocks detected \u2014 will cause 400 error", {
6850
+ model,
6851
+ contentTypes
6852
+ });
6853
+ }
6854
+ }
6855
+ if (msg.role === "user" && Array.isArray(msg.content)) {
6856
+ const contentTypes = msg.content.map((b) => b.type);
6857
+ if (contentTypes.includes("tool_result")) {
6858
+ this.logger.error("[OpenAI formatMessages] Anthropic tool_result blocks detected \u2014 will cause 400 error", {
6859
+ model,
6860
+ contentTypes
6861
+ });
6862
+ }
6863
+ }
6846
6864
  return msg;
6847
6865
  });
6848
6866
  return isO1Model ? formattedMessages : [systemMessage, ...formattedMessages];
@@ -6,7 +6,7 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-RMXZWMAY.js";
9
+ } from "./chunk-I6UMBQ3N.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-RMXZWMAY.js";
5
+ } from "./chunk-I6UMBQ3N.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-XOTWLDQT.js";
6
- import "./chunk-RMXZWMAY.js";
5
+ } from "./chunk-5QW6NKWM.js";
6
+ import "./chunk-I6UMBQ3N.js";
7
7
  import "./chunk-FKJTU7KU.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  getEffectiveApiKey,
6
6
  getOpenWeatherKey,
7
7
  getSerperKey
8
- } from "./chunk-533OGVA7.js";
8
+ } from "./chunk-ZJTOVY35.js";
9
9
  import {
10
10
  ConfigStore,
11
11
  logger
@@ -14,8 +14,8 @@ import {
14
14
  selectActiveBackgroundAgents,
15
15
  useCliStore
16
16
  } from "./chunk-TVW4ZESU.js";
17
- import "./chunk-HXRGW67O.js";
18
- import "./chunk-XOTWLDQT.js";
17
+ import "./chunk-ZZ2U2DXH.js";
18
+ import "./chunk-5QW6NKWM.js";
19
19
  import {
20
20
  BFLImageService,
21
21
  BaseStorage,
@@ -27,7 +27,7 @@ import {
27
27
  OpenAIBackend,
28
28
  OpenAIImageService,
29
29
  XAIImageService
30
- } from "./chunk-RMXZWMAY.js";
30
+ } from "./chunk-I6UMBQ3N.js";
31
31
  import {
32
32
  AiEvents,
33
33
  ApiKeyEvents,
@@ -3625,23 +3625,33 @@ Remember: You are an autonomous AGENT. Act independently and solve problems proa
3625
3625
  }
3626
3626
  }
3627
3627
  /**
3628
- * Build and append tool call/result messages for the conversation history
3628
+ * Build and append tool call/result messages for the conversation history.
3629
+ * Delegates to the backend's native pushToolMessages when available so each
3630
+ * backend can format messages for its own API (OpenAI, Anthropic, Gemini, etc.).
3631
+ * Falls back to Anthropic format for backends that don't implement pushToolMessages.
3629
3632
  */
3630
3633
  appendToolMessages(messages, toolUse, observation, thinkingBlocks) {
3631
3634
  const params = this.parseToolArguments(toolUse.arguments);
3632
- const msgToolCallId = `${toolUse.name}_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
3633
- const assistantContent = [
3634
- ...thinkingBlocks,
3635
- {
3636
- type: "tool_use",
3637
- id: msgToolCallId,
3638
- name: toolUse.name,
3639
- input: params
3640
- }
3641
- ];
3635
+ const msgToolCallId = `${toolUse.name}_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
3636
+ if (this.context.llm.pushToolMessages) {
3637
+ this.context.llm.pushToolMessages(
3638
+ messages,
3639
+ { id: msgToolCallId, name: toolUse.name, parameters: toolUse.arguments || JSON.stringify(params ?? {}) },
3640
+ observation
3641
+ );
3642
+ return;
3643
+ }
3642
3644
  messages.push({
3643
3645
  role: "assistant",
3644
- content: assistantContent
3646
+ content: [
3647
+ ...thinkingBlocks,
3648
+ {
3649
+ type: "tool_use",
3650
+ id: msgToolCallId,
3651
+ name: toolUse.name,
3652
+ input: params
3653
+ }
3654
+ ]
3645
3655
  });
3646
3656
  messages.push({
3647
3657
  role: "user",
@@ -13634,6 +13644,9 @@ var NotifyingLlmBackend = class {
13634
13644
  constructor(inner, backgroundManager) {
13635
13645
  this.inner = inner;
13636
13646
  this.backgroundManager = backgroundManager;
13647
+ if (inner.pushToolMessages) {
13648
+ this.pushToolMessages = (messages, tool, result) => inner.pushToolMessages(messages, tool, result);
13649
+ }
13637
13650
  }
13638
13651
  get currentModel() {
13639
13652
  return this.inner.currentModel;
@@ -13800,7 +13813,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
13800
13813
  // package.json
13801
13814
  var package_default = {
13802
13815
  name: "@bike4mind/cli",
13803
- version: "0.2.29-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
13816
+ version: "0.2.29-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
13804
13817
  type: "module",
13805
13818
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
13806
13819
  license: "UNLICENSED",
@@ -13914,10 +13927,10 @@ var package_default = {
13914
13927
  },
13915
13928
  devDependencies: {
13916
13929
  "@bike4mind/agents": "0.1.0",
13917
- "@bike4mind/common": "2.50.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
13918
- "@bike4mind/mcp": "1.29.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
13919
- "@bike4mind/services": "2.48.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
13920
- "@bike4mind/utils": "2.5.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
13930
+ "@bike4mind/common": "2.50.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
13931
+ "@bike4mind/mcp": "1.29.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
13932
+ "@bike4mind/services": "2.48.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
13933
+ "@bike4mind/utils": "2.5.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
13921
13934
  "@types/better-sqlite3": "^7.6.13",
13922
13935
  "@types/diff": "^5.0.9",
13923
13936
  "@types/jsonwebtoken": "^9.0.4",
@@ -13935,7 +13948,7 @@ var package_default = {
13935
13948
  optionalDependencies: {
13936
13949
  "@vscode/ripgrep": "^1.17.0"
13937
13950
  },
13938
- gitHead: "ba6c13dda8decbcec22ad18c1dbf088b98363cf8"
13951
+ gitHead: "cdbc3d4feb3b70b9dfcc842f4c377a2fd7ea76ee"
13939
13952
  };
13940
13953
 
13941
13954
  // src/config/constants.ts
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  findMostSimilarMemento,
4
4
  getRelevantMementos
5
- } from "./chunk-533OGVA7.js";
6
- import "./chunk-RMXZWMAY.js";
5
+ } from "./chunk-ZJTOVY35.js";
6
+ import "./chunk-I6UMBQ3N.js";
7
7
  import "./chunk-FKJTU7KU.js";
8
8
  import "./chunk-OCYRD7D6.js";
9
9
  export {
@@ -134,7 +134,7 @@ import {
134
134
  validateMermaidSyntax,
135
135
  warmUpSettingsCache,
136
136
  withRetry
137
- } from "./chunk-RMXZWMAY.js";
137
+ } from "./chunk-I6UMBQ3N.js";
138
138
  import "./chunk-FKJTU7KU.js";
139
139
  import {
140
140
  Logger,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  SubtractCreditsSchema,
4
4
  subtractCredits
5
- } from "./chunk-HXRGW67O.js";
6
- import "./chunk-RMXZWMAY.js";
5
+ } from "./chunk-ZZ2U2DXH.js";
6
+ import "./chunk-I6UMBQ3N.js";
7
7
  import "./chunk-FKJTU7KU.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.29-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
3
+ "version": "0.2.29-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
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.50.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
118
- "@bike4mind/mcp": "1.29.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
119
- "@bike4mind/services": "2.48.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
120
- "@bike4mind/utils": "2.5.1-ja-fix-github-slack-notify-non-subscriber-filtering.18913+ba6c13dda",
117
+ "@bike4mind/common": "2.50.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
118
+ "@bike4mind/mcp": "1.29.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
119
+ "@bike4mind/services": "2.48.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
120
+ "@bike4mind/utils": "2.5.1-ja-feat-slack-direct-react-agent.18922+cdbc3d4fe",
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": "ba6c13dda8decbcec22ad18c1dbf088b98363cf8"
138
+ "gitHead": "cdbc3d4feb3b70b9dfcc842f4c377a2fd7ea76ee"
139
139
  }