@codebolt/codeboltjs 2.2.4 → 4.0.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.
@@ -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<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>;
38
+ createFile: (fileName: string, source: string, filePath: string) => Promise<FlatUserMessage>;
39
+ createFolder: (folderName: string, folderPath: string) => Promise<FlatUserMessage>;
40
+ readFile: (filePath: string) => Promise<FlatUserMessage>;
41
+ updateFile: (filename: string, filePath: string, newContent: string) => Promise<FlatUserMessage>;
42
+ deleteFile: (filename: string, filePath: string) => Promise<FlatUserMessage>;
43
+ deleteFolder: (foldername: string, folderpath: string) => Promise<FlatUserMessage>;
44
+ listFile: (folderPath: string, isRecursive?: boolean) => Promise<FlatUserMessage>;
45
+ listCodeDefinitionNames: (path: string) => Promise<FlatUserMessage>;
46
+ searchFiles: (path: string, regex: string, filePattern: string) => Promise<FlatUserMessage>;
47
47
  writeToFile: (relPath: string, newContent: string) => Promise<any>;
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>;
48
+ grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive?: boolean) => Promise<FlatUserMessage>;
49
+ fileSearch: (query: string) => Promise<FlatUserMessage>;
50
+ editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<FlatUserMessage>;
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<import("@codebolt/types/sdk").ReadManyFilesResponse>;
62
+ }) => Promise<FlatUserMessage>;
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<import("@codebolt/types/sdk").ListDirectoryResponse>;
70
+ }) => Promise<FlatUserMessage>;
71
71
  };
72
72
  git: {
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>;
73
+ init: (path: string) => Promise<FlatUserMessage>;
74
+ pull: () => Promise<FlatUserMessage>;
75
+ push: () => Promise<FlatUserMessage>;
76
+ status: () => Promise<FlatUserMessage>;
77
+ addAll: () => Promise<FlatUserMessage>;
78
+ commit: (message: string) => Promise<FlatUserMessage>;
79
+ checkout: (branch: string) => Promise<FlatUserMessage>;
80
+ branch: (branch: string) => Promise<FlatUserMessage>;
81
+ logs: (path: string) => Promise<FlatUserMessage>;
82
+ diff: (commitHash: string) => Promise<FlatUserMessage>;
83
83
  };
