@bike4mind/cli 0.2.66-refactor-7536-flatten-b4m-core-packages.21867 → 0.2.66
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/{ConfigStore-BRxopalY.mjs → ConfigStore-DRYo2iO1.mjs} +33 -5
- package/dist/{bashExecute-BTkdqlSs-Cvoy67KF.mjs → bashExecute-BTkdqlSs-5foM20Lb.mjs} +1 -1
- package/dist/commands/doctorCommand.mjs +1 -1
- package/dist/commands/headlessCommand.mjs +2 -2
- package/dist/commands/mcpCommand.mjs +1 -1
- package/dist/commands/updateCommand.mjs +1 -1
- package/dist/{createFile-yQfh8uvk-Di_OA3Ar.mjs → createFile-yQfh8uvk-I-yM5DxC.mjs} +2 -2
- package/dist/{deleteFile-DKHfnyny-8ToTTK4P.mjs → deleteFile-DKHfnyny-G3b1Kj2T.mjs} +2 -2
- package/dist/{globFiles-D1en6joM-CqY656rd.mjs → globFiles-D1en6joM-8jekiXdX.mjs} +2 -2
- package/dist/{grepSearch-aMamoBn_-l_N3ZcB8.mjs → grepSearch-aMamoBn_-DCJcY8JS.mjs} +2 -2
- package/dist/index.mjs +6 -6
- package/dist/{pathValidation-Cgjh5WQO-CtrrwLnO.mjs → pathValidation-Cgjh5WQO-DiCZTcq6.mjs} +1 -1
- package/dist/{tools-DvLMDNsj.mjs → tools-BHNW_X-R.mjs} +26 -24
- package/dist/{updateChecker-BEu6W76X.mjs → updateChecker-CsRms3Og.mjs} +1 -1
- package/package.json +7 -7
|
@@ -13,7 +13,7 @@ import utc from "dayjs/plugin/utc.js";
|
|
|
13
13
|
import relativeTime from "dayjs/plugin/relativeTime.js";
|
|
14
14
|
import localizedFormat from "dayjs/plugin/localizedFormat.js";
|
|
15
15
|
import fs from "fs/promises";
|
|
16
|
-
//#region ../../b4m-core/common/dist/types/entities/UserTypes.mjs
|
|
16
|
+
//#region ../../b4m-core/packages/common/dist/types/entities/UserTypes.mjs
|
|
17
17
|
let CollectionType = /* @__PURE__ */ function(CollectionType) {
|
|
18
18
|
CollectionType["NOTEBOOK"] = "notebook";
|
|
19
19
|
CollectionType["KNOWLEDGE"] = "knowledge";
|
|
@@ -22,7 +22,7 @@ let CollectionType = /* @__PURE__ */ function(CollectionType) {
|
|
|
22
22
|
return CollectionType;
|
|
23
23
|
}({});
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region ../../b4m-core/common/dist/index.mjs
|
|
25
|
+
//#region ../../b4m-core/packages/common/dist/index.mjs
|
|
26
26
|
/**
|
|
27
27
|
* Error thrown when user denies permission for a tool
|
|
28
28
|
* This should break the agent loop immediately and return control to the user
|
|
@@ -884,9 +884,9 @@ const SreGateConfigSchema = z.object({
|
|
|
884
884
|
* Keep in sync with scripts/apply-sre-fix.cjs ALLOWED_PATTERNS */
|
|
885
885
|
const SRE_BASE_ALLOWED_PATTERNS = [
|
|
886
886
|
"apps/client/**",
|
|
887
|
-
"b4m-core/services/**",
|
|
888
|
-
"b4m-core/common/src/**",
|
|
889
|
-
"b4m-core/utils/src/llm/**",
|
|
887
|
+
"b4m-core/packages/services/**",
|
|
888
|
+
"b4m-core/packages/common/src/**",
|
|
889
|
+
"b4m-core/packages/utils/src/llm/**",
|
|
890
890
|
"packages/database/src/**"
|
|
891
891
|
];
|
|
892
892
|
const SreAgentConfigSchema = z.object({
|
|
@@ -2744,6 +2744,8 @@ z.enum([
|
|
|
2744
2744
|
"githubMcpClientSecret",
|
|
2745
2745
|
"atlassianClientId",
|
|
2746
2746
|
"atlassianClientSecret",
|
|
2747
|
+
"notionClientId",
|
|
2748
|
+
"notionClientSecret",
|
|
2747
2749
|
"qWorkUrl",
|
|
2748
2750
|
"qWorkToken",
|
|
2749
2751
|
"FacebookLink",
|
|
@@ -3410,6 +3412,14 @@ const API_SERVICE_GROUPS = {
|
|
|
3410
3412
|
{
|
|
3411
3413
|
key: "atlassianClientSecret",
|
|
3412
3414
|
order: 5
|
|
3415
|
+
},
|
|
3416
|
+
{
|
|
3417
|
+
key: "notionClientId",
|
|
3418
|
+
order: 6
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
key: "notionClientSecret",
|
|
3422
|
+
order: 7
|
|
3413
3423
|
}
|
|
3414
3424
|
]
|
|
3415
3425
|
},
|
|
@@ -4448,6 +4458,24 @@ makeStringSetting({
|
|
|
4448
4458
|
group: API_SERVICE_GROUPS.MCP.id,
|
|
4449
4459
|
order: 5,
|
|
4450
4460
|
isSensitive: true
|
|
4461
|
+
}), makeStringSetting({
|
|
4462
|
+
key: "notionClientId",
|
|
4463
|
+
name: "Notion Client ID",
|
|
4464
|
+
defaultValue: "",
|
|
4465
|
+
description: "The OAuth Client ID for Notion integration.",
|
|
4466
|
+
category: "Tools",
|
|
4467
|
+
group: API_SERVICE_GROUPS.MCP.id,
|
|
4468
|
+
order: 6,
|
|
4469
|
+
isSensitive: false
|
|
4470
|
+
}), makeStringSetting({
|
|
4471
|
+
key: "notionClientSecret",
|
|
4472
|
+
name: "Notion Client Secret",
|
|
4473
|
+
defaultValue: "",
|
|
4474
|
+
description: "The OAuth Client Secret for Notion integration.",
|
|
4475
|
+
category: "Tools",
|
|
4476
|
+
group: API_SERVICE_GROUPS.MCP.id,
|
|
4477
|
+
order: 7,
|
|
4478
|
+
isSensitive: true
|
|
4451
4479
|
}), makeStringSetting({
|
|
4452
4480
|
key: "qWorkUrl",
|
|
4453
4481
|
name: "Q/Work URL",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from "child_process";
|
|
3
3
|
import path from "path";
|
|
4
|
-
//#region ../../b4m-core/services/dist/bashExecute-BTkdqlSs.mjs
|
|
4
|
+
//#region ../../b4m-core/packages/services/dist/bashExecute-BTkdqlSs.mjs
|
|
5
5
|
const DEFAULT_TIMEOUT_MS = 6e4;
|
|
6
6
|
const MAX_OUTPUT_SIZE = 100 * 1024;
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as version, n as fetchLatestVersion, r as forceCheckForUpdate } from "../updateChecker-
|
|
2
|
+
import { i as version, n as fetchLatestVersion, r as forceCheckForUpdate } from "../updateChecker-CsRms3Og.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-
|
|
3
|
-
import { n as logger, t as ConfigStore } from "../ConfigStore-
|
|
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-BHNW_X-R.mjs";
|
|
3
|
+
import { n as logger, t as ConfigStore } from "../ConfigStore-DRYo2iO1.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 { i as version, r as forceCheckForUpdate } from "../updateChecker-
|
|
2
|
+
import { i as version, r as forceCheckForUpdate } from "../updateChecker-CsRms3Og.mjs";
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
//#region src/commands/updateCommand.ts
|
|
5
5
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as assertPathAllowed } from "./pathValidation-Cgjh5WQO-
|
|
2
|
+
import { t as assertPathAllowed } from "./pathValidation-Cgjh5WQO-DiCZTcq6.mjs";
|
|
3
3
|
import { existsSync, promises } from "fs";
|
|
4
4
|
import path from "path";
|
|
5
|
-
//#region ../../b4m-core/services/dist/createFile-yQfh8uvk.mjs
|
|
5
|
+
//#region ../../b4m-core/packages/services/dist/createFile-yQfh8uvk.mjs
|
|
6
6
|
async function createFile(params, allowedDirectories) {
|
|
7
7
|
const { path: filePath, content, createDirectories = true } = params;
|
|
8
8
|
const resolvedPath = assertPathAllowed(filePath, allowedDirectories, "create");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as assertPathAllowed } from "./pathValidation-Cgjh5WQO-
|
|
2
|
+
import { t as assertPathAllowed } from "./pathValidation-Cgjh5WQO-DiCZTcq6.mjs";
|
|
3
3
|
import { existsSync, promises, statSync } from "fs";
|
|
4
4
|
import path from "path";
|
|
5
|
-
//#region ../../b4m-core/services/dist/deleteFile-DKHfnyny.mjs
|
|
5
|
+
//#region ../../b4m-core/packages/services/dist/deleteFile-DKHfnyny.mjs
|
|
6
6
|
async function deleteFile(params, allowedDirectories) {
|
|
7
7
|
const { path: filePath, recursive = false } = params;
|
|
8
8
|
const resolvedPath = assertPathAllowed(filePath, allowedDirectories, "delete");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isPathAllowed } from "./pathValidation-Cgjh5WQO-
|
|
2
|
+
import { n as isPathAllowed } from "./pathValidation-Cgjh5WQO-DiCZTcq6.mjs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { stat } from "fs/promises";
|
|
5
5
|
import { glob } from "glob";
|
|
6
|
-
//#region ../../b4m-core/services/dist/globFiles-D1en6joM.mjs
|
|
6
|
+
//#region ../../b4m-core/packages/services/dist/globFiles-D1en6joM.mjs
|
|
7
7
|
const DEFAULT_IGNORE_PATTERNS = [
|
|
8
8
|
"**/node_modules/**",
|
|
9
9
|
"**/.git/**",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isPathAllowed } from "./pathValidation-Cgjh5WQO-
|
|
2
|
+
import { n as isPathAllowed } from "./pathValidation-Cgjh5WQO-DiCZTcq6.mjs";
|
|
3
3
|
import { execFile, execFileSync } from "child_process";
|
|
4
4
|
import { existsSync } from "fs";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import { stat } from "fs/promises";
|
|
7
7
|
import { promisify } from "util";
|
|
8
8
|
import { createRequire } from "module";
|
|
9
|
-
//#region ../../b4m-core/services/dist/grepSearch-aMamoBn_.mjs
|
|
9
|
+
//#region ../../b4m-core/packages/services/dist/grepSearch-aMamoBn_.mjs
|
|
10
10
|
const execFileAsync = promisify(execFile);
|
|
11
11
|
const require = createRequire(import.meta.url);
|
|
12
12
|
/** Cached ripgrep binary path after first resolution */
|
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-
|
|
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-
|
|
5
|
-
import { i as version, t as checkForUpdate } from "./updateChecker-
|
|
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-BHNW_X-R.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-DRYo2iO1.mjs";
|
|
5
|
+
import { i as version, t as checkForUpdate } from "./updateChecker-CsRms3Og.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";
|
|
@@ -22,7 +22,7 @@ import jwt from "jsonwebtoken";
|
|
|
22
22
|
import open from "open";
|
|
23
23
|
import axios, { isAxiosError } from "axios";
|
|
24
24
|
import { get_encoding } from "tiktoken";
|
|
25
|
-
import
|
|
25
|
+
import WebSocket from "ws";
|
|
26
26
|
//#region src/components/StatusBar.tsx
|
|
27
27
|
const StatusBar = React.memo(function StatusBar({ sessionName, model, tokenUsage, creditsUsage }) {
|
|
28
28
|
const autoAcceptEdits = useCliStore((state) => state.autoAcceptEdits);
|
|
@@ -2798,14 +2798,14 @@ var JupyterClient = class {
|
|
|
2798
2798
|
let executionCount = null;
|
|
2799
2799
|
let hasError = false;
|
|
2800
2800
|
let errorInfo;
|
|
2801
|
-
const ws = new
|
|
2801
|
+
const ws = new WebSocket(wsUrl);
|
|
2802
2802
|
const timeoutHandle = setTimeout(() => {
|
|
2803
2803
|
cleanup();
|
|
2804
2804
|
reject(new JupyterClientError(`Cell execution timed out after ${timeoutMs}ms`));
|
|
2805
2805
|
}, timeoutMs);
|
|
2806
2806
|
const cleanup = () => {
|
|
2807
2807
|
clearTimeout(timeoutHandle);
|
|
2808
|
-
if (ws.readyState ===
|
|
2808
|
+
if (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING) ws.close();
|
|
2809
2809
|
};
|
|
2810
2810
|
ws.on("error", (err) => {
|
|
2811
2811
|
cleanup();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { realpathSync } from "fs";
|
|
3
3
|
import path from "path";
|
|
4
|
-
//#region ../../b4m-core/services/dist/pathValidation-Cgjh5WQO.mjs
|
|
4
|
+
//#region ../../b4m-core/packages/services/dist/pathValidation-Cgjh5WQO.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Resolves a path to its canonical form, following symlinks.
|
|
7
7
|
* If the path doesn't exist (e.g., file being created), resolves the
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import { n as isPathAllowed, t as assertPathAllowed } from "./pathValidation-Cgjh5WQO-
|
|
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-DRYo2iO1.mjs";
|
|
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";
|
|
6
6
|
import { existsSync, promises, readFileSync, readdirSync, rmSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
@@ -81,7 +81,7 @@ 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
83
|
import { fileURLToPath } from "url";
|
|
84
|
-
import
|
|
84
|
+
import WebSocket from "ws";
|
|
85
85
|
import { createParser } from "eventsource-parser";
|
|
86
86
|
import { createRequire } from "module";
|
|
87
87
|
//#region src/utils/fileSearch.ts
|
|
@@ -1718,7 +1718,7 @@ You can use:
|
|
|
1718
1718
|
}
|
|
1719
1719
|
};
|
|
1720
1720
|
//#endregion
|
|
1721
|
-
//#region ../../b4m-core/agents/dist/index.mjs
|
|
1721
|
+
//#region ../../b4m-core/packages/agents/dist/index.mjs
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Default set of known write (non-parallelizable) tools.
|
|
1724
1724
|
* These tools can modify state and should always be sequential.
|
|
@@ -2663,7 +2663,7 @@ You have access to the '${TOOL_CREATE_DYNAMIC_AGENT}' tool, which lets you creat
|
|
|
2663
2663
|
thoroughness: "quick"`;
|
|
2664
2664
|
}
|
|
2665
2665
|
//#endregion
|
|
2666
|
-
//#region ../../b4m-core/utils/dist/imageGeneration/AIImageService.mjs
|
|
2666
|
+
//#region ../../b4m-core/packages/utils/dist/imageGeneration/AIImageService.mjs
|
|
2667
2667
|
/**
|
|
2668
2668
|
* Abstract class for AI Image Service
|
|
2669
2669
|
*/
|
|
@@ -2675,7 +2675,7 @@ var AIImageService = class {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
};
|
|
2677
2677
|
//#endregion
|
|
2678
|
-
//#region ../../b4m-core/utils/dist/index.mjs
|
|
2678
|
+
//#region ../../b4m-core/packages/utils/dist/index.mjs
|
|
2679
2679
|
var BaseStorage = class {};
|
|
2680
2680
|
var Logger = class Logger {
|
|
2681
2681
|
static globalInstance = new Logger();
|
|
@@ -5912,7 +5912,7 @@ z.object({
|
|
|
5912
5912
|
userId: z.string()
|
|
5913
5913
|
});
|
|
5914
5914
|
//#endregion
|
|
5915
|
-
//#region ../../b4m-core/services/dist/getEffective-DdXITYE5.mjs
|
|
5915
|
+
//#region ../../b4m-core/packages/services/dist/getEffective-DdXITYE5.mjs
|
|
5916
5916
|
const getApiKeySchema = z.object({
|
|
5917
5917
|
type: z.enum(ApiKeyType),
|
|
5918
5918
|
nullIfMissing: z.boolean().optional(),
|
|
@@ -5991,7 +5991,7 @@ z.object({
|
|
|
5991
5991
|
relativePath: z.string().optional()
|
|
5992
5992
|
});
|
|
5993
5993
|
//#endregion
|
|
5994
|
-
//#region ../../b4m-core/services/dist/mfaService/utils.mjs
|
|
5994
|
+
//#region ../../b4m-core/packages/services/dist/mfaService/utils.mjs
|
|
5995
5995
|
const originalEmitWarning = process.emitWarning;
|
|
5996
5996
|
process.emitWarning = (warning, name) => {
|
|
5997
5997
|
if (name === "DeprecationWarning" && warning?.toString().includes("Buffer")) return;
|
|
@@ -5999,7 +5999,7 @@ process.emitWarning = (warning, name) => {
|
|
|
5999
5999
|
};
|
|
6000
6000
|
process.emitWarning = originalEmitWarning;
|
|
6001
6001
|
//#endregion
|
|
6002
|
-
//#region ../../b4m-core/services/dist/llm/tools/implementation/websearch/index.mjs
|
|
6002
|
+
//#region ../../b4m-core/packages/services/dist/llm/tools/implementation/websearch/index.mjs
|
|
6003
6003
|
async function serpApiSearch(adapters, query, num_results) {
|
|
6004
6004
|
const apiKey = await getSerperKey(adapters);
|
|
6005
6005
|
const url = new URL("https://serpapi.com/search");
|
|
@@ -6111,7 +6111,7 @@ const webSearchTool = {
|
|
|
6111
6111
|
})
|
|
6112
6112
|
};
|
|
6113
6113
|
//#endregion
|
|
6114
|
-
//#region ../../b4m-core/services/dist/llm/tools/implementation/webfetch/index.mjs
|
|
6114
|
+
//#region ../../b4m-core/packages/services/dist/llm/tools/implementation/webfetch/index.mjs
|
|
6115
6115
|
/**
|
|
6116
6116
|
* Fetch URL content using Firecrawl (shared function, no ToolContext)
|
|
6117
6117
|
* Pattern follows serpApiSearch from websearch tool
|
|
@@ -6243,7 +6243,7 @@ const webFetchTool = {
|
|
|
6243
6243
|
})
|
|
6244
6244
|
};
|
|
6245
6245
|
//#endregion
|
|
6246
|
-
//#region ../../b4m-core/services/dist/askUserQuestion-Bsx9OWmD.mjs
|
|
6246
|
+
//#region ../../b4m-core/packages/services/dist/askUserQuestion-Bsx9OWmD.mjs
|
|
6247
6247
|
let _showUserQuestion = null;
|
|
6248
6248
|
/**
|
|
6249
6249
|
* Inject the CLI callback that displays the question UI.
|
|
@@ -6354,12 +6354,12 @@ z.object({
|
|
|
6354
6354
|
riskAssessment: z.string(),
|
|
6355
6355
|
affectedFiles: z.array(z.object({
|
|
6356
6356
|
filePath: z.string(),
|
|
6357
|
-
before: z.string(),
|
|
6357
|
+
before: z.string().min(1),
|
|
6358
6358
|
after: z.string()
|
|
6359
|
-
}))
|
|
6359
|
+
})).max(10)
|
|
6360
6360
|
});
|
|
6361
6361
|
//#endregion
|
|
6362
|
-
//#region ../../b4m-core/quantum/dist/index.mjs
|
|
6362
|
+
//#region ../../b4m-core/packages/quantum/dist/index.mjs
|
|
6363
6363
|
const OperationSchema = z.object({
|
|
6364
6364
|
jobId: z.number(),
|
|
6365
6365
|
machineId: z.number(),
|
|
@@ -8268,6 +8268,7 @@ const updateUserSchema = z.object({
|
|
|
8268
8268
|
preferences: z.object({
|
|
8269
8269
|
language: z.string().optional(),
|
|
8270
8270
|
favoriteTags: z.array(z.string()).optional(),
|
|
8271
|
+
favoriteModelIds: z.array(z.string()).optional(),
|
|
8271
8272
|
fileBrowserViewMode: z.enum([
|
|
8272
8273
|
"home",
|
|
8273
8274
|
"list",
|
|
@@ -8285,7 +8286,8 @@ const updateUserSchema = z.object({
|
|
|
8285
8286
|
enableAutoScroll: z.boolean().optional(),
|
|
8286
8287
|
scrollbarWidth: z.number().optional(),
|
|
8287
8288
|
experimentalFeatures: z.record(z.string(), z.boolean()).optional(),
|
|
8288
|
-
rechartsDisplayMode: z.enum(["inline", "artifact"]).optional()
|
|
8289
|
+
rechartsDisplayMode: z.enum(["inline", "artifact"]).optional(),
|
|
8290
|
+
docxTemplateFileId: z.string().nullable().optional()
|
|
8289
8291
|
}).nullable().optional()
|
|
8290
8292
|
});
|
|
8291
8293
|
z.object({
|
|
@@ -14972,7 +14974,7 @@ z.object({
|
|
|
14972
14974
|
mementos: z.array(SingleMementoEvalSchema).optional()
|
|
14973
14975
|
});
|
|
14974
14976
|
//#endregion
|
|
14975
|
-
//#region ../../b4m-core/services/dist/llm/tools/cliTools.mjs
|
|
14977
|
+
//#region ../../b4m-core/packages/services/dist/llm/tools/cliTools.mjs
|
|
14976
14978
|
const MAX_FILE_SIZE$1 = 10 * 1024 * 1024;
|
|
14977
14979
|
async function readFileContent(params, allowedDirectories) {
|
|
14978
14980
|
const { path: filePath, encoding = "utf-8", offset = 0, limit } = params;
|
|
@@ -16378,11 +16380,11 @@ function parseQuery(query) {
|
|
|
16378
16380
|
*/
|
|
16379
16381
|
const getCliOnlyTools = async () => {
|
|
16380
16382
|
const [{ createFileTool }, { globFilesTool }, { grepSearchTool }, { deleteFileTool }, { bashExecuteTool }] = await Promise.all([
|
|
16381
|
-
import("./createFile-yQfh8uvk-
|
|
16382
|
-
import("./globFiles-D1en6joM-
|
|
16383
|
-
import("./grepSearch-aMamoBn_-
|
|
16384
|
-
import("./deleteFile-DKHfnyny-
|
|
16385
|
-
import("./bashExecute-BTkdqlSs-
|
|
16383
|
+
import("./createFile-yQfh8uvk-I-yM5DxC.mjs"),
|
|
16384
|
+
import("./globFiles-D1en6joM-8jekiXdX.mjs"),
|
|
16385
|
+
import("./grepSearch-aMamoBn_-DCJcY8JS.mjs"),
|
|
16386
|
+
import("./deleteFile-DKHfnyny-G3b1Kj2T.mjs"),
|
|
16387
|
+
import("./bashExecute-BTkdqlSs-5foM20Lb.mjs")
|
|
16386
16388
|
]);
|
|
16387
16389
|
return {
|
|
16388
16390
|
file_read: fileReadTool,
|
|
@@ -17641,7 +17643,7 @@ function substituteArguments(template, args) {
|
|
|
17641
17643
|
return result;
|
|
17642
17644
|
}
|
|
17643
17645
|
//#endregion
|
|
17644
|
-
//#region ../../b4m-core/mcp/dist/index.mjs
|
|
17646
|
+
//#region ../../b4m-core/packages/mcp/dist/index.mjs
|
|
17645
17647
|
var MCPClient = class {
|
|
17646
17648
|
mcp;
|
|
17647
17649
|
transport = null;
|
|
@@ -18716,7 +18718,7 @@ var WebSocketLlmBackend = class {
|
|
|
18716
18718
|
//#endregion
|
|
18717
18719
|
//#region src/ws/WebSocketConnectionManager.ts
|
|
18718
18720
|
const useWsPolyfill = typeof globalThis.WebSocket === "undefined";
|
|
18719
|
-
const WS = useWsPolyfill ?
|
|
18721
|
+
const WS = useWsPolyfill ? WebSocket : globalThis.WebSocket;
|
|
18720
18722
|
/**
|
|
18721
18723
|
* Manages a persistent WebSocket connection for CLI ↔ server communication.
|
|
18722
18724
|
* Handles heartbeat, reconnection, and message routing by requestId.
|
|
@@ -18753,7 +18755,7 @@ var WebSocketConnectionManager = class {
|
|
|
18753
18755
|
}
|
|
18754
18756
|
return new Promise((resolve, reject) => {
|
|
18755
18757
|
logger.debug(`[WS] Connecting to ${this.wsUrl}...`);
|
|
18756
|
-
if (useWsPolyfill) this.ws = new
|
|
18758
|
+
if (useWsPolyfill) this.ws = new WebSocket(this.wsUrl, { headers: { "Sec-WebSocket-Protocol": `access_token.${token}` } });
|
|
18757
18759
|
else this.ws = new WS(this.wsUrl, [`access_token.${token}`]);
|
|
18758
18760
|
this.ws.onopen = () => {
|
|
18759
18761
|
logger.debug("[WS] Connected");
|
|
@@ -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.66
|
|
7
|
+
var version = "0.2.66";
|
|
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.66
|
|
3
|
+
"version": "0.2.66",
|
|
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.4
|
|
119
|
-
"@bike4mind/common": "2.
|
|
120
|
-
"@bike4mind/mcp": "1.33.23
|
|
121
|
-
"@bike4mind/services": "2.
|
|
122
|
-
"@bike4mind/utils": "2.16.5
|
|
118
|
+
"@bike4mind/agents": "0.4.4",
|
|
119
|
+
"@bike4mind/common": "2.76.0",
|
|
120
|
+
"@bike4mind/mcp": "1.33.23",
|
|
121
|
+
"@bike4mind/services": "2.70.0",
|
|
122
|
+
"@bike4mind/utils": "2.16.5",
|
|
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": "
|
|
139
|
+
"gitHead": "cbb3a453c5af99d8779d98f364a81e721f296027"
|
|
140
140
|
}
|