@codebolt/codeboltjs 2.1.0 → 2.2.2
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/Readme.md +3 -0
- package/dist/core/Codebolt.d.ts +179 -166
- package/dist/core/Codebolt.js +224 -7
- package/dist/core/websocket.js +9 -11
- package/dist/index.d.ts +1 -1
- package/dist/modules/agent.d.ts +2 -16
- package/dist/modules/agent.js +15 -33
- package/dist/modules/browser.d.ts +1 -1
- package/dist/modules/browser.js +52 -51
- package/dist/modules/chat.d.ts +2 -2
- package/dist/modules/chat.js +20 -18
- package/dist/modules/codeutils.d.ts +1 -9
- package/dist/modules/codeutils.js +13 -111
- package/dist/modules/dbmemory.d.ts +3 -3
- package/dist/modules/dbmemory.js +8 -7
- package/dist/modules/debug.d.ts +1 -1
- package/dist/modules/fs.d.ts +59 -28
- package/dist/modules/fs.js +86 -45
- package/dist/modules/git.d.ts +1 -1
- package/dist/modules/git.js +31 -30
- package/dist/modules/history.d.ts +1 -1
- package/dist/modules/history.js +7 -6
- package/dist/modules/llm.d.ts +13 -20
- package/dist/modules/llm.js +16 -15
- package/dist/modules/mcp.d.ts +4 -4
- package/dist/modules/mcp.js +25 -25
- package/dist/modules/outputparsers.d.ts +22 -22
- package/dist/modules/outputparsers.js +7 -5
- package/dist/modules/project.d.ts +1 -1
- package/dist/modules/project.js +15 -13
- package/dist/modules/state.d.ts +1 -1
- package/dist/modules/state.js +16 -15
- package/dist/modules/task.d.ts +1 -138
- package/dist/modules/task.js +555 -287
- package/dist/modules/terminal.d.ts +1 -1
- package/dist/modules/terminal.js +12 -11
- package/dist/modules/tokenizer.d.ts +1 -1
- package/dist/modules/tokenizer.js +7 -6
- package/dist/modules/user-message-manager.d.ts +165 -0
- package/dist/modules/user-message-manager.js +308 -0
- package/dist/modules/user-message-utilities.d.ts +111 -0
- package/dist/modules/user-message-utilities.js +115 -0
- package/dist/modules/utils.d.ts +1 -1
- package/dist/modules/utils.js +4 -3
- package/dist/modules/vectordb.d.ts +1 -1
- package/dist/modules/vectordb.js +13 -12
- package/dist/notificationfunctions/agent.js +7 -6
- package/dist/notificationfunctions/browser.js +9 -8
- package/dist/notificationfunctions/chat.js +9 -8
- package/dist/notificationfunctions/codeutils.js +9 -8
- package/dist/notificationfunctions/crawler.js +9 -8
- package/dist/notificationfunctions/dbmemory.js +9 -8
- package/dist/notificationfunctions/fs.js +45 -44
- package/dist/notificationfunctions/git.d.ts +2 -2
- package/dist/notificationfunctions/git.js +111 -51
- package/dist/notificationfunctions/history.js +9 -8
- package/dist/notificationfunctions/llm.js +9 -8
- package/dist/notificationfunctions/mcp.js +17 -16
- package/dist/notificationfunctions/search.js +13 -12
- package/dist/notificationfunctions/system.js +5 -4
- package/dist/notificationfunctions/terminal.js +5 -4
- package/dist/notificationfunctions/todo.js +13 -12
- package/dist/types/commonTypes.d.ts +4 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/libFunctionTypes.d.ts +918 -29
- package/dist/types/libFunctionTypes.js +33 -0
- package/dist/types/notificationFunctions/git.d.ts +40 -1
- package/dist/types/notificationFunctions/index.d.ts +1 -0
- package/dist/types/notificationFunctions/index.js +1 -0
- package/package.json +6 -14
|
@@ -9,3 +9,36 @@
|
|
|
9
9
|
* - User-facing data structures
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
// ================================
|
|
13
|
+
// Summary Section
|
|
14
|
+
// ================================
|
|
15
|
+
/**
|
|
16
|
+
* This file contains comprehensive TypeScript types for the codeboltjs library API.
|
|
17
|
+
*
|
|
18
|
+
* Key sections include:
|
|
19
|
+
* - Message Types for Library API
|
|
20
|
+
* - File System API Types and Response Types
|
|
21
|
+
* - Browser API Types
|
|
22
|
+
* - Terminal API Types
|
|
23
|
+
* - Git API Types
|
|
24
|
+
* - LLM API Types
|
|
25
|
+
* - Vector Database API Types
|
|
26
|
+
* - Agent API Types
|
|
27
|
+
* - Memory API Types
|
|
28
|
+
* - Task API Types
|
|
29
|
+
* - Code Utils API Types
|
|
30
|
+
* - Debug API Types
|
|
31
|
+
* - Project API Types
|
|
32
|
+
* - Crawler API Types
|
|
33
|
+
* - MCP Tools API Types
|
|
34
|
+
* - State Management API Types
|
|
35
|
+
* - Chat API Types
|
|
36
|
+
* - Notification API Types
|
|
37
|
+
* - Utility Types for API
|
|
38
|
+
* - Event Types for API
|
|
39
|
+
* - Configuration Types for Library
|
|
40
|
+
* - Callback Types
|
|
41
|
+
*
|
|
42
|
+
* All types are designed to be user-friendly and provide comprehensive
|
|
43
|
+
* type safety for the codeboltjs library functions.
|
|
44
|
+
*/
|
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git diff file schema with comprehensive metadata
|
|
3
|
+
*/
|
|
4
|
+
export interface GitDiffFile {
|
|
5
|
+
file: string;
|
|
6
|
+
changes: number;
|
|
7
|
+
insertions: number;
|
|
8
|
+
deletions: number;
|
|
9
|
+
binary?: boolean;
|
|
10
|
+
status?: 'added' | 'modified' | 'deleted' | 'renamed' | 'copied';
|
|
11
|
+
oldFile?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Comprehensive git diff result schema
|
|
15
|
+
*/
|
|
16
|
+
export interface GitDiffResult {
|
|
17
|
+
files: GitDiffFile[];
|
|
18
|
+
insertions: number;
|
|
19
|
+
deletions: number;
|
|
20
|
+
changed: number;
|
|
21
|
+
diff?: string;
|
|
22
|
+
stats?: string;
|
|
23
|
+
metadata?: {
|
|
24
|
+
totalChanges: number;
|
|
25
|
+
additions: number;
|
|
26
|
+
deletions: number;
|
|
27
|
+
commitHash?: string;
|
|
28
|
+
parentCommit?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Git diff response content (wrapped format)
|
|
33
|
+
*/
|
|
34
|
+
export interface GitDiffResponseContent {
|
|
35
|
+
success: boolean;
|
|
36
|
+
data: string | GitDiffResult;
|
|
37
|
+
commitHash?: string;
|
|
38
|
+
message?: string;
|
|
39
|
+
}
|
|
1
40
|
/**
|
|
2
41
|
* Interface for git notification functions
|
|
3
42
|
*/
|
|
@@ -21,7 +60,7 @@ export interface GitNotifications {
|
|
|
21
60
|
GitLogsRequestNotify(path?: string, toolUseId?: string): void;
|
|
22
61
|
GitLogsResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
|
|
23
62
|
GitDiffRequestNotify(path?: string, toolUseId?: string): void;
|
|
24
|
-
GitDiffResponseNotify(content: string |
|
|
63
|
+
GitDiffResponseNotify(content: string | GitDiffResult | GitDiffResponseContent, isError?: boolean, toolUseId?: string): void;
|
|
25
64
|
GitRemoteAddRequestNotify(remoteName: string, remoteUrl: string, path?: string, toolUseId?: string): void;
|
|
26
65
|
GitRemoteAddResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
|
|
27
66
|
GitCloneRequestNotify(repoUrl: string, targetPath?: string, toolUseId?: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebolt/codeboltjs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@codebolt/globby": "^1.0.1",
|
|
26
|
-
"@codebolt/types": "^1.0.10",
|
|
27
25
|
"@types/uuid": "^10.0.0",
|
|
28
26
|
"buffer": "^6.0.3",
|
|
29
27
|
"execa": "^9.5.2",
|
|
@@ -36,9 +34,7 @@
|
|
|
36
34
|
"uuid": "^11.1.0",
|
|
37
35
|
"ws": "^8.17.0",
|
|
38
36
|
"yargs": "^17.7.2",
|
|
39
|
-
"@codebolt/
|
|
40
|
-
"@codebolt/mcp": "1.1.0",
|
|
41
|
-
"@codebolt/utils": "1.1.0"
|
|
37
|
+
"@codebolt/types": "1.0.16"
|
|
42
38
|
},
|
|
43
39
|
"devDependencies": {
|
|
44
40
|
"@types/events": "^3.0.3",
|
|
@@ -49,9 +45,9 @@
|
|
|
49
45
|
"jest": "^29.7.0",
|
|
50
46
|
"jest-serial-runner": "^1.2.1",
|
|
51
47
|
"ts-loader": "^9.5.1",
|
|
52
|
-
"typedoc": "^0.
|
|
48
|
+
"typedoc": "^0.28.10",
|
|
53
49
|
"typedoc-plugin-markdown": "^3.15.0",
|
|
54
|
-
"typedoc-plugin-missing-exports": "^
|
|
50
|
+
"typedoc-plugin-missing-exports": "^4.1.0",
|
|
55
51
|
"typescript": "^5.4.5",
|
|
56
52
|
"webpack": "^5.91.0",
|
|
57
53
|
"webpack-cli": "^5.1.4"
|
|
@@ -63,10 +59,6 @@
|
|
|
63
59
|
".": {
|
|
64
60
|
"types": "./dist/index.d.ts",
|
|
65
61
|
"default": "./dist/index.js"
|
|
66
|
-
},
|
|
67
|
-
"./utils": {
|
|
68
|
-
"types": "./dist/utils.d.ts",
|
|
69
|
-
"default": "./dist/utils.js"
|
|
70
62
|
}
|
|
71
63
|
},
|
|
72
64
|
"scripts": {
|
|
@@ -76,7 +68,7 @@
|
|
|
76
68
|
"build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
|
|
77
69
|
"build:jsondocs": "typedoc --plugin typedoc-plugin-missing-exports --json out.json --pretty",
|
|
78
70
|
"test": "echo \"Integration tests require WebSocket server - skipping for release\" && exit 0",
|
|
79
|
-
"clean": "
|
|
80
|
-
"lint": "tsc --noEmit"
|
|
71
|
+
"clean": "powershell -Command \"Remove-Item -Path 'dist' -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item -Path 'build' -Recurse -Force -ErrorAction SilentlyContinue\"",
|
|
72
|
+
"lint": "eslint src/**/*.ts && tsc --noEmit"
|
|
81
73
|
}
|
|
82
74
|
}
|