84
84
  llm: {
85
- inference: (params: import("@codebolt/types/sdk").LLMInferenceParams) => Promise<{
86
- completion: import("@codebolt/types/sdk").LLMCompletion;
85
+ inference: (params: FlatUserMessage) => Promise<{
86
+ completion: FlatUserMessage;
87
87
  }>;
88
88
  getModelConfig: (modelId?: string) => Promise<{
89
- config: import("@codebolt/types/sdk").LLMModelConfig | null;
89
+ config: FlatUserMessage | null;
90
90
  success: boolean;
91
91
  error?: string;
92
92
  }>;
93
93
  };
94
94
  browser: {
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>;
95
+ newPage: () => Promise<FlatUserMessage>;
96
+ getUrl: () => Promise<FlatUserMessage>;
97
+ goToPage: (url: string) => Promise<FlatUserMessage>;
98
+ screenshot: () => Promise<FlatUserMessage>;
99
+ getHTML: () => Promise<FlatUserMessage>;
100
+ getMarkdown: () => Promise<FlatUserMessage>;
101
101
  getPDF: () => void;
102
102
  pdfToText: () => void;
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>;
103
+ getContent: () => Promise<FlatUserMessage>;
104
+ getSnapShot: () => Promise<FlatUserMessage>;
105
+ getBrowserInfo: () => Promise<FlatUserMessage>;
106
+ extractText: () => Promise<FlatUserMessage>;
107
107
  close: () => void;
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>;
108
+ scroll: (direction: string, pixels: string) => Promise<FlatUserMessage>;
109
+ type: (elementid: string, text: string) => Promise<FlatUserMessage>;
110
+ click: (elementid: string) => Promise<FlatUserMessage>;
111
+ enter: () => Promise<FlatUserMessage>;
112
+ search: (elementid: string, query: string) => Promise<FlatUserMessage>;
113
113
  };
114
114
  chat: {
115
- getChatHistory: (threadId: string) => Promise<import("@codebolt/types/sdk").ChatMessage>;
115
+ getChatHistory: (threadId: string) => Promise<FlatUserMessage>;
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<import("@codebolt/types/sdk").UserMessage>;
118
+ waitforReply: (message: string) => Promise<FlatUserMessage>;
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<import("@codebolt/types/sdk").CommandError>;
154
- sendManualInterrupt(): Promise<import("@codebolt/types/sdk").TerminalInterruptResponse>;
153
+ executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<FlatUserMessage>;
154
+ sendManualInterrupt(): Promise<FlatUserMessage>;
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<import("@codebolt/types/sdk").MatchProblemResponse>;
178
- getMatcherList: () => Promise<import("@codebolt/types/sdk").GetMatcherListTreeResponse>;
179
- matchDetail: (matcher: string) => Promise<import("@codebolt/types/sdk").getMatchDetail>;
177
+ performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<FlatUserMessage>;
178
+ getMatcherList: () => Promise<FlatUserMessage>;
179
+ matchDetail: (matcher: string) => Promise<FlatUserMessage>;
180
180
  };
181
181
  crawler: {
182
182
  start: () => void;
@@ -208,102 +208,108 @@ declare class Codebolt {
208
208
  parseWarnings: (output: import("../modules/outputparsers").ParsableOutput) => string[];
209
209
  };
210
210
  project: {
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>;
211
+ getProjectSettings: () => Promise<FlatUserMessage>;
212
+ getProjectPath: () => Promise<FlatUserMessage>;
213
+ getRepoMap: (message: any) => Promise<FlatUserMessage>;
214
214
  runProject: () => void;
215
215
  getEditorFileStatus: () => Promise<any>;
216
216
  };
217
217
  dbmemory: {
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>;
218
+ addKnowledge: (key: string, value: FlatUserMessage) => Promise<FlatUserMessage>;
219
+ getKnowledge: (key: string) => Promise<FlatUserMessage>;
220
220
  };
221
221
  cbstate: {
222
222
  getApplicationState: () => Promise<import("../types/commonTypes").ApplicationState>;
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>;
223
+ addToAgentState: (key: string, value: string) => Promise<FlatUserMessage>;
224
+ getAgentState: () => Promise<FlatUserMessage>;
225
+ getProjectState: () => Promise<FlatUserMessage>;
226
+ updateProjectState: (key: string, value: any) => Promise<FlatUserMessage>;
227
227
  };
228
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>;
229
+ createTask: (options: FlatUserMessage) => Promise<FlatUserMessage>;
230
+ createSimpleTask: (taskName: string, threadId?: string) => Promise<FlatUserMessage>;
231
+ getTaskList: (options?: FlatUserMessage) => Promise<FlatUserMessage>;
232
+ getTaskDetail: (options: FlatUserMessage) => Promise<FlatUserMessage>;
233
+ addStepToTask: (options: FlatUserMessage) => Promise<FlatUserMessage>;
234
+ getTaskMessages: (options: FlatUserMessage) => Promise<FlatUserMessage>;
235
+ updateTask: (taskId: string, updates: FlatUserMessage) => Promise<FlatUserMessage>;
236
+ updateSimpleTask: (taskId: string, taskName: string) => Promise<FlatUserMessage>;
237
+ deleteTask: (taskId: string) => Promise<FlatUserMessage>;
238
+ completeTask: (taskId: string) => Promise<FlatUserMessage>;
239
+ startTask: (taskId: string) => Promise<FlatUserMessage>;
240
+ getAllSteps: (options?: FlatUserMessage) => Promise<FlatUserMessage>;
241
+ getCurrentRunningStep: (options?: FlatUserMessage) => Promise<FlatUserMessage>;
242
+ updateStepStatus: (options: FlatUserMessage) => Promise<FlatUserMessage>;
243
+ completeStep: (options: FlatUserMessage) => Promise<FlatUserMessage>;
244
+ sendSteeringMessage: (options: FlatUserMessage) => Promise<FlatUserMessage>;
245
+ canTaskStart: (taskId: string) => Promise<FlatUserMessage>;
246
+ getTasksDependentOn: (taskId: string) => Promise<FlatUserMessage>;
247
+ getTasksReadyToStart: (options?: FlatUserMessage) => Promise<FlatUserMessage>;
248
+ getTaskDependencyChain: (taskId: string) => Promise<FlatUserMessage>;
249
+ getTaskStats: (options?: FlatUserMessage) => Promise<FlatUserMessage>;
250
+ toggleTaskCompletion: (taskId: string, completed: boolean) => Promise<FlatUserMessage>;
251
+ createQuickTask: (name: string, threadId?: string) => Promise<FlatUserMessage>;
252
+ getTasksStartedByMe: (userId: string, options?: FlatUserMessage) => Promise<FlatUserMessage>;
253
+ addTask: (params: import("../types/libFunctionTypes").TaskCreateOptions) => Promise<FlatUserMessage>;
254
+ getTasks: (filters?: import("../types/libFunctionTypes").TaskFilterOptions) => Promise<FlatUserMessage>;
255
+ getTasksByAgent: (agentId: string) => Promise<FlatUserMessage>;
256
+ getTasksByCategory: (category: string) => Promise<FlatUserMessage>;
257
+ attachJsonMemoryToTask: (taskId: string, memoryId: string) => Promise<any>;
258
+ attachMarktownMemoryJToTask: (taskId: string, memoryId: string) => Promise<any>;
259
+ attachToDoToTask: (taskId: string, todoId: string) => Promise<any>;
260
+ getAttachedTodos: (taskId: string) => Promise<any>;
261
+ getAttachedJsonMemory: (taskId: string) => Promise<any>;
262
+ getAttachedMarkdownMemory: (taskId: string) => Promise<any>;
257
263
  };
258
264
  vectordb: {
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>;
265
+ getVector: (key: string) => Promise<FlatUserMessage>;
266
+ addVectorItem: (item: any) => Promise<FlatUserMessage>;
267
+ queryVectorItem: (key: string) => Promise<FlatUserMessage>;
268
+ queryVectorItems: (items: [], dbPath: string) => Promise<FlatUserMessage>;
263
269
  };
264
270
  debug: {
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>;
271
+ debug: (log: string, type: import("../modules/debug").logType) => Promise<FlatUserMessage>;
272
+ openDebugBrowser: (url: string, port: number) => Promise<FlatUserMessage>;
267
273
  };
268
274
  tokenizer: {
269
- addToken: (key: string) => Promise<import("@codebolt/types/sdk").AddTokenResponse>;
270
- getToken: (key: string) => Promise<import("@codebolt/types/sdk").GetTokenResponse>;
275
+ addToken: (key: string) => Promise<FlatUserMessage>;
276
+ getToken: (key: string) => Promise<FlatUserMessage>;
271
277
  };
272
278
  chatSummary: {
273
- summarizeAll: () => Promise<import("@codebolt/types/sdk").GetSummarizeAllResponse>;
279
+ summarizeAll: () => Promise<FlatUserMessage>;
274
280
  summarize: (messages: {
275
281
  role: string;
276
282
  content: string;
277
- }[], depth: number) => Promise<import("@codebolt/types/sdk").GetSummarizeResponse>;
283
+ }[], depth: number) => Promise<FlatUserMessage>;
278
284
  };
