@bike4mind/cli 0.2.64 → 0.2.65-feat-favorite-ai-models.21861

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.
@@ -880,6 +880,15 @@ const SreGateConfigSchema = z.object({
880
880
  message: "autoThreshold must be >= askThreshold",
881
881
  path: ["autoThreshold"]
882
882
  });
883
+ /** Base allowed patterns — always merged into stored config.
884
+ * Keep in sync with scripts/apply-sre-fix.cjs ALLOWED_PATTERNS */
885
+ const SRE_BASE_ALLOWED_PATTERNS = [
886
+ "apps/client/**",
887
+ "b4m-core/packages/services/**",
888
+ "b4m-core/packages/common/src/**",
889
+ "b4m-core/packages/utils/src/llm/**",
890
+ "packages/database/src/**"
891
+ ];
883
892
  const SreAgentConfigSchema = z.object({
884
893
  enabled: z.boolean().default(false),
885
894
  maxFixesPerDay: z.number().min(0).default(5),
@@ -938,11 +947,9 @@ const SreAgentConfigSchema = z.object({
938
947
  sentinelToDiagnostician: { ...SRE_GATE_DEFAULTS },
939
948
  diagnosticianToSurgeon: { ...SRE_GATE_DEFAULTS }
940
949
  }),
941
- allowedFilePatterns: z.array(z.string()).default([
942
- "apps/client/**",
943
- "b4m-core/packages/services/**",
944
- "b4m-core/packages/common/src/**"
945
- ]),
950
+ allowedFilePatterns: z.array(z.string()).default([...SRE_BASE_ALLOWED_PATTERNS]).transform((patterns) => {
951
+ return [...new Set([...SRE_BASE_ALLOWED_PATTERNS, ...patterns])];
952
+ }),
946
953
  blockedFilePatterns: z.array(z.string()).default([
947
954
  "infra/**",
948
955
  "*.secret*",
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as version, n as fetchLatestVersion, r as forceCheckForUpdate } from "../updateChecker-Cu9dkHxV.mjs";
2
+ import { i as version, n as fetchLatestVersion, r as forceCheckForUpdate } from "../updateChecker-DvBLwr4p.mjs";
3
3
  import { execSync } from "child_process";
4
4
  import { constants, existsSync, promises } from "fs";
5
5
  import { homedir } from "os";
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { I as isReadOnlyTool, L as ReActAgent, M as setWebSocketToolExecutor, P as buildCoreSystemPrompt, R as CustomCommandStore, S as getApiUrl, T as generateCliTools, V as SessionStore, _ as McpManager, a as createBackgroundAgentTools, c as AgentStore, f as ApiClient, g as ServerLlmBackend, h as WebSocketLlmBackend, i as createWriteTodosTool, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, w as PermissionManager, x as loadContextFiles, z as CheckpointStore } from "../tools-C6M5aW8W.mjs";
3
- import { n as logger, t as ConfigStore } from "../ConfigStore-CllM6jOf.mjs";
2
+ import { I as isReadOnlyTool, L as ReActAgent, M as setWebSocketToolExecutor, P as buildCoreSystemPrompt, R as CustomCommandStore, S as getApiUrl, T as generateCliTools, V as SessionStore, _ as McpManager, a as createBackgroundAgentTools, c as AgentStore, f as ApiClient, g as ServerLlmBackend, h as WebSocketLlmBackend, i as createWriteTodosTool, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, w as PermissionManager, x as loadContextFiles, z as CheckpointStore } from "../tools-BrU2_7Mb.mjs";
3
+ import { n as logger, t as ConfigStore } from "../ConfigStore-uYYzNv7J.mjs";
4
4
  import { t as DEFAULT_SANDBOX_CONFIG } from "../types-DBEjF9YS.mjs";
5
5
  import { t as createSandboxRuntime } from "../SandboxRuntimeAdapter-C1B4t20N.mjs";
6
6
  import { t as SandboxOrchestrator } from "../SandboxOrchestrator-BEW3rqYi.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as ConfigStore } from "../ConfigStore-CllM6jOf.mjs";
2
+ import { t as ConfigStore } from "../ConfigStore-uYYzNv7J.mjs";
3
3
  //#region src/commands/mcpCommand.ts
4
4
  /**
5
5
  * External MCP commands (b4m mcp list, b4m mcp add, etc.)
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as version, r as forceCheckForUpdate } from "../updateChecker-Cu9dkHxV.mjs";
2
+ import { i as version, r as forceCheckForUpdate } from "../updateChecker-DvBLwr4p.mjs";
3
3
  import { execSync } from "child_process";
4
4
  //#region src/commands/updateCommand.ts
5
5
  /**
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as useCliStore, t as selectActiveBackgroundAgents } from "./store-Dw1nZX2Y.mjs";
3
- import { A as clearFeatureModuleTools, B as CommandHistoryStore, C as getEnvironmentName, D as DEFAULT_AGENT_MODEL, E as ALWAYS_DENIED_FOR_AGENTS, F as buildSkillsPromptSection, G as searchCommands, H as OAuthClient, I as isReadOnlyTool, J as searchFiles, K as mergeCommands, L as ReActAgent, M as setWebSocketToolExecutor, N as OllamaBackend, O as DEFAULT_MAX_ITERATIONS, P as buildCoreSystemPrompt, R as CustomCommandStore, S as getApiUrl, T as generateCliTools, U as hasFileReferences, V as SessionStore, W as processFileReferences, Y as warmFileCache, _ as McpManager, a as createBackgroundAgentTools, b as extractCompactInstructions, c as AgentStore, d as parseAgentConfig, f as ApiClient, g as ServerLlmBackend, h as WebSocketLlmBackend, i as createWriteTodosTool, j as registerFeatureModuleTools, k as DEFAULT_THOROUGHNESS, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, q as formatFileSize, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, v as substituteArguments, w as PermissionManager, x as loadContextFiles, y as formatStep, z as CheckpointStore } from "./tools-C6M5aW8W.mjs";
4
- import { Dt as validateNotebookPath$1, Et as validateJupyterKernelName, g as ChatModels, m as CREDIT_DEDUCT_TRANSACTION_TYPES, n as logger, t as ConfigStore } from "./ConfigStore-CllM6jOf.mjs";
5
- import { i as version, t as checkForUpdate } from "./updateChecker-Cu9dkHxV.mjs";
3
+ import { A as clearFeatureModuleTools, B as CommandHistoryStore, C as getEnvironmentName, D as DEFAULT_AGENT_MODEL, E as ALWAYS_DENIED_FOR_AGENTS, F as buildSkillsPromptSection, G as searchCommands, H as OAuthClient, I as isReadOnlyTool, J as searchFiles, K as mergeCommands, L as ReActAgent, M as setWebSocketToolExecutor, N as OllamaBackend, O as DEFAULT_MAX_ITERATIONS, P as buildCoreSystemPrompt, R as CustomCommandStore, S as getApiUrl, T as generateCliTools, U as hasFileReferences, V as SessionStore, W as processFileReferences, Y as warmFileCache, _ as McpManager, a as createBackgroundAgentTools, b as extractCompactInstructions, c as AgentStore, d as parseAgentConfig, f as ApiClient, g as ServerLlmBackend, h as WebSocketLlmBackend, i as createWriteTodosTool, j as registerFeatureModuleTools, k as DEFAULT_THOROUGHNESS, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, q as formatFileSize, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, v as substituteArguments, w as PermissionManager, x as loadContextFiles, y as formatStep, z as CheckpointStore } from "./tools-BrU2_7Mb.mjs";
4
+ import { Dt as validateNotebookPath$1, Et as validateJupyterKernelName, g as ChatModels, m as CREDIT_DEDUCT_TRANSACTION_TYPES, n as logger, t as ConfigStore } from "./ConfigStore-uYYzNv7J.mjs";
5
+ import { i as version, t as checkForUpdate } from "./updateChecker-DvBLwr4p.mjs";
6
6
  import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from "react";
7
7
  import { Box, Static, Text, render, useApp, useInput } from "ink";
8
8
  import { execSync } from "child_process";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as RegInviteEvents, A as ImageGenerationUsageTransaction, B as OpenAIEmbeddingModel, C as FileEvents, Ct as isGPTImageModel, D as GenericCreditAddTransaction, E as GenerateImageToolCallSchema, F as KnowledgeType, G as ProjectEvents, H as Permission, I as LLMEvents, J as QuestMasterParamsSchema, K as PromptMetaZodSchema, L as MiscEvents, M as InboxEvents, N as InviteEvents, O as GenericCreditDeductTransaction, Ot as CollectionType, P as InviteType, Q as RechartsChartTypeList, R as ModalEvents, S as FeedbackEvents, St as getViewById, T as GEMINI_IMAGE_MODELS, Tt as sanitizeTelemetryError, U as PermissionDeniedError, V as OpenAIImageGenerationInput, W as ProfileEvents, X as RealtimeVoiceUsageTransaction, Y as REASONING_SUPPORTED_MODELS, Z as ReceivedCreditTransaction, _ as CompletionApiUsageTransaction, _t as VoyageAIEmbeddingModel, a as ApiKeyEvents, at as SpeechToTextModels, b as FIXED_TEMPERATURE_MODELS, bt as getDataLakeTags, c as AppFileEvents, ct as TagType, d as BFL_IMAGE_MODELS, dt as ToolUsageTransaction, et as ResearchModeParamsSchema, f as BFL_SAFETY_TOLERANCE, ft as TransferCreditTransaction, g as ChatModels, gt as VideoModels, h as ChatCompletionCreateInputSchema, ht as VideoGenerationUsageTransaction, i as AiEvents, it as SessionEvents, j as ImageModels, k as ImageEditUsageTransaction, l as ArtifactTypeSchema, lt as TaskScheduleHandler, mt as VIDEO_SIZE_CONSTRAINTS, n as logger, nt as ResearchTaskPeriodicFrequencyType, o as ApiKeyScope, ot as SubscriptionCreditTransaction, p as BedrockEmbeddingModel, pt as UiNavigationEvents, q as PurchaseTransaction, r as ALERT_THRESHOLDS, rt as ResearchTaskType, s as ApiKeyType, st as SupportedFabFileMimeTypes, t as ConfigStore, tt as ResearchTaskExecutionType, u as AuthEvents, ut as TextGenerationUsageTransaction, v as DashboardParamsSchema, vt as XAI_IMAGE_MODELS, w as FriendshipEvents, wt as resolveNavigationIntents, x as FavoriteDocumentType, xt as getMcpProviderMetadata, y as ElabsEvents, yt as b4mLLMTools, z as ModelBackend } from "./ConfigStore-CllM6jOf.mjs";
2
+ import { $ as RegInviteEvents, A as ImageGenerationUsageTransaction, B as OpenAIEmbeddingModel, C as FileEvents, Ct as isGPTImageModel, D as GenericCreditAddTransaction, E as GenerateImageToolCallSchema, F as KnowledgeType, G as ProjectEvents, H as Permission, I as LLMEvents, J as QuestMasterParamsSchema, K as PromptMetaZodSchema, L as MiscEvents, M as InboxEvents, N as InviteEvents, O as GenericCreditDeductTransaction, Ot as CollectionType, P as InviteType, Q as RechartsChartTypeList, R as ModalEvents, S as FeedbackEvents, St as getViewById, T as GEMINI_IMAGE_MODELS, Tt as sanitizeTelemetryError, U as PermissionDeniedError, V as OpenAIImageGenerationInput, W as ProfileEvents, X as RealtimeVoiceUsageTransaction, Y as REASONING_SUPPORTED_MODELS, Z as ReceivedCreditTransaction, _ as CompletionApiUsageTransaction, _t as VoyageAIEmbeddingModel, a as ApiKeyEvents, at as SpeechToTextModels, b as FIXED_TEMPERATURE_MODELS, bt as getDataLakeTags, c as AppFileEvents, ct as TagType, d as BFL_IMAGE_MODELS, dt as ToolUsageTransaction, et as ResearchModeParamsSchema, f as BFL_SAFETY_TOLERANCE, ft as TransferCreditTransaction, g as ChatModels, gt as VideoModels, h as ChatCompletionCreateInputSchema, ht as VideoGenerationUsageTransaction, i as AiEvents, it as SessionEvents, j as ImageModels, k as ImageEditUsageTransaction, l as ArtifactTypeSchema, lt as TaskScheduleHandler, mt as VIDEO_SIZE_CONSTRAINTS, n as logger, nt as ResearchTaskPeriodicFrequencyType, o as ApiKeyScope, ot as SubscriptionCreditTransaction, p as BedrockEmbeddingModel, pt as UiNavigationEvents, q as PurchaseTransaction, r as ALERT_THRESHOLDS, rt as ResearchTaskType, s as ApiKeyType, st as SupportedFabFileMimeTypes, t as ConfigStore, tt as ResearchTaskExecutionType, u as AuthEvents, ut as TextGenerationUsageTransaction, v as DashboardParamsSchema, vt as XAI_IMAGE_MODELS, w as FriendshipEvents, wt as resolveNavigationIntents, x as FavoriteDocumentType, xt as getMcpProviderMetadata, y as ElabsEvents, yt as b4mLLMTools, z as ModelBackend } from "./ConfigStore-uYYzNv7J.mjs";
3
3
  import { n as isPathAllowed, t as assertPathAllowed } from "./pathValidation-Cgjh5WQO-DiCZTcq6.mjs";
4
4
  import { execFile, execFileSync, spawn } from "child_process";
5
5
  import { createHash, randomBytes } from "crypto";
@@ -80,6 +80,7 @@ import "zod-validation-error";
80
80
  import { homedir as homedir$1 } from "node:os";
81
81
  import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
82
82
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
83
+ import { fileURLToPath } from "url";
83
84
  import WsWebSocket from "ws";
84
85
  import { createParser } from "eventsource-parser";
85
86
  import { createRequire } from "module";
@@ -8267,6 +8268,7 @@ const updateUserSchema = z.object({
8267
8268
  preferences: z.object({
8268
8269
  language: z.string().optional(),
8269
8270
  favoriteTags: z.array(z.string()).optional(),
8271
+ favoriteModelIds: z.array(z.string()).optional(),
8270
8272
  fileBrowserViewMode: z.enum([
8271
8273
  "home",
8272
8274
  "list",
@@ -8284,7 +8286,8 @@ const updateUserSchema = z.object({
8284
8286
  enableAutoScroll: z.boolean().optional(),
8285
8287
  scrollbarWidth: z.number().optional(),
8286
8288
  experimentalFeatures: z.record(z.string(), z.boolean()).optional(),
8287
- rechartsDisplayMode: z.enum(["inline", "artifact"]).optional()
8289
+ rechartsDisplayMode: z.enum(["inline", "artifact"]).optional(),
8290
+ docxTemplateFileId: z.string().nullable().optional()
8288
8291
  }).nullable().optional()
8289
8292
  });
8290
8293
  z.object({
@@ -17675,21 +17678,14 @@ var MCPClient = class {
17675
17678
  command = this.customCommand;
17676
17679
  args = this.customArgs ?? [];
17677
17680
  } else {
17678
- const root = process.env.INIT_CWD || process.cwd();
17679
- const candidatePaths = [
17680
- path.join(root, `node_modules/@bike4mind/mcp/dist/src/${this.serverName}/index.js`),
17681
- path.join(root, `b4m-core/packages/mcp/dist/src/${this.serverName}/index.js`),
17682
- path.join(root, `../../../b4m-core/packages/mcp/dist/src/${this.serverName}/index.js`),
17683
- path.join(root, `../../b4m-core/packages/mcp/dist/src/${this.serverName}/index.js`),
17684
- path.join(root, `/b4m-core/packages/mcp/dist/src/${this.serverName}/index.js`),
17685
- path.join(root, "core", "mcp", "servers", this.serverName, "dist", "index.js")
17686
- ];
17687
- const serverScriptPath = candidatePaths.find((p) => existsSync(p));
17688
- if (!serverScriptPath) {
17689
- const getDirectories = (source) => readdirSync(source, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
17690
- console.error(`[MCP] Server script not found. Tried paths:`, candidatePaths);
17691
- console.error(`[MCP] Available directories in ${root}:`, getDirectories(root));
17692
- throw new Error(`MCP Server script path not found for ${this.serverName}. Root: ${root}, Available dirs: ${getDirectories(root).join(", ")}`);
17681
+ const moduleDir = path.dirname(fileURLToPath(import.meta.url));
17682
+ const serverScriptPath = path.join(moduleDir, this.serverName, "index.mjs");
17683
+ if (!existsSync(serverScriptPath)) {
17684
+ const availableFiles = readdirSync(moduleDir, { withFileTypes: true }).map((d) => d.isDirectory() ? `${d.name}/` : d.name);
17685
+ console.error(`[MCP] Server script not found at: ${serverScriptPath}`);
17686
+ console.error(`[MCP] Module directory: ${moduleDir}`);
17687
+ console.error(`[MCP] Available in module dir:`, availableFiles);
17688
+ throw new Error(`MCP Server script not found for ${this.serverName} at ${serverScriptPath}. Module dir: ${moduleDir}`);
17693
17689
  }
17694
17690
  command = process.execPath;
17695
17691
  args = [serverScriptPath];
@@ -4,7 +4,7 @@ import { homedir } from "os";
4
4
  import path from "path";
5
5
  import axios from "axios";
6
6
  //#region package.json
7
- var version = "0.2.64";
7
+ var version = "0.2.65-feat-favorite-ai-models.21861+16a4cbc30";
8
8
  //#endregion
9
9
  //#region src/utils/updateChecker.ts
10
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.64",
3
+ "version": "0.2.65-feat-favorite-ai-models.21861+16a4cbc30",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -115,11 +115,11 @@
115
115
  "zustand": "^4.5.4"
116
116
  },
117
117
  "devDependencies": {
118
- "@bike4mind/agents": "0.4.2",
119
- "@bike4mind/common": "2.75.1",
120
- "@bike4mind/mcp": "1.33.21",
121
- "@bike4mind/services": "2.69.1",
122
- "@bike4mind/utils": "2.16.3",
118
+ "@bike4mind/agents": "0.4.3-feat-favorite-ai-models.21861+16a4cbc30",
119
+ "@bike4mind/common": "2.75.2-feat-favorite-ai-models.21861+16a4cbc30",
120
+ "@bike4mind/mcp": "1.33.22-feat-favorite-ai-models.21861+16a4cbc30",
121
+ "@bike4mind/services": "2.69.2-feat-favorite-ai-models.21861+16a4cbc30",
122
+ "@bike4mind/utils": "2.16.4-feat-favorite-ai-models.21861+16a4cbc30",
123
123
  "@types/better-sqlite3": "^7.6.13",
124
124
  "@types/jsonwebtoken": "^9.0.4",
125
125
  "@types/node": "^22.9.0",
@@ -136,5 +136,5 @@
136
136
  "optionalDependencies": {
137
137
  "@vscode/ripgrep": "^1.17.1"
138
138
  },
139
- "gitHead": "bab047b7f53654baafcbb873a9b5e6a8f16cffb7"
139
+ "gitHead": "16a4cbc30fc1d09e116155114535dd8eb5085b01"
140
140
  }