@bike4mind/cli 0.2.49-fix-cli-stream-resilience.21034 → 0.2.49-fix-cli-stream-resilience.21035
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-F6IY547T.js → chunk-7VEI22BF.js} +1 -1
- package/dist/{chunk-QJ47T42W.js → chunk-KE2DKWPR.js} +2 -2
- package/dist/{chunk-OPFQTJGV.js → chunk-KR6Q7BEQ.js} +6 -6
- package/dist/{chunk-WKPO5JDF.js → chunk-MP3FYWMR.js} +1 -1
- package/dist/{chunk-M7QGYBN7.js → chunk-UDBM5N7V.js} +58 -22
- package/dist/{chunk-OFKZXY6L.js → chunk-X26VCD3A.js} +1 -1
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/headlessCommand.js +5 -5
- package/dist/commands/updateCommand.js +1 -1
- package/dist/{create-6Z46TX3C.js → create-PA2DIVCF.js} +2 -2
- package/dist/index.js +6 -6
- package/dist/{mementoService-XAAA3Q54.js → mementoService-W76KVRGE.js} +2 -2
- package/dist/{src-FDPAPWTO.js → src-XUTQ6N2T.js} +1 -1
- package/dist/{subtractCredits-7SHS6DXL.js → subtractCredits-3V5REXEH.js} +2 -2
- package/package.json +6 -6
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getOpenWeatherKey,
|
|
5
5
|
getSerperKey,
|
|
6
6
|
getWolframAlphaKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7VEI22BF.js";
|
|
8
8
|
import {
|
|
9
9
|
BFLImageService,
|
|
10
10
|
BaseStorage,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
OpenAIBackend,
|
|
17
17
|
OpenAIImageService,
|
|
18
18
|
XAIImageService
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UDBM5N7V.js";
|
|
20
20
|
import {
|
|
21
21
|
Logger
|
|
22
22
|
} from "./chunk-PFBYGCOW.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.49-fix-cli-stream-resilience.
|
|
6
|
+
version: "0.2.49-fix-cli-stream-resilience.21035+55211284e",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -118,10 +118,10 @@ var package_default = {
|
|
|
118
118
|
},
|
|
119
119
|
devDependencies: {
|
|
120
120
|
"@bike4mind/agents": "0.1.0",
|
|
121
|
-
"@bike4mind/common": "2.67.1-fix-cli-stream-resilience.
|
|
122
|
-
"@bike4mind/mcp": "1.33.11-fix-cli-stream-resilience.
|
|
123
|
-
"@bike4mind/services": "2.63.1-fix-cli-stream-resilience.
|
|
124
|
-
"@bike4mind/utils": "2.15.4-fix-cli-stream-resilience.
|
|
121
|
+
"@bike4mind/common": "2.67.1-fix-cli-stream-resilience.21035+55211284e",
|
|
122
|
+
"@bike4mind/mcp": "1.33.11-fix-cli-stream-resilience.21035+55211284e",
|
|
123
|
+
"@bike4mind/services": "2.63.1-fix-cli-stream-resilience.21035+55211284e",
|
|
124
|
+
"@bike4mind/utils": "2.15.4-fix-cli-stream-resilience.21035+55211284e",
|
|
125
125
|
"@types/better-sqlite3": "^7.6.13",
|
|
126
126
|
"@types/diff": "^5.0.9",
|
|
127
127
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -140,7 +140,7 @@ var package_default = {
|
|
|
140
140
|
optionalDependencies: {
|
|
141
141
|
"@vscode/ripgrep": "^1.17.0"
|
|
142
142
|
},
|
|
143
|
-
gitHead: "
|
|
143
|
+
gitHead: "55211284e57c3ff385fd9fa37c2cbb8f5292a531"
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
// src/utils/updateChecker.ts
|
|
@@ -6578,6 +6578,57 @@ var GeminiBackend = class {
|
|
|
6578
6578
|
// ../../b4m-core/packages/utils/dist/src/llm/ollamaBackend.js
|
|
6579
6579
|
import { Ollama } from "ollama";
|
|
6580
6580
|
import { Agent as Agent2 } from "undici";
|
|
6581
|
+
|
|
6582
|
+
// ../../b4m-core/packages/utils/dist/src/llm/messageFormatConverter.js
|
|
6583
|
+
function convertMessageToOpenAIFormat(msg) {
|
|
6584
|
+
if (msg.role === "assistant" && msg.tool_calls) {
|
|
6585
|
+
return [
|
|
6586
|
+
{
|
|
6587
|
+
...msg,
|
|
6588
|
+
content: null,
|
|
6589
|
+
tool_calls: msg.tool_calls
|
|
6590
|
+
}
|
|
6591
|
+
];
|
|
6592
|
+
}
|
|
6593
|
+
if (msg.role === "assistant" && Array.isArray(msg.content)) {
|
|
6594
|
+
const contentBlocks = msg.content;
|
|
6595
|
+
const toolUseBlocks = contentBlocks.filter((b) => b.type === "tool_use");
|
|
6596
|
+
if (toolUseBlocks.length > 0) {
|
|
6597
|
+
const textParts = contentBlocks.filter((b) => b.type === "text").map((b) => b.text).filter(Boolean);
|
|
6598
|
+
return [
|
|
6599
|
+
{
|
|
6600
|
+
role: "assistant",
|
|
6601
|
+
content: textParts.length > 0 ? textParts.join("\n") : null,
|
|
6602
|
+
tool_calls: toolUseBlocks.map((b) => ({
|
|
6603
|
+
id: b.id,
|
|
6604
|
+
type: "function",
|
|
6605
|
+
function: {
|
|
6606
|
+
name: b.name,
|
|
6607
|
+
arguments: typeof b.input === "string" ? b.input : JSON.stringify(b.input)
|
|
6608
|
+
}
|
|
6609
|
+
}))
|
|
6610
|
+
}
|
|
6611
|
+
];
|
|
6612
|
+
}
|
|
6613
|
+
}
|
|
6614
|
+
if (msg.role === "user" && Array.isArray(msg.content)) {
|
|
6615
|
+
const contentBlocks = msg.content;
|
|
6616
|
+
const toolResultBlocks = contentBlocks.filter((b) => b.type === "tool_result");
|
|
6617
|
+
if (toolResultBlocks.length > 0) {
|
|
6618
|
+
return toolResultBlocks.map((b) => ({
|
|
6619
|
+
role: "tool",
|
|
6620
|
+
content: typeof b.content === "string" ? b.content : JSON.stringify(b.content),
|
|
6621
|
+
tool_call_id: b.tool_use_id
|
|
6622
|
+
}));
|
|
6623
|
+
}
|
|
6624
|
+
}
|
|
6625
|
+
return [msg];
|
|
6626
|
+
}
|
|
6627
|
+
function convertMessagesToOpenAIFormat(messages) {
|
|
6628
|
+
return messages.flatMap(convertMessageToOpenAIFormat);
|
|
6629
|
+
}
|
|
6630
|
+
|
|
6631
|
+
// ../../b4m-core/packages/utils/dist/src/llm/ollamaBackend.js
|
|
6581
6632
|
var OllamaBackend = class {
|
|
6582
6633
|
_host;
|
|
6583
6634
|
_api;
|
|
@@ -6741,9 +6792,12 @@ var OllamaBackend = class {
|
|
|
6741
6792
|
/**
|
|
6742
6793
|
* Map IMessage[] to Ollama's Message[], preserving tool_calls for multi-turn
|
|
6743
6794
|
* tool conversations (added by pushToolMessages).
|
|
6795
|
+
* First converts B4M standard format (tool_use/tool_result) to OpenAI-compatible
|
|
6796
|
+
* format since Ollama uses the same tool_calls/role:tool convention.
|
|
6744
6797
|
*/
|
|
6745
6798
|
buildMessages(messages) {
|
|
6746
|
-
|
|
6799
|
+
const converted = convertMessagesToOpenAIFormat(messages);
|
|
6800
|
+
return converted.map((msg) => {
|
|
6747
6801
|
const raw = msg;
|
|
6748
6802
|
const mapped = {
|
|
6749
6803
|
role: msg.role,
|
|
@@ -7837,16 +7891,8 @@ Only when someone asks, remember that you are specifically the ${model} model.`;
|
|
|
7837
7891
|
role: "system",
|
|
7838
7892
|
content: systemContent
|
|
7839
7893
|
};
|
|
7840
|
-
const
|
|
7841
|
-
|
|
7842
|
-
return {
|
|
7843
|
-
...msg,
|
|
7844
|
-
content: null,
|
|
7845
|
-
tool_calls: msg.tool_calls
|
|
7846
|
-
};
|
|
7847
|
-
}
|
|
7848
|
-
return msg;
|
|
7849
|
-
});
|
|
7894
|
+
const convertedMessages = convertMessagesToOpenAIFormat(filteredMessages);
|
|
7895
|
+
const formattedMessages = convertedMessages;
|
|
7850
7896
|
return isO1Model ? formattedMessages : [systemMessage, ...formattedMessages];
|
|
7851
7897
|
}
|
|
7852
7898
|
pushToolMessages(messages, tool, result, _thinkingBlocks) {
|
|
@@ -8369,17 +8415,7 @@ var XAIBackend = class {
|
|
|
8369
8415
|
}
|
|
8370
8416
|
}
|
|
8371
8417
|
formatMessages(messages) {
|
|
8372
|
-
|
|
8373
|
-
if (msg.role === "assistant" && msg.tool_calls) {
|
|
8374
|
-
return {
|
|
8375
|
-
...msg,
|
|
8376
|
-
content: null,
|
|
8377
|
-
tool_calls: msg.tool_calls
|
|
8378
|
-
};
|
|
8379
|
-
}
|
|
8380
|
-
return msg;
|
|
8381
|
-
});
|
|
8382
|
-
return formattedMessages;
|
|
8418
|
+
return convertMessagesToOpenAIFormat(messages);
|
|
8383
8419
|
}
|
|
8384
8420
|
formatTools(tools = []) {
|
|
8385
8421
|
return tools.map((tool) => ({
|
|
@@ -36,13 +36,13 @@ import {
|
|
|
36
36
|
isReadOnlyTool,
|
|
37
37
|
loadContextFiles,
|
|
38
38
|
setWebSocketToolExecutor
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-KE2DKWPR.js";
|
|
40
40
|
import "../chunk-BDQBOLYG.js";
|
|
41
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-7VEI22BF.js";
|
|
42
42
|
import "../chunk-GQGOWACU.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-X26VCD3A.js";
|
|
44
|
+
import "../chunk-MP3FYWMR.js";
|
|
45
|
+
import "../chunk-UDBM5N7V.js";
|
|
46
46
|
import "../chunk-PFBYGCOW.js";
|
|
47
47
|
import "../chunk-BPFEGDC7.js";
|
|
48
48
|
import {
|
package/dist/index.js
CHANGED
|
@@ -46,15 +46,15 @@ import {
|
|
|
46
46
|
setWebSocketToolExecutor,
|
|
47
47
|
substituteArguments,
|
|
48
48
|
warmFileCache
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-KE2DKWPR.js";
|
|
50
50
|
import "./chunk-BDQBOLYG.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-7VEI22BF.js";
|
|
52
52
|
import "./chunk-GQGOWACU.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-X26VCD3A.js";
|
|
54
|
+
import "./chunk-MP3FYWMR.js";
|
|
55
55
|
import {
|
|
56
56
|
OllamaBackend
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-UDBM5N7V.js";
|
|
58
58
|
import "./chunk-PFBYGCOW.js";
|
|
59
59
|
import "./chunk-BPFEGDC7.js";
|
|
60
60
|
import {
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
checkForUpdate,
|
|
66
66
|
package_default
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-KR6Q7BEQ.js";
|
|
68
68
|
import {
|
|
69
69
|
selectActiveBackgroundAgents,
|
|
70
70
|
useCliStore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.49-fix-cli-stream-resilience.
|
|
3
|
+
"version": "0.2.49-fix-cli-stream-resilience.21035+55211284e",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@bike4mind/agents": "0.1.0",
|
|
118
|
-
"@bike4mind/common": "2.67.1-fix-cli-stream-resilience.
|
|
119
|
-
"@bike4mind/mcp": "1.33.11-fix-cli-stream-resilience.
|
|
120
|
-
"@bike4mind/services": "2.63.1-fix-cli-stream-resilience.
|
|
121
|
-
"@bike4mind/utils": "2.15.4-fix-cli-stream-resilience.
|
|
118
|
+
"@bike4mind/common": "2.67.1-fix-cli-stream-resilience.21035+55211284e",
|
|
119
|
+
"@bike4mind/mcp": "1.33.11-fix-cli-stream-resilience.21035+55211284e",
|
|
120
|
+
"@bike4mind/services": "2.63.1-fix-cli-stream-resilience.21035+55211284e",
|
|
121
|
+
"@bike4mind/utils": "2.15.4-fix-cli-stream-resilience.21035+55211284e",
|
|
122
122
|
"@types/better-sqlite3": "^7.6.13",
|
|
123
123
|
"@types/diff": "^5.0.9",
|
|
124
124
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"optionalDependencies": {
|
|
138
138
|
"@vscode/ripgrep": "^1.17.0"
|
|
139
139
|
},
|
|
140
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "55211284e57c3ff385fd9fa37c2cbb8f5292a531"
|
|
141
141
|
}
|