279
285
  mcp: {
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>;
286
+ getEnabledMCPServers: () => Promise<FlatUserMessage>;
287
+ getLocalMCPServers: () => Promise<FlatUserMessage>;
288
+ getMentionedMCPServers: (userMessage: FlatUserMessage) => Promise<FlatUserMessage>;
289
+ searchAvailableMCPServers: (query: string) => Promise<FlatUserMessage>;
290
+ listMcpFromServers: (toolBoxes: string[]) => Promise<FlatUserMessage>;
291
+ configureMCPServer: (name: string, config: FlatUserMessage) => Promise<FlatUserMessage>;
286
292
  getTools: (tools: {
287
293
  toolbox: string;
288
294
  toolName: string;
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>;
295
+ }[]) => Promise<FlatUserMessage>;
296
+ executeTool: (toolbox: string, toolName: string, params: FlatUserMessage) => Promise<FlatUserMessage>;
291
297
  };
292
298
  agent: {
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>;
299
+ findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion: FlatUserMessage, getFrom: FlatUserMessage) => Promise<FlatUserMessage>;
300
+ startAgent: (agentId: string, task: string) => Promise<FlatUserMessage>;
301
+ getAgentsList: (type?: FlatUserMessage) => Promise<FlatUserMessage>;
302
+ getAgentsDetail: (agentList?: never[]) => Promise<FlatUserMessage>;
297
303
  };
