@codebolt/codeboltjs 4.0.2 → 4.0.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/dist/core/Codebolt.d.ts
CHANGED
|
@@ -35,19 +35,19 @@ declare class Codebolt {
|
|
|
35
35
|
*/
|
|
36
36
|
get ready(): boolean;
|
|
37
37
|
fs: {
|
|
38
|
-
createFile: (fileName: string, source: string, filePath: string) => Promise<
|
|
39
|
-
createFolder: (folderName: string, folderPath: string) => Promise<
|
|
40
|
-
readFile: (filePath: string) => Promise<
|
|
41
|
-
updateFile: (filename: string, filePath: string, newContent: string) => Promise<
|
|
42
|
-
deleteFile: (filename: string, filePath: string) => Promise<
|
|
43
|
-
deleteFolder: (foldername: string, folderpath: string) => Promise<
|
|
44
|
-
listFile: (folderPath: string, isRecursive?: boolean) => Promise<
|
|
45
|
-
listCodeDefinitionNames: (path: string) => Promise<
|
|
46
|
-
searchFiles: (path: string, regex: string, filePattern: string) => Promise<
|
|
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>;
|
|
47
47
|
writeToFile: (relPath: string, newContent: string) => Promise<any>;
|
|
48
|
-
grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive?: boolean) => Promise<
|
|
49
|
-
fileSearch: (query: string) => Promise<
|
|
50
|
-
editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<
|
|
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
51
|
readManyFiles: (params: {
|
|
52
52
|
paths: string[];
|
|
53
53
|
include?: string[];
|
|
@@ -59,7 +59,7 @@ declare class Codebolt {
|
|
|
59
59
|
include_metadata?: boolean;
|
|
60
60
|
separator_format?: string;
|
|
61
61
|
notifyUser?: boolean;
|
|
62
|
-
}) => Promise<
|
|
62
|
+
}) => Promise<import("@codebolt/types/sdk").ReadManyFilesResponse>;
|
|
63
63
|
listDirectory: (params: {
|
|
64
64
|
path: string;
|
|
65
65
|
ignore?: string[];
|
|
@@ -67,55 +67,55 @@ declare class Codebolt {
|
|
|
67
67
|
detailed?: boolean;
|
|
68
68
|
limit?: number;
|
|
69
69
|
notifyUser?: boolean;
|
|
70
|
-
}) => Promise<
|
|
70
|
+
}) => Promise<import("@codebolt/types/sdk").ListDirectoryResponse>;
|
|
71
71
|
};
|
|
72
72
|
git: {
|
|
73
|
-
init: (path: string) => Promise<
|
|
74
|
-
pull: () => Promise<
|
|
75
|
-
push: () => Promise<
|
|
76
|
-
status: () => Promise<
|
|
77
|
-
addAll: () => Promise<
|
|
78
|
-
commit: (message: string) => Promise<
|
|
79
|
-
checkout: (branch: string) => Promise<
|
|
80
|
-
branch: (branch: string) => Promise<
|
|
81
|
-
logs: (path: string) => Promise<
|
|
82
|
-
diff: (commitHash: string) => Promise<
|
|
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>;
|
|
83
83
|
};
|
|
84
84
|
llm: {
|
|
85
|
-
inference: (params:
|
|
86
|
-
completion:
|
|
85
|
+
inference: (params: import("@codebolt/types/sdk").LLMInferenceParams) => Promise<{
|
|
86
|
+
completion: import("@codebolt/types/sdk").LLMCompletion;
|
|
87
87
|
}>;
|
|
88
88
|
getModelConfig: (modelId?: string) => Promise<{
|
|
89
|
-
config:
|
|
89
|
+
config: import("@codebolt/types/sdk").LLMModelConfig | null;
|
|
90
90
|
success: boolean;
|
|
91
91
|
error?: string;
|
|
92
92
|
}>;
|
|
93
93
|
};
|
|
94
94
|
browser: {
|
|
95
|
-
newPage: () => Promise<
|
|
96
|
-
getUrl: () => Promise<
|
|
97
|
-
goToPage: (url: string) => Promise<
|
|
98
|
-
screenshot: () => Promise<
|
|
99
|
-
getHTML: () => Promise<
|
|
100
|
-
getMarkdown: () => Promise<
|
|
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>;
|
|
101
101
|
getPDF: () => void;
|
|
102
102
|
pdfToText: () => void;
|
|
103
|
-
getContent: () => Promise<
|
|
104
|
-
getSnapShot: () => Promise<
|
|
105
|
-
getBrowserInfo: () => Promise<
|
|
106
|
-
extractText: () => Promise<
|
|
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>;
|
|
107
107
|
close: () => void;
|
|
108
|
-
scroll: (direction: string, pixels: string) => Promise<
|
|
109
|
-
type: (elementid: string, text: string) => Promise<
|
|
110
|
-
click: (elementid: string) => Promise<
|
|
111
|
-
enter: () => Promise<
|
|
112
|
-
search: (elementid: string, query: string) => Promise<
|
|
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>;
|
|
113
113
|
};
|
|
114
114
|
chat: {
|
|
115
|
-
getChatHistory: (threadId: string) => Promise<
|
|
115
|
+
getChatHistory: (threadId: string) => Promise<import("@codebolt/types/sdk").ChatMessage>;
|
|
116
116
|
setRequestHandler: (handler: (request: any, response: (data: any) => void) => Promise<void> | void) => void;
|
|
117
117
|
sendMessage: (message: string, payload: any) => void;
|
|
118
|
-
waitforReply: (message: string) => Promise<
|
|
118
|
+
waitforReply: (message: string) => Promise<import("@codebolt/types/sdk").UserMessage>;
|
|
119
119
|
processStarted: (onStopClicked?: (message: any) => void) => {
|
|
120
120
|
stopProcess: () => void;
|
|
121
121
|
cleanup: () => void;
|
|
@@ -150,8 +150,8 @@ declare class Codebolt {
|
|
|
150
150
|
eventNames(): (string | symbol)[];
|
|
151
151
|
};
|
|
152
152
|
executeCommand: (command: string, returnEmptyStringOnSuccess?: boolean) => Promise<any>;
|
|
153
|
-
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<
|
|
154
|
-
sendManualInterrupt(): Promise<
|
|
153
|
+
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<import("@codebolt/types/sdk").CommandError>;
|
|
154
|
+
sendManualInterrupt(): Promise<import("@codebolt/types/sdk").TerminalInterruptResponse>;
|
|
155
155
|
executeCommandWithStream(command: string, executeInMain?: boolean): {
|
|
156
156
|
cleanup?: () => void;
|
|
157
157
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
@@ -174,9 +174,9 @@ declare class Codebolt {
|
|
|
174
174
|
};
|
|
175
175
|
codeutils: {
|
|
176
176
|
getAllFilesAsMarkDown: () => Promise<string>;
|
|
177
|
-
performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<
|
|
178
|
-
getMatcherList: () => Promise<
|
|
179
|
-
matchDetail: (matcher: string) => Promise<
|
|
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;
|
|
@@ -208,52 +208,52 @@ declare class Codebolt {
|
|
|
208
208
|
parseWarnings: (output: import("../modules/outputparsers").ParsableOutput) => string[];
|
|
209
209
|
};
|
|
210
210
|
project: {
|
|
211
|
-
getProjectSettings: () => Promise<
|
|
212
|
-
getProjectPath: () => Promise<
|
|
213
|
-
getRepoMap: (message: any) => Promise<
|
|
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>;
|
|
214
214
|
runProject: () => void;
|
|
215
215
|
getEditorFileStatus: () => Promise<any>;
|
|
216
216
|
};
|
|
217
217
|
dbmemory: {
|
|
218
|
-
addKnowledge: (key: string, value:
|
|
219
|
-
getKnowledge: (key: string) => Promise<
|
|
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>;
|
|
220
220
|
};
|
|
221
221
|
cbstate: {
|
|
222
222
|
getApplicationState: () => Promise<import("../types/commonTypes").ApplicationState>;
|
|
223
|
-
addToAgentState: (key: string, value: string) => Promise<
|
|
224
|
-
getAgentState: () => Promise<
|
|
225
|
-
getProjectState: () => Promise<
|
|
226
|
-
updateProjectState: (key: string, value: any) => Promise<
|
|
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>;
|
|
227
227
|
};
|
|
228
228
|
task: {
|
|
229
|
-
createTask: (options:
|
|
230
|
-
createSimpleTask: (taskName: string, threadId?: string) => Promise<
|
|
231
|
-
getTaskList: (options?:
|
|
232
|
-
getTaskDetail: (options:
|
|
233
|
-
addStepToTask: (options:
|
|
234
|
-
getTaskMessages: (options:
|
|
235
|
-
updateTask: (taskId: string, updates:
|
|
236
|
-
updateSimpleTask: (taskId: string, taskName: string) => Promise<
|
|
237
|
-
deleteTask: (taskId: string) => Promise<
|
|
238
|
-
completeTask: (taskId: string) => Promise<
|
|
239
|
-
startTask: (taskId: string) => Promise<
|
|
240
|
-
getAllSteps: (options?:
|
|
241
|
-
getCurrentRunningStep: (options?:
|
|
242
|
-
updateStepStatus: (options:
|
|
243
|
-
completeStep: (options:
|
|
244
|
-
sendSteeringMessage: (options:
|
|
245
|
-
canTaskStart: (taskId: string) => Promise<
|
|
246
|
-
getTasksDependentOn: (taskId: string) => Promise<
|
|
247
|
-
getTasksReadyToStart: (options?:
|
|
248
|
-
getTaskDependencyChain: (taskId: string) => Promise<
|
|
249
|
-
getTaskStats: (options?:
|
|
250
|
-
toggleTaskCompletion: (taskId: string, completed: boolean) => Promise<
|
|
251
|
-
createQuickTask: (name: string, threadId?: string) => Promise<
|
|
252
|
-
getTasksStartedByMe: (userId: string, options?:
|
|
253
|
-
addTask: (params: import("../types/libFunctionTypes").TaskCreateOptions) => Promise<
|
|
254
|
-
getTasks: (filters?: import("../types/libFunctionTypes").TaskFilterOptions) => Promise<
|
|
255
|
-
getTasksByAgent: (agentId: string) => Promise<
|
|
256
|
-
getTasksByCategory: (category: string) => Promise<
|
|
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>;
|
|
257
257
|
attachJsonMemoryToTask: (taskId: string, memoryId: string) => Promise<any>;
|
|
258
258
|
attachMarktownMemoryJToTask: (taskId: string, memoryId: string) => Promise<any>;
|
|
259
259
|
attachToDoToTask: (taskId: string, todoId: string) => Promise<any>;
|
|
@@ -262,54 +262,74 @@ declare class Codebolt {
|
|
|
262
262
|
getAttachedMarkdownMemory: (taskId: string) => Promise<any>;
|
|
263
263
|
};
|
|
264
264
|
vectordb: {
|
|
265
|
-
getVector: (key: string) => Promise<
|
|
266
|
-
addVectorItem: (item: any) => Promise<
|
|
267
|
-
queryVectorItem: (key: string) => Promise<
|
|
268
|
-
queryVectorItems: (items: [], dbPath: string) => Promise<
|
|
265
|
+
getVector: (key: string) => Promise<import("@codebolt/types/sdk").GetVectorResponse>;
|
|
266
|
+
addVectorItem: (item: any) => Promise<import("@codebolt/types/sdk").AddVectorItemResponse>;
|
|
267
|
+
queryVectorItem: (key: string) => Promise<import("@codebolt/types/sdk").QueryVectorItemResponse>;
|
|
268
|
+
queryVectorItems: (items: [], dbPath: string) => Promise<import("@codebolt/types/sdk").QueryVectorItemResponse>;
|
|
269
269
|
};
|
|
270
270
|
debug: {
|
|
271
|
-
debug: (log: string, type: import("../modules/debug").logType) => Promise<
|
|
272
|
-
openDebugBrowser: (url: string, port: number) => Promise<
|
|
271
|
+
debug: (log: string, type: import("../modules/debug").logType) => Promise<import("@codebolt/types/sdk").DebugAddLogResponse>;
|
|
272
|
+
openDebugBrowser: (url: string, port: number) => Promise<import("@codebolt/types/sdk").OpenDebugBrowserResponse>;
|
|
273
273
|
};
|
|
274
274
|
tokenizer: {
|
|
275
|
-
addToken: (key: string) => Promise<
|
|
276
|
-
getToken: (key: string) => Promise<
|
|
275
|
+
addToken: (key: string) => Promise<import("@codebolt/types/sdk").AddTokenResponse>;
|
|
276
|
+
getToken: (key: string) => Promise<import("@codebolt/types/sdk").GetTokenResponse>;
|
|
277
277
|
};
|
|
278
278
|
chatSummary: {
|
|
279
|
-
summarizeAll: () => Promise<
|
|
279
|
+
summarizeAll: () => Promise<import("@codebolt/types/sdk").GetSummarizeAllResponse>;
|
|
280
280
|
summarize: (messages: {
|
|
281
281
|
role: string;
|
|
282
282
|
content: string;
|
|
283
|
-
}[], depth: number) => Promise<
|
|
283
|
+
}[], depth: number) => Promise<import("@codebolt/types/sdk").GetSummarizeResponse>;
|
|
284
284
|
};
|
|
285
285
|
mcp: {
|
|
286
|
-
getEnabledMCPServers: () => Promise<
|
|
287
|
-
getLocalMCPServers: () => Promise<
|
|
288
|
-
getMentionedMCPServers: (userMessage:
|
|
289
|
-
searchAvailableMCPServers: (query: string) => Promise<
|
|
290
|
-
listMcpFromServers: (toolBoxes: string[]) => Promise<
|
|
291
|
-
configureMCPServer: (name: string, config:
|
|
286
|
+
getEnabledMCPServers: () => Promise<import("@codebolt/types/sdk").GetEnabledToolBoxesResponse>;
|
|
287
|
+
getLocalMCPServers: () => Promise<import("@codebolt/types/sdk").GetLocalToolBoxesResponse>;
|
|
288
|
+
getMentionedMCPServers: (userMessage: import("@codebolt/types/sdk").MCPUserMessage) => Promise<import("@codebolt/types/sdk").GetAvailableToolBoxesResponse>;
|
|
289
|
+
searchAvailableMCPServers: (query: string) => Promise<import("@codebolt/types/sdk").SearchAvailableToolBoxesResponse>;
|
|
290
|
+
listMcpFromServers: (toolBoxes: string[]) => Promise<import("@codebolt/types/sdk").ListToolsFromToolBoxesResponse>;
|
|
291
|
+
configureMCPServer: (name: string, config: import("@codebolt/types/sdk").MCPConfiguration) => Promise<import("@codebolt/types/sdk").ConfigureToolBoxResponse>;
|
|
292
292
|
getTools: (tools: {
|
|
293
293
|
toolbox: string;
|
|
294
294
|
toolName: string;
|
|
295
|
-
}[]) => Promise<
|
|
296
|
-
executeTool: (toolbox: string, toolName: string, params:
|
|
295
|
+
}[]) => Promise<import("@codebolt/types/sdk").GetToolsResponse>;
|
|
296
|
+
executeTool: (toolbox: string, toolName: string, params: import("@codebolt/types/sdk").ToolParameters) => Promise<import("@codebolt/types/sdk").ExecuteToolResponse>;
|
|
297
297
|
};
|
|
298
298
|
agent: {
|
|
299
|
-
findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion:
|
|
300
|
-
startAgent: (agentId: string, task: string) => Promise<
|
|
301
|
-
getAgentsList: (type?:
|
|
302
|
-
getAgentsDetail: (agentList?: never[]) => Promise<
|
|
299
|
+
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>;
|
|
300
|
+
startAgent: (agentId: string, task: string) => Promise<import("@codebolt/types/sdk").TaskCompletionResponse>;
|
|
301
|
+
getAgentsList: (type?: import("@codebolt/types/enum").Agents) => Promise<import("@codebolt/types/sdk").ListAgentsResponse>;
|
|
302
|
+
getAgentsDetail: (agentList?: never[]) => Promise<import("@codebolt/types/sdk").AgentsDetailResponse>;
|
|
303
303
|
};
|
|
304
304
|
utils: {
|
|
305
|
-
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<
|
|
305
|
+
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("@codebolt/types/sdk").FsEditFileAndApplyDiffResponse>;
|
|
306
306
|
};
|
|
307
307
|
notify: NotificationFunctions;
|
|
308
|
+
memory: {
|
|
309
|
+
json: {
|
|
310
|
+
save: (json: any) => Promise<import("../modules/memory").SaveMemoryResponse>;
|
|
311
|
+
update: (memoryId: string, json: any) => Promise<import("../modules/memory").UpdateMemoryResponse>;
|
|
312
|
+
delete: (memoryId: string) => Promise<import("../modules/memory").DeleteMemoryResponse>;
|
|
313
|
+
list: (filters?: Record<string, unknown>) => Promise<import("../modules/memory").ListMemoryResponse>;
|
|
314
|
+
};
|
|
315
|
+
todo: {
|
|
316
|
+
save: (todo: import("@codebolt/types/agent-to-app-ws-schema").TodoData, metadata?: Record<string, unknown>) => Promise<import("../modules/memory").SaveMemoryResponse>;
|
|
317
|
+
update: (memoryId: string, todo: import("@codebolt/types/agent-to-app-ws-schema").TodoItem) => Promise<import("../modules/memory").UpdateMemoryResponse>;
|
|
318
|
+
delete: (memoryId: string) => Promise<import("../modules/memory").DeleteMemoryResponse>;
|
|
319
|
+
list: (filters?: Record<string, unknown>) => Promise<import("../modules/memory").ListMemoryResponse>;
|
|
320
|
+
};
|
|
321
|
+
markdown: {
|
|
322
|
+
save: (markdown: string, metadata?: Record<string, unknown>) => Promise<import("../modules/memory").SaveMemoryResponse>;
|
|
323
|
+
update: (memoryId: string, markdown: string, metadata?: Record<string, unknown>) => Promise<import("../modules/memory").UpdateMemoryResponse>;
|
|
324
|
+
delete: (memoryId: string) => Promise<import("../modules/memory").DeleteMemoryResponse>;
|
|
325
|
+
list: (filters?: Record<string, unknown>) => Promise<import("../modules/memory").ListMemoryResponse>;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
308
328
|
/**
|
|
309
329
|
* User message utilities for accessing current user message and context
|
|
310
330
|
*/
|
|
311
331
|
userMessage: {
|
|
312
|
-
getCurrent: () =>
|
|
332
|
+
getCurrent: () => FlatUserMessage | undefined;
|
|
313
333
|
getText: () => string;
|
|
314
334
|
getMentionedMCPs: () => string[];
|
|
315
335
|
getMentionedFiles: () => string[];
|
|
@@ -321,7 +341,7 @@ declare class Codebolt {
|
|
|
321
341
|
getSelection: () => string | undefined;
|
|
322
342
|
getMessageId: () => string | undefined;
|
|
323
343
|
getThreadId: () => string | undefined;
|
|
324
|
-
getProcessingConfig: () => AgentProcessingConfig;
|
|
344
|
+
getProcessingConfig: () => import("@codebolt/types/sdk").AgentProcessingConfig;
|
|
325
345
|
isProcessingEnabled: (type: "processMentionedMCPs" | "processRemixPrompt" | "processMentionedFiles" | "processMentionedAgents") => boolean;
|
|
326
346
|
setSessionData: (key: string, value: any) => void;
|
|
327
347
|
getSessionData: (key: string) => any;
|
package/dist/core/Codebolt.js
CHANGED
|
@@ -25,6 +25,7 @@ const debug_1 = __importDefault(require("../modules/debug"));
|
|
|
25
25
|
const tokenizer_1 = __importDefault(require("../modules/tokenizer"));
|
|
26
26
|
const history_1 = require("../modules/history");
|
|
27
27
|
const mcp_1 = __importDefault(require("../modules/mcp"));
|
|
28
|
+
const memory_1 = __importDefault(require("../modules/memory"));
|
|
28
29
|
const agent_1 = __importDefault(require("../modules/agent"));
|
|
29
30
|
const utils_1 = __importDefault(require("../modules/utils"));
|
|
30
31
|
const notificationfunctions_1 = require("../notificationfunctions");
|
|
@@ -67,6 +68,7 @@ class Codebolt {
|
|
|
67
68
|
this.agent = agent_1.default;
|
|
68
69
|
this.utils = utils_1.default;
|
|
69
70
|
this.notify = notificationfunctions_1.notificationFunctions;
|
|
71
|
+
this.memory = memory_1.default;
|
|
70
72
|
/**
|
|
71
73
|
* User message utilities for accessing current user message and context
|
|
72
74
|
*/
|
package/dist/modules/agent.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const codeboltAgent: {
|
|
|
6
6
|
* @param {string} task - The task for which an agent is needed.
|
|
7
7
|
* @returns {Promise<FindAgentByTaskResponse>} A promise that resolves with the agent details.
|
|
8
8
|
*/
|
|
9
|
-
findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion: AgentLocation, getFrom: FilterUsing.USE_VECTOR_DB) => Promise<FindAgentByTaskResponse>;
|
|
9
|
+
findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion: AgentLocation | undefined, getFrom: FilterUsing.USE_VECTOR_DB) => Promise<FindAgentByTaskResponse>;
|
|
10
10
|
/**
|
|
11
11
|
* Starts an agent for the specified task.
|
|
12
12
|
* @param {string} task - The task for which the agent should be started.
|
package/dist/modules/memory.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TodoItem, TodoData } from '@codebolt/types/agent-to-app-ws-schema';
|
|
1
2
|
export interface BaseMemoryResponse {
|
|
2
3
|
requestId: string;
|
|
3
4
|
success?: boolean;
|
|
@@ -29,6 +30,12 @@ declare const cbmemory: {
|
|
|
29
30
|
delete: (memoryId: string) => Promise<DeleteMemoryResponse>;
|
|
30
31
|
list: (filters?: Record<string, unknown>) => Promise<ListMemoryResponse>;
|
|
31
32
|
};
|
|
33
|
+
todo: {
|
|
34
|
+
save: (todo: TodoData, metadata?: Record<string, unknown>) => Promise<SaveMemoryResponse>;
|
|
35
|
+
update: (memoryId: string, todo: TodoItem) => Promise<UpdateMemoryResponse>;
|
|
36
|
+
delete: (memoryId: string) => Promise<DeleteMemoryResponse>;
|
|
37
|
+
list: (filters?: Record<string, unknown>) => Promise<ListMemoryResponse>;
|
|
38
|
+
};
|
|
32
39
|
markdown: {
|
|
33
40
|
save: (markdown: string, metadata?: Record<string, unknown>) => Promise<SaveMemoryResponse>;
|
|
34
41
|
update: (memoryId: string, markdown: string, metadata?: Record<string, unknown>) => Promise<UpdateMemoryResponse>;
|
package/dist/modules/memory.js
CHANGED
|
@@ -8,22 +8,20 @@ const crypto_1 = require("crypto");
|
|
|
8
8
|
const cbmemory = {
|
|
9
9
|
json: {
|
|
10
10
|
save: (json) => {
|
|
11
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
12
11
|
const event = {
|
|
13
12
|
type: 'memoryEvent',
|
|
14
13
|
action: 'saveMemory',
|
|
15
|
-
requestId,
|
|
14
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
16
15
|
format: 'json',
|
|
17
16
|
json
|
|
18
17
|
};
|
|
19
18
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'saveMemoryResponse');
|
|
20
19
|
},
|
|
21
20
|
update: (memoryId, json) => {
|
|
22
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
23
21
|
const event = {
|
|
24
22
|
type: 'memoryEvent',
|
|
25
23
|
action: 'updateMemory',
|
|
26
|
-
requestId,
|
|
24
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
27
25
|
format: 'json',
|
|
28
26
|
memoryId,
|
|
29
27
|
json
|
|
@@ -31,35 +29,76 @@ const cbmemory = {
|
|
|
31
29
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'updateMemoryResponse');
|
|
32
30
|
},
|
|
33
31
|
delete: (memoryId) => {
|
|
34
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
35
32
|
const event = {
|
|
36
33
|
type: 'memoryEvent',
|
|
37
34
|
action: 'deleteMemory',
|
|
38
|
-
requestId,
|
|
35
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
39
36
|
format: 'json',
|
|
40
37
|
memoryId
|
|
41
38
|
};
|
|
42
39
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'deleteMemoryResponse');
|
|
43
40
|
},
|
|
44
41
|
list: (filters = {}) => {
|
|
45
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
46
42
|
const event = {
|
|
47
43
|
type: 'memoryEvent',
|
|
48
44
|
action: 'listMemory',
|
|
49
|
-
requestId,
|
|
45
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
50
46
|
format: 'json',
|
|
51
47
|
filters
|
|
52
48
|
};
|
|
53
49
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'listMemoryResponse');
|
|
54
50
|
}
|
|
55
51
|
},
|
|
52
|
+
todo: {
|
|
53
|
+
save: (todo, metadata = {}) => {
|
|
54
|
+
const event = {
|
|
55
|
+
type: 'memoryEvent',
|
|
56
|
+
action: 'saveMemory',
|
|
57
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
58
|
+
format: 'todo',
|
|
59
|
+
todo,
|
|
60
|
+
metadata
|
|
61
|
+
};
|
|
62
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'saveMemoryResponse');
|
|
63
|
+
},
|
|
64
|
+
update: (memoryId, todo) => {
|
|
65
|
+
const event = {
|
|
66
|
+
type: 'memoryEvent',
|
|
67
|
+
action: 'updateMemory',
|
|
68
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
69
|
+
format: 'todo',
|
|
70
|
+
memoryId,
|
|
71
|
+
todo
|
|
72
|
+
};
|
|
73
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'updateMemoryResponse');
|
|
74
|
+
},
|
|
75
|
+
delete: (memoryId) => {
|
|
76
|
+
const event = {
|
|
77
|
+
type: 'memoryEvent',
|
|
78
|
+
action: 'deleteMemory',
|
|
79
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
80
|
+
format: 'todo',
|
|
81
|
+
memoryId
|
|
82
|
+
};
|
|
83
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'deleteMemoryResponse');
|
|
84
|
+
},
|
|
85
|
+
list: (filters = {}) => {
|
|
86
|
+
const event = {
|
|
87
|
+
type: 'memoryEvent',
|
|
88
|
+
action: 'listMemory',
|
|
89
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
90
|
+
format: 'todo',
|
|
91
|
+
filters
|
|
92
|
+
};
|
|
93
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'listMemoryResponse');
|
|
94
|
+
}
|
|
95
|
+
},
|
|
56
96
|
markdown: {
|
|
57
97
|
save: (markdown, metadata = {}) => {
|
|
58
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
59
98
|
const event = {
|
|
60
99
|
type: 'memoryEvent',
|
|
61
100
|
action: 'saveMemory',
|
|
62
|
-
requestId,
|
|
101
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
63
102
|
format: 'markdown',
|
|
64
103
|
markdown,
|
|
65
104
|
metadata
|
|
@@ -67,11 +106,10 @@ const cbmemory = {
|
|
|
67
106
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'saveMemoryResponse');
|
|
68
107
|
},
|
|
69
108
|
update: (memoryId, markdown, metadata = {}) => {
|
|
70
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
71
109
|
const event = {
|
|
72
110
|
type: 'memoryEvent',
|
|
73
111
|
action: 'updateMemory',
|
|
74
|
-
requestId,
|
|
112
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
75
113
|
format: 'markdown',
|
|
76
114
|
memoryId,
|
|
77
115
|
markdown,
|
|
@@ -80,22 +118,20 @@ const cbmemory = {
|
|
|
80
118
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'updateMemoryResponse');
|
|
81
119
|
},
|
|
82
120
|
delete: (memoryId) => {
|
|
83
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
84
121
|
const event = {
|
|
85
122
|
type: 'memoryEvent',
|
|
86
123
|
action: 'deleteMemory',
|
|
87
|
-
requestId,
|
|
124
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
88
125
|
format: 'markdown',
|
|
89
126
|
memoryId
|
|
90
127
|
};
|
|
91
128
|
return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'deleteMemoryResponse');
|
|
92
129
|
},
|
|
93
130
|
list: (filters = {}) => {
|
|
94
|
-
const requestId = (0, crypto_1.randomUUID)();
|
|
95
131
|
const event = {
|
|
96
132
|
type: 'memoryEvent',
|
|
97
133
|
action: 'listMemory',
|
|
98
|
-
requestId,
|
|
134
|
+
requestId: (0, crypto_1.randomUUID)(),
|
|
99
135
|
format: 'markdown',
|
|
100
136
|
filters
|
|
101
137
|
};
|
|
@@ -10,7 +10,7 @@ export declare const userMessageUtilities: {
|
|
|
10
10
|
* Get the current user message object
|
|
11
11
|
* @returns Current UserMessage or undefined
|
|
12
12
|
*/
|
|
13
|
-
getCurrent: () =>
|
|
13
|
+
getCurrent: () => import("@codebolt/types/sdk").FlatUserMessage | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* Get the user message text content
|
|
16
16
|
* @returns Message text string
|
|
@@ -70,7 +70,7 @@ export declare const userMessageUtilities: {
|
|
|
70
70
|
* Get processing configuration
|
|
71
71
|
* @returns Processing configuration object
|
|
72
72
|
*/
|
|
73
|
-
getProcessingConfig: () => AgentProcessingConfig;
|
|
73
|
+
getProcessingConfig: () => import("@codebolt/types/sdk").AgentProcessingConfig;
|
|
74
74
|
/**
|
|
75
75
|
* Check if a processing type is enabled
|
|
76
76
|
* @param type Processing type to check
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebolt/codeboltjs",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"uuid": "^11.1.0",
|
|
36
36
|
"ws": "^8.18.3",
|
|
37
37
|
"yargs": "^17.7.2",
|
|
38
|
-
"@codebolt/types": "1.0.
|
|
38
|
+
"@codebolt/types": "1.0.22"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/events": "^3.0.3",
|