Skip to content

Commit c0e6c58

Browse files
notificaiton interfaces added
1 parent ec05762 commit c0e6c58

File tree

15 files changed

+1173
-0
lines changed

15 files changed

+1173
-0
lines changed

src/types/notifications/agent.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// ===== AGENT NOTIFICATIONS =====
2+
3+
//Subagent Tasks
4+
export type StartSubagentTaskRequestNotification = {
5+
toolUseId: string;
6+
type: "agentnotify";
7+
action: "startSubagentTaskRequest";
8+
data: {
9+
parentAgentId: string;
10+
subagentId: string;
11+
task: string;
12+
priority?: string;
13+
dependencies?: string[];
14+
};
15+
}
16+
17+
export type StartSubagentTaskResponseNotification = {
18+
toolUseId: string;
19+
type: "agentnotify";
20+
action: "startSubagentTaskResult";
21+
content: string | any;
22+
isError?: boolean;
23+
}
24+
25+
export type SubagentTaskCompletedNotification = {
26+
toolUseId: string;
27+
type: "agentnotify";
28+
action: "subagentTaskCompleted";
29+
data: {
30+
parentAgentId: string;
31+
subagentId: string;
32+
taskId: string;
33+
result: any;
34+
status: string;
35+
};
36+
}

src/types/notifications/browser.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// ===== BROWSER NOTIFICATIONS =====
2+
3+
// Request Notifications
4+
// WebFetch
5+
export type WebFetchRequestNotification = {
6+
toolUseId: string;
7+
type: "browsernotify";
8+
action: "webFetchRequest";
9+
data: {
10+
url: string;
11+
method?: string;
12+
headers?: Record<string, string>;
13+
body?: string;
14+
timeout?: number;
15+
};
16+
}
17+
18+
export type WebFetchResponseNotification = {
19+
toolUseId: string;
20+
type: "browsernotify";
21+
action: "webFetchResult";
22+
content: string | any;
23+
isError?: boolean;
24+
data?: {
25+
status?: number;
26+
statusText?: string;
27+
headers?: Record<string, string>;
28+
url?: string;
29+
};
30+
}
31+
32+
// WebSearch
33+
export type WebSearchRequestNotification = {
34+
toolUseId: string;
35+
type: "browsernotify";
36+
action: "webSearchRequest";
37+
data: {
38+
query: string;
39+
maxResults?: number;
40+
searchEngine?: string;
41+
filters?: Record<string, any>;
42+
};
43+
}
44+
45+
export type WebSearchResponseNotification = {
46+
toolUseId: string;
47+
type: "browsernotify";
48+
action: "webSearchResult";
49+
content: string | any;
50+
isError?: boolean;
51+
data?: {
52+
results: Array<{
53+
title: string;
54+
url: string;
55+
snippet: string;
56+
rank?: number;
57+
}>;
58+
totalResults?: number;
59+
searchTime?: number;
60+
};
61+
}