298
304
  utils: {
299
- editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("@codebolt/types/sdk").FsEditFileAndApplyDiffResponse>;
305
+ editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<FlatUserMessage>;
300
306
  };
301
307
  notify: NotificationFunctions;
302
308
  /**
303
309
  * User message utilities for accessing current user message and context
304
310
  */
305
311
  userMessage: {
306
- getCurrent: () => FlatUserMessage | undefined;
312
+ getCurrent: () => any;
307
313
  getText: () => string;
308
314
  getMentionedMCPs: () => string[];
309
315
  getMentionedFiles: () => string[];
@@ -315,7 +321,7 @@ declare class Codebolt {
315
321
  getSelection: () => string | undefined;
316
322
  getMessageId: () => string | undefined;
317
323
  getThreadId: () => string | undefined;
318
- getProcessingConfig: () => import("@codebolt/types/sdk").AgentProcessingConfig;
324
+ getProcessingConfig: () => AgentProcessingConfig;
319
325
  isProcessingEnabled: (type: "processMentionedMCPs" | "processRemixPrompt" | "processMentionedFiles" | "processMentionedAgents") => boolean;
320
326
  setSessionData: (key: string, value: any) => void;
321
327
  getSessionData: (key: string) => any;
@@ -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 | undefined, getFrom: FilterUsing.USE_VECTOR_DB) => Promise<FindAgentByTaskResponse>;
9
+ findAgent: (task: string, maxResult: number | undefined, agents: never[] | undefined, agentLocaltion: AgentLocation, 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.
@@ -0,0 +1,39 @@
1
+ export interface BaseMemoryResponse {
2
+ requestId: string;
3
+ success?: boolean;
4
+ message?: string;
5
+ error?: string;
6
+ }
7
+ export interface SaveMemoryResponse extends BaseMemoryResponse {
8
+ type: 'saveMemoryResponse';
9
+ memoryId?: string;
10
+ data?: unknown;
11
+ }
12
+ export interface UpdateMemoryResponse extends BaseMemoryResponse {
13
+ type: 'updateMemoryResponse';
14
+ memoryId?: string;
15
+ data?: unknown;
16
+ }
17
+ export interface DeleteMemoryResponse extends BaseMemoryResponse {
18
+ type: 'deleteMemoryResponse';
19
+ }
20
+ export interface ListMemoryResponse extends BaseMemoryResponse {
21
+ type: 'listMemoryResponse';
22
+ items?: unknown[];
23
+ }
24
+ export type MemoryServiceResponse = SaveMemoryResponse | UpdateMemoryResponse | DeleteMemoryResponse | ListMemoryResponse;
25
+ declare const cbmemory: {
26
+ json: {
27
+ save: (json: any) => Promise<SaveMemoryResponse>;
28
+ update: (memoryId: string, json: any) => Promise<UpdateMemoryResponse>;
29
+ delete: (memoryId: string) => Promise<DeleteMemoryResponse>;
30
+ list: (filters?: Record<string, unknown>) => Promise<ListMemoryResponse>;
31
+ };
32
+ markdown: {
33
+ save: (markdown: string, metadata?: Record<string, unknown>) => Promise<SaveMemoryResponse>;
34
+ update: (memoryId: string, markdown: string, metadata?: Record<string, unknown>) => Promise<UpdateMemoryResponse>;
35
+ delete: (memoryId: string) => Promise<DeleteMemoryResponse>;
36
+ list: (filters?: Record<string, unknown>) => Promise<ListMemoryResponse>;
37
+ };
38
+ };
39
+ export default cbmemory;
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const websocket_1 = __importDefault(require("../core/websocket"));
7
+ const crypto_1 = require("crypto");
8
+ const cbmemory = {
9
+ json: {
10
+ save: (json) => {
11
+ const requestId = (0, crypto_1.randomUUID)();
12
+ const event = {
13
+ type: 'memoryEvent',
14
+ action: 'saveMemory',
15
+ requestId,
16
+ format: 'json',
17
+ json
18
+ };
19
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'saveMemoryResponse');
20
+ },
21
+ update: (memoryId, json) => {
22
+ const requestId = (0, crypto_1.randomUUID)();
23
+ const event = {
24
+ type: 'memoryEvent',
25
+ action: 'updateMemory',
26
+ requestId,
27
+ format: 'json',
28
+ memoryId,
29
+ json
30
+ };
31
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'updateMemoryResponse');
32
+ },
33
+ delete: (memoryId) => {
34
+ const requestId = (0, crypto_1.randomUUID)();
35
+ const event = {
36
+ type: 'memoryEvent',
37
+ action: 'deleteMemory',
38
+ requestId,
39
+ format: 'json',
40
+ memoryId
41
+ };
42
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'deleteMemoryResponse');
43
+ },
44
+ list: (filters = {}) => {
45
+ const requestId = (0, crypto_1.randomUUID)();
46
+ const event = {
47
+ type: 'memoryEvent',
48
+ action: 'listMemory',
49
+ requestId,
50
+ format: 'json',
51
+ filters
52
+ };
53
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'listMemoryResponse');
54
+ }
55
+ },
56
+ markdown: {
57
+ save: (markdown, metadata = {}) => {
58
+ const requestId = (0, crypto_1.randomUUID)();
59
+ const event = {
60
+ type: 'memoryEvent',
61
+ action: 'saveMemory',
62
+ requestId,
63
+ format: 'markdown',
64
+ markdown,
65
+ metadata
66
+ };
67
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'saveMemoryResponse');
68
+ },
69
+ update: (memoryId, markdown, metadata = {}) => {
70
+ const requestId = (0, crypto_1.randomUUID)();
71
+ const event = {
72
+ type: 'memoryEvent',
73
+ action: 'updateMemory',
74
+ requestId,
75
+ format: 'markdown',
76
+ memoryId,
77
+ markdown,
78
+ metadata
79
+ };
80
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'updateMemoryResponse');
81
+ },
82
+ delete: (memoryId) => {
83
+ const requestId = (0, crypto_1.randomUUID)();
84
+ const event = {
85
+ type: 'memoryEvent',
86
+ action: 'deleteMemory',
87
+ requestId,
88
+ format: 'markdown',
89
+ memoryId
90
+ };
91
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'deleteMemoryResponse');
92
+ },
93
+ list: (filters = {}) => {
94
+ const requestId = (0, crypto_1.randomUUID)();
95
+ const event = {
96
+ type: 'memoryEvent',
97
+ action: 'listMemory',
98
+ requestId,
99
+ format: 'markdown',
100
+ filters
101
+ };
102
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'listMemoryResponse');
103
+ }
104
+ }
105
+ };
106
+ exports.default = cbmemory;
@@ -176,6 +176,12 @@ declare const taskService: {
176
176
  * @deprecated Use getTaskList instead
177
177
  */
178
178
  getTasksByCategory: (category: string) => Promise<GetTaskListResponse>;
179
+ attachJsonMemoryToTask: (taskId: string, memoryId: string) => Promise<any>;
180
+ attachMarktownMemoryJToTask: (taskId: string, memoryId: string) => Promise<any>;
181
+ attachToDoToTask: (taskId: string, todoId: string) => Promise<any>;
182
+ getAttachedTodos: (taskId: string) => Promise<any>;
183
+ getAttachedJsonMemory: (taskId: string) => Promise<any>;
184
+ getAttachedMarkdownMemory: (taskId: string) => Promise<any>;
179
185
  };
