@codebolt/codeboltjs 2.2.1 → 2.2.3
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 +212 -165
- package/dist/core/Codebolt.js +267 -6
- 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 +136 -92
- package/dist/modules/task.js +354 -205
- 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 +17 -25
- package/dist/modules/codeparsers.d.ts +0 -37
- package/dist/modules/codeparsers.js +0 -329
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,7 @@
|
|
|
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
|
+
import { RawMessageForAgent, ProviderInitVars } from '@codebolt/types/provider';
|
|
4
5
|
/**
|
|
5
6
|
* @class Codebolt
|
|
6
7
|
* @description This class provides a unified interface to interact with various modules.
|
|
@@ -34,87 +35,87 @@ declare class Codebolt {
|
|
|
34
35
|
*/
|
|
35
36
|
get ready(): boolean;
|
|
36
37
|
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
|
-
}>;
|
|
38
|
+
createFile: (fileName: string, source: string, filePath: string) => Promise<import("@codebolt/types/sdk").CreateFileResponse>;
|
|
39
|
+
createFolder: (folderName: string, folderPath: string) => Promise<import("@codebolt/types/sdk").CreateFolderResponse>;
|
|
40
|
+
readFile: (filePath: string) => Promise<import("@codebolt/types/sdk").ReadFileResponse>;
|
|
41
|
+
updateFile: (filename: string, filePath: string, newContent: string) => Promise<import("@codebolt/types/sdk").UpdateFileResponse>;
|
|
42
|
+
deleteFile: (filename: string, filePath: string) => Promise<import("@codebolt/types/sdk").DeleteFileResponse>;
|
|
43
|
+
deleteFolder: (foldername: string, folderpath: string) => Promise<import("@codebolt/types/sdk").DeleteFolderResponse>;
|
|
44
|
+
listFile: (folderPath: string, isRecursive?: boolean) => Promise<import("@codebolt/types/sdk").FileListResponse>;
|
|
45
|
+
listCodeDefinitionNames: (path: string) => Promise<import("@codebolt/types/sdk").ListCodeDefinitionsResponse>;
|
|
46
|
+
searchFiles: (path: string, regex: string, filePattern: string) => Promise<import("@codebolt/types/sdk").SearchFilesResponse>;
|
|
52
47
|
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
|
-
|
|
48
|
+
grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive?: boolean) => Promise<import("@codebolt/types/sdk").GrepSearchResponse>;
|
|
49
|
+
fileSearch: (query: string) => Promise<import("@codebolt/types/sdk").FileSearchResponse>;
|
|
50
|
+
editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("@codebolt/types/sdk").EditFileAndApplyDiffResponse>;
|
|
51
|
+
readManyFiles: (params: {
|
|
52
|
+
paths: string[];
|
|
53
|
+
include?: string[];
|
|
54
|
+
exclude?: string[];
|
|
55
|
+
recursive?: boolean;
|
|
56
|
+
use_default_excludes?: boolean;
|
|
57
|
+
max_files?: number;
|
|
58
|
+
max_total_size?: number;
|
|
59
|
+
include_metadata?: boolean;
|
|
60
|
+
separator_format?: string;
|
|
61
|
+
notifyUser?: boolean;
|
|
62
|
+
}) => Promise<import("@codebolt/types/sdk").ReadManyFilesResponse>;
|
|
63
|
+
listDirectory: (params: {
|
|
64
|
+
path: string;
|
|
65
|
+
ignore?: string[];
|
|
66
|
+
show_hidden?: boolean;
|
|
67
|
+
detailed?: boolean;
|
|
68
|
+
limit?: number;
|
|
69
|
+
notifyUser?: boolean;
|
|
70
|
+
}) => Promise<import("@codebolt/types/sdk").ListDirectoryResponse>;
|
|
65
71
|
};
|
|
66
72
|
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("
|
|
73
|
+
init: (path: string) => Promise<import("@codebolt/types/sdk").GitInitResponse>;
|
|
74
|
+
pull: () => Promise<import("@codebolt/types/sdk").GitPullResponse>;
|
|
75
|
+
push: () => Promise<import("@codebolt/types/sdk").GitPushResponse>;
|
|
76
|
+
status: () => Promise<import("@codebolt/types/sdk").GitStatusResponse>;
|
|
77
|
+
addAll: () => Promise<import("@codebolt/types/sdk").AddResponse>;
|
|
78
|
+
commit: (message: string) => Promise<import("@codebolt/types/sdk").GitCommitResponse>;
|
|
79
|
+
checkout: (branch: string) => Promise<import("@codebolt/types/sdk").GitCheckoutResponse>;
|
|
80
|
+
branch: (branch: string) => Promise<import("@codebolt/types/sdk").GitBranchResponse>;
|
|
81
|
+
logs: (path: string) => Promise<import("@codebolt/types/sdk").GitLogsResponse>;
|
|
82
|
+
diff: (commitHash: string) => Promise<import("@codebolt/types/sdk").GitDiffResponse>;
|
|
77
83
|
};
|
|
78
84
|
llm: {
|
|
79
|
-
inference: (params: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
temperature?: number;
|
|
87
|
-
stream?: boolean;
|
|
88
|
-
}, llmrole?: string) => Promise<{
|
|
89
|
-
completion: any;
|
|
85
|
+
inference: (params: import("@codebolt/types/sdk").LLMInferenceParams) => Promise<{
|
|
86
|
+
completion: import("@codebolt/types/sdk").LLMCompletion;
|
|
87
|
+
}>;
|
|
88
|
+
getModelConfig: (modelId?: string) => Promise<{
|
|
89
|
+
config: import("@codebolt/types/sdk").LLMModelConfig | null;
|
|
90
|
+
success: boolean;
|
|
91
|
+
error?: string;
|
|
90
92
|
}>;
|
|
91
|
-
legacyInference: (message: string, llmrole: string) => Promise<import("../types/socketMessageTypes").LLMResponse>;
|
|
92
93
|
};
|
|
93
94
|
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("
|
|
95
|
+
newPage: () => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
96
|
+
getUrl: () => Promise<import("@codebolt/types/sdk").UrlResponse>;
|
|
97
|
+
goToPage: (url: string) => Promise<import("@codebolt/types/sdk").GoToPageResponse>;
|
|
98
|
+
screenshot: () => Promise<import("@codebolt/types/sdk").BrowserScreenshotResponse>;
|
|
99
|
+
getHTML: () => Promise<import("@codebolt/types/sdk").HtmlReceived>;
|
|
100
|
+
getMarkdown: () => Promise<import("@codebolt/types/sdk").GetMarkdownResponse>;
|
|
100
101
|
getPDF: () => void;
|
|
101
102
|
pdfToText: () => void;
|
|
102
|
-
getContent: () => Promise<import("
|
|
103
|
-
getSnapShot: () => Promise<import("
|
|
104
|
-
getBrowserInfo: () => Promise<import("
|
|
105
|
-
extractText: () => Promise<import("
|
|
103
|
+
getContent: () => Promise<import("@codebolt/types/sdk").GetContentResponse>;
|
|
104
|
+
getSnapShot: () => Promise<import("@codebolt/types/sdk").BrowserSnapshotResponse>;
|
|
105
|
+
getBrowserInfo: () => Promise<import("@codebolt/types/sdk").BrowserInfoResponse>;
|
|
106
|
+
extractText: () => Promise<import("@codebolt/types/sdk").ExtractTextResponse>;
|
|
106
107
|
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("
|
|
108
|
+
scroll: (direction: string, pixels: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
109
|
+
type: (elementid: string, text: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
110
|
+
click: (elementid: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
111
|
+
enter: () => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
112
|
+
search: (elementid: string, query: string) => Promise<import("@codebolt/types/sdk").BrowserActionResponseData>;
|
|
112
113
|
};
|
|
113
114
|
chat: {
|
|
114
|
-
getChatHistory: () => Promise<import("
|
|
115
|
+
getChatHistory: (threadId: string) => Promise<import("@codebolt/types/sdk").ChatMessage>;
|
|
115
116
|
setRequestHandler: (handler: (request: any, response: (data: any) => void) => Promise<void> | void) => void;
|
|
116
117
|
sendMessage: (message: string, payload: any) => void;
|
|
117
|
-
waitforReply: (message: string) => Promise<import("
|
|
118
|
+
waitforReply: (message: string) => Promise<import("@codebolt/types/sdk").UserMessage>;
|
|
118
119
|
processStarted: (onStopClicked?: (message: any) => void) => {
|
|
119
120
|
stopProcess: () => void;
|
|
120
121
|
cleanup: () => void;
|
|
@@ -149,8 +150,8 @@ declare class Codebolt {
|
|
|
149
150
|
eventNames(): (string | symbol)[];
|
|
150
151
|
};
|
|
151
152
|
executeCommand: (command: string, returnEmptyStringOnSuccess?: boolean) => Promise<any>;
|
|
152
|
-
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<import("
|
|
153
|
-
sendManualInterrupt(): Promise<import("
|
|
153
|
+
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<import("@codebolt/types/sdk").CommandError>;
|
|
154
|
+
sendManualInterrupt(): Promise<import("@codebolt/types/sdk").TerminalInterruptResponse>;
|
|
154
155
|
executeCommandWithStream(command: string, executeInMain?: boolean): {
|
|
155
156
|
cleanup?: () => void;
|
|
156
157
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
@@ -172,11 +173,10 @@ declare class Codebolt {
|
|
|
172
173
|
};
|
|
173
174
|
};
|
|
174
175
|
codeutils: {
|
|
175
|
-
getJsTree: (filePath?: string) => Promise<import("../types/InternalTypes").JSTreeResponse>;
|
|
176
176
|
getAllFilesAsMarkDown: () => Promise<string>;
|
|
177
|
-
performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<import("
|
|
178
|
-
getMatcherList: () => Promise<import("
|
|
179
|
-
matchDetail: (matcher: string) => Promise<import("
|
|
177
|
+
performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<import("@codebolt/types/sdk").MatchProblemResponse>;
|
|
178
|
+
getMatcherList: () => Promise<import("@codebolt/types/sdk").GetMatcherListTreeResponse>;
|
|
179
|
+
matchDetail: (matcher: string) => Promise<import("@codebolt/types/sdk").getMatchDetail>;
|
|
180
180
|
};
|
|
181
181
|
crawler: {
|
|
182
182
|
start: () => void;
|
|
@@ -196,130 +196,134 @@ declare class Codebolt {
|
|
|
196
196
|
add_file: (filename: string, file_path: string) => void;
|
|
197
197
|
retrieve_related_knowledge: (query: string, filename: string) => void;
|
|
198
198
|
};
|
|
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
199
|
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[];
|
|
200
|
+
parseJSON: (jsonString: string) => import("../modules/outputparsers").ParseResult<unknown>;
|
|
201
|
+
parseXML: (xmlString: string) => import("../modules/outputparsers").ParseResult<{
|
|
202
|
+
rootElement: string;
|
|
203
|
+
[key: string]: unknown;
|
|
204
|
+
}>;
|
|
205
|
+
parseCSV: (csvString: string) => import("../modules/outputparsers").ParseResult<import("../modules/outputparsers").CSVRow[]>;
|
|
206
|
+
parseText: (text: string) => import("../modules/outputparsers").ParseResult<string[]>;
|
|
207
|
+
parseErrors: (output: import("../modules/outputparsers").ParsableOutput) => string[];
|
|
208
|
+
parseWarnings: (output: import("../modules/outputparsers").ParsableOutput) => string[];
|
|
238
209
|
};
|
|
239
210
|
project: {
|
|
240
|
-
getProjectSettings: () => Promise<import("
|
|
241
|
-
getProjectPath: () => Promise<import("
|
|
242
|
-
getRepoMap: (message: any) => Promise<import("
|
|
211
|
+
getProjectSettings: () => Promise<import("@codebolt/types/sdk").GetProjectSettingsResponse>;
|
|
212
|
+
getProjectPath: () => Promise<import("@codebolt/types/sdk").GetProjectPathResponse>;
|
|
213
|
+
getRepoMap: (message: any) => Promise<import("@codebolt/types/sdk").GetProjectPathResponse>;
|
|
243
214
|
runProject: () => void;
|
|
244
215
|
getEditorFileStatus: () => Promise<any>;
|
|
245
216
|
};
|
|
246
217
|
dbmemory: {
|
|
247
|
-
addKnowledge: (key: string, value:
|
|
248
|
-
getKnowledge: (key: string) => Promise<import("
|
|
218
|
+
addKnowledge: (key: string, value: import("@codebolt/types/sdk").MemoryValue) => Promise<import("@codebolt/types/sdk").MemorySetResponse>;
|
|
219
|
+
getKnowledge: (key: string) => Promise<import("@codebolt/types/sdk").MemoryGetResponse>;
|
|
249
220
|
};
|
|
250
221
|
cbstate: {
|
|
251
222
|
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("
|
|
223
|
+
addToAgentState: (key: string, value: string) => Promise<import("@codebolt/types/sdk").AddToAgentStateResponse>;
|
|
224
|
+
getAgentState: () => Promise<import("@codebolt/types/sdk").GetAgentStateResponse>;
|
|
225
|
+
getProjectState: () => Promise<import("@codebolt/types/sdk").GetProjectStateResponse>;
|
|
226
|
+
updateProjectState: (key: string, value: any) => Promise<import("@codebolt/types/sdk").UpdateProjectStateResponse>;
|
|
256
227
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
updateTask: (
|
|
265
|
-
updateSimpleTask: (taskId: string,
|
|
266
|
-
deleteTask: (taskId: string) => Promise<import("
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
228
|
+
task: {
|
|
229
|
+
createTask: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").CreateTaskOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CreateTaskResponse>;
|
|
230
|
+
createSimpleTask: (taskName: string, threadId?: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CreateTaskResponse>;
|
|
231
|
+
getTaskList: (options?: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetTaskListOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskListResponse>;
|
|
232
|
+
getTaskDetail: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetTaskDetailOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskDetailResponse>;
|
|
233
|
+
addStepToTask: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").AddStepToTaskOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").AddStepToTaskResponse>;
|
|
234
|
+
getTaskMessages: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetTaskMessagesOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskMessagesResponse>;
|
|
235
|
+
updateTask: (taskId: string, updates: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").UpdateTaskOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").UpdateTaskResponse>;
|
|
236
|
+
updateSimpleTask: (taskId: string, taskName: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").UpdateTaskResponse>;
|
|
237
|
+
deleteTask: (taskId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").DeleteTaskResponse>;
|
|
238
|
+
completeTask: (taskId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CompleteTaskResponse>;
|
|
239
|
+
startTask: (taskId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").StartTaskResponse>;
|
|
240
|
+
getAllSteps: (options?: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetAllStepsOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetAllStepsResponse>;
|
|
241
|
+
getCurrentRunningStep: (options?: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetActiveStepOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetCurrentRunningStepResponse>;
|
|
242
|
+
updateStepStatus: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").UpdateStepStatusOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").UpdateStepStatusResponse>;
|
|
243
|
+
completeStep: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").CompleteStepOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CompleteStepResponse>;
|
|
244
|
+
sendSteeringMessage: (options: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").SendSteeringMessageOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").SendSteeringMessageResponse>;
|
|
245
|
+
canTaskStart: (taskId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CanTaskStartResponse>;
|
|
246
|
+
getTasksDependentOn: (taskId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTasksDependentOnResponse>;
|
|
247
|
+
getTasksReadyToStart: (options?: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetTasksReadyToStartOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTasksReadyToStartResponse>;
|
|
248
|
+
getTaskDependencyChain: (taskId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskDependencyChainResponse>;
|
|
249
|
+
getTaskStats: (options?: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetTaskStatsOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskStatsResponse>;
|
|
250
|
+
toggleTaskCompletion: (taskId: string, completed: boolean) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").UpdateTaskResponse>;
|
|
251
|
+
createQuickTask: (name: string, threadId?: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CreateTaskResponse>;
|
|
252
|
+
getTasksStartedByMe: (userId: string, options?: import("node_modules/@codebolt/types/dist/wstypes/agent-to-app-ws/actions/taskEventSchemas").GetTaskListOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskListResponse>;
|
|
253
|
+
addTask: (params: import("../types/libFunctionTypes").TaskCreateOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").CreateTaskResponse>;
|
|
254
|
+
getTasks: (filters?: import("../types/libFunctionTypes").TaskFilterOptions) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskListResponse>;
|
|
255
|
+
getTasksByAgent: (agentId: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskListResponse>;
|
|
256
|
+
getTasksByCategory: (category: string) => Promise<import("node_modules/@codebolt/types/dist/wstypes/app-to-agent-ws/taskServiceResponses").GetTaskListResponse>;
|
|
278
257
|
};
|
|
279
258
|
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("
|
|
259
|
+
getVector: (key: string) => Promise<import("@codebolt/types/sdk").GetVectorResponse>;
|
|
260
|
+
addVectorItem: (item: any) => Promise<import("@codebolt/types/sdk").AddVectorItemResponse>;
|
|
261
|
+
queryVectorItem: (key: string) => Promise<import("@codebolt/types/sdk").QueryVectorItemResponse>;
|
|
262
|
+
queryVectorItems: (items: [], dbPath: string) => Promise<import("@codebolt/types/sdk").QueryVectorItemResponse>;
|
|
284
263
|
};
|
|
285
264
|
debug: {
|
|
286
|
-
debug: (log: string, type: import("../modules/debug").logType) => Promise<import("
|
|
287
|
-
openDebugBrowser: (url: string, port: number) => Promise<import("
|
|
265
|
+
debug: (log: string, type: import("../modules/debug").logType) => Promise<import("@codebolt/types/sdk").DebugAddLogResponse>;
|
|
266
|
+
openDebugBrowser: (url: string, port: number) => Promise<import("@codebolt/types/sdk").OpenDebugBrowserResponse>;
|
|
288
267
|
};
|
|
289
268
|
tokenizer: {
|
|
290
|
-
addToken: (key: string) => Promise<import("
|
|
291
|
-
getToken: (key: string) => Promise<import("
|
|
269
|
+
addToken: (key: string) => Promise<import("@codebolt/types/sdk").AddTokenResponse>;
|
|
270
|
+
getToken: (key: string) => Promise<import("@codebolt/types/sdk").GetTokenResponse>;
|
|
292
271
|
};
|
|
293
272
|
chatSummary: {
|
|
294
|
-
summarizeAll: () => Promise<import("
|
|
273
|
+
summarizeAll: () => Promise<import("@codebolt/types/sdk").GetSummarizeAllResponse>;
|
|
295
274
|
summarize: (messages: {
|
|
296
275
|
role: string;
|
|
297
276
|
content: string;
|
|
298
|
-
}[], depth: number) => Promise<import("
|
|
277
|
+
}[], depth: number) => Promise<import("@codebolt/types/sdk").GetSummarizeResponse>;
|
|
299
278
|
};
|
|
300
279
|
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:
|
|
280
|
+
getEnabledMCPServers: () => Promise<import("@codebolt/types/sdk").GetEnabledToolBoxesResponse>;
|
|
281
|
+
getLocalMCPServers: () => Promise<import("@codebolt/types/sdk").GetLocalToolBoxesResponse>;
|
|
282
|
+
getMentionedMCPServers: (userMessage: import("@codebolt/types/sdk").MCPUserMessage) => Promise<import("@codebolt/types/sdk").GetAvailableToolBoxesResponse>;
|
|
283
|
+
searchAvailableMCPServers: (query: string) => Promise<import("@codebolt/types/sdk").SearchAvailableToolBoxesResponse>;
|
|
284
|
+
listMcpFromServers: (toolBoxes: string[]) => Promise<import("@codebolt/types/sdk").ListToolsFromToolBoxesResponse>;
|
|
285
|
+
configureMCPServer: (name: string, config: import("@codebolt/types/sdk").MCPConfiguration) => Promise<import("@codebolt/types/sdk").ConfigureToolBoxResponse>;
|
|
307
286
|
getTools: (tools: {
|
|
308
287
|
toolbox: string;
|
|
309
288
|
toolName: string;
|
|
310
|
-
}[]) => Promise<import("
|
|
311
|
-
executeTool: (toolbox: string, toolName: string, params:
|
|
289
|
+
}[]) => Promise<import("@codebolt/types/sdk").GetToolsResponse>;
|
|
290
|
+
executeTool: (toolbox: string, toolName: string, params: import("@codebolt/types/sdk").ToolParameters) => Promise<import("@codebolt/types/sdk").ExecuteToolResponse>;
|
|
312
291
|
};
|
|
313
292
|
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("
|
|
293
|
+
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>;
|
|
294
|
+
startAgent: (agentId: string, task: string) => Promise<import("@codebolt/types/sdk").TaskCompletionResponse>;
|
|
295
|
+
getAgentsList: (type?: import("@codebolt/types/enum").Agents) => Promise<import("@codebolt/types/sdk").ListAgentsResponse>;
|
|
296
|
+
getAgentsDetail: (agentList?: never[]) => Promise<import("@codebolt/types/sdk").AgentsDetailResponse>;
|
|
318
297
|
};
|
|
319
298
|
utils: {
|
|
320
|
-
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("
|
|
299
|
+
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("@codebolt/types/sdk").FsEditFileAndApplyDiffResponse>;
|
|
321
300
|
};
|
|
322
301
|
notify: NotificationFunctions;
|
|
302
|
+
/**
|
|
303
|
+
* User message utilities for accessing current user message and context
|
|
304
|
+
*/
|
|
305
|
+
userMessage: {
|
|
306
|
+
getCurrent: () => FlatUserMessage | undefined;
|
|
307
|
+
getText: () => string;
|
|
308
|
+
getMentionedMCPs: () => string[];
|
|
309
|
+
getMentionedFiles: () => string[];
|
|
310
|
+
getMentionedFolders: () => string[];
|
|
311
|
+
getMentionedAgents: () => any[];
|
|
312
|
+
getRemixPrompt: () => string | undefined;
|
|
313
|
+
getUploadedImages: () => any[];
|
|
314
|
+
getCurrentFile: () => string | undefined;
|
|
315
|
+
getSelection: () => string | undefined;
|
|
316
|
+
getMessageId: () => string | undefined;
|
|
317
|
+
getThreadId: () => string | undefined;
|
|
318
|
+
getProcessingConfig: () => import("@codebolt/types/sdk").AgentProcessingConfig;
|
|
319
|
+
isProcessingEnabled: (type: "processMentionedMCPs" | "processRemixPrompt" | "processMentionedFiles" | "processMentionedAgents") => boolean;
|
|
320
|
+
setSessionData: (key: string, value: any) => void;
|
|
321
|
+
getSessionData: (key: string) => any;
|
|
322
|
+
getTimestamp: () => string | undefined;
|
|
323
|
+
hasMessage: () => boolean;
|
|
324
|
+
updateProcessingConfig: (config: any) => void;
|
|
325
|
+
clear: () => void;
|
|
326
|
+
};
|
|
323
327
|
/**
|
|
324
328
|
* Sets up a handler function to be executed when the WebSocket connection is established.
|
|
325
329
|
* If the connection is already established, the handler will be executed immediately.
|
|
@@ -332,6 +336,49 @@ declare class Codebolt {
|
|
|
332
336
|
* @param {Function} handler - The handler function to call when a message is received.
|
|
333
337
|
* @returns {void}
|
|
334
338
|
*/
|
|
335
|
-
onMessage(handler: (userMessage:
|
|
339
|
+
onMessage(handler: (userMessage: FlatUserMessage) => void | Promise<void> | any | Promise<any>): void;
|
|
340
|
+
onRawMessage(handler: (userMessage: RawMessageForAgent) => void | Promise<void> | any | Promise<any>): void;
|
|
341
|
+
/**
|
|
342
|
+
* Sets up a listener for provider start events.
|
|
343
|
+
* @param {Function} handler - The handler function to call when provider starts.
|
|
344
|
+
* @returns {void}
|
|
345
|
+
*/
|
|
346
|
+
onProviderStart(handler: (initvars: ProviderInitVars) => void | Promise<void> | any | Promise<any>): void;
|
|
347
|
+
/**
|
|
348
|
+
* Sets up a listener for provider agent start events.
|
|
349
|
+
* @param {Function} handler - The handler function to call when provider agent starts.
|
|
350
|
+
* @returns {void}
|
|
351
|
+
*/
|
|
352
|
+
onProviderAgentStart(handler: (userMessage: any) => void | Promise<void> | any | Promise<any>): void;
|
|
353
|
+
/**
|
|
354
|
+
* Sets up a listener for provider stop events.
|
|
355
|
+
* @param {Function} handler - The handler function to call when provider stops.
|
|
356
|
+
* @returns {void}
|
|
357
|
+
*/
|
|
358
|
+
onProviderStop(handler: (initvars: ProviderInitVars) => void | Promise<void> | any | Promise<any>): void;
|
|
359
|
+
/**
|
|
360
|
+
* Sets up a listener for get diff files events.
|
|
361
|
+
* @param {Function} handler - The handler function to call when diff files are requested.
|
|
362
|
+
* @returns {void}
|
|
363
|
+
*/
|
|
364
|
+
onGetDiffFiles(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
365
|
+
/**
|
|
366
|
+
* Sets up a listener for close signal events.
|
|
367
|
+
* @param {Function} handler - The handler function to call when close signal is received.
|
|
368
|
+
* @returns {void}
|
|
369
|
+
*/
|
|
370
|
+
onCloseSignal(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
371
|
+
/**
|
|
372
|
+
* Sets up a listener for create patch request events.
|
|
373
|
+
* @param {Function} handler - The handler function to call when patch request is created.
|
|
374
|
+
* @returns {void}
|
|
375
|
+
*/
|
|
376
|
+
onCreatePatchRequest(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
377
|
+
/**
|
|
378
|
+
* Sets up a listener for create pull request events.
|
|
379
|
+
* @param {Function} handler - The handler function to call when pull request is created.
|
|
380
|
+
* @returns {void}
|
|
381
|
+
*/
|
|
382
|
+
onCreatePullRequestRequest(handler: () => void | Promise<void> | any | Promise<any>): void;
|
|
336
383
|
}
|
|
337
384
|
export default Codebolt;
|