@codebolt/codeboltjs 2.2.1 → 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 +4 -12
package/Readme.md
CHANGED
|
@@ -121,6 +121,9 @@ For detailed type usage examples, see [TYPES.md](./TYPES.md).
|
|
|
121
121
|
- `codebolt.agent` - Agent operations
|
|
122
122
|
- `codebolt.vectordb` - Vector database operations
|
|
123
123
|
- `codebolt.mcp` - MCP (Model Context Protocol) tools
|
|
124
|
+
- `codebolt.codeparsers` - Code parsing and AST generation (migrated from internal module)
|
|
125
|
+
|
|
126
|
+
> **Note**: The `codeparsers` functions have been migrated to the `@codebolt/codeparser` package for better modularity. You can still access them through `codebolt.codeparsers` or import directly from `@codebolt/codeparser`. See [CODEPARSERS_MIGRATION.md](./CODEPARSERS_MIGRATION.md) for details.
|
|
124
127
|
|
|
125
128
|
### Example Usage
|
|
126
129
|
|
package/dist/core/Codebolt.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket from 'ws';
|
|
2
2
|
import { type NotificationFunctions } from '../notificationfunctions';
|
|
3
|
-
import type {
|
|
3
|
+
import type { FlatUserMessage } from '@codebolt/types/sdk';
|
|
4
4
|
/**
|
|
5
5
|
* @class Codebolt
|
|
6
6
|
* @description This class provides a unified interface to interact with various modules.
|
|
@@ -34,87 +34,87 @@ declare class Codebolt {
|
|
|
34
34
|
*/
|
|
35
35
|
get ready(): boolean;
|
|
36
36
|
fs: {
|
|
37
|
-
createFile: (fileName: string, source: string, filePath: string) => Promise<import("
|
|
38
|
-
createFolder: (folderName: string, folderPath: string) => Promise<import("
|
|
39
|
-
readFile: (filePath: string) => Promise<import("
|
|
40
|
-
updateFile: (filename: string, filePath: string, newContent: string) => Promise<import("
|
|
41
|
-
deleteFile: (filename: string, filePath: string) => Promise<import("
|
|
42
|
-
deleteFolder: (foldername: string, folderpath: string) => Promise<import("
|
|
43
|
-
listFile: (folderPath: string, isRecursive?: boolean) => Promise<
|
|
44
|
-
listCodeDefinitionNames: (path: string) => Promise<
|
|
45
|
-
|
|
46
|
-
result: any;
|
|
47
|
-
}>;
|
|
48
|
-
searchFiles: (path: string, regex: string, filePattern: string) => Promise<{
|
|
49
|
-
success: boolean;
|
|
50
|
-
result: any;
|
|
51
|
-
}>;
|
|
37
|
+
createFile: (fileName: string, source: string, filePath: string) => Promise<import("@codebolt/types/sdk").CreateFileResponse>;
|
|
38
|
+
createFolder: (folderName: string, folderPath: string) => Promise<import("@codebolt/types/sdk").CreateFolderResponse>;
|
|
39
|
+
readFile: (filePath: string) => Promise<import("@codebolt/types/sdk").ReadFileResponse>;
|
|
40
|
+
updateFile: (filename: string, filePath: string, newContent: string) => Promise<import("@codebolt/types/sdk").UpdateFileResponse>;
|
|
41
|
+
deleteFile: (filename: string, filePath: string) => Promise<import("@codebolt/types/sdk").DeleteFileResponse>;
|
|
42
|
+
deleteFolder: (foldername: string, folderpath: string) => Promise<import("@codebolt/types/sdk").DeleteFolderResponse>;
|
|
43
|
+
listFile: (folderPath: string, isRecursive?: boolean) => Promise<import("@codebolt/types/sdk").FileListResponse>;
|
|
44
|
+
listCodeDefinitionNames: (path: string) => Promise<import("@codebolt/types/sdk").ListCodeDefinitionsResponse>;
|
|
45
|
+
searchFiles: (path: string, regex: string, filePattern: string) => Promise<import("@codebolt/types/sdk").SearchFilesResponse>;
|
|
52
46
|
writeToFile: (relPath: string, newContent: string) => Promise<any>;
|
|
53
|
-
grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive?: boolean) => Promise<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive?: boolean) => Promise<import("@codebolt/types/sdk").GrepSearchResponse>;
|
|
48
|
+
fileSearch: (query: string) => Promise<import("@codebolt/types/sdk").FileSearchResponse>;
|
|
49
|
+
editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("@codebolt/types/sdk").EditFileAndApplyDiffResponse>;
|
|
50
|
+
readManyFiles: (params: {
|
|
51
|
+
paths: string[];
|
|
52
|
+
include?: string[];
|
|
53
|
+
exclude?: string[];
|
|
54
|
+
recursive?: boolean;
|
|
55
|
+
use_default_excludes?: boolean;
|
|
56
|
+
max_files?: number;
|
|
57
|
+
max_total_size?: number;
|
|
58
|
+
include_metadata?: boolean;
|
|
59
|
+
separator_format?: string;
|
|
60
|
+
notifyUser?: boolean;
|
|
61
|
+
}) => Promise<import("@codebolt/types/sdk").ReadManyFilesResponse>;
|
|
62
|
+
listDirectory: (params: {
|
|
63
|
+
path: string;
|
|
64
|
+
ignore?: string[];
|
|
65
|
+
show_hidden?: boolean;
|
|
66
|
+
detailed?: boolean;
|
|
67
|
+
limit?: number;
|
|
68
|
+
notifyUser?: boolean;
|
|
69
|
+
}) => Promise<import("@codebolt/types/sdk").ListDirectoryResponse>;
|
|
65
70
|
};
|
|
66
71
|
git: {
|
|
67
|
-
init: (path: string) => Promise<import("
|
|
68
|
-
pull: () => Promise<import("
|
|
69
|
-
push: () => Promise<import("
|
|
70
|
-
status: () => Promise<import("
|
|
71
|
-
addAll: () => Promise<import("
|
|
72
|
-
commit: (message: string) => Promise<import("
|
|
73
|
-
checkout: (branch: string) => Promise<import("
|
|
74
|
-
branch: (branch: string) => Promise<import("
|
|
75
|
-
logs: (path: string) => Promise<import("
|
|
76
|
-
diff: (commitHash: string) => Promise<import("
|
|
72
|
+
init: (path: string) => Promise<import("@codebolt/types/sdk").GitInitResponse>;
|
|
73
|
+
pull: () => Promise<import("@codebolt/types/sdk").GitPullResponse>;
|
|
74
|
+
push: () => Promise<import("@codebolt/types/sdk").GitPushResponse>;
|
|
75
|
+
status: () => Promise<import("@codebolt/types/sdk").GitStatusResponse>;
|
|
76
|
+
addAll: () => Promise<import("@codebolt/types/sdk").AddResponse>;
|
|
77
|
+
commit: (message: string) => Promise<import("@codebolt/types/sdk").GitCommitResponse>;
|
|
78
|
+
checkout: (branch: string) => Promise<import("@codebolt/types/sdk").GitCheckoutResponse>;
|
|
79
|
+
branch: (branch: string) => Promise<import("@codebolt/types/sdk").GitBranchResponse>;
|
|
80
|
+
logs: (path: string) => Promise<import("@codebolt/types/sdk").GitLogsResponse>;
|
|
81
|
+
diff: (commitHash: string) => Promise<import("@codebolt/types/sdk").GitDiffResponse>;
|
|
77
82
|
};
|
|
78
83
|
llm: {
|
|
79
|
-
inference: (params: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
temperature?: number;
|
|
87
|
-
stream?: boolean;
|
|
88
|
-
}, llmrole?: string) => Promise<{
|
|
89
|
-
completion: any;
|
|
84
|
+
inference: (params: import("@codebolt/types/sdk").LLMInferenceParams) => Promise<{
|
|
85
|
+
completion: import("@codebolt/types/sdk").LLMCompletion;
|
|
86
|
+
}>;
|
|
87
|
+
getModelConfig: (modelId?: string) => Promise<{
|
|
88
|
+
config: import("@codebolt/types/sdk").LLMModelConfig | null;
|
|
89
|
+
success: boolean;
|
|
90
|
+
error?: string;
|
|
90
91
|
}>;
|
|
91
|
-
legacyInference: (message: string, llmrole: string) => Promise<import("../types/socketMessageTypes").LLMResponse>;
|
|
92
92
|
};
|
|
93
93
|
browser: {
|
|
94
|
-
newPage: () => Promise<import("
|
|
95
|
-
getUrl: () => Promise<import("
|
|
96
|
-
goToPage: (url: string) => Promise<import("
|
|
97
|
-
screenshot: () => Promise<import("
|
|
98
|
-
getHTML: () => Promise<import("
|
|
99
|
-
getMarkdown: () => Promise<import("
|
|
94
|
+
newPage: () => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
95
|
+
getUrl: () => Promise<import("@codebolt/types/sdk").UrlResponse>;
|
|
96
|
+
goToPage: (url: string) => Promise<import("@codebolt/types/sdk").GoToPageResponse>;
|
|
97
|
+
screenshot: () => Promise<import("@codebolt/types/sdk").BrowserScreenshotResponse>;
|
|
98
|
+
getHTML: () => Promise<import("@codebolt/types/sdk").HtmlReceived>;
|
|
99
|
+
getMarkdown: () => Promise<import("@codebolt/types/sdk").GetMarkdownResponse>;
|
|
100
100
|
getPDF: () => void;
|
|
101
101
|
pdfToText: () => void;
|
|
102
|
-
getContent: () => Promise<import("
|
|
103
|
-
getSnapShot: () => Promise<import("
|
|
104
|
-
getBrowserInfo: () => Promise<import("
|
|
105
|
-
extractText: () => Promise<import("
|
|
102
|
+
getContent: () => Promise<import("@codebolt/types/sdk").GetContentResponse>;
|
|
103
|
+
getSnapShot: () => Promise<import("@codebolt/types/sdk").BrowserSnapshotResponse>;
|
|
104
|
+
getBrowserInfo: () => Promise<import("@codebolt/types/sdk").BrowserInfoResponse>;
|
|
105
|
+
extractText: () => Promise<import("@codebolt/types/sdk").ExtractTextResponse>;
|
|
106
106
|
close: () => void;
|
|
107
|
-
scroll: (direction: string, pixels: string) => Promise<import("
|
|
108
|
-
type: (elementid: string, text: string) => Promise<import("
|
|
109
|
-
click: (elementid: string) => Promise<import("
|
|
110
|
-
enter: () => Promise<import("
|
|
111
|
-
search: (elementid: string, query: string) => Promise<import("
|
|
107
|
+
scroll: (direction: string, pixels: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
108
|
+
type: (elementid: string, text: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
109
|
+
click: (elementid: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
110
|
+
enter: () => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
111
|
+
search: (elementid: string, query: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
112
112
|
};
|
|
113
113
|
chat: {
|
|
114
|
-
getChatHistory: () => Promise<import("
|
|
114
|
+
getChatHistory: (threadId: string) => Promise<import("@codebolt/types/sdk").ChatMessage>;
|
|
115
115
|
setRequestHandler: (handler: (request: any, response: (data: any) => void) => Promise<void> | void) => void;
|
|
116
116
|
sendMessage: (message: string, payload: any) => void;
|
|
117
|
-
waitforReply: (message: string) => Promise<import("
|
|
117
|
+
waitforReply: (message: string) => Promise<import("@codebolt/types/sdk").UserMessage>;
|
|
118
118
|
processStarted: (onStopClicked?: (message: any) => void) => {
|
|
119
119
|
stopProcess: () => void;
|
|
120
120
|
cleanup: () => void;
|
|
@@ -149,8 +149,8 @@ declare class Codebolt {
|
|
|
149
149
|
eventNames(): (string | symbol)[];
|
|
150
150
|
};
|
|
151
151
|
executeCommand: (command: string, returnEmptyStringOnSuccess?: boolean) => Promise<any>;
|
|
152
|
-
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<import("
|
|
153
|
-
sendManualInterrupt(): Promise<import("
|
|
152
|
+
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<import("@codebolt/types/sdk").CommandError>;
|
|
153
|
+
sendManualInterrupt(): Promise<import("@codebolt/types/sdk").TerminalInterruptResponse>;
|
|
154
154
|
executeCommandWithStream(command: string, executeInMain?: boolean): {
|
|
155
155
|
cleanup?: () => void;
|
|
156
156
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
@@ -172,11 +172,10 @@ declare class Codebolt {
|
|
|
172
172
|
};
|
|
173
173
|
};
|
|
174
174
|
codeutils: {
|
|
175
|
-
getJsTree: (filePath?: string) => Promise<import("../types/InternalTypes").JSTreeResponse>;
|
|
176
175
|
getAllFilesAsMarkDown: () => Promise<string>;
|
|
177
|
-
performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<import("
|
|
178
|
-
getMatcherList: () => Promise<import("
|
|
179
|
-
matchDetail: (matcher: string) => Promise<import("
|
|
176
|
+
performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<import("@codebolt/types/sdk").MatchProblemResponse>;
|
|
177
|
+
getMatcherList: () => Promise<import("@codebolt/types/sdk").GetMatcherListTreeResponse>;
|
|
178
|
+
matchDetail: (matcher: string) => Promise<import("@codebolt/types/sdk").getMatchDetail>;
|
|
180
179
|
};
|
|
181
180
|
crawler: {
|
|
182
181
|
start: () => void;
|
|
@@ -196,130 +195,104 @@ declare class Codebolt {
|
|
|
196
195
|
add_file: (filename: string, file_path: string) => void;
|
|
197
196
|
retrieve_related_knowledge: (query: string, filename: string) => void;
|
|
198
197
|
};
|
|
199
|
-
codeparsers: {
|
|
200
|
-
getClassesInFile: (file: string) => Promise<{
|
|
201
|
-
error: string;
|
|
202
|
-
} | {
|
|
203
|
-
name: any;
|
|
204
|
-
location: string;
|
|
205
|
-
}[]>;
|
|
206
|
-
getFunctionsinClass: (file: string, className: string) => Promise<{
|
|
207
|
-
error: string;
|
|
208
|
-
} | {
|
|
209
|
-
name: string;
|
|
210
|
-
class: string;
|
|
211
|
-
location: string;
|
|
212
|
-
}[]>;
|
|
213
|
-
getAstTreeInFile: (file: string, className?: string) => Promise<import("..").ASTNode | {
|
|
214
|
-
error: string;
|
|
215
|
-
}>;
|
|
216
|
-
};
|
|
217
198
|
outputparsers: {
|
|
218
|
-
parseJSON: (jsonString: string) =>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
parseCSV: (csvString: string) => {
|
|
228
|
-
success: boolean;
|
|
229
|
-
parsed?: any[];
|
|
230
|
-
error?: Error;
|
|
231
|
-
};
|
|
232
|
-
parseText: (text: string) => {
|
|
233
|
-
success: boolean;
|
|
234
|
-
parsed: string[];
|
|
235
|
-
};
|
|
236
|
-
parseErrors: (output: any) => string[];
|
|
237
|
-
parseWarnings: (output: any) => string[];
|
|
199
|
+
parseJSON: (jsonString: string) => import("../modules/outputparsers").ParseResult<unknown>;
|
|
200
|
+
parseXML: (xmlString: string) => import("../modules/outputparsers").ParseResult<{
|
|
201
|
+
rootElement: string;
|
|
202
|
+
[key: string]: unknown;
|
|
203
|
+
}>;
|
|
204
|
+
parseCSV: (csvString: string) => import("../modules/outputparsers").ParseResult<import("../modules/outputparsers").CSVRow[]>;
|
|
205
|
+
parseText: (text: string) => import("../modules/outputparsers").ParseResult<string[]>;
|
|
206
|
+
parseErrors: (output: import("../modules/outputparsers").ParsableOutput) => string[];
|
|
207
|
+
parseWarnings: (output: import("../modules/outputparsers").ParsableOutput) => string[];
|
|
238
208
|
};
|
|
239
209
|
project: {
|
|
240
|
-
getProjectSettings: () => Promise<import("
|
|
241
|
-
getProjectPath: () => Promise<import("
|
|
242
|
-
getRepoMap: (message: any) => Promise<import("
|
|
210
|
+
getProjectSettings: () => Promise<import("@codebolt/types/sdk").GetProjectSettingsResponse>;
|
|
211
|
+
getProjectPath: () => Promise<import("@codebolt/types/sdk").GetProjectPathResponse>;
|
|
212
|
+
getRepoMap: (message: any) => Promise<import("@codebolt/types/sdk").GetProjectPathResponse>;
|
|
243
213
|
runProject: () => void;
|
|
244
214
|
getEditorFileStatus: () => Promise<any>;
|
|
245
215
|
};
|
|
246
216
|
dbmemory: {
|
|
247
|
-
addKnowledge: (key: string, value:
|
|
248
|
-
getKnowledge: (key: string) => Promise<import("
|
|
217
|
+
addKnowledge: (key: string, value: import("@codebolt/types/sdk").MemoryValue) => Promise<import("@codebolt/types/sdk").MemorySetResponse>;
|
|
218
|
+
getKnowledge: (key: string) => Promise<import("@codebolt/types/sdk").MemoryGetResponse>;
|
|
249
219
|
};
|
|
250
220
|
cbstate: {
|
|
251
221
|
getApplicationState: () => Promise<import("../types/commonTypes").ApplicationState>;
|
|
252
|
-
addToAgentState: (key: string, value: string) => Promise<import("
|
|
253
|
-
getAgentState: () => Promise<import("
|
|
254
|
-
getProjectState: () => Promise<import("
|
|
255
|
-
updateProjectState: (key: string, value: any) => Promise<import("
|
|
256
|
-
};
|
|
257
|
-
taskplaner: {
|
|
258
|
-
addTask: (params: import("../types/libFunctionTypes").TaskCreateOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
259
|
-
addSimpleTask: (task: string, agentId?: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
260
|
-
getTasks: (filters?: import("../types/libFunctionTypes").TaskFilterOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
261
|
-
getTasksByAgent: (agentId: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
262
|
-
getTasksByCategory: (category: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
263
|
-
getAllAgents: () => Promise<import("../types/commonTypes").TaskResponse>;
|
|
264
|
-
updateTask: (params: import("../types/libFunctionTypes").TaskUpdateOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
265
|
-
updateSimpleTask: (taskId: string, task: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
266
|
-
deleteTask: (taskId: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
267
|
-
addSubTask: (params: import("../types/libFunctionTypes").AddSubTaskOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
268
|
-
updateSubTask: (params: import("../types/libFunctionTypes").UpdateSubTaskOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
269
|
-
deleteSubTask: (taskId: string, subtaskId: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
270
|
-
createTasksFromMarkdown: (params: import("../types/libFunctionTypes").TaskMarkdownImportOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
271
|
-
exportTasksToMarkdown: (params?: import("../types/libFunctionTypes").TaskMarkdownExportOptions) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
272
|
-
toggleTaskCompletion: (taskId: string, completed: boolean) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
273
|
-
toggleSubTaskCompletion: (taskId: string, subtaskId: string, completed: boolean) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
274
|
-
moveTaskToAgent: (taskId: string, newAgentId: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
275
|
-
setTaskPriority: (taskId: string, priority: "low" | "medium" | "high") => Promise<import("../types/commonTypes").TaskResponse>;
|
|
276
|
-
addTaskTags: (taskId: string, tags: string[]) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
277
|
-
createQuickTask: (title: string, agentId?: string, category?: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
222
|
+
addToAgentState: (key: string, value: string) => Promise<import("@codebolt/types/sdk").AddToAgentStateResponse>;
|
|
223
|
+
getAgentState: () => Promise<import("@codebolt/types/sdk").GetAgentStateResponse>;
|
|
224
|
+
getProjectState: () => Promise<import("@codebolt/types/sdk").GetProjectStateResponse>;
|
|
225
|
+
updateProjectState: (key: string, value: any) => Promise<import("@codebolt/types/sdk").UpdateProjectStateResponse>;
|
|
278
226
|
};
|
|
279
227
|
vectordb: {
|
|
280
|
-
getVector: (key: string) => Promise<import("
|
|
281
|
-
addVectorItem: (item: any) => Promise<import("
|
|
282
|
-
queryVectorItem: (key: string) => Promise<import("
|
|
283
|
-
queryVectorItems: (items: [], dbPath: string) => Promise<import("
|
|
228
|
+
getVector: (key: string) => Promise<import("@codebolt/types/sdk").GetVectorResponse>;
|
|
229
|
+
addVectorItem: (item: any) => Promise<import("@codebolt/types/sdk").AddVectorItemResponse>;
|
|
230
|
+
queryVectorItem: (key: string) => Promise<import("@codebolt/types/sdk").QueryVectorItemResponse>;
|
|
231
|
+
queryVectorItems: (items: [], dbPath: string) => Promise<import("@codebolt/types/sdk").QueryVectorItemResponse>;
|
|
284
232
|
};
|
|
285
233
|
debug: {
|
|
286
|
-
debug: (log: string, type: import("../modules/debug").logType) => Promise<import("
|
|
287
|
-
openDebugBrowser: (url: string, port: number) => Promise<import("
|
|
234
|
+
debug: (log: string, type: import("../modules/debug").logType) => Promise<import("@codebolt/types/sdk").DebugAddLogResponse>;
|
|
235
|
+
openDebugBrowser: (url: string, port: number) => Promise<import("@codebolt/types/sdk").OpenDebugBrowserResponse>;
|
|
288
236
|
};
|
|
289
237
|
tokenizer: {
|
|
290
|
-
addToken: (key: string) => Promise<import("
|
|
291
|
-
getToken: (key: string) => Promise<import("
|
|
238
|
+
addToken: (key: string) => Promise<import("@codebolt/types/sdk").AddTokenResponse>;
|
|
239
|
+
getToken: (key: string) => Promise<import("@codebolt/types/sdk").GetTokenResponse>;
|
|
292
240
|
};
|
|
293
241
|
chatSummary: {
|
|
294
|
-
summarizeAll: () => Promise<import("
|
|
242
|
+
summarizeAll: () => Promise<import("@codebolt/types/sdk").GetSummarizeAllResponse>;
|
|
295
243
|
summarize: (messages: {
|
|
296
244
|
role: string;
|
|
297
245
|
content: string;
|
|
298
|
-
}[], depth: number) => Promise<import("
|
|
246
|
+
}[], depth: number) => Promise<import("@codebolt/types/sdk").GetSummarizeResponse>;
|
|
299
247
|
};
|
|
300
248
|
mcp: {
|
|
301
|
-
getEnabledMCPServers: () => Promise<import("
|
|
302
|
-
getLocalMCPServers: () => Promise<import("
|
|
303
|
-
getMentionedMCPServers: (userMessage:
|
|
304
|
-
searchAvailableMCPServers: (query: string) => Promise<import("
|
|
305
|
-
listMcpFromServers: (toolBoxes: string[]) => Promise<import("
|
|
306
|
-
configureMCPServer: (name: string, config:
|
|
249
|
+
getEnabledMCPServers: () => Promise<import("@codebolt/types/sdk").GetEnabledToolBoxesResponse>;
|
|
250
|
+
getLocalMCPServers: () => Promise<import("@codebolt/types/sdk").GetLocalToolBoxesResponse>;
|
|
251
|
+
getMentionedMCPServers: (userMessage: import("@codebolt/types/sdk").MCPUserMessage) => Promise<import("@codebolt/types/sdk").GetAvailableToolBoxesResponse>;
|
|
252
|
+
searchAvailableMCPServers: (query: string) => Promise<import("@codebolt/types/sdk").SearchAvailableToolBoxesResponse>;
|
|
253
|
+
listMcpFromServers: (toolBoxes: string[]) => Promise<import("@codebolt/types/sdk").ListToolsFromToolBoxesResponse>;
|
|
254
|
+
configureMCPServer: (name: string, config: import("@codebolt/types/sdk").MCPConfiguration) => Promise<import("@codebolt/types/sdk").ConfigureToolBoxResponse>;
|
|
307
255
|
getTools: (tools: {
|
|
308
256
|
toolbox: string;
|
|
309
257
|
toolName: string;
|
|
310
|
-
}[]) => Promise<import("
|
|
311
|
-
executeTool: (toolbox: string, toolName: string, params:
|
|
258
|
+
}[]) => Promise<import("@codebolt/types/sdk").GetToolsResponse>;
|
|
259
|
+
executeTool: (toolbox: string, toolName: string, params: import("@codebolt/types/sdk").ToolParameters) => Promise<import("@codebolt/types/sdk").ExecuteToolResponse>;
|
|
312
260
|
};
|
|
313
261
|
agent: {
|
|
314
|
-
findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion: import("
|
|
315
|
-
startAgent: (agentId: string, task: string) => Promise<import("
|
|
316
|
-
getAgentsList: (type?: import("
|
|
317
|
-
getAgentsDetail: (agentList?: never[]) => Promise<import("
|
|
262
|
+
findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion: import("@codebolt/types/enum").AgentLocation | undefined, getFrom: import("@codebolt/types/enum").FilterUsing.USE_VECTOR_DB) => Promise<import("@codebolt/types/sdk").FindAgentByTaskResponse>;
|
|
263
|
+
startAgent: (agentId: string, task: string) => Promise<import("@codebolt/types/sdk").TaskCompletionResponse>;
|
|
264
|
+
getAgentsList: (type?: import("@codebolt/types/enum").Agents) => Promise<import("@codebolt/types/sdk").ListAgentsResponse>;
|
|
265
|
+
getAgentsDetail: (agentList?: never[]) => Promise<import("@codebolt/types/sdk").AgentsDetailResponse>;
|
|
318
266
|
};
|
|
319
267
|
utils: {
|
|
320
|
-
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("
|
|
268
|
+
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("@codebolt/types/sdk").FsEditFileAndApplyDiffResponse>;
|
|
321
269
|
};
|
|
322
270
|
notify: NotificationFunctions;
|
|
271
|
+
/**
|
|
272
|
+
* User message utilities for accessing current user message and context
|
|
273
|
+
*/
|
|
274
|
+
userMessage: {
|
|
275
|
+
getCurrent: () => FlatUserMessage | undefined;
|
|
276
|
+
getText: () => string;
|
|
277
|
+
getMentionedMCPs: () => string[];
|
|
278
|
+
getMentionedFiles: () => string[];
|
|
279
|
+
getMentionedFolders: () => string[];
|
|
280
|
+
getMentionedAgents: () => any[];
|
|
281
|
+
getRemixPrompt: () => string | undefined;
|
|
282
|
+
getUploadedImages: () => any[];
|
|
283
|
+
getCurrentFile: () => string | undefined;
|
|
284
|
+
getSelection: () => string | undefined;
|
|
285
|
+
getMessageId: () => string | undefined;
|
|
286
|
+
getThreadId: () => string | undefined;
|
|
287
|
+
getProcessingConfig: () => import("@codebolt/types/sdk").AgentProcessingConfig;
|
|
288
|
+
isProcessingEnabled: (type: "processMentionedMCPs" | "processRemixPrompt" | "processMentionedFiles" | "processMentionedAgents") => boolean;
|
|
289
|
+
setSessionData: (key: string, value: any) => void;
|
|
290
|
+
getSessionData: (key: string) => any;
|
|
291
|
+
getTimestamp: () => string | undefined;
|
|
292
|
+
hasMessage: () => boolean;
|
|
293
|
+
updateProcessingConfig: (config: any) => void;
|
|
294
|
+
clear: () => void;
|
|
295
|
+
};
|
|
323
296
|
/**
|
|
324
297
|
* Sets up a handler function to be executed when the WebSocket connection is established.
|
|
325
298
|
* If the connection is already established, the handler will be executed immediately.
|
|
@@ -332,6 +305,46 @@ declare class Codebolt {
|
|
|
332
305
|
* @param {Function} handler - The handler function to call when a message is received.
|
|
333
306
|
* @returns {void}
|
|
334
307
|
*/
|
|
335
|
-
onMessage(handler: (userMessage:
|
|
308
|
+
onMessage(handler: (userMessage: FlatUserMessage) => void | Promise<void> | any | Promise<any>): void;
|
|
309
|
+
onRawMessage(handler: (userMessage: FlatUserMessage) => void | Promise<void> | any | Promise<any>): void;
|
|
310
|
+
/**
|
|
311
|
+
* Sets up a listener for provider start events.
|
|
312
|
+
* @param {Function} handler - The handler function to call when provider starts.
|
|
313
|
+
* @returns {void}
|
|
314
|
+
*/
|
|
315
|
+
onProviderStart(handler: (initvars: {
|
|
316
|
+
type: string;
|
|
317
|
+
environmentName: string;
|
|
318
|
+
}) => void | Promise<void> | any | Promise<any>): void;
|
|
319
|
+
/**
|
|
320
|
+
* Sets up a listener for provider agent start events.
|
|
321
|
+
* @param {Function} handler - The handler function to call when provider agent starts.
|
|
322
|
+
* @returns {void}
|
|
323
|
+
*/
|
|
324
|
+
onProviderAgentStart(handler: (userMessage: any) => void | Promise<void> | any | Promise<any>): void;
|
|
325
|
+
/**
|
|
326
|
+
* Sets up a listener for get diff files events.
|
|
327
|
+
* @param {Function} handler - The handler function to call when diff files are requested.
|
|
328
|
+
* @returns {void}
|
|
329
|
+
*/
|
|
330
|
+
onGetDiffFiles(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
331
|
+
/**
|
|
332
|
+
* Sets up a listener for close signal events.
|
|
333
|
+
* @param {Function} handler - The handler function to call when close signal is received.
|
|
334
|
+
* @returns {void}
|
|
335
|
+
*/
|
|
336
|
+
onCloseSignal(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
337
|
+
/**
|
|
338
|
+
* Sets up a listener for create patch request events.
|
|
339
|
+
* @param {Function} handler - The handler function to call when patch request is created.
|
|
340
|
+
* @returns {void}
|
|
341
|
+
*/
|
|
342
|
+
onCreatePatchRequest(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
343
|
+
/**
|
|
344
|
+
* Sets up a listener for create pull request events.
|
|
345
|
+
* @param {Function} handler - The handler function to call when pull request is created.
|
|
346
|
+
* @returns {void}
|
|
347
|
+
*/
|
|
348
|
+
onCreatePullRequestRequest(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
336
349
|
}
|
|
337
350
|
export default Codebolt;
|