@codebolt/codeboltjs 2.0.17 → 2.2.1
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 +48 -53
- package/dist/core/messageManager.d.ts +0 -1
- package/dist/modules/chat.d.ts +1 -1
- package/dist/modules/codeparsers.js +24 -15
- package/dist/modules/codeutils.js +19 -9
- package/dist/modules/task.d.ts +1 -1
- package/dist/modules/terminal.d.ts +0 -1
- package/dist/notificationfunctions/agent.js +4 -4
- package/dist/notificationfunctions/browser.js +5 -5
- package/dist/notificationfunctions/chat.js +5 -5
- package/dist/notificationfunctions/codeutils.js +5 -5
- package/dist/notificationfunctions/crawler.js +5 -5
- package/dist/notificationfunctions/dbmemory.js +5 -5
- package/dist/notificationfunctions/fs.js +23 -23
- package/dist/notificationfunctions/git.js +25 -25
- package/dist/notificationfunctions/history.js +5 -5
- package/dist/notificationfunctions/llm.js +5 -5
- package/dist/notificationfunctions/mcp.js +9 -9
- package/dist/notificationfunctions/search.js +7 -7
- package/dist/notificationfunctions/system.js +3 -3
- package/dist/notificationfunctions/terminal.js +3 -3
- package/dist/notificationfunctions/todo.js +7 -7
- package/dist/notificationfunctions/utils.js +8 -8
- package/dist/types/InternalTypes.d.ts +0 -3
- package/dist/types/commonTypes.d.ts +2 -2
- package/dist/types/socketMessageTypes.d.ts +0 -2
- package/dist/types/socketMessageTypes.js +6 -7
- package/package.json +23 -29
- package/dist/utils/docutils.d.ts +0 -9
- package/dist/utils/docutils.js +0 -69
- package/dist/utils/mcpServer.d.ts +0 -481
- package/dist/utils/mcpServer.js +0 -779
- package/dist/utils/parse-source-code/index.d.ts +0 -9
- package/dist/utils/parse-source-code/index.js +0 -233
- package/dist/utils/parse-source-code/languageParser.d.ts +0 -2
- package/dist/utils/parse-source-code/languageParser.js +0 -137
- package/dist/utils/parse-source-code/queries/c-sharp.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/c-sharp.js +0 -25
- package/dist/utils/parse-source-code/queries/c.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/c.js +0 -17
- package/dist/utils/parse-source-code/queries/cpp.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/cpp.js +0 -25
- package/dist/utils/parse-source-code/queries/go.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/go.js +0 -29
- package/dist/utils/parse-source-code/queries/index.d.ts +0 -12
- package/dist/utils/parse-source-code/queries/index.js +0 -30
- package/dist/utils/parse-source-code/queries/java.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/java.js +0 -17
- package/dist/utils/parse-source-code/queries/javascript.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/javascript.js +0 -67
- package/dist/utils/parse-source-code/queries/php.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/php.js +0 -17
- package/dist/utils/parse-source-code/queries/python.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/python.js +0 -13
- package/dist/utils/parse-source-code/queries/ruby.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/ruby.js +0 -54
- package/dist/utils/parse-source-code/queries/rust.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/rust.js +0 -18
- package/dist/utils/parse-source-code/queries/swift.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/swift.js +0 -47
- package/dist/utils/parse-source-code/queries/typescript.d.ts +0 -2
- package/dist/utils/parse-source-code/queries/typescript.js +0 -34
- package/dist/utils/parse-source-code/tree-sitter-c.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-c_sharp.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-cpp.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-go.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-java.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-javascript.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-php.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-python.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-ruby.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-rust.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-swift.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-tsx.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter-typescript.wasm +0 -0
- package/dist/utils/parse-source-code/tree-sitter.wasm +0 -0
- package/dist/utils.d.ts +0 -2
- package/dist/utils.js +0 -10
package/dist/core/Codebolt.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import WebSocket from 'ws';
|
|
3
2
|
import { type NotificationFunctions } from '../notificationfunctions';
|
|
4
3
|
import type { UserMessage } from '../types/libFunctionTypes';
|
|
@@ -51,7 +50,7 @@ declare class Codebolt {
|
|
|
51
50
|
result: any;
|
|
52
51
|
}>;
|
|
53
52
|
writeToFile: (relPath: string, newContent: string) => Promise<any>;
|
|
54
|
-
grepSearch: (path: string, query: string, includePattern?: string
|
|
53
|
+
grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive?: boolean) => Promise<{
|
|
55
54
|
success: boolean;
|
|
56
55
|
result: any;
|
|
57
56
|
}>;
|
|
@@ -59,7 +58,7 @@ declare class Codebolt {
|
|
|
59
58
|
success: boolean;
|
|
60
59
|
result: any;
|
|
61
60
|
}>;
|
|
62
|
-
editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string
|
|
61
|
+
editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<{
|
|
63
62
|
success: boolean;
|
|
64
63
|
result: any;
|
|
65
64
|
}>;
|
|
@@ -79,18 +78,14 @@ declare class Codebolt {
|
|
|
79
78
|
llm: {
|
|
80
79
|
inference: (params: {
|
|
81
80
|
messages: import("../types/libFunctionTypes").Message[];
|
|
82
|
-
tools?: any[]
|
|
83
|
-
tool_choice?: string
|
|
84
|
-
full?: boolean
|
|
85
|
-
llmrole?: string
|
|
86
|
-
max_tokens?: number
|
|
87
|
-
temperature?: number
|
|
88
|
-
stream?: boolean
|
|
89
|
-
}, llmrole?: string
|
|
90
|
-
/**
|
|
91
|
-
* @constructor
|
|
92
|
-
* @description Initializes the websocket connection.
|
|
93
|
-
*/
|
|
81
|
+
tools?: any[];
|
|
82
|
+
tool_choice?: string;
|
|
83
|
+
full?: boolean;
|
|
84
|
+
llmrole?: string;
|
|
85
|
+
max_tokens?: number;
|
|
86
|
+
temperature?: number;
|
|
87
|
+
stream?: boolean;
|
|
88
|
+
}, llmrole?: string) => Promise<{
|
|
94
89
|
completion: any;
|
|
95
90
|
}>;
|
|
96
91
|
legacyInference: (message: string, llmrole: string) => Promise<import("../types/socketMessageTypes").LLMResponse>;
|
|
@@ -117,10 +112,10 @@ declare class Codebolt {
|
|
|
117
112
|
};
|
|
118
113
|
chat: {
|
|
119
114
|
getChatHistory: () => Promise<import("../types/socketMessageTypes").ChatMessage[]>;
|
|
120
|
-
setRequestHandler: (handler: (request: any, response: (data: any) => void) => void |
|
|
115
|
+
setRequestHandler: (handler: (request: any, response: (data: any) => void) => Promise<void> | void) => void;
|
|
121
116
|
sendMessage: (message: string, payload: any) => void;
|
|
122
117
|
waitforReply: (message: string) => Promise<import("../types/socketMessageTypes").UserMessage>;
|
|
123
|
-
processStarted: (onStopClicked?: (
|
|
118
|
+
processStarted: (onStopClicked?: (message: any) => void) => {
|
|
124
119
|
stopProcess: () => void;
|
|
125
120
|
cleanup: () => void;
|
|
126
121
|
} | {
|
|
@@ -131,53 +126,53 @@ declare class Codebolt {
|
|
|
131
126
|
processFinished: () => void;
|
|
132
127
|
sendConfirmationRequest: (confirmationMessage: string, buttons?: string[], withFeedback?: boolean) => Promise<string>;
|
|
133
128
|
askQuestion: (question: string, buttons?: string[], withFeedback?: boolean) => Promise<string>;
|
|
134
|
-
sendNotificationEvent: (notificationMessage: string, type: "
|
|
129
|
+
sendNotificationEvent: (notificationMessage: string, type: "debug" | "git" | "planner" | "browser" | "editor" | "terminal" | "preview") => void;
|
|
135
130
|
};
|
|
136
131
|
terminal: {
|
|
137
132
|
eventEmitter: {
|
|
138
|
-
cleanup?: (
|
|
133
|
+
cleanup?: () => void;
|
|
139
134
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
140
|
-
addListener<
|
|
141
|
-
on<
|
|
142
|
-
once<
|
|
143
|
-
removeListener<
|
|
144
|
-
off<
|
|
145
|
-
removeAllListeners(eventName?: string | symbol | undefined): any;
|
|
146
|
-
setMaxListeners(n: number): any;
|
|
135
|
+
addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
136
|
+
on<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
137
|
+
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
138
|
+
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
139
|
+
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
140
|
+
removeAllListeners(eventName?: string | symbol | undefined): /*elided*/ any;
|
|
141
|
+
setMaxListeners(n: number): /*elided*/ any;
|
|
147
142
|
getMaxListeners(): number;
|
|
148
|
-
listeners<
|
|
149
|
-
rawListeners<
|
|
150
|
-
emit<
|
|
151
|
-
listenerCount<
|
|
152
|
-
prependListener<
|
|
153
|
-
prependOnceListener<
|
|
143
|
+
listeners<K>(eventName: string | symbol): Function[];
|
|
144
|
+
rawListeners<K>(eventName: string | symbol): Function[];
|
|
145
|
+
emit<K>(eventName: string | symbol, ...args: any[]): boolean;
|
|
146
|
+
listenerCount<K>(eventName: string | symbol, listener?: Function | undefined): number;
|
|
147
|
+
prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
148
|
+
prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
154
149
|
eventNames(): (string | symbol)[];
|
|
155
150
|
};
|
|
156
151
|
executeCommand: (command: string, returnEmptyStringOnSuccess?: boolean) => Promise<any>;
|
|
157
152
|
executeCommandRunUntilError: (command: string, executeInMain?: boolean) => Promise<import("../types/socketMessageTypes").CommandError>;
|
|
158
153
|
sendManualInterrupt(): Promise<import("../types/socketMessageTypes").TerminalInterruptResponse>;
|
|
159
154
|
executeCommandWithStream(command: string, executeInMain?: boolean): {
|
|
160
|
-
cleanup?: (
|
|
155
|
+
cleanup?: () => void;
|
|
161
156
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
162
|
-
addListener<
|
|
163
|
-
on<
|
|
164
|
-
once<
|
|
165
|
-
removeListener<
|
|
166
|
-
off<
|
|
167
|
-
removeAllListeners(eventName?: string | symbol | undefined): any;
|
|
168
|
-
setMaxListeners(n: number): any;
|
|
157
|
+
addListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
158
|
+
on<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
159
|
+
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
160
|
+
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
161
|
+
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
162
|
+
removeAllListeners(eventName?: string | symbol | undefined): /*elided*/ any;
|
|
163
|
+
setMaxListeners(n: number): /*elided*/ any;
|
|
169
164
|
getMaxListeners(): number;
|
|
170
|
-
listeners<
|
|
171
|
-
rawListeners<
|
|
172
|
-
emit<
|
|
173
|
-
listenerCount<
|
|
174
|
-
prependListener<
|
|
175
|
-
prependOnceListener<
|
|
165
|
+
listeners<K>(eventName: string | symbol): Function[];
|
|
166
|
+
rawListeners<K>(eventName: string | symbol): Function[];
|
|
167
|
+
emit<K>(eventName: string | symbol, ...args: any[]): boolean;
|
|
168
|
+
listenerCount<K>(eventName: string | symbol, listener?: Function | undefined): number;
|
|
169
|
+
prependListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
170
|
+
prependOnceListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
176
171
|
eventNames(): (string | symbol)[];
|
|
177
172
|
};
|
|
178
173
|
};
|
|
179
174
|
codeutils: {
|
|
180
|
-
getJsTree: (filePath?: string
|
|
175
|
+
getJsTree: (filePath?: string) => Promise<import("../types/InternalTypes").JSTreeResponse>;
|
|
181
176
|
getAllFilesAsMarkDown: () => Promise<string>;
|
|
182
177
|
performMatch: (matcherDefinition: object, problemPatterns: any[], problems?: any[]) => Promise<import("../types/socketMessageTypes").MatchProblemResponse>;
|
|
183
178
|
getMatcherList: () => Promise<import("../types/socketMessageTypes").GetMatcherListTreeResponse>;
|
|
@@ -215,7 +210,7 @@ declare class Codebolt {
|
|
|
215
210
|
class: string;
|
|
216
211
|
location: string;
|
|
217
212
|
}[]>;
|
|
218
|
-
getAstTreeInFile: (file: string, className?: string
|
|
213
|
+
getAstTreeInFile: (file: string, className?: string) => Promise<import("..").ASTNode | {
|
|
219
214
|
error: string;
|
|
220
215
|
}>;
|
|
221
216
|
};
|
|
@@ -223,7 +218,7 @@ declare class Codebolt {
|
|
|
223
218
|
parseJSON: (jsonString: string) => {
|
|
224
219
|
success: boolean;
|
|
225
220
|
parsed?: any;
|
|
226
|
-
error?: Error
|
|
221
|
+
error?: Error;
|
|
227
222
|
};
|
|
228
223
|
parseXML: (xmlString: string) => {
|
|
229
224
|
success: boolean;
|
|
@@ -231,8 +226,8 @@ declare class Codebolt {
|
|
|
231
226
|
};
|
|
232
227
|
parseCSV: (csvString: string) => {
|
|
233
228
|
success: boolean;
|
|
234
|
-
parsed?: any[]
|
|
235
|
-
error?: Error
|
|
229
|
+
parsed?: any[];
|
|
230
|
+
error?: Error;
|
|
236
231
|
};
|
|
237
232
|
parseText: (text: string) => {
|
|
238
233
|
success: boolean;
|
|
@@ -279,7 +274,7 @@ declare class Codebolt {
|
|
|
279
274
|
moveTaskToAgent: (taskId: string, newAgentId: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
280
275
|
setTaskPriority: (taskId: string, priority: "low" | "medium" | "high") => Promise<import("../types/commonTypes").TaskResponse>;
|
|
281
276
|
addTaskTags: (taskId: string, tags: string[]) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
282
|
-
createQuickTask: (title: string, agentId?: string, category?: string
|
|
277
|
+
createQuickTask: (title: string, agentId?: string, category?: string) => Promise<import("../types/commonTypes").TaskResponse>;
|
|
283
278
|
};
|
|
284
279
|
vectordb: {
|
|
285
280
|
getVector: (key: string) => Promise<import("../types/socketMessageTypes").GetVectorResponse>;
|
|
@@ -322,7 +317,7 @@ declare class Codebolt {
|
|
|
322
317
|
getAgentsDetail: (agentList?: never[]) => Promise<import("../types/socketMessageTypes").AgentsDetailResponse>;
|
|
323
318
|
};
|
|
324
319
|
utils: {
|
|
325
|
-
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string
|
|
320
|
+
editFileAndApplyDiff: (filePath: string, diff: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<import("../types/socketMessageTypes").FsEditFileAndApplyDiffResponse>;
|
|
326
321
|
};
|
|
327
322
|
notify: NotificationFunctions;
|
|
328
323
|
/**
|
package/dist/modules/chat.d.ts
CHANGED
|
@@ -57,6 +57,6 @@ declare const cbchat: {
|
|
|
57
57
|
* Sends a notification event to the server.
|
|
58
58
|
* @param {string} notificationMessage - The message to be sent in the notification.
|
|
59
59
|
*/
|
|
60
|
-
sendNotificationEvent: (notificationMessage: string, type:
|
|
60
|
+
sendNotificationEvent: (notificationMessage: string, type: "debug" | "git" | "planner" | "browser" | "editor" | "terminal" | "preview") => void;
|
|
61
61
|
};
|
|
62
62
|
export default cbchat;
|
|
@@ -15,16 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const
|
|
27
|
-
const languageParser_1 = require("../utils/parse-source-code/languageParser");
|
|
36
|
+
const codeparser_1 = require("@codebolt/codeparser");
|
|
28
37
|
const fs = __importStar(require("fs/promises"));
|
|
29
38
|
const path = __importStar(require("path"));
|
|
30
39
|
/**
|
|
@@ -50,9 +59,9 @@ const cbcodeparsers = {
|
|
|
50
59
|
return { error: `Unsupported file type: ${ext}` };
|
|
51
60
|
}
|
|
52
61
|
// Load language parser for this file
|
|
53
|
-
const languageParsers = await (0,
|
|
62
|
+
const languageParsers = await (0, codeparser_1.loadRequiredLanguageParsers)([file]);
|
|
54
63
|
// Parse the file
|
|
55
|
-
const result = await (0,
|
|
64
|
+
const result = await (0, codeparser_1.parseFile)(file, languageParsers);
|
|
56
65
|
// Filter for class definitions only
|
|
57
66
|
const lines = (result === null || result === void 0 ? void 0 : result.split('\n')) || [];
|
|
58
67
|
const classes = [];
|
|
@@ -72,7 +81,7 @@ const cbcodeparsers = {
|
|
|
72
81
|
// Get the file extension
|
|
73
82
|
const ext = path.extname(file).toLowerCase().slice(1);
|
|
74
83
|
// Load language parser
|
|
75
|
-
const languageParsers = await (0,
|
|
84
|
+
const languageParsers = await (0, codeparser_1.loadRequiredLanguageParsers)([file]);
|
|
76
85
|
// Get the parser for this file type
|
|
77
86
|
const { parser } = languageParsers[ext] || {};
|
|
78
87
|
if (parser) {
|
|
@@ -131,9 +140,9 @@ const cbcodeparsers = {
|
|
|
131
140
|
return { error: `File does not exist or is not accessible: ${file}` };
|
|
132
141
|
}
|
|
133
142
|
// Load language parser for this file
|
|
134
|
-
const languageParsers = await (0,
|
|
143
|
+
const languageParsers = await (0, codeparser_1.loadRequiredLanguageParsers)([file]);
|
|
135
144
|
// Parse the file
|
|
136
|
-
const result = await (0,
|
|
145
|
+
const result = await (0, codeparser_1.parseFile)(file, languageParsers);
|
|
137
146
|
// Extract content
|
|
138
147
|
const fileContent = await fs.readFile(file, 'utf8');
|
|
139
148
|
// Parse the file content to find the class and its methods
|
|
@@ -248,7 +257,7 @@ const cbcodeparsers = {
|
|
|
248
257
|
return { error: `Unsupported file type: ${ext}` };
|
|
249
258
|
}
|
|
250
259
|
// Load language parser for this file
|
|
251
|
-
const languageParsers = await (0,
|
|
260
|
+
const languageParsers = await (0, codeparser_1.loadRequiredLanguageParsers)([file]);
|
|
252
261
|
// Get the parser for this file type
|
|
253
262
|
const { parser } = languageParsers[ext] || {};
|
|
254
263
|
if (!parser) {
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -29,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
39
|
const websocket_1 = __importDefault(require("../core/websocket"));
|
|
30
40
|
const fs = __importStar(require("fs"));
|
|
31
41
|
const path_1 = __importDefault(require("path"));
|
|
32
|
-
const
|
|
42
|
+
const codeparser_1 = require("@codebolt/codeparser");
|
|
33
43
|
/**
|
|
34
44
|
* A utility module for working with code.
|
|
35
45
|
*/
|
|
@@ -52,7 +62,7 @@ const cbcodeutils = {
|
|
|
52
62
|
// Get file extension to determine language parser
|
|
53
63
|
const ext = path_1.default.extname(absolutePath).toLowerCase().slice(1);
|
|
54
64
|
// Load appropriate language parser
|
|
55
|
-
const languageParsers = await (0,
|
|
65
|
+
const languageParsers = await (0, codeparser_1.loadRequiredLanguageParsers)([absolutePath]);
|
|
56
66
|
// Get parser for this file type
|
|
57
67
|
const { parser, query } = languageParsers[ext] || {};
|
|
58
68
|
if (!parser || !query) {
|
package/dist/modules/task.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ declare const taskplaner: {
|
|
|
117
117
|
* @param {'low' | 'medium' | 'high'} priority - The priority level.
|
|
118
118
|
* @returns {Promise<TaskResponse>} A promise that resolves with the response from the update task event.
|
|
119
119
|
*/
|
|
120
|
-
setTaskPriority: (taskId: string, priority:
|
|
120
|
+
setTaskPriority: (taskId: string, priority: "low" | "medium" | "high") => Promise<TaskResponse>;
|
|
121
121
|
/**
|
|
122
122
|
* Utility function to add tags to a task.
|
|
123
123
|
* @param {string} taskId - The task ID.
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
* including subagent task operations and completions.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.agentNotifications =
|
|
9
|
+
exports.agentNotifications = void 0;
|
|
10
|
+
exports.StartSubagentTaskRequestNotify = StartSubagentTaskRequestNotify;
|
|
11
|
+
exports.StartSubagentTaskResponseNotify = StartSubagentTaskResponseNotify;
|
|
12
|
+
exports.SubagentTaskCompletedNotify = SubagentTaskCompletedNotify;
|
|
10
13
|
const utils_1 = require("./utils");
|
|
11
14
|
/**
|
|
12
15
|
* Sends a request to start a subagent task
|
|
@@ -41,7 +44,6 @@ function StartSubagentTaskRequestNotify(parentAgentId, subagentId, task, priorit
|
|
|
41
44
|
// Send the notification
|
|
42
45
|
(0, utils_1.sendNotification)(notification, 'agent.StartSubagentTaskRequestNotify');
|
|
43
46
|
}
|
|
44
|
-
exports.StartSubagentTaskRequestNotify = StartSubagentTaskRequestNotify;
|
|
45
47
|
/**
|
|
46
48
|
* Sends a response to a subagent task request
|
|
47
49
|
*
|
|
@@ -68,7 +70,6 @@ function StartSubagentTaskResponseNotify(content, isError = false, toolUseId) {
|
|
|
68
70
|
// Send the notification
|
|
69
71
|
(0, utils_1.sendNotification)(notification, 'agent.StartSubagentTaskResponseNotify');
|
|
70
72
|
}
|
|
71
|
-
exports.StartSubagentTaskResponseNotify = StartSubagentTaskResponseNotify;
|
|
72
73
|
/**
|
|
73
74
|
* Notifies that a subagent task has been completed
|
|
74
75
|
*
|
|
@@ -102,7 +103,6 @@ function SubagentTaskCompletedNotify(parentAgentId, subagentId, taskId, result,
|
|
|
102
103
|
// Send the notification
|
|
103
104
|
(0, utils_1.sendNotification)(notification, 'agent.SubagentTaskCompletedNotify');
|
|
104
105
|
}
|
|
105
|
-
exports.SubagentTaskCompletedNotify = SubagentTaskCompletedNotify;
|
|
106
106
|
/**
|
|
107
107
|
* Agent notification functions object
|
|
108
108
|
*/
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* including web fetch and web search operations.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.browserNotifications =
|
|
9
|
+
exports.browserNotifications = void 0;
|
|
10
|
+
exports.WebFetchRequestNotify = WebFetchRequestNotify;
|
|
11
|
+
exports.WebFetchResponseNotify = WebFetchResponseNotify;
|
|
12
|
+
exports.WebSearchRequestNotify = WebSearchRequestNotify;
|
|
13
|
+
exports.WebSearchResponseNotify = WebSearchResponseNotify;
|
|
10
14
|
const utils_1 = require("./utils");
|
|
11
15
|
/**
|
|
12
16
|
* Sends a web fetch request notification
|
|
@@ -41,7 +45,6 @@ function WebFetchRequestNotify(url, method, headers, body, timeout, toolUseId) {
|
|
|
41
45
|
// Send the notification
|
|
42
46
|
(0, utils_1.sendNotification)(notification, 'browser.WebFetchRequestNotify');
|
|
43
47
|
}
|
|
44
|
-
exports.WebFetchRequestNotify = WebFetchRequestNotify;
|
|
45
48
|
/**
|
|
46
49
|
* Sends a web fetch response notification
|
|
47
50
|
*
|
|
@@ -70,7 +73,6 @@ function WebFetchResponseNotify(content, isError = false, toolUseId, data) {
|
|
|
70
73
|
// Send the notification
|
|
71
74
|
(0, utils_1.sendNotification)(notification, 'browser.WebFetchResponseNotify');
|
|
72
75
|
}
|
|
73
|
-
exports.WebFetchResponseNotify = WebFetchResponseNotify;
|
|
74
76
|
/**
|
|
75
77
|
* Sends a web search request notification
|
|
76
78
|
*
|
|
@@ -102,7 +104,6 @@ function WebSearchRequestNotify(query, maxResults, searchEngine, filters, toolUs
|
|
|
102
104
|
// Send the notification
|
|
103
105
|
(0, utils_1.sendNotification)(notification, 'browser.WebSearchRequestNotify');
|
|
104
106
|
}
|
|
105
|
-
exports.WebSearchRequestNotify = WebSearchRequestNotify;
|
|
106
107
|
/**
|
|
107
108
|
* Sends a web search response notification
|
|
108
109
|
*
|
|
@@ -131,7 +132,6 @@ function WebSearchResponseNotify(content, isError = false, toolUseId, data) {
|
|
|
131
132
|
// Send the notification
|
|
132
133
|
(0, utils_1.sendNotification)(notification, 'browser.WebSearchResponseNotify');
|
|
133
134
|
}
|
|
134
|
-
exports.WebSearchResponseNotify = WebSearchResponseNotify;
|
|
135
135
|
/**
|
|
136
136
|
* Browser notification functions object
|
|
137
137
|
*/
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* including user messages, agent responses, and chat history operations.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.chatNotifications =
|
|
9
|
+
exports.chatNotifications = void 0;
|
|
10
|
+
exports.UserMessageRequestNotify = UserMessageRequestNotify;
|
|
11
|
+
exports.AgentTextResponseNotify = AgentTextResponseNotify;
|
|
12
|
+
exports.GetChatHistoryRequestNotify = GetChatHistoryRequestNotify;
|
|
13
|
+
exports.GetChatHistoryResultNotify = GetChatHistoryResultNotify;
|
|
10
14
|
const utils_1 = require("./utils");
|
|
11
15
|
/**
|
|
12
16
|
* Sends a user message request
|
|
@@ -35,7 +39,6 @@ function UserMessageRequestNotify(message, payload, toolUseId) {
|
|
|
35
39
|
// Send the notification
|
|
36
40
|
(0, utils_1.sendNotification)(notification, 'chat.UserMessageRequestNotify');
|
|
37
41
|
}
|
|
38
|
-
exports.UserMessageRequestNotify = UserMessageRequestNotify;
|
|
39
42
|
/**
|
|
40
43
|
* Sends an agent text response
|
|
41
44
|
*
|
|
@@ -64,7 +67,6 @@ function AgentTextResponseNotify(content, isError = false, toolUseId, data) {
|
|
|
64
67
|
// Send the notification
|
|
65
68
|
(0, utils_1.sendNotification)(notification, 'chat.AgentTextResponseNotify');
|
|
66
69
|
}
|
|
67
|
-
exports.AgentTextResponseNotify = AgentTextResponseNotify;
|
|
68
70
|
/**
|
|
69
71
|
* Requests chat history
|
|
70
72
|
*
|
|
@@ -84,7 +86,6 @@ function GetChatHistoryRequestNotify(data, toolUseId) {
|
|
|
84
86
|
// Send the notification
|
|
85
87
|
(0, utils_1.sendNotification)(notification, 'chat.GetChatHistoryRequestNotify');
|
|
86
88
|
}
|
|
87
|
-
exports.GetChatHistoryRequestNotify = GetChatHistoryRequestNotify;
|
|
88
89
|
/**
|
|
89
90
|
* Sends chat history result
|
|
90
91
|
*
|
|
@@ -111,7 +112,6 @@ function GetChatHistoryResultNotify(content, isError = false, toolUseId) {
|
|
|
111
112
|
// Send the notification
|
|
112
113
|
(0, utils_1.sendNotification)(notification, 'chat.GetChatHistoryResultNotify');
|
|
113
114
|
}
|
|
114
|
-
exports.GetChatHistoryResultNotify = GetChatHistoryResultNotify;
|
|
115
115
|
/**
|
|
116
116
|
* Chat notification functions object
|
|
117
117
|
*/
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* including grep search and glob search operations.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.codeutilsNotifications =
|
|
9
|
+
exports.codeutilsNotifications = void 0;
|
|
10
|
+
exports.GrepSearchRequestNotify = GrepSearchRequestNotify;
|
|
11
|
+
exports.GrepSearchResponseNotify = GrepSearchResponseNotify;
|
|
12
|
+
exports.GlobSearchRequestNotify = GlobSearchRequestNotify;
|
|
13
|
+
exports.GlobSearchResponseNotify = GlobSearchResponseNotify;
|
|
10
14
|
const utils_1 = require("./utils");
|
|
11
15
|
/**
|
|
12
16
|
* Sends a grep search request
|
|
@@ -41,7 +45,6 @@ function GrepSearchRequestNotify(pattern, filePath, recursive, ignoreCase, maxRe
|
|
|
41
45
|
// Send the notification
|
|
42
46
|
(0, utils_1.sendNotification)(notification, 'codeutils.GrepSearchRequestNotify');
|
|
43
47
|
}
|
|
44
|
-
exports.GrepSearchRequestNotify = GrepSearchRequestNotify;
|
|
45
48
|
/**
|
|
46
49
|
* Sends a response to a grep search request
|
|
47
50
|
*
|
|
@@ -70,7 +73,6 @@ function GrepSearchResponseNotify(content, isError = false, toolUseId, data) {
|
|
|
70
73
|
// Send the notification
|
|
71
74
|
(0, utils_1.sendNotification)(notification, 'codeutils.GrepSearchResponseNotify');
|
|
72
75
|
}
|
|
73
|
-
exports.GrepSearchResponseNotify = GrepSearchResponseNotify;
|
|
74
76
|
/**
|
|
75
77
|
* Sends a glob search request
|
|
76
78
|
*
|
|
@@ -102,7 +104,6 @@ function GlobSearchRequestNotify(pattern, basePath, maxDepth, includeDirectories
|
|
|
102
104
|
// Send the notification
|
|
103
105
|
(0, utils_1.sendNotification)(notification, 'codeutils.GlobSearchRequestNotify');
|
|
104
106
|
}
|
|
105
|
-
exports.GlobSearchRequestNotify = GlobSearchRequestNotify;
|
|
106
107
|
/**
|
|
107
108
|
* Sends a response to a glob search request
|
|
108
109
|
*
|
|
@@ -131,7 +132,6 @@ function GlobSearchResponseNotify(content, isError = false, toolUseId, data) {
|
|
|
131
132
|
// Send the notification
|
|
132
133
|
(0, utils_1.sendNotification)(notification, 'codeutils.GlobSearchResponseNotify');
|
|
133
134
|
}
|
|
134
|
-
exports.GlobSearchResponseNotify = GlobSearchResponseNotify;
|
|
135
135
|
/**
|
|
136
136
|
* Codeutils notification functions object
|
|
137
137
|
*/
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* including web crawling search operations and crawler initialization.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.crawlerNotifications =
|
|
9
|
+
exports.crawlerNotifications = void 0;
|
|
10
|
+
exports.CrawlerSearchRequestNotify = CrawlerSearchRequestNotify;
|
|
11
|
+
exports.CrawlerSearchResponseNotify = CrawlerSearchResponseNotify;
|
|
12
|
+
exports.CrawlerStartRequestNotify = CrawlerStartRequestNotify;
|
|
13
|
+
exports.CrawlerStartResponseNotify = CrawlerStartResponseNotify;
|
|
10
14
|
const utils_1 = require("./utils");
|
|
11
15
|
/**
|
|
12
16
|
* Sends a request to perform a crawler search
|
|
@@ -51,7 +55,6 @@ function CrawlerSearchRequestNotify(url, searchQuery, maxDepth, maxPages, includ
|
|
|
51
55
|
// Send the notification
|
|
52
56
|
(0, utils_1.sendNotification)(notification, 'crawler.CrawlerSearchRequestNotify');
|
|
53
57
|
}
|
|
54
|
-
exports.CrawlerSearchRequestNotify = CrawlerSearchRequestNotify;
|
|
55
58
|
/**
|
|
56
59
|
* Sends a response to a crawler search request
|
|
57
60
|
*
|
|
@@ -80,7 +83,6 @@ function CrawlerSearchResponseNotify(content, isError = false, toolUseId, data)
|
|
|
80
83
|
// Send the notification
|
|
81
84
|
(0, utils_1.sendNotification)(notification, 'crawler.CrawlerSearchResponseNotify');
|
|
82
85
|
}
|
|
83
|
-
exports.CrawlerSearchResponseNotify = CrawlerSearchResponseNotify;
|
|
84
86
|
/**
|
|
85
87
|
* Sends a request to start a crawler
|
|
86
88
|
*
|
|
@@ -116,7 +118,6 @@ function CrawlerStartRequestNotify(startUrl, options, toolUseId) {
|
|
|
116
118
|
// Send the notification
|
|
117
119
|
(0, utils_1.sendNotification)(notification, 'crawler.CrawlerStartRequestNotify');
|
|
118
120
|
}
|
|
119
|
-
exports.CrawlerStartRequestNotify = CrawlerStartRequestNotify;
|
|
120
121
|
/**
|
|
121
122
|
* Sends a response to a crawler start request
|
|
122
123
|
*
|
|
@@ -145,7 +146,6 @@ function CrawlerStartResponseNotify(content, isError = false, toolUseId, data) {
|
|
|
145
146
|
// Send the notification
|
|
146
147
|
(0, utils_1.sendNotification)(notification, 'crawler.CrawlerStartResponseNotify');
|
|
147
148
|
}
|
|
148
|
-
exports.CrawlerStartResponseNotify = CrawlerStartResponseNotify;
|
|
149
149
|
/**
|
|
150
150
|
* Crawler notification functions object
|
|
151
151
|
*/
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* including knowledge storage and retrieval operations.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.dbmemoryNotifications =
|
|
9
|
+
exports.dbmemoryNotifications = void 0;
|
|
10
|
+
exports.AddMemoryRequestNotify = AddMemoryRequestNotify;
|
|
11
|
+
exports.AddMemoryResultNotify = AddMemoryResultNotify;
|
|
12
|
+
exports.GetMemoryRequestNotify = GetMemoryRequestNotify;
|
|
13
|
+
exports.GetMemoryResultNotify = GetMemoryResultNotify;
|
|
10
14
|
const utils_1 = require("./utils");
|
|
11
15
|
/**
|
|
12
16
|
* Sends a request to add knowledge to memory
|
|
@@ -40,7 +44,6 @@ function AddMemoryRequestNotify(key, value, toolUseId) {
|
|
|
40
44
|
// Send the notification
|
|
41
45
|
(0, utils_1.sendNotification)(notification, 'dbmemory.AddMemoryRequestNotify');
|
|
42
46
|
}
|
|
43
|
-
exports.AddMemoryRequestNotify = AddMemoryRequestNotify;
|
|
44
47
|
/**
|
|
45
48
|
* Sends a result response for an add memory operation
|
|
46
49
|
*
|
|
@@ -67,7 +70,6 @@ function AddMemoryResultNotify(content, isError = false, toolUseId) {
|
|
|
67
70
|
// Send the notification
|
|
68
71
|
(0, utils_1.sendNotification)(notification, 'dbmemory.AddMemoryResultNotify');
|
|
69
72
|
}
|
|
70
|
-
exports.AddMemoryResultNotify = AddMemoryResultNotify;
|
|
71
73
|
/**
|
|
72
74
|
* Sends a request to get knowledge from memory
|
|
73
75
|
*
|
|
@@ -93,7 +95,6 @@ function GetMemoryRequestNotify(key, toolUseId) {
|
|
|
93
95
|
// Send the notification
|
|
94
96
|
(0, utils_1.sendNotification)(notification, 'dbmemory.GetMemoryRequestNotify');
|
|
95
97
|
}
|
|
96
|
-
exports.GetMemoryRequestNotify = GetMemoryRequestNotify;
|
|
97
98
|
/**
|
|
98
99
|
* Sends a result response for a get memory operation
|
|
99
100
|
*
|
|
@@ -120,7 +121,6 @@ function GetMemoryResultNotify(content, isError = false, toolUseId) {
|
|
|
120
121
|
// Send the notification
|
|
121
122
|
(0, utils_1.sendNotification)(notification, 'dbmemory.GetMemoryResultNotify');
|
|
122
123
|
}
|
|
123
|
-
exports.GetMemoryResultNotify = GetMemoryResultNotify;
|
|
124
124
|
/**
|
|
125
125
|
* Database memory notification functions object
|
|
126
126
|
*/
|