@codebolt/codeboltjs 2.0.12 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +138 -4
- package/dist/agentlib/agent.js +3 -7
- package/dist/agentlib/followupquestionbuilder.d.ts +75 -0
- package/dist/agentlib/followupquestionbuilder.js +193 -0
- package/dist/agentlib/llmoutputhandler.d.ts +102 -0
- package/dist/agentlib/llmoutputhandler.js +451 -0
- package/dist/agentlib/promptbuilder.d.ts +171 -17
- package/dist/agentlib/promptbuilder.js +367 -49
- package/dist/agentlib/systemprompt.js +3 -3
- package/dist/agentlib/usermessage.d.ts +1 -1
- package/dist/agentlib/usermessage.js +5 -1
- package/dist/core/Codebolt.d.ts +342 -0
- package/dist/core/Codebolt.js +201 -0
- package/dist/core/websocket.js +2 -1
- package/dist/index.d.ts +4 -300
- package/dist/index.js +11 -137
- package/dist/modules/llm.d.ts +23 -3
- package/dist/modules/llm.js +20 -3
- package/dist/modules/project.d.ts +3 -3
- package/dist/modules/project.js +1 -1
- package/dist/modules/state.d.ts +5 -3
- package/dist/modules/state.js +2 -0
- package/dist/modules/task.d.ts +126 -11
- package/dist/modules/task.js +262 -20
- package/dist/notificationfunctions/agent.d.ts +48 -0
- package/dist/notificationfunctions/agent.js +115 -0
- package/dist/notificationfunctions/browser.d.ts +60 -0
- package/dist/notificationfunctions/browser.js +145 -0
- package/dist/notificationfunctions/chat.d.ts +53 -0
- package/dist/notificationfunctions/chat.js +125 -0
- package/dist/notificationfunctions/codeutils.d.ts +60 -0
- package/dist/notificationfunctions/codeutils.js +145 -0
- package/dist/notificationfunctions/crawler.d.ts +59 -0
- package/dist/notificationfunctions/crawler.js +159 -0
- package/dist/notificationfunctions/dbmemory.d.ts +50 -0
- package/dist/notificationfunctions/dbmemory.js +132 -0
- package/dist/notificationfunctions/fs.d.ts +125 -0
- package/dist/notificationfunctions/fs.js +472 -0
- package/dist/notificationfunctions/git.d.ts +174 -0
- package/dist/notificationfunctions/git.js +521 -0
- package/dist/notificationfunctions/history.d.ts +38 -0
- package/dist/notificationfunctions/history.js +97 -0
- package/dist/notificationfunctions/index.d.ts +79 -0
- package/dist/notificationfunctions/index.js +102 -0
- package/dist/notificationfunctions/llm.d.ts +39 -0
- package/dist/notificationfunctions/llm.js +99 -0
- package/dist/notificationfunctions/mcp.d.ts +67 -0
- package/dist/notificationfunctions/mcp.js +192 -0
- package/dist/notificationfunctions/search.d.ts +50 -0
- package/dist/notificationfunctions/search.js +146 -0
- package/dist/notificationfunctions/system.d.ts +25 -0
- package/dist/notificationfunctions/system.js +59 -0
- package/dist/notificationfunctions/terminal.d.ts +26 -0
- package/dist/notificationfunctions/terminal.js +64 -0
- package/dist/notificationfunctions/todo.d.ts +63 -0
- package/dist/notificationfunctions/todo.js +164 -0
- package/dist/notificationfunctions/utils.d.ts +81 -0
- package/dist/notificationfunctions/utils.js +177 -0
- package/dist/types/InternalTypes.d.ts +1 -0
- package/dist/types/commonTypes.d.ts +26 -3
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +15 -0
- package/dist/types/libFunctionTypes.d.ts +110 -4
- package/dist/types/notificationFunctions/agent.d.ts +8 -0
- package/dist/types/notificationFunctions/agent.js +2 -0
- package/dist/types/notificationFunctions/browser.d.ts +10 -0
- package/dist/types/notificationFunctions/browser.js +2 -0
- package/dist/types/notificationFunctions/chat.d.ts +10 -0
- package/dist/types/notificationFunctions/chat.js +2 -0
- package/dist/types/notificationFunctions/codeutils.d.ts +10 -0
- package/dist/types/notificationFunctions/codeutils.js +2 -0
- package/dist/types/notificationFunctions/crawler.d.ts +10 -0
- package/dist/types/notificationFunctions/crawler.js +2 -0
- package/dist/types/notificationFunctions/dbmemory.d.ts +9 -0
- package/dist/types/notificationFunctions/dbmemory.js +2 -0
- package/dist/types/notificationFunctions/fs.d.ts +27 -0
- package/dist/types/notificationFunctions/fs.js +2 -0
- package/dist/types/notificationFunctions/git.d.ts +29 -0
- package/dist/types/notificationFunctions/git.js +2 -0
- package/dist/types/notificationFunctions/history.d.ts +10 -0
- package/dist/types/notificationFunctions/history.js +2 -0
- package/dist/types/notificationFunctions/index.d.ts +0 -0
- package/dist/types/notificationFunctions/index.js +1 -0
- package/dist/types/notificationFunctions/llm.d.ts +10 -0
- package/dist/types/notificationFunctions/llm.js +2 -0
- package/dist/types/notificationFunctions/mcp.d.ts +16 -0
- package/dist/types/notificationFunctions/mcp.js +2 -0
- package/dist/types/notificationFunctions/search.d.ts +11 -0
- package/dist/types/notificationFunctions/search.js +2 -0
- package/dist/types/notificationFunctions/system.d.ts +7 -0
- package/dist/types/notificationFunctions/system.js +2 -0
- package/dist/types/notificationFunctions/terminal.d.ts +7 -0
- package/dist/types/notificationFunctions/terminal.js +2 -0
- package/dist/types/notificationFunctions/todo.d.ts +11 -0
- package/dist/types/notificationFunctions/todo.js +2 -0
- package/dist/types/notifications/agent.d.ts +31 -0
- package/dist/types/notifications/agent.js +3 -0
- package/dist/types/notifications/browser.d.ts +53 -0
- package/dist/types/notifications/browser.js +3 -0
- package/dist/types/notifications/chat.d.ts +37 -0
- package/dist/types/notifications/chat.js +3 -0
- package/dist/types/notifications/codeutils.d.ts +55 -0
- package/dist/types/notifications/codeutils.js +3 -0
- package/dist/types/notifications/crawler.d.ts +55 -0
- package/dist/types/notifications/crawler.js +3 -0
- package/dist/types/notifications/dbmemory.d.ts +31 -0
- package/dist/types/notifications/dbmemory.js +3 -0
- package/dist/types/notifications/fs.d.ts +180 -0
- package/dist/types/notifications/fs.js +3 -0
- package/dist/types/notifications/git.d.ts +205 -0
- package/dist/types/notifications/git.js +3 -0
- package/dist/types/notifications/history.d.ts +32 -0
- package/dist/types/notifications/history.js +3 -0
- package/dist/types/notifications/llm.d.ts +45 -0
- package/dist/types/notifications/llm.js +2 -0
- package/dist/types/notifications/mcp.d.ts +63 -0
- package/dist/types/notifications/mcp.js +3 -0
- package/dist/types/notifications/search.d.ts +47 -0
- package/dist/types/notifications/search.js +3 -0
- package/dist/types/notifications/system.d.ts +20 -0
- package/dist/types/notifications/system.js +2 -0
- package/dist/types/notifications/terminal.d.ts +17 -0
- package/dist/types/notifications/terminal.js +2 -0
- package/dist/types/notifications/todo.d.ts +60 -0
- package/dist/types/notifications/todo.js +3 -0
- package/dist/types/socketMessageTypes.d.ts +3 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +7 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for system notification functions
|
|
3
|
+
*/
|
|
4
|
+
export interface SystemNotifications {
|
|
5
|
+
AgentInitNotify(onStopClicked?: boolean, toolUseId?: string): void;
|
|
6
|
+
AgentCompletionNotify(resultString: string, sessionId?: string, duration?: string, toolUseId?: string): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for terminal notification functions
|
|
3
|
+
*/
|
|
4
|
+
export interface TerminalNotifications {
|
|
5
|
+
CommandExecutionRequestNotify(command: string, returnEmptyStringOnSuccess?: boolean, executeInMain?: boolean, toolUseId?: string): void;
|
|
6
|
+
CommandExecutionResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for todo notification functions
|
|
3
|
+
*/
|
|
4
|
+
export interface TodoNotifications {
|
|
5
|
+
AddTodoRequestNotify(title?: string, agentId?: string, description?: string, phase?: string, category?: string, priority?: string, tags?: string[], toolUseId?: string): void;
|
|
6
|
+
AddTodoResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
|
|
7
|
+
GetTodoRequestNotify(filters?: any, toolUseId?: string): void;
|
|
8
|
+
GetTodoResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
|
|
9
|
+
EditTodoTaskRequestNotify(taskId?: string, title?: string, description?: string, phase?: string, category?: string, priority?: string, tags?: string[], status?: string, toolUseId?: string): void;
|
|
10
|
+
EditTodoTaskResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type StartSubagentTaskRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "agentnotify";
|
|
4
|
+
action: "startSubagentTaskRequest";
|
|
5
|
+
data: {
|
|
6
|
+
parentAgentId: string;
|
|
7
|
+
subagentId: string;
|
|
8
|
+
task: string;
|
|
9
|
+
priority?: string;
|
|
10
|
+
dependencies?: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type StartSubagentTaskResponseNotification = {
|
|
14
|
+
toolUseId: string;
|
|
15
|
+
type: "agentnotify";
|
|
16
|
+
action: "startSubagentTaskResult";
|
|
17
|
+
content: string | any;
|
|
18
|
+
isError?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type SubagentTaskCompletedNotification = {
|
|
21
|
+
toolUseId: string;
|
|
22
|
+
type: "agentnotify";
|
|
23
|
+
action: "subagentTaskCompleted";
|
|
24
|
+
data: {
|
|
25
|
+
parentAgentId: string;
|
|
26
|
+
subagentId: string;
|
|
27
|
+
taskId: string;
|
|
28
|
+
result: any;
|
|
29
|
+
status: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type WebFetchRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "browsernotify";
|
|
4
|
+
action: "webFetchRequest";
|
|
5
|
+
data: {
|
|
6
|
+
url: string;
|
|
7
|
+
method?: string;
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
body?: string;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type WebFetchResponseNotification = {
|
|
14
|
+
toolUseId: string;
|
|
15
|
+
type: "browsernotify";
|
|
16
|
+
action: "webFetchResult";
|
|
17
|
+
content: string | any;
|
|
18
|
+
isError?: boolean;
|
|
19
|
+
data?: {
|
|
20
|
+
status?: number;
|
|
21
|
+
statusText?: string;
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
url?: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type WebSearchRequestNotification = {
|
|
27
|
+
toolUseId: string;
|
|
28
|
+
type: "browsernotify";
|
|
29
|
+
action: "webSearchRequest";
|
|
30
|
+
data: {
|
|
31
|
+
query: string;
|
|
32
|
+
maxResults?: number;
|
|
33
|
+
searchEngine?: string;
|
|
34
|
+
filters?: Record<string, any>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export type WebSearchResponseNotification = {
|
|
38
|
+
toolUseId: string;
|
|
39
|
+
type: "browsernotify";
|
|
40
|
+
action: "webSearchResult";
|
|
41
|
+
content: string | any;
|
|
42
|
+
isError?: boolean;
|
|
43
|
+
data?: {
|
|
44
|
+
results: Array<{
|
|
45
|
+
title: string;
|
|
46
|
+
url: string;
|
|
47
|
+
snippet: string;
|
|
48
|
+
rank?: number;
|
|
49
|
+
}>;
|
|
50
|
+
totalResults?: number;
|
|
51
|
+
searchTime?: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type UserMessageRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "chatnotify";
|
|
4
|
+
action: "sendMessageRequest";
|
|
5
|
+
data: {
|
|
6
|
+
message: string;
|
|
7
|
+
payload?: any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type AgentTextResponseNotification = {
|
|
11
|
+
toolUseId: string;
|
|
12
|
+
type: "chatnotify";
|
|
13
|
+
action: "agentTextResponse";
|
|
14
|
+
content: string | any;
|
|
15
|
+
isError?: boolean;
|
|
16
|
+
data?: {
|
|
17
|
+
message: string;
|
|
18
|
+
timestamp?: string;
|
|
19
|
+
agentId?: string;
|
|
20
|
+
conversationId?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type GetChatHistoryRequestNotification = {
|
|
24
|
+
toolUseId: string;
|
|
25
|
+
type: "chatnotify";
|
|
26
|
+
action: "getChatHistoryRequest";
|
|
27
|
+
data: {
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type GetChatHistoryResultNotification = {
|
|
32
|
+
toolUseId: string;
|
|
33
|
+
type: "chatnotify";
|
|
34
|
+
action: "getChatHistoryResult";
|
|
35
|
+
content: string | any;
|
|
36
|
+
isError?: boolean;
|
|
37
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type GrepSearchRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "codeutilsnotify";
|
|
4
|
+
action: "grepSearchRequest";
|
|
5
|
+
data: {
|
|
6
|
+
pattern: string;
|
|
7
|
+
filePath?: string;
|
|
8
|
+
recursive?: boolean;
|
|
9
|
+
ignoreCase?: boolean;
|
|
10
|
+
maxResults?: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type GrepSearchResponseNotification = {
|
|
14
|
+
toolUseId: string;
|
|
15
|
+
type: "codeutilsnotify";
|
|
16
|
+
action: "grepSearchResult";
|
|
17
|
+
content: string | any;
|
|
18
|
+
isError?: boolean;
|
|
19
|
+
data?: {
|
|
20
|
+
matches: Array<{
|
|
21
|
+
file: string;
|
|
22
|
+
line: number;
|
|
23
|
+
content: string;
|
|
24
|
+
matchIndex?: number;
|
|
25
|
+
}>;
|
|
26
|
+
totalMatches?: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type GlobSearchRequestNotification = {
|
|
30
|
+
toolUseId: string;
|
|
31
|
+
type: "codeutilsnotify";
|
|
32
|
+
action: "globSearchRequest";
|
|
33
|
+
data: {
|
|
34
|
+
pattern: string;
|
|
35
|
+
basePath?: string;
|
|
36
|
+
maxDepth?: number;
|
|
37
|
+
includeDirectories?: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type GlobSearchResponseNotification = {
|
|
41
|
+
toolUseId: string;
|
|
42
|
+
type: "codeutilsnotify";
|
|
43
|
+
action: "globSearchResult";
|
|
44
|
+
content: string | any;
|
|
45
|
+
isError?: boolean;
|
|
46
|
+
data?: {
|
|
47
|
+
files: Array<{
|
|
48
|
+
path: string;
|
|
49
|
+
type: 'file' | 'directory';
|
|
50
|
+
size?: number;
|
|
51
|
+
modified?: string;
|
|
52
|
+
}>;
|
|
53
|
+
totalFiles?: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type CrawlerSearchRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "crawlernotify";
|
|
4
|
+
action: "crawlerSearchRequest";
|
|
5
|
+
data: {
|
|
6
|
+
url: string;
|
|
7
|
+
searchQuery?: string;
|
|
8
|
+
maxDepth?: number;
|
|
9
|
+
maxPages?: number;
|
|
10
|
+
includeSubdomains?: boolean;
|
|
11
|
+
followRedirects?: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type CrawlerSearchResponseNotification = {
|
|
15
|
+
toolUseId: string;
|
|
16
|
+
type: "crawlernotify";
|
|
17
|
+
action: "crawlerSearchResult";
|
|
18
|
+
content: string | any;
|
|
19
|
+
isError?: boolean;
|
|
20
|
+
data?: {
|
|
21
|
+
pages: Array<{
|
|
22
|
+
url: string;
|
|
23
|
+
title: string;
|
|
24
|
+
content: string;
|
|
25
|
+
depth: number;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
}>;
|
|
28
|
+
totalPages?: number;
|
|
29
|
+
crawlTime?: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type CrawlerStartRequestNotification = {
|
|
33
|
+
toolUseId: string;
|
|
34
|
+
type: "crawlernotify";
|
|
35
|
+
action: "crawlerStartRequest";
|
|
36
|
+
data: {
|
|
37
|
+
startUrl: string;
|
|
38
|
+
options?: {
|
|
39
|
+
userAgent?: string;
|
|
40
|
+
timeout?: number;
|
|
41
|
+
headers?: Record<string, string>;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type CrawlerStartResponseNotification = {
|
|
46
|
+
toolUseId: string;
|
|
47
|
+
type: "crawlernotify";
|
|
48
|
+
action: "crawlerStartResult";
|
|
49
|
+
content: string | any;
|
|
50
|
+
isError?: boolean;
|
|
51
|
+
data?: {
|
|
52
|
+
sessionId: string;
|
|
53
|
+
status: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type AddMemoryRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "dbmemorynotify";
|
|
4
|
+
action: "addKnowledgeRequest";
|
|
5
|
+
data: {
|
|
6
|
+
key: string;
|
|
7
|
+
value: any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type AddMemoryResultNotification = {
|
|
11
|
+
toolUseId: string;
|
|
12
|
+
type: "dbmemorynotify";
|
|
13
|
+
action: "addKnowledgeResult";
|
|
14
|
+
content: string | any;
|
|
15
|
+
isError?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type GetMemoryRequestNotification = {
|
|
18
|
+
toolUseId: string;
|
|
19
|
+
type: "dbmemorynotify";
|
|
20
|
+
action: "getKnowledgeRequest";
|
|
21
|
+
data: {
|
|
22
|
+
key: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type GetMemoryResultNotification = {
|
|
26
|
+
toolUseId: string;
|
|
27
|
+
type: "dbmemorynotify";
|
|
28
|
+
action: "getKnowledgeResult";
|
|
29
|
+
content: string | any;
|
|
30
|
+
isError?: boolean;
|
|
31
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export type FileCreateRequestNotification = {
|
|
2
|
+
toolUseId: string;
|
|
3
|
+
type: "fsnotify";
|
|
4
|
+
action: "createFileRequest";
|
|
5
|
+
data: {
|
|
6
|
+
fileName: string;
|
|
7
|
+
source: string;
|
|
8
|
+
filePath: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type FileCreateResponseNotification = {
|
|
12
|
+
toolUseId: string;
|
|
13
|
+
type: "fsnotify";
|
|
14
|
+
action: "createFileResult";
|
|
15
|
+
content: string | any;
|
|
16
|
+
isError?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type FolderCreateRequestNotification = {
|
|
19
|
+
toolUseId: string;
|
|
20
|
+
type: "fsnotify";
|
|
21
|
+
action: "createFolderRequest";
|
|
22
|
+
data: {
|
|
23
|
+
folderName: string;
|
|
24
|
+
folderPath: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type FolderCreateResponseNotification = {
|
|
28
|
+
toolUseId: string;
|
|
29
|
+
type: "fsnotify";
|
|
30
|
+
action: "createFolderResult";
|
|
31
|
+
content: string | any;
|
|
32
|
+
isError?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type FileReadRequestNotification = {
|
|
35
|
+
toolUseId: string;
|
|
36
|
+
type: "fsnotify";
|
|
37
|
+
action: "readFileRequest";
|
|
38
|
+
data: {
|
|
39
|
+
filePath: string;
|
|
40
|
+
startLine?: string;
|
|
41
|
+
endLine?: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type FileReadResponseNotification = {
|
|
45
|
+
toolUseId: string;
|
|
46
|
+
type: "fsnotify";
|
|
47
|
+
action: "readFileResult";
|
|
48
|
+
content: string | any;
|
|
49
|
+
isError?: boolean;
|
|
50
|
+
};
|
|
51
|
+
export type FileEditRequestNotification = {
|
|
52
|
+
toolUseId: string;
|
|
53
|
+
type: "fsnotify";
|
|
54
|
+
action: "updateFileRequest";
|
|
55
|
+
data: {
|
|
56
|
+
fileName: string;
|
|
57
|
+
filePath: string;
|
|
58
|
+
newContent: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export type FileEditResponseNotification = {
|
|
62
|
+
toolUseId: string;
|
|
63
|
+
type: "fsnotify";
|
|
64
|
+
action: "updateFileResult";
|
|
65
|
+
content: string | any;
|
|
66
|
+
isError?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type FileDeleteRequestNotification = {
|
|
69
|
+
toolUseId: string;
|
|
70
|
+
type: "fsnotify";
|
|
71
|
+
action: "deleteFileRequest";
|
|
72
|
+
data: {
|
|
73
|
+
fileName: string;
|
|
74
|
+
filePath: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export type FileDeleteResponseNotification = {
|
|
78
|
+
toolUseId: string;
|
|
79
|
+
type: "fsnotify";
|
|
80
|
+
action: "deleteFileResult";
|
|
81
|
+
content: string | any;
|
|
82
|
+
isError?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type FolderDeleteRequestNotification = {
|
|
85
|
+
toolUseId: string;
|
|
86
|
+
type: "fsnotify";
|
|
87
|
+
action: "deleteFolderRequest";
|
|
88
|
+
data: {
|
|
89
|
+
folderName: string;
|
|
90
|
+
folderPath: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export type FolderDeleteResponseNotification = {
|
|
94
|
+
toolUseId: string;
|
|
95
|
+
type: "fsnotify";
|
|
96
|
+
action: "deleteFolderResult";
|
|
97
|
+
content: string | any;
|
|
98
|
+
isError?: boolean;
|
|
99
|
+
};
|
|
100
|
+
export type ListDirectoryRequestNotification = {
|
|
101
|
+
toolUseId: string;
|
|
102
|
+
type: "fsnotify";
|
|
103
|
+
action: "listDirectoryRequest";
|
|
104
|
+
data: {
|
|
105
|
+
dirPath: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export type ListDirectoryResponseNotification = {
|
|
109
|
+
toolUseId: string;
|
|
110
|
+
type: "fsnotify";
|
|
111
|
+
action: "listDirectoryResult";
|
|
112
|
+
content: string | any;
|
|
113
|
+
isError?: boolean;
|
|
114
|
+
};
|
|
115
|
+
export type WriteToFileRequestNotification = {
|
|
116
|
+
toolUseId: string;
|
|
117
|
+
type: "fsnotify";
|
|
118
|
+
action: "writeToFileRequest";
|
|
119
|
+
data: {
|
|
120
|
+
filePath: string;
|
|
121
|
+
text: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export type WriteToFileResponseNotification = {
|
|
125
|
+
toolUseId: string;
|
|
126
|
+
type: "fsnotify";
|
|
127
|
+
action: "writeToFileResult";
|
|
128
|
+
content: string | any;
|
|
129
|
+
isError?: boolean;
|
|
130
|
+
};
|
|
131
|
+
export type AppendToFileRequestNotification = {
|
|
132
|
+
toolUseId: string;
|
|
133
|
+
type: "fsnotify";
|
|
134
|
+
action: "appendToFileRequest";
|
|
135
|
+
data: {
|
|
136
|
+
filePath: string;
|
|
137
|
+
text: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type AppendToFileResponseNotification = {
|
|
141
|
+
toolUseId: string;
|
|
142
|
+
type: "fsnotify";
|
|
143
|
+
action: "appendToFileResult";
|
|
144
|
+
content: string | any;
|
|
145
|
+
isError?: boolean;
|
|
146
|
+
};
|
|
147
|
+
export type CopyFileRequestNotification = {
|
|
148
|
+
toolUseId: string;
|
|
149
|
+
type: "fsnotify";
|
|
150
|
+
action: "copyFileRequest";
|
|
151
|
+
data: {
|
|
152
|
+
sourceFile: string;
|
|
153
|
+
destinationFile: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
export type CopyFileResponseNotification = {
|
|
157
|
+
toolUseId: string;
|
|
158
|
+
type: "fsnotify";
|
|
159
|
+
action: "copyFileResult";
|
|
160
|
+
content: string | any;
|
|
161
|
+
isError?: boolean;
|
|
162
|
+
};
|
|
163
|
+
export type MoveFileRequestNotification = {
|
|
164
|
+
toolUseId: string;
|
|
165
|
+
type: "fsnotify";
|
|
166
|
+
action: "moveFileRequest";
|
|
167
|
+
data: {
|
|
168
|
+
sourceFile: string;
|
|
169
|
+
destinationFile: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export type MoveFileResponseNotification = {
|
|
173
|
+
toolUseId: string;
|
|
174
|
+
type: "fsnotify";
|
|
175
|
+
action: "moveFileResult";
|
|
176
|
+
content: string | any;
|
|
177
|
+
isError?: boolean;
|
|
178
|
+
};
|
|
179
|
+
export type FileSystemRequestNotification = FileCreateRequestNotification | FolderCreateRequestNotification | FileReadRequestNotification | FileEditRequestNotification | FileDeleteRequestNotification | FolderDeleteRequestNotification | ListDirectoryRequestNotification | WriteToFileRequestNotification | AppendToFileRequestNotification | CopyFileRequestNotification | MoveFileRequestNotification;
|
|
180
|
+
export type FileSystemResponseNotification = FileCreateResponseNotification | FolderCreateResponseNotification | FileReadResponseNotification | FileEditResponseNotification | FileDeleteResponseNotification | FolderDeleteResponseNotification | ListDirectoryResponseNotification | WriteToFileResponseNotification | AppendToFileResponseNotification | CopyFileResponseNotification | MoveFileResponseNotification;
|