@codebolt/codeboltjs 2.0.4 → 2.0.6
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/core/messageManager.d.ts +47 -0
- package/dist/core/messageManager.js +128 -0
- package/dist/{modules → core}/websocket.d.ts +5 -0
- package/dist/{modules → core}/websocket.js +15 -10
- package/dist/index.d.ts +98 -68
- package/dist/index.js +51 -4
- package/dist/modules/agent.js +26 -58
- package/dist/modules/browser.d.ts +7 -7
- package/dist/modules/browser.js +75 -195
- package/dist/modules/chat.d.ts +8 -20
- package/dist/modules/chat.js +60 -123
- package/dist/modules/codeparsers.d.ts +32 -3
- package/dist/modules/codeparsers.js +295 -3
- package/dist/modules/codeutils.d.ts +24 -7
- package/dist/modules/codeutils.js +113 -126
- package/dist/modules/crawler.d.ts +1 -16
- package/dist/modules/crawler.js +13 -72
- package/dist/modules/dbmemory.js +12 -28
- package/dist/modules/debug.js +17 -33
- package/dist/modules/docutils.d.ts +1 -4
- package/dist/modules/docutils.js +52 -2
- package/dist/modules/fs.d.ts +47 -1
- package/dist/modules/fs.js +151 -162
- package/dist/modules/git.d.ts +7 -14
- package/dist/modules/git.js +54 -163
- package/dist/modules/history.js +11 -27
- package/dist/modules/llm.js +8 -16
- package/dist/modules/outputparsers.d.ts +36 -4
- package/dist/modules/outputparsers.js +56 -5
- package/dist/modules/project.d.ts +4 -5
- package/dist/modules/project.js +23 -45
- package/dist/modules/state.js +29 -69
- package/dist/modules/task.js +19 -43
- package/dist/modules/terminal.d.ts +3 -2
- package/dist/modules/terminal.js +36 -47
- package/dist/modules/tokenizer.js +15 -31
- package/dist/modules/tools.d.ts +0 -6
- package/dist/modules/tools.js +41 -179
- package/dist/modules/utils.js +22 -0
- package/dist/modules/vectordb.js +30 -62
- package/dist/utils/parse-source-code/index.d.ts +9 -0
- package/dist/utils/parse-source-code/index.js +233 -0
- package/dist/utils/parse-source-code/languageParser.d.ts +8 -0
- package/dist/utils/parse-source-code/languageParser.js +137 -0
- package/dist/utils/parse-source-code/queries/c-sharp.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/c-sharp.js +25 -0
- package/dist/utils/parse-source-code/queries/c.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/c.js +17 -0
- package/dist/utils/parse-source-code/queries/cpp.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/cpp.js +25 -0
- package/dist/utils/parse-source-code/queries/go.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/go.js +29 -0
- package/dist/utils/parse-source-code/queries/index.d.ts +12 -0
- package/dist/utils/parse-source-code/queries/index.js +30 -0
- package/dist/utils/parse-source-code/queries/java.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/java.js +17 -0
- package/dist/utils/parse-source-code/queries/javascript.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/javascript.js +67 -0
- package/dist/utils/parse-source-code/queries/php.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/php.js +17 -0
- package/dist/utils/parse-source-code/queries/python.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/python.js +13 -0
- package/dist/utils/parse-source-code/queries/ruby.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/ruby.js +54 -0
- package/dist/utils/parse-source-code/queries/rust.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/rust.js +18 -0
- package/dist/utils/parse-source-code/queries/swift.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/swift.js +47 -0
- package/dist/utils/parse-source-code/queries/typescript.d.ts +2 -0
- package/dist/utils/parse-source-code/queries/typescript.js +34 -0
- package/dist/utils/parse-source-code/tree-sitter-c.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-c_sharp.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-cpp.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-go.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-java.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-javascript.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-php.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-python.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-ruby.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-rust.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-swift.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-tsx.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-typescript.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter.wasm +0 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +6 -2
- package/dist/utils/editFile.js +0 -30
- /package/dist/{utils/editFile.d.ts → modules/utils.d.ts} +0 -0
- /package/dist/{modules → utils}/toolBox.d.ts +0 -0
- /package/dist/{modules → utils}/toolBox.js +0 -0
|
Binary file
|
|
Binary file
|
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Agent = exports.SystemPrompt = exports.UserMessage = exports.TaskInstruction = exports.ToolBox = void 0;
|
|
4
|
-
var toolBox_1 = require("./
|
|
4
|
+
var toolBox_1 = require("./utils/toolBox");
|
|
5
5
|
Object.defineProperty(exports, "ToolBox", { enumerable: true, get: function () { return toolBox_1.ToolBox; } });
|
|
6
6
|
var taskInstruction_1 = require("./agentlib/taskInstruction");
|
|
7
7
|
Object.defineProperty(exports, "TaskInstruction", { enumerable: true, get: function () { return taskInstruction_1.TaskInstruction; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebolt/codeboltjs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"LICENSE"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "tsc",
|
|
15
|
+
"build": "tsc && node script/copy-wasm.js",
|
|
16
16
|
"build:webpack": "webpack",
|
|
17
17
|
"build:all": "npm run build && npm run build:webpack",
|
|
18
18
|
"build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
|
|
@@ -28,18 +28,22 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"homepage": "https://codeboltai.github.io",
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@codebolt/globby": "^1.0.1",
|
|
31
32
|
"@codebolt/types": "^1.0.10",
|
|
32
33
|
"@modelcontextprotocol/sdk": "^1.4.1",
|
|
34
|
+
"@types/pdf-parse": "^1.1.5",
|
|
33
35
|
"execa": "^9.5.2",
|
|
34
36
|
"file-type": "^19.6.0",
|
|
35
37
|
"fuse.js": "^7.0.0",
|
|
36
38
|
"js-yaml": "^4.1.0",
|
|
37
39
|
"load-esm": "^1.0.1",
|
|
38
40
|
"mcp-proxy": "^2.4.0",
|
|
41
|
+
"pdf-parse": "^1.1.1",
|
|
39
42
|
"strict-event-emitter-types": "^2.0.0",
|
|
40
43
|
"timers": "^0.1.1",
|
|
41
44
|
"undici": "^7.4.0",
|
|
42
45
|
"uri-templates": "^0.2.0",
|
|
46
|
+
"web-tree-sitter": "^0.24.1",
|
|
43
47
|
"ws": "^8.17.0",
|
|
44
48
|
"yargs": "^17.7.2",
|
|
45
49
|
"zod": "^3.24.1",
|
package/dist/utils/editFile.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const websocket_1 = __importDefault(require("../modules/websocket"));
|
|
7
|
-
const cbutils = {
|
|
8
|
-
editFileAndApplyDiff: (filePath, diff, diffIdentifier, prompt, applyModel) => {
|
|
9
|
-
return new Promise((resolve, reject) => {
|
|
10
|
-
websocket_1.default.getWebsocket.send(JSON.stringify({
|
|
11
|
-
"type": "fsEvent",
|
|
12
|
-
"action": "editFileAndApplyDiff",
|
|
13
|
-
message: {
|
|
14
|
-
filePath,
|
|
15
|
-
diff,
|
|
16
|
-
diffIdentifier,
|
|
17
|
-
prompt,
|
|
18
|
-
applyModel
|
|
19
|
-
}
|
|
20
|
-
}));
|
|
21
|
-
websocket_1.default.getWebsocket.on('message', (data) => {
|
|
22
|
-
const response = JSON.parse(data);
|
|
23
|
-
if (response.type === "editFileAndApplyDiffResponse") {
|
|
24
|
-
resolve(response);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.default = cbutils;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|