180
186
  export type { Task, ExtendedTask, Step, ExtendedStep, TaskMessage, MessageData, ResponseMessageData, TaskStats, CreateTaskOptions, UpdateTaskOptions, GetTaskListOptions, AddStepToTaskOptions, GetTaskDetailOptions, GetTaskMessagesOptions, UpdateStepStatusOptions, CompleteStepOptions, SendSteeringMessageOptions, GetAllStepsOptions, GetActiveStepOptions, DeleteTaskOptions, CompleteTaskOptions, StartTaskOptions, CanTaskStartOptions, GetTasksDependentOnOptions, GetTasksReadyToStartOptions, GetTaskDependencyChainOptions, GetTaskStatsOptions, TaskResponse, TaskListResponse, StepResponse, StepListResponse, TaskMessagesResponse, ActiveStepResponse, SendSteeringMessageResponse, DeleteTaskResponse, CanTaskStartResponse, TaskStatsResponse, CreateTaskResponse, GetTaskListResponse, AddStepToTaskResponse, GetTaskDetailResponse, GetTaskMessagesResponse, GetAllStepsResponse, GetCurrentRunningStepResponse, UpdateStepStatusResponse, CompleteStepResponse, UpdateTaskResponse, CompleteTaskResponse, StartTaskResponse, GetTasksDependentOnResponse, GetTasksReadyToStartResponse, GetTaskDependencyChainResponse, GetTaskStatsResponse, Position, FlowData };
