@bike4mind/cli 0.2.54-ja-feat-slack-plan-block-loading-ux.21274 → 0.2.54
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/{artifactExtractor-HFN7RJXB.js → artifactExtractor-ABHS5PT3.js} +1 -1
- package/dist/{chunk-OPNFYZGE.js → chunk-524RAWPN.js} +1 -1
- package/dist/{chunk-6IDOZ6X6.js → chunk-655WYP3G.js} +2 -2
- package/dist/{chunk-USEKJZNJ.js → chunk-7ELVZNRR.js} +2 -2
- package/dist/{chunk-36GFSCB3.js → chunk-EUQGJPLS.js} +7 -7
- package/dist/{chunk-VHR4HJME.js → chunk-HLDLI3VO.js} +2 -2
- package/dist/{chunk-HR6WDZGJ.js → chunk-I5ZF2OVL.js} +16 -3
- package/dist/{chunk-RBPC7XN6.js → chunk-NRKWUJ22.js} +103 -8
- package/dist/{chunk-HXAC7EJB.js → chunk-WVV6VBSO.js} +1 -1
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/headlessCommand.js +7 -7
- package/dist/commands/mcpCommand.js +2 -2
- package/dist/commands/updateCommand.js +1 -1
- package/dist/{create-BCFOXSUT.js → create-4PUVKCNA.js} +3 -3
- package/dist/index.js +8 -8
- package/dist/{llmMarkdownGenerator-MIZ7KER6.js → llmMarkdownGenerator-2NOW6PWQ.js} +1 -1
- package/dist/{markdownGenerator-FEVKYE5V.js → markdownGenerator-4P3ZQHNH.js} +1 -1
- package/dist/{mementoService-ZHZEL3XE.js → mementoService-HG56LF67.js} +3 -3
- package/dist/{src-YSC245ZX.js → src-NQXGURIE.js} +1 -1
- package/dist/{src-Z4LCZH2X.js → src-Z6YVSZDI.js} +2 -2
- package/dist/{subtractCredits-GBLMQCF6.js → subtractCredits-Y5LD56RZ.js} +3 -3
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I5ZF2OVL.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-
|
|
9
|
+
} from "./chunk-WVV6VBSO.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I5ZF2OVL.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-
|
|
5
|
+
} from "./chunk-WVV6VBSO.js";
|
|
6
6
|
import {
|
|
7
7
|
CompletionApiUsageTransaction,
|
|
8
8
|
GenericCreditDeductTransaction,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ToolUsageTransaction,
|
|
14
14
|
TransferCreditTransaction,
|
|
15
15
|
VideoGenerationUsageTransaction
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I5ZF2OVL.js";
|
|
17
17
|
|
|
18
18
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
19
19
|
import { z } from "zod";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.54
|
|
6
|
+
version: "0.2.54",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -117,11 +117,11 @@ var package_default = {
|
|
|
117
117
|
zustand: "^4.5.4"
|
|
118
118
|
},
|
|
119
119
|
devDependencies: {
|
|
120
|
-
"@bike4mind/agents": "0.
|
|
121
|
-
"@bike4mind/common": "2.
|
|
122
|
-
"@bike4mind/mcp": "1.33.14
|
|
123
|
-
"@bike4mind/services": "2.64.2
|
|
124
|
-
"@bike4mind/utils": "2.15.8
|
|
120
|
+
"@bike4mind/agents": "0.2.0",
|
|
121
|
+
"@bike4mind/common": "2.70.0",
|
|
122
|
+
"@bike4mind/mcp": "1.33.14",
|
|
123
|
+
"@bike4mind/services": "2.64.2",
|
|
124
|
+
"@bike4mind/utils": "2.15.8",
|
|
125
125
|
"@types/better-sqlite3": "^7.6.13",
|
|
126
126
|
"@types/jsonwebtoken": "^9.0.4",
|
|
127
127
|
"@types/node": "^22.9.0",
|
|
@@ -138,7 +138,7 @@ var package_default = {
|
|
|
138
138
|
optionalDependencies: {
|
|
139
139
|
"@vscode/ripgrep": "^1.17.0"
|
|
140
140
|
},
|
|
141
|
-
gitHead: "
|
|
141
|
+
gitHead: "25fa9aa32360baeb085e24eb0277d329dccc55c6"
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
// src/utils/updateChecker.ts
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WVV6VBSO.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I5ZF2OVL.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -220,6 +220,10 @@ var getTextModelCost = (model, inputTokens, outputTokens) => {
|
|
|
220
220
|
return model.pricing[threshold].input * inputTokens + model.pricing[threshold].output * outputTokens;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
+
if (thresholds.length > 0) {
|
|
224
|
+
const lastThreshold = thresholds[thresholds.length - 1];
|
|
225
|
+
return model.pricing[lastThreshold].input * inputTokens + model.pricing[lastThreshold].output * outputTokens;
|
|
226
|
+
}
|
|
223
227
|
return 0;
|
|
224
228
|
};
|
|
225
229
|
var isModelDeprecated = (model, now = /* @__PURE__ */ new Date()) => {
|
|
@@ -1920,7 +1924,14 @@ var TavernHeartbeatLogAction = z11.object({
|
|
|
1920
1924
|
"complete_quest",
|
|
1921
1925
|
"tool_use",
|
|
1922
1926
|
"email",
|
|
1923
|
-
"move_decoration"
|
|
1927
|
+
"move_decoration",
|
|
1928
|
+
"gate_paused",
|
|
1929
|
+
"gate_timed",
|
|
1930
|
+
"gate_proceed",
|
|
1931
|
+
"yolo_override",
|
|
1932
|
+
"intent",
|
|
1933
|
+
"report",
|
|
1934
|
+
"credits"
|
|
1924
1935
|
]),
|
|
1925
1936
|
text: z11.string().optional(),
|
|
1926
1937
|
toolOutput: z11.string().optional(),
|
|
@@ -1929,7 +1940,10 @@ var TavernHeartbeatLogAction = z11.object({
|
|
|
1929
1940
|
timestamp: z11.string(),
|
|
1930
1941
|
burstId: z11.string().optional(),
|
|
1931
1942
|
stepIndex: z11.number().optional(),
|
|
1932
|
-
totalSteps: z11.number().optional()
|
|
1943
|
+
totalSteps: z11.number().optional(),
|
|
1944
|
+
confidence: z11.number().optional(),
|
|
1945
|
+
confidenceSource: z11.string().optional(),
|
|
1946
|
+
creditsUsed: z11.number().optional()
|
|
1933
1947
|
})
|
|
1934
1948
|
});
|
|
1935
1949
|
var SessionCreatedAction = shareableDocumentSchema.extend({
|
|
@@ -11455,7 +11469,6 @@ function getControlledScopes() {
|
|
|
11455
11469
|
return {
|
|
11456
11470
|
bot: [
|
|
11457
11471
|
"app_mentions:read",
|
|
11458
|
-
"assistant:write",
|
|
11459
11472
|
"channels:history",
|
|
11460
11473
|
"channels:manage",
|
|
11461
11474
|
"channels:read",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getOpenWeatherKey,
|
|
5
5
|
getSerperKey,
|
|
6
6
|
getWolframAlphaKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-655WYP3G.js";
|
|
8
8
|
import {
|
|
9
9
|
BFLImageService,
|
|
10
10
|
BaseStorage,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
OpenAIBackend,
|
|
17
17
|
OpenAIImageService,
|
|
18
18
|
XAIImageService
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WVV6VBSO.js";
|
|
20
20
|
import {
|
|
21
21
|
Logger
|
|
22
22
|
} from "./chunk-PFBYGCOW.js";
|
|
23
23
|
import {
|
|
24
24
|
ConfigStore,
|
|
25
25
|
logger
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-524RAWPN.js";
|
|
27
27
|
import {
|
|
28
28
|
ALERT_THRESHOLDS,
|
|
29
29
|
AiEvents,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
getViewById,
|
|
85
85
|
resolveNavigationIntents,
|
|
86
86
|
sanitizeTelemetryError
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-I5ZF2OVL.js";
|
|
88
88
|
|
|
89
89
|
// src/utils/fileSearch.ts
|
|
90
90
|
import * as fs from "fs";
|
|
@@ -1768,8 +1768,13 @@ var ReActAgent = class extends EventEmitter {
|
|
|
1768
1768
|
totalInputTokens = 0;
|
|
1769
1769
|
totalOutputTokens = 0;
|
|
1770
1770
|
totalCredits = 0;
|
|
1771
|
+
totalCacheReadTokens = 0;
|
|
1772
|
+
totalCacheWriteTokens = 0;
|
|
1771
1773
|
toolCallCount = 0;
|
|
1772
1774
|
observationQueue = [];
|
|
1775
|
+
confidenceLog = [];
|
|
1776
|
+
/** Confidence scores collected during the current iteration (reset each iteration) */
|
|
1777
|
+
iterationConfidences = [];
|
|
1773
1778
|
constructor(context) {
|
|
1774
1779
|
super();
|
|
1775
1780
|
this.context = {
|
|
@@ -1792,7 +1797,11 @@ var ReActAgent = class extends EventEmitter {
|
|
|
1792
1797
|
this.totalInputTokens = 0;
|
|
1793
1798
|
this.totalOutputTokens = 0;
|
|
1794
1799
|
this.totalCredits = 0;
|
|
1800
|
+
this.totalCacheReadTokens = 0;
|
|
1801
|
+
this.totalCacheWriteTokens = 0;
|
|
1795
1802
|
this.toolCallCount = 0;
|
|
1803
|
+
this.confidenceLog = [];
|
|
1804
|
+
this.iterationConfidences = [];
|
|
1796
1805
|
const maxIterations = options.maxIterations ?? this.context.maxIterations ?? 5;
|
|
1797
1806
|
const temperature = options.temperature ?? this.context.temperature ?? 0.7;
|
|
1798
1807
|
const maxTokens = options.maxTokens ?? this.context.maxTokens ?? 4096;
|
|
@@ -1831,6 +1840,8 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1831
1840
|
totalInputTokens: this.totalInputTokens,
|
|
1832
1841
|
totalOutputTokens: this.totalOutputTokens,
|
|
1833
1842
|
totalCredits: this.totalCredits > 0 ? this.totalCredits : void 0,
|
|
1843
|
+
totalCacheReadTokens: this.totalCacheReadTokens > 0 ? this.totalCacheReadTokens : void 0,
|
|
1844
|
+
totalCacheWriteTokens: this.totalCacheWriteTokens > 0 ? this.totalCacheWriteTokens : void 0,
|
|
1834
1845
|
iterations,
|
|
1835
1846
|
toolCalls: this.toolCallCount,
|
|
1836
1847
|
reachedMaxIterations: false
|
|
@@ -1845,6 +1856,17 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1845
1856
|
let currentText = "";
|
|
1846
1857
|
const processedToolIds = /* @__PURE__ */ new Set();
|
|
1847
1858
|
let hadToolCalls = false;
|
|
1859
|
+
if (options.maxHistoryIterations && options.maxHistoryIterations > 0 && iterations > 1) {
|
|
1860
|
+
trimConversationHistory(messages, options.maxHistoryIterations);
|
|
1861
|
+
}
|
|
1862
|
+
const cacheStrategy = options.enableCaching ? {
|
|
1863
|
+
enableCaching: true,
|
|
1864
|
+
cacheSystemPrompt: true,
|
|
1865
|
+
cacheTools: this.context.tools.length > 0,
|
|
1866
|
+
cacheConversationHistory: false,
|
|
1867
|
+
// History changes each iteration
|
|
1868
|
+
cacheTTL: "5m"
|
|
1869
|
+
} : void 0;
|
|
1848
1870
|
await this.context.llm.complete(this.context.model, messages, {
|
|
1849
1871
|
stream: false,
|
|
1850
1872
|
tools: this.context.tools,
|
|
@@ -1853,7 +1875,8 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1853
1875
|
abortSignal: options.signal,
|
|
1854
1876
|
tool_choice: this.context.toolChoice,
|
|
1855
1877
|
executeTools: false,
|
|
1856
|
-
thinking: this.context.thinking
|
|
1878
|
+
thinking: this.context.thinking,
|
|
1879
|
+
cacheStrategy
|
|
1857
1880
|
}, async (texts, completionInfo) => {
|
|
1858
1881
|
for (const text of texts) {
|
|
1859
1882
|
if (text) {
|
|
@@ -1866,6 +1889,10 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1866
1889
|
this.totalTokens += inputTokens + outputTokens;
|
|
1867
1890
|
this.totalInputTokens += inputTokens;
|
|
1868
1891
|
this.totalOutputTokens += outputTokens;
|
|
1892
|
+
if (completionInfo.cacheStats) {
|
|
1893
|
+
this.totalCacheReadTokens += completionInfo.cacheStats.cacheReadTokens || 0;
|
|
1894
|
+
this.totalCacheWriteTokens += completionInfo.cacheStats.cacheWriteTokens || 0;
|
|
1895
|
+
}
|
|
1869
1896
|
if (completionInfo.creditsUsed) {
|
|
1870
1897
|
this.totalCredits += completionInfo.creditsUsed;
|
|
1871
1898
|
}
|
|
@@ -1947,6 +1974,24 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1947
1974
|
if (iterationComplete && finalAnswer) {
|
|
1948
1975
|
break;
|
|
1949
1976
|
}
|
|
1977
|
+
if (hadToolCalls && options.confidenceGate && this.iterationConfidences.length > 0) {
|
|
1978
|
+
const iterAvg = this.iterationConfidences.reduce((a, b) => a + b, 0) / this.iterationConfidences.length;
|
|
1979
|
+
const decision = options.confidenceGate(iterAvg, iterations);
|
|
1980
|
+
if (decision.action === "wait_for_human") {
|
|
1981
|
+
this.context.logger.info(`[ReActAgent] Confidence gate PAUSED at iteration ${iterations} (avg: ${iterAvg.toFixed(2)}): ${decision.reason}`);
|
|
1982
|
+
this.emit("gate_paused", { ...decision, iteration: iterations });
|
|
1983
|
+
finalAnswer = `[Paused for review \u2014 confidence ${(iterAvg * 100).toFixed(0)}%] ${decision.reason}`;
|
|
1984
|
+
break;
|
|
1985
|
+
}
|
|
1986
|
+
if (decision.action === "timed_gate") {
|
|
1987
|
+
this.context.logger.info(`[ReActAgent] Confidence gate TIMED at iteration ${iterations} (avg: ${iterAvg.toFixed(2)}): ${decision.reason}`);
|
|
1988
|
+
this.emit("gate_timed", { ...decision, iteration: iterations });
|
|
1989
|
+
finalAnswer = `[Timed gate \u2014 confidence ${(iterAvg * 100).toFixed(0)}%] ${decision.reason}`;
|
|
1990
|
+
break;
|
|
1991
|
+
}
|
|
1992
|
+
this.emit("gate_proceed", { ...decision, iteration: iterations });
|
|
1993
|
+
}
|
|
1994
|
+
this.iterationConfidences = [];
|
|
1950
1995
|
if (!iterationComplete && hadToolCalls) {
|
|
1951
1996
|
messages.push({
|
|
1952
1997
|
role: "user",
|
|
@@ -1970,6 +2015,8 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1970
2015
|
if (options.signal?.aborted && !finalAnswer) {
|
|
1971
2016
|
finalAnswer = "Interrupted";
|
|
1972
2017
|
}
|
|
2018
|
+
const avgConfidence = this.confidenceLog.length > 0 ? this.confidenceLog.reduce((sum2, c) => sum2 + c.confidence, 0) / this.confidenceLog.length : void 0;
|
|
2019
|
+
const minConfidence = this.confidenceLog.length > 0 ? Math.min(...this.confidenceLog.map((c) => c.confidence)) : void 0;
|
|
1973
2020
|
const result = {
|
|
1974
2021
|
finalAnswer,
|
|
1975
2022
|
steps: this.steps,
|
|
@@ -1978,9 +2025,14 @@ ${options.context}` : this.getSystemPrompt()
|
|
|
1978
2025
|
totalInputTokens: this.totalInputTokens,
|
|
1979
2026
|
totalOutputTokens: this.totalOutputTokens,
|
|
1980
2027
|
totalCredits: this.totalCredits > 0 ? this.totalCredits : void 0,
|
|
2028
|
+
totalCacheReadTokens: this.totalCacheReadTokens > 0 ? this.totalCacheReadTokens : void 0,
|
|
2029
|
+
totalCacheWriteTokens: this.totalCacheWriteTokens > 0 ? this.totalCacheWriteTokens : void 0,
|
|
1981
2030
|
iterations,
|
|
1982
2031
|
toolCalls: this.toolCallCount,
|
|
1983
|
-
reachedMaxIterations
|
|
2032
|
+
reachedMaxIterations,
|
|
2033
|
+
averageConfidence: avgConfidence,
|
|
2034
|
+
minConfidence,
|
|
2035
|
+
confidenceLog: this.confidenceLog.length > 0 ? this.confidenceLog : void 0
|
|
1984
2036
|
}
|
|
1985
2037
|
};
|
|
1986
2038
|
this.emit("complete", result);
|
|
@@ -2097,20 +2149,40 @@ Remember: You are an autonomous AGENT. Act independently and solve problems proa
|
|
|
2097
2149
|
this.emit("action", actionStep);
|
|
2098
2150
|
}
|
|
2099
2151
|
/**
|
|
2100
|
-
* Create and emit an observation step
|
|
2152
|
+
* Create and emit an observation step, scoring confidence for the result
|
|
2101
2153
|
*/
|
|
2102
2154
|
emitObservationStep(toolName, observation) {
|
|
2155
|
+
const confidence = this.scoreToolResult(toolName, observation);
|
|
2156
|
+
const confidenceSource = observation.startsWith("Error:") ? "deterministic" : "default";
|
|
2157
|
+
this.confidenceLog.push({ toolName, confidence, source: confidenceSource, timestamp: Date.now() });
|
|
2158
|
+
this.iterationConfidences.push(confidence);
|
|
2103
2159
|
const observationStep = {
|
|
2104
2160
|
type: "observation",
|
|
2105
2161
|
content: observation,
|
|
2106
2162
|
metadata: {
|
|
2107
2163
|
toolName,
|
|
2108
|
-
timestamp: Date.now()
|
|
2164
|
+
timestamp: Date.now(),
|
|
2165
|
+
confidence,
|
|
2166
|
+
confidenceSource
|
|
2109
2167
|
}
|
|
2110
2168
|
};
|
|
2111
2169
|
this.steps.push(observationStep);
|
|
2112
2170
|
this.emit("observation", observationStep);
|
|
2113
2171
|
}
|
|
2172
|
+
/**
|
|
2173
|
+
* Score the confidence of a tool result.
|
|
2174
|
+
* Deterministic scoring for errors; default stub (0.7) for everything else.
|
|
2175
|
+
* This is the extension point for tool-level score functions.
|
|
2176
|
+
*/
|
|
2177
|
+
scoreToolResult(toolName, result) {
|
|
2178
|
+
if (result.startsWith("Error:")) {
|
|
2179
|
+
return 0.1;
|
|
2180
|
+
}
|
|
2181
|
+
if (!result || result.trim().length === 0) {
|
|
2182
|
+
return 0.3;
|
|
2183
|
+
}
|
|
2184
|
+
return 0.7;
|
|
2185
|
+
}
|
|
2114
2186
|
/**
|
|
2115
2187
|
* Parse tool arguments, handling both string and object forms
|
|
2116
2188
|
*/
|
|
@@ -2154,6 +2226,29 @@ Remember: You are an autonomous AGENT. Act independently and solve problems proa
|
|
|
2154
2226
|
this.context.llm.pushToolMessages(messages, { id: toolId, name: toolUse.name, parameters }, observation, thinkingBlocks);
|
|
2155
2227
|
}
|
|
2156
2228
|
};
|
|
2229
|
+
function trimConversationHistory(messages, maxIterations) {
|
|
2230
|
+
let dynamicStart = 0;
|
|
2231
|
+
for (let i = 0; i < messages.length; i++) {
|
|
2232
|
+
if (messages[i].role === "user") {
|
|
2233
|
+
dynamicStart = i + 1;
|
|
2234
|
+
break;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
const dynamicMessages = messages.slice(dynamicStart);
|
|
2238
|
+
if (dynamicMessages.length === 0)
|
|
2239
|
+
return;
|
|
2240
|
+
const nudgeIndices = [];
|
|
2241
|
+
for (let i = 0; i < dynamicMessages.length; i++) {
|
|
2242
|
+
if (dynamicMessages[i].role === "user" && typeof dynamicMessages[i].content === "string") {
|
|
2243
|
+
nudgeIndices.push(i);
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
if (nudgeIndices.length <= maxIterations)
|
|
2247
|
+
return;
|
|
2248
|
+
const cutoffNudgeIndex = nudgeIndices[nudgeIndices.length - maxIterations];
|
|
2249
|
+
const keepFrom = dynamicStart + cutoffNudgeIndex;
|
|
2250
|
+
messages.splice(dynamicStart, keepFrom - dynamicStart);
|
|
2251
|
+
}
|
|
2157
2252
|
|
|
2158
2253
|
// src/config/toolSafety.ts
|
|
2159
2254
|
import { z as z2 } from "zod";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
extractSnippetMeta,
|
|
21
21
|
isGPTImageModel,
|
|
22
22
|
settingsMap
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-I5ZF2OVL.js";
|
|
24
24
|
|
|
25
25
|
// ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
|
|
26
26
|
import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
|
|
@@ -36,20 +36,20 @@ import {
|
|
|
36
36
|
isReadOnlyTool,
|
|
37
37
|
loadContextFiles,
|
|
38
38
|
setWebSocketToolExecutor
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-NRKWUJ22.js";
|
|
40
40
|
import "../chunk-BDQBOLYG.js";
|
|
41
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-655WYP3G.js";
|
|
42
42
|
import "../chunk-GQGOWACU.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-7ELVZNRR.js";
|
|
44
|
+
import "../chunk-HLDLI3VO.js";
|
|
45
|
+
import "../chunk-WVV6VBSO.js";
|
|
46
46
|
import "../chunk-PFBYGCOW.js";
|
|
47
47
|
import "../chunk-BPFEGDC7.js";
|
|
48
48
|
import {
|
|
49
49
|
ConfigStore,
|
|
50
50
|
logger
|
|
51
|
-
} from "../chunk-
|
|
52
|
-
import "../chunk-
|
|
51
|
+
} from "../chunk-524RAWPN.js";
|
|
52
|
+
import "../chunk-I5ZF2OVL.js";
|
|
53
53
|
import {
|
|
54
54
|
DEFAULT_SANDBOX_CONFIG
|
|
55
55
|
} from "../chunk-4BIBE3J7.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-HLDLI3VO.js";
|
|
6
|
+
import "./chunk-WVV6VBSO.js";
|
|
7
7
|
import "./chunk-PFBYGCOW.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-I5ZF2OVL.js";
|
|
9
9
|
export {
|
|
10
10
|
createFabFile,
|
|
11
11
|
createFabFileSchema
|
package/dist/index.js
CHANGED
|
@@ -46,25 +46,25 @@ import {
|
|
|
46
46
|
setWebSocketToolExecutor,
|
|
47
47
|
substituteArguments,
|
|
48
48
|
warmFileCache
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-NRKWUJ22.js";
|
|
50
50
|
import "./chunk-BDQBOLYG.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-655WYP3G.js";
|
|
52
52
|
import "./chunk-GQGOWACU.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-7ELVZNRR.js";
|
|
54
|
+
import "./chunk-HLDLI3VO.js";
|
|
55
55
|
import {
|
|
56
56
|
OllamaBackend
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-WVV6VBSO.js";
|
|
58
58
|
import "./chunk-PFBYGCOW.js";
|
|
59
59
|
import "./chunk-BPFEGDC7.js";
|
|
60
60
|
import {
|
|
61
61
|
ConfigStore,
|
|
62
62
|
logger
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-524RAWPN.js";
|
|
64
64
|
import {
|
|
65
65
|
checkForUpdate,
|
|
66
66
|
package_default
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-EUQGJPLS.js";
|
|
68
68
|
import {
|
|
69
69
|
selectActiveBackgroundAgents,
|
|
70
70
|
useCliStore
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
import {
|
|
73
73
|
CREDIT_DEDUCT_TRANSACTION_TYPES,
|
|
74
74
|
ChatModels
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-I5ZF2OVL.js";
|
|
76
76
|
import "./chunk-4BIBE3J7.js";
|
|
77
77
|
|
|
78
78
|
// src/index.tsx
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-655WYP3G.js";
|
|
6
|
+
import "./chunk-WVV6VBSO.js";
|
|
7
7
|
import "./chunk-PFBYGCOW.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-I5ZF2OVL.js";
|
|
9
9
|
export {
|
|
10
10
|
findMostSimilarMemento,
|
|
11
11
|
getRelevantMementos
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
validateUrlForFetch,
|
|
144
144
|
warmUpSettingsCache,
|
|
145
145
|
withRetry
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-WVV6VBSO.js";
|
|
147
147
|
import {
|
|
148
148
|
Logger,
|
|
149
149
|
NotificationDeduplicator,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
buildRateLimitLogEntry,
|
|
157
157
|
isNearLimit,
|
|
158
158
|
parseRateLimitHeaders
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-I5ZF2OVL.js";
|
|
160
160
|
export {
|
|
161
161
|
AIVideoService,
|
|
162
162
|
AWSBackend,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-7ELVZNRR.js";
|
|
6
|
+
import "./chunk-WVV6VBSO.js";
|
|
7
7
|
import "./chunk-PFBYGCOW.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-I5ZF2OVL.js";
|
|
9
9
|
export {
|
|
10
10
|
SubtractCreditsSchema,
|
|
11
11
|
subtractCredits
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.54
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -114,11 +114,11 @@
|
|
|
114
114
|
"zustand": "^4.5.4"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
|
-
"@bike4mind/agents": "0.
|
|
118
|
-
"@bike4mind/common": "2.
|
|
119
|
-
"@bike4mind/mcp": "1.33.14
|
|
120
|
-
"@bike4mind/services": "2.64.2
|
|
121
|
-
"@bike4mind/utils": "2.15.8
|
|
117
|
+
"@bike4mind/agents": "0.2.0",
|
|
118
|
+
"@bike4mind/common": "2.70.0",
|
|
119
|
+
"@bike4mind/mcp": "1.33.14",
|
|
120
|
+
"@bike4mind/services": "2.64.2",
|
|
121
|
+
"@bike4mind/utils": "2.15.8",
|
|
122
122
|
"@types/better-sqlite3": "^7.6.13",
|
|
123
123
|
"@types/jsonwebtoken": "^9.0.4",
|
|
124
124
|
"@types/node": "^22.9.0",
|
|
@@ -135,5 +135,5 @@
|
|
|
135
135
|
"optionalDependencies": {
|
|
136
136
|
"@vscode/ripgrep": "^1.17.0"
|
|
137
137
|
},
|
|
138
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "25fa9aa32360baeb085e24eb0277d329dccc55c6"
|
|
139
139
|
}
|