@codebolt/codeboltjs 1.0.8 → 1.1.10
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/index.d.ts +1 -164
- package/index.js +2 -1
- package/package.json +2 -2
- package/src/index.ts +3 -1
package/index.d.ts
CHANGED
|
@@ -1,164 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import WebSocket from 'ws';
|
|
3
|
-
/**
|
|
4
|
-
* @class Codebolt
|
|
5
|
-
* @description This class provides a unified interface to interact with various modules.
|
|
6
|
-
*/
|
|
7
|
-
declare class Codebolt {
|
|
8
|
-
/**
|
|
9
|
-
* @constructor
|
|
10
|
-
* @description Initializes the websocket connection.
|
|
11
|
-
*/
|
|
12
|
-
constructor();
|
|
13
|
-
/**
|
|
14
|
-
* @method waitForConnection
|
|
15
|
-
* @description Waits for the WebSocket connection to open.
|
|
16
|
-
* @returns {Promise<void>} A promise that resolves when the WebSocket connection is open.
|
|
17
|
-
*/
|
|
18
|
-
waitForConnection(): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* @method start_browser
|
|
21
|
-
* @description Starts a new browser page.
|
|
22
|
-
* @param {string} objective - The objective of the browser session.
|
|
23
|
-
* @param {string} url - The URL to navigate to.
|
|
24
|
-
* @param {string} previous_command - The previous command executed.
|
|
25
|
-
* @param {string} browser_content - The content of the browser.
|
|
26
|
-
*/
|
|
27
|
-
start_browser(objective: string, url: string, previous_command: string, browser_content: string): void;
|
|
28
|
-
websocket: WebSocket | null;
|
|
29
|
-
fs: {
|
|
30
|
-
createFile: (fileName: string, source: string, filePath: string) => Promise<any>;
|
|
31
|
-
createFolder: (folderName: string, folderPath: string) => Promise<any>;
|
|
32
|
-
readFile: (filename: string, filePath: string) => Promise<any>;
|
|
33
|
-
updateFile: (filename: string, filePath: string, newContent: string) => Promise<any>;
|
|
34
|
-
deleteFile: (filename: string, filePath: string) => Promise<any>;
|
|
35
|
-
deleteFolder: (foldername: string, folderpath: string) => Promise<any>;
|
|
36
|
-
};
|
|
37
|
-
git: {
|
|
38
|
-
init: (path: string) => Promise<any>;
|
|
39
|
-
clone: (url: string, path: string) => Promise<any>;
|
|
40
|
-
pull: (path: string) => Promise<any>;
|
|
41
|
-
push: (path: string) => Promise<any>;
|
|
42
|
-
status: (path: string) => Promise<any>;
|
|
43
|
-
add: (path: string) => Promise<any>;
|
|
44
|
-
commit: (message: string) => Promise<any>;
|
|
45
|
-
checkout: (path: string, branch: string) => Promise<any>;
|
|
46
|
-
branch: (path: string, branch: string) => Promise<any>;
|
|
47
|
-
logs: (path: string) => Promise<any>;
|
|
48
|
-
diff: (commitHash: string, path: string) => Promise<any>;
|
|
49
|
-
};
|
|
50
|
-
llm: {
|
|
51
|
-
inference: (message: string, llmrole: string) => Promise<any>;
|
|
52
|
-
};
|
|
53
|
-
browser: {
|
|
54
|
-
newPage: () => void;
|
|
55
|
-
getUrl: () => Promise<unknown>;
|
|
56
|
-
goToPage: (url: string) => Promise<unknown>;
|
|
57
|
-
screenshot: () => void;
|
|
58
|
-
getHTML: () => Promise<unknown>;
|
|
59
|
-
getMarkdown: () => Promise<unknown>;
|
|
60
|
-
getPDF: () => void;
|
|
61
|
-
pdfToText: () => void;
|
|
62
|
-
getContent: () => void;
|
|
63
|
-
extractText: () => void;
|
|
64
|
-
close: () => void;
|
|
65
|
-
scroll: (direction: string, pixels: string) => Promise<unknown>;
|
|
66
|
-
type: (elementid: string, text: string) => Promise<unknown>;
|
|
67
|
-
click: (elementid: string) => Promise<unknown>;
|
|
68
|
-
enter: () => Promise<unknown>;
|
|
69
|
-
search: (elementid: string, query: string) => Promise<unknown>;
|
|
70
|
-
};
|
|
71
|
-
chat: {
|
|
72
|
-
eventEmitter: {
|
|
73
|
-
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
74
|
-
addListener<K_1>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
75
|
-
on<K_2>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
76
|
-
once<K_3>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
77
|
-
removeListener<K_4>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
78
|
-
off<K_5>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
79
|
-
removeAllListeners(eventName?: string | symbol | undefined): any;
|
|
80
|
-
setMaxListeners(n: number): any;
|
|
81
|
-
getMaxListeners(): number;
|
|
82
|
-
listeners<K_6>(eventName: string | symbol): Function[];
|
|
83
|
-
rawListeners<K_7>(eventName: string | symbol): Function[];
|
|
84
|
-
emit<K_8>(eventName: string | symbol, ...args: any[]): boolean;
|
|
85
|
-
listenerCount<K_9>(eventName: string | symbol, listener?: Function | undefined): number;
|
|
86
|
-
prependListener<K_10>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
87
|
-
prependOnceListener<K_11>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
88
|
-
eventNames(): (string | symbol)[];
|
|
89
|
-
};
|
|
90
|
-
sendMessage(message: string): void;
|
|
91
|
-
waitforReply(message: string): Promise<any>;
|
|
92
|
-
processStarted(): {
|
|
93
|
-
event: {
|
|
94
|
-
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
95
|
-
addListener<K_1>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
96
|
-
on<K_2>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
97
|
-
once<K_3>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
98
|
-
removeListener<K_4>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
99
|
-
off<K_5>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
100
|
-
removeAllListeners(eventName?: string | symbol | undefined): any;
|
|
101
|
-
setMaxListeners(n: number): any;
|
|
102
|
-
getMaxListeners(): number;
|
|
103
|
-
listeners<K_6>(eventName: string | symbol): Function[];
|
|
104
|
-
rawListeners<K_7>(eventName: string | symbol): Function[];
|
|
105
|
-
emit<K_8>(eventName: string | symbol, ...args: any[]): boolean;
|
|
106
|
-
listenerCount<K_9>(eventName: string | symbol, listener?: Function | undefined): number;
|
|
107
|
-
prependListener<K_10>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
108
|
-
prependOnceListener<K_11>(eventName: string | symbol, listener: (...args: any[]) => void): any;
|
|
109
|
-
eventNames(): (string | symbol)[];
|
|
110
|
-
};
|
|
111
|
-
stopProcess: () => void;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
terminal: {
|
|
115
|
-
executeCommand: (command: string) => Promise<any>;
|
|
116
|
-
};
|
|
117
|
-
codeutils: {
|
|
118
|
-
getCodeTree: (fileName: any, source: any, filePath: any) => Promise<any>;
|
|
119
|
-
};
|
|
120
|
-
docutils: {
|
|
121
|
-
pdf_to_text: (pdf_path: any) => Promise<string>;
|
|
122
|
-
};
|
|
123
|
-
crawler: {
|
|
124
|
-
start: () => void;
|
|
125
|
-
screenshot: () => void;
|
|
126
|
-
goToPage: (url: string) => void;
|
|
127
|
-
scroll: (direction: string) => void;
|
|
128
|
-
click: (id: string) => Promise<unknown>;
|
|
129
|
-
type: (id: string, text: string) => Promise<unknown>;
|
|
130
|
-
enter: () => void;
|
|
131
|
-
crawl: () => void;
|
|
132
|
-
};
|
|
133
|
-
search: {
|
|
134
|
-
init: (engine?: string) => void;
|
|
135
|
-
search: (query: string) => Promise<string>;
|
|
136
|
-
get_first_link: (query: string) => Promise<string>;
|
|
137
|
-
};
|
|
138
|
-
knowledge: {};
|
|
139
|
-
rag: {
|
|
140
|
-
init: () => void;
|
|
141
|
-
add_file: (filename: string, file_path: string) => void;
|
|
142
|
-
retrieve_related_knowledge: (query: string, filename: string) => void;
|
|
143
|
-
};
|
|
144
|
-
codeparsers: {
|
|
145
|
-
getClassesInFile: (file: any) => void;
|
|
146
|
-
getFunctionsinClass: (file: any, className: any) => void;
|
|
147
|
-
getAstTreeInFile: (file: any, className: any) => void;
|
|
148
|
-
};
|
|
149
|
-
outputparsers: {
|
|
150
|
-
init: (output: any) => void;
|
|
151
|
-
parseErrors: (output: any) => string[];
|
|
152
|
-
parseWarnings: (output: any) => string[];
|
|
153
|
-
};
|
|
154
|
-
project: {
|
|
155
|
-
getProjectSettings: (output: any) => void;
|
|
156
|
-
getProjectPath: () => Promise<any>;
|
|
157
|
-
};
|
|
158
|
-
dbmemory: {
|
|
159
|
-
addKnowledge: (key: string, value: any) => Promise<any>;
|
|
160
|
-
getKnowledge: (key: string) => Promise<any>;
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
declare const _default: Codebolt;
|
|
164
|
-
export default _default;
|
|
1
|
+
export {};
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebolt/codeboltjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
7
7
|
"main": "index.js",
|
|
8
|
-
"license": "ISC",
|
|
9
8
|
"scripts": {
|
|
10
9
|
"build": "tsc",
|
|
11
10
|
"build:docs": "typedoc --plugin typedoc-plugin-missing-exports",
|
|
@@ -16,6 +15,7 @@
|
|
|
16
15
|
"type": "git",
|
|
17
16
|
"url": "https://github.com/codeboltai/codeboltjs"
|
|
18
17
|
},
|
|
18
|
+
"license": "MIT",
|
|
19
19
|
"homepage": "https://codeboltai.github.io",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"typedoc-plugin-missing-exports": "^2.2.0",
|