@bike4mind/cli 0.2.58 → 0.2.59-feat-cli-tavern-integration.21571
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-WPK7K4BM.js → chunk-BPUFVNEJ.js} +27 -6
- package/dist/{chunk-XZLLBLTF.js → chunk-PEG5MIUM.js} +12 -12
- package/dist/{chunk-RB5GFKSM.js → chunk-U52SND4Y.js} +3 -0
- package/dist/{chunk-G2LYCVZJ.js → chunk-Y4WOJJM3.js} +8 -1
- package/dist/commands/doctorCommand.js +1 -1
- package/dist/commands/headlessCommand.js +2 -2
- package/dist/commands/mcpCommand.js +1 -1
- package/dist/commands/updateCommand.js +1 -1
- package/dist/index.js +1075 -18
- package/dist/{store-X5LEOSGZ.js → store-CAB6BV3P.js} +1 -1
- package/package.json +12 -12
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
ConfigStore,
|
|
25
25
|
logger
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-U52SND4Y.js";
|
|
27
27
|
import {
|
|
28
28
|
ALERT_THRESHOLDS,
|
|
29
29
|
AiEvents,
|
|
@@ -543,7 +543,7 @@ function customCommandToDefinition(customCommand) {
|
|
|
543
543
|
source: customCommand.source
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
|
-
function mergeCommands(customCommands) {
|
|
546
|
+
function mergeCommands(customCommands, featureCommands) {
|
|
547
547
|
const builtInCommands = COMMANDS.map((cmd) => ({ ...cmd, source: "built-in" }));
|
|
548
548
|
const customDefinitions = customCommands.filter((cmd) => !isBuiltInCommand(cmd.name)).map(customCommandToDefinition);
|
|
549
549
|
const conflicts = customCommands.filter((cmd) => isBuiltInCommand(cmd.name));
|
|
@@ -553,7 +553,7 @@ function mergeCommands(customCommands) {
|
|
|
553
553
|
conflicts.map((cmd) => cmd.name).join(", ")
|
|
554
554
|
);
|
|
555
555
|
}
|
|
556
|
-
return [...builtInCommands, ...customDefinitions];
|
|
556
|
+
return [...builtInCommands, ...featureCommands ?? [], ...customDefinitions];
|
|
557
557
|
}
|
|
558
558
|
|
|
559
559
|
// src/utils/processFileReferences.ts
|
|
@@ -2381,6 +2381,7 @@ function buildCoreSystemPrompt(contextSection, config) {
|
|
|
2381
2381
|
let skillsSection = "";
|
|
2382
2382
|
let dynamicAgentSection = "";
|
|
2383
2383
|
let directoriesSection = "";
|
|
2384
|
+
let featureModulesSection = "";
|
|
2384
2385
|
if (typeof contextSection === "string") {
|
|
2385
2386
|
projectContextSection = contextSection;
|
|
2386
2387
|
if (config) {
|
|
@@ -2393,6 +2394,9 @@ function buildCoreSystemPrompt(contextSection, config) {
|
|
|
2393
2394
|
if (config.enableDynamicAgentCreation) {
|
|
2394
2395
|
dynamicAgentSection = buildDynamicAgentPromptSection();
|
|
2395
2396
|
}
|
|
2397
|
+
if (config.featureModulePrompts) {
|
|
2398
|
+
featureModulesSection = config.featureModulePrompts;
|
|
2399
|
+
}
|
|
2396
2400
|
}
|
|
2397
2401
|
} else if (contextSection && typeof contextSection === "object") {
|
|
2398
2402
|
config = contextSection;
|
|
@@ -2429,6 +2433,9 @@ To access files in additional directories, pass the full path to the 'dir_path'
|
|
|
2429
2433
|
|
|
2430
2434
|
When the user asks about content in an additional directory, search there first using the dir_path parameter.`;
|
|
2431
2435
|
}
|
|
2436
|
+
if (config.featureModulePrompts) {
|
|
2437
|
+
featureModulesSection = config.featureModulePrompts;
|
|
2438
|
+
}
|
|
2432
2439
|
}
|
|
2433
2440
|
return `You are an autonomous AI assistant with access to tools. Your job is to help users by taking action and solving problems proactively.
|
|
2434
2441
|
|
|
@@ -2518,7 +2525,7 @@ EXAMPLES:
|
|
|
2518
2525
|
- "what packages installed?" \u2192 ${TOOL_GLOB_FILES} "**/package.json" \u2192 ${TOOL_FILE_READ}
|
|
2519
2526
|
- "find all components using React hooks" \u2192 ${TOOL_SUBAGENT_DELEGATE}(task="find all components using React hooks", type="explore")
|
|
2520
2527
|
|
|
2521
|
-
Remember: Use context from previous messages to understand follow-up questions.${directoriesSection}${projectContextSection}${skillsSection}`;
|
|
2528
|
+
Remember: Use context from previous messages to understand follow-up questions.${directoriesSection}${projectContextSection}${skillsSection}${featureModulesSection}`;
|
|
2522
2529
|
}
|
|
2523
2530
|
function buildDynamicAgentPromptSection() {
|
|
2524
2531
|
return `
|
|
@@ -2610,6 +2617,18 @@ var ServerToolExecutor = class {
|
|
|
2610
2617
|
|
|
2611
2618
|
// src/llm/ToolRouter.ts
|
|
2612
2619
|
var wsToolExecutor = null;
|
|
2620
|
+
var featureModuleTools = /* @__PURE__ */ new Set();
|
|
2621
|
+
function registerFeatureModuleTools(toolNames) {
|
|
2622
|
+
for (const name of toolNames) {
|
|
2623
|
+
featureModuleTools.add(name);
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
function clearFeatureModuleTools() {
|
|
2627
|
+
featureModuleTools.clear();
|
|
2628
|
+
}
|
|
2629
|
+
function isFeatureModuleTool(toolName) {
|
|
2630
|
+
return featureModuleTools.has(toolName);
|
|
2631
|
+
}
|
|
2613
2632
|
function setWebSocketToolExecutor(executor) {
|
|
2614
2633
|
wsToolExecutor = executor;
|
|
2615
2634
|
}
|
|
@@ -2647,7 +2666,7 @@ async function executeTool(toolName, input, apiClient, localToolFn) {
|
|
|
2647
2666
|
logger.debug(`[ToolRouter] Routing ${toolName} to server via HTTP`);
|
|
2648
2667
|
const executor = new ServerToolExecutor(apiClient);
|
|
2649
2668
|
return await executor.executeTool(toolName, input);
|
|
2650
|
-
} else if (isLocalTool(toolName)) {
|
|
2669
|
+
} else if (isLocalTool(toolName) || isFeatureModuleTool(toolName)) {
|
|
2651
2670
|
logger.debug(`[ToolRouter] Executing ${toolName} locally`);
|
|
2652
2671
|
if (!localToolFn) {
|
|
2653
2672
|
throw new Error(`Local tool ${toolName} has no implementation`);
|
|
@@ -15665,7 +15684,7 @@ function wrapToolWithPermission(tool, permissionManager, showPermissionPrompt, a
|
|
|
15665
15684
|
if (!permissionManager.needsPermission(toolName, { isSandboxed })) {
|
|
15666
15685
|
return executeAndRecord();
|
|
15667
15686
|
}
|
|
15668
|
-
const { useCliStore } = await import("./store-
|
|
15687
|
+
const { useCliStore } = await import("./store-CAB6BV3P.js");
|
|
15669
15688
|
if (useCliStore.getState().autoAcceptEdits) {
|
|
15670
15689
|
return executeAndRecord();
|
|
15671
15690
|
}
|
|
@@ -19898,6 +19917,8 @@ export {
|
|
|
19898
19917
|
isReadOnlyTool,
|
|
19899
19918
|
buildSkillsPromptSection,
|
|
19900
19919
|
buildCoreSystemPrompt,
|
|
19920
|
+
registerFeatureModuleTools,
|
|
19921
|
+
clearFeatureModuleTools,
|
|
19901
19922
|
setWebSocketToolExecutor,
|
|
19902
19923
|
ALWAYS_DENIED_FOR_AGENTS,
|
|
19903
19924
|
DEFAULT_MAX_ITERATIONS,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@bike4mind/cli",
|
|
6
|
-
version: "0.2.
|
|
6
|
+
version: "0.2.59-feat-cli-tavern-integration.21571+5a8e57614",
|
|
7
7
|
type: "module",
|
|
8
8
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
9
9
|
license: "UNLICENSED",
|
|
@@ -44,7 +44,7 @@ var package_default = {
|
|
|
44
44
|
postinstall: `node -e "try { require('better-sqlite3') } catch(e) { if(e.message.includes('bindings')) { console.log('\\n\u26A0\uFE0F Rebuilding better-sqlite3 native bindings...'); require('child_process').execSync('pnpm rebuild better-sqlite3', {stdio:'inherit'}) } }"`
|
|
45
45
|
},
|
|
46
46
|
dependencies: {
|
|
47
|
-
"@anthropic-ai/sdk": "^0.
|
|
47
|
+
"@anthropic-ai/sdk": "^0.79.0",
|
|
48
48
|
"@aws-sdk/client-apigatewaymanagementapi": "3.1009.0",
|
|
49
49
|
"@aws-sdk/client-bedrock-runtime": "3.1009.0",
|
|
50
50
|
"@aws-sdk/client-cloudwatch": "3.1009.0",
|
|
@@ -55,20 +55,20 @@ var package_default = {
|
|
|
55
55
|
"@aws-sdk/credential-provider-node": "3.972.21",
|
|
56
56
|
"@aws-sdk/s3-request-presigner": "3.1009.0",
|
|
57
57
|
"@casl/ability": "^6.8.0",
|
|
58
|
-
"@google/genai": "^1.
|
|
58
|
+
"@google/genai": "^1.46.0",
|
|
59
59
|
"@joplin/turndown-plugin-gfm": "^1.0.64",
|
|
60
60
|
"@mendable/firecrawl-js": "^1.29.3",
|
|
61
61
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
62
62
|
"@octokit/rest": "^22.0.1",
|
|
63
63
|
"@opensearch-project/opensearch": "2.11.0",
|
|
64
|
-
"@smithy/node-http-handler": "^4.
|
|
64
|
+
"@smithy/node-http-handler": "^4.5.0",
|
|
65
65
|
"async-mutex": "^0.5.0",
|
|
66
66
|
axios: "^1.13.6",
|
|
67
67
|
bcryptjs: "^3.0.2",
|
|
68
68
|
"better-sqlite3": "^12.8.0",
|
|
69
69
|
cheerio: "1.0.0-rc.12",
|
|
70
70
|
"cli-highlight": "^2.1.11",
|
|
71
|
-
"csv-parse": "^6.
|
|
71
|
+
"csv-parse": "^6.2.0",
|
|
72
72
|
dayjs: "^1.11.20",
|
|
73
73
|
diff: "^8.0.2",
|
|
74
74
|
dotenv: "^17.0.0",
|
|
@@ -94,7 +94,7 @@ var package_default = {
|
|
|
94
94
|
mongoose: "^8.8.3",
|
|
95
95
|
ollama: "^0.6.3",
|
|
96
96
|
open: "^11.0.0",
|
|
97
|
-
openai: "^6.
|
|
97
|
+
openai: "^6.32.0",
|
|
98
98
|
"p-limit": "^7.3.0",
|
|
99
99
|
picomatch: "^4.0.3",
|
|
100
100
|
qrcode: "^1.5.4",
|
|
@@ -118,11 +118,11 @@ var package_default = {
|
|
|
118
118
|
zustand: "^4.5.4"
|
|
119
119
|
},
|
|
120
120
|
devDependencies: {
|
|
121
|
-
"@bike4mind/agents": "0.2.
|
|
122
|
-
"@bike4mind/common": "2.72.
|
|
123
|
-
"@bike4mind/mcp": "1.33.
|
|
124
|
-
"@bike4mind/services": "2.66.
|
|
125
|
-
"@bike4mind/utils": "2.15.
|
|
121
|
+
"@bike4mind/agents": "0.2.4-feat-cli-tavern-integration.21571+5a8e57614",
|
|
122
|
+
"@bike4mind/common": "2.72.1-feat-cli-tavern-integration.21571+5a8e57614",
|
|
123
|
+
"@bike4mind/mcp": "1.33.18-feat-cli-tavern-integration.21571+5a8e57614",
|
|
124
|
+
"@bike4mind/services": "2.66.1-feat-cli-tavern-integration.21571+5a8e57614",
|
|
125
|
+
"@bike4mind/utils": "2.15.12-feat-cli-tavern-integration.21571+5a8e57614",
|
|
126
126
|
"@types/better-sqlite3": "^7.6.13",
|
|
127
127
|
"@types/jsonwebtoken": "^9.0.4",
|
|
128
128
|
"@types/node": "^22.9.0",
|
|
@@ -139,7 +139,7 @@ var package_default = {
|
|
|
139
139
|
optionalDependencies: {
|
|
140
140
|
"@vscode/ripgrep": "^1.17.1"
|
|
141
141
|
},
|
|
142
|
-
gitHead: "
|
|
142
|
+
gitHead: "5a8e5761479b4545a77d5859f657fbdd8c991d47"
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
// src/utils/updateChecker.ts
|
|
@@ -397,6 +397,9 @@ var CliConfigSchema = z.object({
|
|
|
397
397
|
disabled: z.array(z.string()),
|
|
398
398
|
config: z.record(z.string(), z.any())
|
|
399
399
|
}),
|
|
400
|
+
features: z.object({
|
|
401
|
+
tavern: z.boolean().optional()
|
|
402
|
+
}).optional().prefault({}),
|
|
400
403
|
trustedTools: z.array(z.string()).optional().prefault([]),
|
|
401
404
|
sandbox: SandboxConfigSchema.optional(),
|
|
402
405
|
additionalDirectories: z.array(z.string()).optional().prefault([])
|
|
@@ -128,7 +128,14 @@ var useCliStore = create((set) => ({
|
|
|
128
128
|
clearCompletedGroupNotifications: () => set({ completedGroupNotifications: [] }),
|
|
129
129
|
// Pending background trigger
|
|
130
130
|
pendingBackgroundTrigger: false,
|
|
131
|
-
setPendingBackgroundTrigger: (pending) => set({ pendingBackgroundTrigger: pending })
|
|
131
|
+
setPendingBackgroundTrigger: (pending) => set({ pendingBackgroundTrigger: pending }),
|
|
132
|
+
// Tavern activity log (capped at 200 entries)
|
|
133
|
+
tavernActivityLog: [],
|
|
134
|
+
addTavernLogEntry: (entry) => set((state) => {
|
|
135
|
+
const log = [...state.tavernActivityLog, entry];
|
|
136
|
+
return { tavernActivityLog: log.length > 200 ? log.slice(-200) : log };
|
|
137
|
+
}),
|
|
138
|
+
clearTavernActivityLog: () => set({ tavernActivityLog: [] })
|
|
132
139
|
}));
|
|
133
140
|
var selectActiveBackgroundAgents = (state) => state.backgroundAgents.filter((j) => isActiveStatus(j.status));
|
|
134
141
|
var selectCompletedBackgroundAgents = (state) => state.backgroundAgents.filter((j) => !isActiveStatus(j.status));
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
isReadOnlyTool,
|
|
37
37
|
loadContextFiles,
|
|
38
38
|
setWebSocketToolExecutor
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-BPUFVNEJ.js";
|
|
40
40
|
import "../chunk-BDQBOLYG.js";
|
|
41
41
|
import "../chunk-5TQE3IBF.js";
|
|
42
42
|
import "../chunk-GQGOWACU.js";
|
|
@@ -48,7 +48,7 @@ import "../chunk-BPFEGDC7.js";
|
|
|
48
48
|
import {
|
|
49
49
|
ConfigStore,
|
|
50
50
|
logger
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-U52SND4Y.js";
|
|
52
52
|
import "../chunk-EY2AKUAW.js";
|
|
53
53
|
import {
|
|
54
54
|
DEFAULT_SANDBOX_CONFIG
|