@bike4mind/cli 0.2.18-feat-merge-pull-request-tool.17775 → 0.2.19-feat-update-pull-request-tool.17801
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-MNVIKVBH.js → artifactExtractor-6OWA6GIP.js} +1 -1
- package/dist/{chunk-NMWRXDTN.js → chunk-AZ7I44K7.js} +2 -2
- package/dist/{chunk-CHBAKX4C.js → chunk-D2RBSVLE.js} +14 -1
- package/dist/{chunk-6EEN6XHK.js → chunk-E4K7LPQC.js} +2 -2
- package/dist/{chunk-QDWMIP2Q.js → chunk-GRCMDIFP.js} +1 -1
- package/dist/{chunk-WULZDTLD.js → chunk-KZNSOBD6.js} +2 -2
- package/dist/{create-SR7Q7HAF.js → create-WVVHEPCQ.js} +3 -3
- package/dist/index.js +104 -12
- package/dist/{llmMarkdownGenerator-2APZC4H3.js → llmMarkdownGenerator-PYQLOSEU.js} +1 -1
- package/dist/{markdownGenerator-S7OHONSP.js → markdownGenerator-LFZJI3XC.js} +1 -1
- package/dist/{mementoService-UMJ5BYDO.js → mementoService-PUP3VFSA.js} +3 -3
- package/dist/{src-NBBLECSQ.js → src-CZKPMIOS.js} +1 -1
- package/dist/{src-VEJGC5KU.js → src-KALIUGCJ.js} +2 -2
- package/dist/{subtractCredits-N7Y27C34.js → subtractCredits-2HDKUWLJ.js} +3 -3
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D2RBSVLE.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-GRCMDIFP.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D2RBSVLE.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -232,6 +232,8 @@ var b4mLLMTools = z3.enum([
|
|
|
232
232
|
"glob_files",
|
|
233
233
|
"grep_search",
|
|
234
234
|
"delete_file",
|
|
235
|
+
// Knowledge base search
|
|
236
|
+
"search_knowledge_base",
|
|
235
237
|
// Shell execution
|
|
236
238
|
"bash_execute"
|
|
237
239
|
]);
|
|
@@ -2018,6 +2020,7 @@ var SettingKeySchema = z19.enum([
|
|
|
2018
2020
|
"voyageApiKey",
|
|
2019
2021
|
"FirecrawlApiKey",
|
|
2020
2022
|
"EnableDeepResearch",
|
|
2023
|
+
"EnableKnowledgeBaseSearch",
|
|
2021
2024
|
"DefaultChunkSize",
|
|
2022
2025
|
"DefaultAPIModel",
|
|
2023
2026
|
"AutoNameNotebook",
|
|
@@ -2495,7 +2498,8 @@ var API_SERVICE_GROUPS = {
|
|
|
2495
2498
|
{ key: "EnableRapidReply", order: 7 },
|
|
2496
2499
|
{ key: "EnableResearchEngine", order: 8 },
|
|
2497
2500
|
{ key: "EnableReactViewer", order: 9 },
|
|
2498
|
-
{ key: "EnableDeepResearch", order: 10 }
|
|
2501
|
+
{ key: "EnableDeepResearch", order: 10 },
|
|
2502
|
+
{ key: "EnableKnowledgeBaseSearch", order: 11 }
|
|
2499
2503
|
]
|
|
2500
2504
|
},
|
|
2501
2505
|
NOTEBOOK: {
|
|
@@ -3397,6 +3401,15 @@ var settingsMap = {
|
|
|
3397
3401
|
group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
|
|
3398
3402
|
order: 9
|
|
3399
3403
|
}),
|
|
3404
|
+
EnableKnowledgeBaseSearch: makeBooleanSetting({
|
|
3405
|
+
key: "EnableKnowledgeBaseSearch",
|
|
3406
|
+
name: "Enable Knowledge Base Search",
|
|
3407
|
+
defaultValue: false,
|
|
3408
|
+
description: "Allow AI to search user uploaded documents. When enabled, users can toggle the Knowledge Base Search tool in AI Settings.",
|
|
3409
|
+
category: "Experimental",
|
|
3410
|
+
group: API_SERVICE_GROUPS.EXPERIMENTAL.id,
|
|
3411
|
+
order: 11
|
|
3412
|
+
}),
|
|
3400
3413
|
enableVoiceSession: makeBooleanSetting({
|
|
3401
3414
|
key: "enableVoiceSession",
|
|
3402
3415
|
name: "Enable Voice Session",
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getSettingsMap,
|
|
8
8
|
getSettingsValue,
|
|
9
9
|
secureParameters
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GRCMDIFP.js";
|
|
11
11
|
import {
|
|
12
12
|
KnowledgeType,
|
|
13
13
|
SupportedFabFileMimeTypes
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D2RBSVLE.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/fabFileService/create.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-GRCMDIFP.js";
|
|
6
6
|
import {
|
|
7
7
|
CompletionApiUsageTransaction,
|
|
8
8
|
GenericCreditDeductTransaction,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
RealtimeVoiceUsageTransaction,
|
|
12
12
|
TextGenerationUsageTransaction,
|
|
13
13
|
TransferCreditTransaction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D2RBSVLE.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
17
17
|
import { z } from "zod";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFabFile,
|
|
4
4
|
createFabFileSchema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-E4K7LPQC.js";
|
|
6
|
+
import "./chunk-GRCMDIFP.js";
|
|
7
|
+
import "./chunk-D2RBSVLE.js";
|
|
8
8
|
import "./chunk-OCYRD7D6.js";
|
|
9
9
|
export {
|
|
10
10
|
createFabFile,
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getEffectiveApiKey,
|
|
5
5
|
getOpenWeatherKey,
|
|
6
6
|
getSerperKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AZ7I44K7.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfigStore
|
|
10
10
|
} from "./chunk-FFJX3FF3.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-KZNSOBD6.js";
|
|
12
|
+
import "./chunk-E4K7LPQC.js";
|
|
13
13
|
import {
|
|
14
14
|
BFLImageService,
|
|
15
15
|
BaseStorage,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
OpenAIBackend,
|
|
22
22
|
OpenAIImageService,
|
|
23
23
|
XAIImageService
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GRCMDIFP.js";
|
|
25
25
|
import {
|
|
26
26
|
AiEvents,
|
|
27
27
|
ApiKeyEvents,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
XAI_IMAGE_MODELS,
|
|
76
76
|
b4mLLMTools,
|
|
77
77
|
getMcpProviderMetadata
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-D2RBSVLE.js";
|
|
79
79
|
import {
|
|
80
80
|
Logger
|
|
81
81
|
} from "./chunk-OCYRD7D6.js";
|
|
@@ -4019,7 +4019,9 @@ var updateSchema = z76.object({
|
|
|
4019
4019
|
name: z76.string().optional(),
|
|
4020
4020
|
description: z76.string().optional(),
|
|
4021
4021
|
billingContact: z76.string().optional(),
|
|
4022
|
-
currentCredits: z76.coerce.number().optional()
|
|
4022
|
+
currentCredits: z76.coerce.number().optional(),
|
|
4023
|
+
systemPrompt: z76.string().max(1e4).optional()
|
|
4024
|
+
// ~2500 tokens
|
|
4023
4025
|
});
|
|
4024
4026
|
|
|
4025
4027
|
// ../../b4m-core/packages/services/dist/src/organizationService/delete.js
|
|
@@ -8804,6 +8806,94 @@ var deleteFileTool = {
|
|
|
8804
8806
|
})
|
|
8805
8807
|
};
|
|
8806
8808
|
|
|
8809
|
+
// ../../b4m-core/packages/services/dist/src/llm/tools/implementation/knowledgeBaseSearch/index.js
|
|
8810
|
+
function formatSearchResults(files) {
|
|
8811
|
+
if (files.length === 0) {
|
|
8812
|
+
return "No documents found matching your search query in your knowledge base.";
|
|
8813
|
+
}
|
|
8814
|
+
const formattedFiles = files.map((file, index) => {
|
|
8815
|
+
const tags = file.tags?.map((t) => t.name).join(", ") || "none";
|
|
8816
|
+
const notes = file.notes ? `
|
|
8817
|
+
Notes: ${file.notes}` : "";
|
|
8818
|
+
const fileType = file.type || "FILE";
|
|
8819
|
+
return `${index + 1}. **${file.fileName}**
|
|
8820
|
+
Type: ${fileType} | MIME: ${file.mimeType}
|
|
8821
|
+
Tags: ${tags}${notes}`;
|
|
8822
|
+
});
|
|
8823
|
+
return `Found ${files.length} document(s) in your knowledge base:
|
|
8824
|
+
|
|
8825
|
+
` + formattedFiles.join("\n\n") + "\n\n*To use these documents in your conversation, you can ask me to reference specific files by name.*";
|
|
8826
|
+
}
|
|
8827
|
+
var knowledgeBaseSearchTool = {
|
|
8828
|
+
name: "search_knowledge_base",
|
|
8829
|
+
implementation: (context) => ({
|
|
8830
|
+
toolFn: async (value) => {
|
|
8831
|
+
const params = value;
|
|
8832
|
+
const { query, tags, file_type, max_results = 5 } = params;
|
|
8833
|
+
context.logger.log("\u{1F4DA} Knowledge Base Search: Starting search for query:", query);
|
|
8834
|
+
if (!context.db.fabfiles) {
|
|
8835
|
+
context.logger.error("\u274C Knowledge Base Search: fabfiles repository not available");
|
|
8836
|
+
return "Knowledge base search is not available at this time.";
|
|
8837
|
+
}
|
|
8838
|
+
try {
|
|
8839
|
+
const searchResults = await context.db.fabfiles.search(context.userId, query, {
|
|
8840
|
+
tags: tags || [],
|
|
8841
|
+
type: file_type,
|
|
8842
|
+
shared: false
|
|
8843
|
+
// Not filtering to ONLY shared files
|
|
8844
|
+
}, {
|
|
8845
|
+
page: 1,
|
|
8846
|
+
limit: Math.min(max_results, 10)
|
|
8847
|
+
// Cap at 10 results
|
|
8848
|
+
}, {
|
|
8849
|
+
by: "fileName",
|
|
8850
|
+
direction: "asc"
|
|
8851
|
+
}, {
|
|
8852
|
+
includeShared: true,
|
|
8853
|
+
// Include owned + explicitly shared + org-shared files
|
|
8854
|
+
userGroups: context.user.groups || []
|
|
8855
|
+
// Pass user's groups for org-level sharing
|
|
8856
|
+
});
|
|
8857
|
+
context.logger.log("\u{1F4DA} Knowledge Base Search: Found", searchResults.data.length, "results");
|
|
8858
|
+
return formatSearchResults(searchResults.data);
|
|
8859
|
+
} catch (error) {
|
|
8860
|
+
context.logger.error("\u274C Knowledge Base Search: Error during search:", error);
|
|
8861
|
+
return "An error occurred while searching your knowledge base. Please try again.";
|
|
8862
|
+
}
|
|
8863
|
+
},
|
|
8864
|
+
toolSchema: {
|
|
8865
|
+
name: "search_knowledge_base",
|
|
8866
|
+
description: "Search the user's uploaded knowledge base (fab files). Returns relevant documents from the user's own files, organization-shared files, and files explicitly shared with them. Use this tool when the user asks about their own documents, uploaded files, or organization knowledge.",
|
|
8867
|
+
parameters: {
|
|
8868
|
+
type: "object",
|
|
8869
|
+
properties: {
|
|
8870
|
+
query: {
|
|
8871
|
+
type: "string",
|
|
8872
|
+
description: "The search query to find relevant documents by filename or content"
|
|
8873
|
+
},
|
|
8874
|
+
tags: {
|
|
8875
|
+
type: "array",
|
|
8876
|
+
items: { type: "string" },
|
|
8877
|
+
description: "Optional: filter results to only include files with these tags"
|
|
8878
|
+
},
|
|
8879
|
+
file_type: {
|
|
8880
|
+
type: "string",
|
|
8881
|
+
enum: ["pdf", "text", "image", "excel", "word", "json", "csv", "markdown", "code", "url"],
|
|
8882
|
+
description: "Optional: filter results by file type"
|
|
8883
|
+
},
|
|
8884
|
+
max_results: {
|
|
8885
|
+
type: "number",
|
|
8886
|
+
description: "Maximum number of results to return (default: 5, max: 10)",
|
|
8887
|
+
minimum: 1,
|
|
8888
|
+
maximum: 10
|
|
8889
|
+
}
|
|
8890
|
+
},
|
|
8891
|
+
required: ["query"]
|
|
8892
|
+
}
|
|
8893
|
+
}
|
|
8894
|
+
})
|
|
8895
|
+
};
|
|
8896
|
+
|
|
8807
8897
|
// ../../b4m-core/packages/services/dist/src/llm/tools/implementation/bashExecute/index.js
|
|
8808
8898
|
import { spawn } from "child_process";
|
|
8809
8899
|
import path11 from "path";
|
|
@@ -9306,6 +9396,8 @@ var tools = {
|
|
|
9306
9396
|
glob_files: globFilesTool,
|
|
9307
9397
|
grep_search: grepSearchTool,
|
|
9308
9398
|
delete_file: deleteFileTool,
|
|
9399
|
+
// Knowledge base search
|
|
9400
|
+
search_knowledge_base: knowledgeBaseSearchTool,
|
|
9309
9401
|
// Shell execution
|
|
9310
9402
|
bash_execute: bashExecuteTool
|
|
9311
9403
|
};
|
|
@@ -11471,7 +11563,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
|
|
|
11471
11563
|
// package.json
|
|
11472
11564
|
var package_default = {
|
|
11473
11565
|
name: "@bike4mind/cli",
|
|
11474
|
-
version: "0.2.
|
|
11566
|
+
version: "0.2.19-feat-update-pull-request-tool.17801+d029604ca",
|
|
11475
11567
|
type: "module",
|
|
11476
11568
|
description: "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
11477
11569
|
license: "UNLICENSED",
|
|
@@ -11578,10 +11670,10 @@ var package_default = {
|
|
|
11578
11670
|
},
|
|
11579
11671
|
devDependencies: {
|
|
11580
11672
|
"@bike4mind/agents": "0.1.0",
|
|
11581
|
-
"@bike4mind/common": "2.43.1-feat-
|
|
11582
|
-
"@bike4mind/mcp": "1.
|
|
11583
|
-
"@bike4mind/services": "2.41.
|
|
11584
|
-
"@bike4mind/utils": "2.2.1-feat-
|
|
11673
|
+
"@bike4mind/common": "2.43.1-feat-update-pull-request-tool.17801+d029604ca",
|
|
11674
|
+
"@bike4mind/mcp": "1.23.1-feat-update-pull-request-tool.17801+d029604ca",
|
|
11675
|
+
"@bike4mind/services": "2.41.2-feat-update-pull-request-tool.17801+d029604ca",
|
|
11676
|
+
"@bike4mind/utils": "2.2.1-feat-update-pull-request-tool.17801+d029604ca",
|
|
11585
11677
|
"@types/better-sqlite3": "^7.6.13",
|
|
11586
11678
|
"@types/diff": "^5.0.9",
|
|
11587
11679
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -11598,7 +11690,7 @@ var package_default = {
|
|
|
11598
11690
|
optionalDependencies: {
|
|
11599
11691
|
"@vscode/ripgrep": "^1.17.0"
|
|
11600
11692
|
},
|
|
11601
|
-
gitHead: "
|
|
11693
|
+
gitHead: "d029604cab34181f23f4f1736bafc51b7ebc2ea1"
|
|
11602
11694
|
};
|
|
11603
11695
|
|
|
11604
11696
|
// src/config/constants.ts
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findMostSimilarMemento,
|
|
4
4
|
getRelevantMementos
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-AZ7I44K7.js";
|
|
6
|
+
import "./chunk-GRCMDIFP.js";
|
|
7
|
+
import "./chunk-D2RBSVLE.js";
|
|
8
8
|
import "./chunk-OCYRD7D6.js";
|
|
9
9
|
export {
|
|
10
10
|
findMostSimilarMemento,
|
|
@@ -129,8 +129,8 @@ import {
|
|
|
129
129
|
validateMermaidSyntax,
|
|
130
130
|
warmUpSettingsCache,
|
|
131
131
|
withRetry
|
|
132
|
-
} from "./chunk-
|
|
133
|
-
import "./chunk-
|
|
132
|
+
} from "./chunk-GRCMDIFP.js";
|
|
133
|
+
import "./chunk-D2RBSVLE.js";
|
|
134
134
|
import {
|
|
135
135
|
Logger,
|
|
136
136
|
NotificationDeduplicator,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
SubtractCreditsSchema,
|
|
4
4
|
subtractCredits
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-KZNSOBD6.js";
|
|
6
|
+
import "./chunk-GRCMDIFP.js";
|
|
7
|
+
import "./chunk-D2RBSVLE.js";
|
|
8
8
|
import "./chunk-OCYRD7D6.js";
|
|
9
9
|
export {
|
|
10
10
|
SubtractCreditsSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19-feat-update-pull-request-tool.17801+d029604ca",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@bike4mind/agents": "0.1.0",
|
|
110
|
-
"@bike4mind/common": "2.43.1-feat-
|
|
111
|
-
"@bike4mind/mcp": "1.
|
|
112
|
-
"@bike4mind/services": "2.41.
|
|
113
|
-
"@bike4mind/utils": "2.2.1-feat-
|
|
110
|
+
"@bike4mind/common": "2.43.1-feat-update-pull-request-tool.17801+d029604ca",
|
|
111
|
+
"@bike4mind/mcp": "1.23.1-feat-update-pull-request-tool.17801+d029604ca",
|
|
112
|
+
"@bike4mind/services": "2.41.2-feat-update-pull-request-tool.17801+d029604ca",
|
|
113
|
+
"@bike4mind/utils": "2.2.1-feat-update-pull-request-tool.17801+d029604ca",
|
|
114
114
|
"@types/better-sqlite3": "^7.6.13",
|
|
115
115
|
"@types/diff": "^5.0.9",
|
|
116
116
|
"@types/jsonwebtoken": "^9.0.4",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"optionalDependencies": {
|
|
128
128
|
"@vscode/ripgrep": "^1.17.0"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "d029604cab34181f23f4f1736bafc51b7ebc2ea1"
|
|
131
131
|
}
|