src/types/notifications/chat.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// ===== CHAT NOTIFICATIONS =====
2+
3+
// Request Notifications
4+
5+
export type UserMessageRequestNotification = {
6+
toolUseId: string;
7+
type: "chatnotify";
8+
action: "sendMessageRequest";
9+
data: {
10+
message: string;
11+
payload?: any;
12+
};
13+
};
14+
15+
export type AgentTextResponseNotification = {
16+
toolUseId: string;
17+
type: "chatnotify";
18+
action: "agentTextResponse";
19+
content: string | any;
20+
isError?: boolean;
21+
data?: {
22+
message: string;
23+
timestamp?: string;
24+
agentId?: string;
25+
conversationId?: string;
26+
};
27+
}
28+
29+
export type GetChatHistoryRequestNotification = {
30+
toolUseId: string;
31+
type: "chatnotify";
32+
action: "getChatHistoryRequest";
33+
data: {
34+
sessionId?: string;
35+
};
36+
};
37+
38+
export type GetChatHistoryResultNotification = {
39+
toolUseId: string;
40+
type: "chatnotify";
41+
action: "getChatHistoryResult";
42+
content: string | any;
43+
isError?: boolean;
44+
};
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// ===== CODE UTILS NOTIFICATIONS =====
2+
3+
export type GrepSearchRequestNotification = {
4+
toolUseId: string;
5+
type: "codeutilsnotify";
6+
action: "grepSearchRequest";
7+
data: {
8+
pattern: string;
9+
filePath?: string;
10+
recursive?: boolean;
11+
ignoreCase?: boolean;
12+
maxResults?: number;
13+
};
14+
}
15+
16+
export type GrepSearchResponseNotification = {
17+
toolUseId: string;
18+
type: "codeutilsnotify";
19+
action: "grepSearchResult";
20+
content: string | any;
21+
isError?: boolean;
22+
data?: {
23+
matches: Array<{
24+
file: string;
25+
line: number;
26+
content: string;
27+
matchIndex?: number;
28+
}>;
29+
totalMatches?: number;
30+
};
31+
}
32+
33+
export type GlobSearchRequestNotification = {
34+
toolUseId: string;
35+
type: "codeutilsnotify";
36+
action: "globSearchRequest";
37+
data: {
38+
pattern: string;
39+
basePath?: string;
40+
maxDepth?: number;
41+
includeDirectories?: boolean;
42+
};
43+
}
44+
45+
export type GlobSearchResponseNotification = {
46+
toolUseId: string;
47+
type: "codeutilsnotify";
48+
action: "globSearchResult";
49+
content: string | any;
50+
isError?: boolean;
51+
data?: {
52+
files: Array<{
53+
path: string;
54+
type: 'file' | 'directory';
55+
size?: number;
56+
modified?: string;
57+
}>;
58+
totalFiles?: number;
59+
};
60+
}

src/types/notifications/crawler.ts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// ===== CRAWLER NOTIFICATIONS =====
2+
3+
// Request Notifications
4+
// Add Search functions here
5+
6+
export type CrawlerSearchRequestNotification = {
7+
toolUseId: string;
8+
type: "crawlernotify";
9+
action: "crawlerSearchRequest";
10+
data: {
11+
url: string;
12+
searchQuery?: string;
13+
maxDepth?: number;
14+
maxPages?: number;
15+
includeSubdomains?: boolean;
16+
followRedirects?: boolean;
17+
};
18+
}
19+
20+
export type CrawlerSearchResponseNotification = {
21+
toolUseId: string;
22+
type: "crawlernotify";
23+
action: "crawlerSearchResult";
24+
content: string | any;
25+
isError?: boolean;
26+
data?: {
27+
pages: Array<{
28+
url: string;
29+
title: string;
30+
content: string;
31+
depth: number;
32+
timestamp: string;
33+
}>;
34+
totalPages?: number;
35+
crawlTime?: number;
36+
};
37+
}
38+
39+
export type CrawlerStartRequestNotification = {
40+
toolUseId: string;
41+
type: "crawlernotify";
42+
action: "crawlerStartRequest";
43+
data: {
44+
startUrl: string;
45+
options?: {
46+
userAgent?: string;
47+
timeout?: number;
48+
headers?: Record<string, string>;
49+
};
50+
};
51+
}
52+
53+
export type CrawlerStartResponseNotification = {
54+
toolUseId: string;
55+
type: "crawlernotify";
56+
action: "crawlerStartResult";
57+
content: string | any;
58+
isError?: boolean;
59+
data?: {
60+
sessionId: string;
61+
status: string;
62+
};
63+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// ===== DBMEMORY NOTIFICATIONS =====
2+
3+
// Request Notifications
4+
export type AddMemoryRequestNotification = {
5+
toolUseId: string;
6+
type: "dbmemorynotify";
7+
action: "addKnowledgeRequest";
8+
data: {
9+
key: string;
10+
value: any;
11+
};
12+
};
13+
export type AddMemoryResultNotification = {
14+
toolUseId: string;
15+
type: "dbmemorynotify";
16+
action: "addKnowledgeResult";
17+
content: string | any;
18+
isError?: boolean;
19+
};
20+
21+
export type GetMemoryRequestNotification = {
22+
toolUseId: string;
23+
type: "dbmemorynotify";
24+
action: "getKnowledgeRequest";
25+
data: {
26+
key: string;
27+
};
28+
};
29+
30+
export type GetMemoryResultNotification = {
31+
toolUseId: string;
32+
type: "dbmemorynotify";
33+
action: "getKnowledgeResult";
34+
content: string | any;
35+
isError?: boolean;
36+
};

0 commit comments

Comments
 (0)