181
187
  export type { LegacyTask as Task_Legacy, LegacySubTask as SubTask, LegacyTaskResponse as TaskResponse_Legacy, LegacyTaskCreateOptions as TaskCreateOptions_Legacy, LegacyTaskUpdateOptions as TaskUpdateOptions_Legacy, AddSubTaskOptions, UpdateSubTaskOptions, TaskFilterOptions, TaskMarkdownImportOptions, TaskMarkdownExportOptions };
@@ -436,6 +436,69 @@ const taskService = {
436
436
  // Note: The new API doesn't have category filtering built-in
437
437
  // This would need to be implemented as post-processing
438
438
  return taskService.getTaskList();
439
+ },
440
+ attachJsonMemoryToTask: (taskId, memoryId) => {
441
+ const requestId = (0, crypto_1.randomUUID)();
442
+ const event = {
443
+ type: 'taskEvent',
444
+ action: 'attachJsonMemoryToTask',
445
+ requestId,
446
+ taskId,
447
+ memoryId
448
+ };
449
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'attachJsonMemoryToTaskResponse');
450
+ },
451
+ attachMarktownMemoryJToTask: (taskId, memoryId) => {
452
+ const requestId = (0, crypto_1.randomUUID)();
453
+ const event = {
454
+ type: 'taskEvent',
455
+ action: 'attachMarktownMemoryJToTask',
456
+ requestId,
457
+ taskId,
458
+ memoryId
459
+ };
460
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'attachJsonMemoryToTaskResponse');
461
+ },
462
+ attachToDoToTask: (taskId, todoId) => {
463
+ const requestId = (0, crypto_1.randomUUID)();
464
+ const event = {
465
+ type: 'taskEvent',
466
+ action: 'attachToDoToTask',
467
+ requestId,
468
+ taskId,
469
+ todoId
470
+ };
471
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'attachToDoToTaskResponse');
472
+ },
473
+ getAttachedTodos: (taskId) => {
474
+ const requestId = (0, crypto_1.randomUUID)();
475
+ const event = {
476
+ type: 'taskEvent',
477
+ action: 'attachToDoToTask',
478
+ requestId,
479
+ taskId,
480
+ };
481
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'attachToDoToTaskResponse');
482
+ },
483
+ getAttachedJsonMemory: (taskId) => {
484
+ const requestId = (0, crypto_1.randomUUID)();
485
+ const event = {
486
+ type: 'taskEvent',
487
+ action: 'getAttachedJsonMemory',
488
+ requestId,
489
+ taskId,
490
+ };
491
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'getAttachedJsonMemoryResponse');
492
+ },
493
+ getAttachedMarkdownMemory: (taskId) => {
494
+ const requestId = (0, crypto_1.randomUUID)();
495
+ const event = {
496
+ type: 'taskEvent',
497
+ action: 'getAttachedMarkdownMemory',
498
+ requestId,
499
+ taskId,
500
+ };
501
+ return websocket_1.default.messageManager.sendAndWaitForResponse(event, 'getAttachedMarkdownMemoryResponse');
439
502
  }
440
503
  };
441
504
  exports.default = taskService;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cbTodo = {
4
+ createTodos: () => {
5
+ },
6
+ getTodos: (taskId) => {
7
+ }
8
+ };
9
+ module.exports = cbTodo;
@@ -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: () => import("@codebolt/types/sdk").FlatUserMessage | undefined;
13
+ getCurrent: () => any;
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: () => import("@codebolt/types/sdk").AgentProcessingConfig;
73
+ getProcessingConfig: () => 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": "2.2.4",
3
+ "version": "4.0.2",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -9,18 +9,9 @@
9
9
  "files": [
10
10
  "dist/**/*",
11
11
  "README.md",
12
- "LICENSE"
12
+ "LICENSE",
13
+ "package.json"
13
14
  ],
14
- "scripts": {
15
- "build": "tsc && node script/copy-wasm.js",
16
- "build:webpack": "webpack",
17
- "build:all": "npm run build && npm run build:webpack",
18
- "build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
19
- "build:jsondocs": "typedoc --plugin typedoc-plugin-missing-exports --json out.json --pretty",
20
- "test": "echo \"Integration tests require WebSocket server - skipping for release\" && exit 0",
21
- "clean": "powershell -Command \"Remove-Item -Path 'dist' -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item -Path 'build' -Recurse -Force -ErrorAction SilentlyContinue\"",
22
- "lint": "eslint src/**/*.ts && tsc --noEmit"
23
- },
24
15
  "repository": {
25
16
  "type": "git",
26
17
  "url": "git+https://github.com/codeboltai/codeboltjs.git",
@@ -32,7 +23,6 @@
32
23
  "access": "public"
33
24
  },
34
25
  "dependencies": {
35
- "@codebolt/types": "workspace:*",
36
26
  "@types/uuid": "^10.0.0",
37
27
  "buffer": "^6.0.3",
38
28
  "execa": "^9.5.2",
@@ -44,7 +34,8 @@
44
34
  "util": "^0.12.5",
45
35
  "uuid": "^11.1.0",
46
36
  "ws": "^8.18.3",
47
- "yargs": "^17.7.2"
37
+ "yargs": "^17.7.2",
38
+ "@codebolt/types": "1.0.21"
48
39
  },
49
40
  "devDependencies": {
50
41
  "@types/events": "^3.0.3",
@@ -70,5 +61,15 @@
70
61
  "types": "./dist/index.d.ts",
71
62
  "default": "./dist/index.js"
72
63
  }
64
+ },
65
+ "scripts": {
66
+ "build": "tsc && node script/copy-wasm.js",
67
+ "build:webpack": "webpack",
68
+ "build:all": "npm run build && npm run build:webpack",
69
+ "build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
70
+ "build:jsondocs": "typedoc --plugin typedoc-plugin-missing-exports --json out.json --pretty",
71
+ "test": "echo \"Integration tests require WebSocket server - skipping for release\" && exit 0",
72
+ "clean": "powershell -Command \"Remove-Item -Path 'dist' -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item -Path 'build' -Recurse -Force -ErrorAction SilentlyContinue\"",
73
+ "lint": "eslint src/**/*.ts && tsc --noEmit"
73
74
  }
74
- }
75
+ }