Skip to content

Commit b6b32fd

Browse files
committed
updated
1 parent 18e769b commit b6b32fd

33 files changed

+355
-286
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codebolt/codeboltjs",
3-
"version": "2.0.13",
3+
"version": "2.0.15",
44
"description": "",
55
"keywords": [],
66
"author": "",

src/notificationfunctions/agent.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,14 @@ import {
1111
SubagentTaskCompletedNotification
1212
} from '../types/notifications/agent';
1313

14+
import { AgentNotifications } from '../types/notificationFunctions/agent';
15+
1416
import {
1517
sendNotification,
1618
generateToolUseId,
17-
validateRequiredFields,
18-
createErrorResponse,
19-
createSuccessResponse
19+
validateRequiredFields
2020
} from './utils';
2121

22-
/**
23-
* Interface for agent notification functions
24-
*/
25-
export interface AgentNotifications {
26-
StartSubagentTaskRequestNotify(parentAgentId: string, subagentId: string, task: string, priority?: string, dependencies?: string[], toolUseId?: string): void;
27-
StartSubagentTaskResponseNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
28-
SubagentTaskCompletedNotify(parentAgentId: string, subagentId: string, taskId: string, result: any, status: string, toolUseId?: string): void;
29-
}
30-
3122
/**
3223
* Sends a request to start a subagent task
3324
*

src/notificationfunctions/browser.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@ import {
1212
WebSearchResponseNotification
1313
} from '../types/notifications/browser';
1414

15+
import { BrowserNotifications } from '../types/notificationFunctions/browser';
16+
1517
import {
1618
sendNotification,
1719
generateToolUseId,
1820
validateRequiredFields
1921
} from './utils';
2022

21-
/**
22-
* Interface for browser notification functions
23-
*/
24-
export interface BrowserNotifications {
25-
WebFetchRequestNotify(url: string, method?: string, headers?: Record<string, string>, body?: any, timeout?: number, toolUseId?: string): void;
26-
WebFetchResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: WebFetchResponseNotification['data']): void;
27-
WebSearchRequestNotify(query: string, maxResults?: number, searchEngine?: string, filters?: any, toolUseId?: string): void;
28-
WebSearchResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: WebSearchResponseNotification['data']): void;
29-
}
3023

3124
/**
3225
* Sends a web fetch request notification

src/notificationfunctions/chat.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
GetChatHistoryResultNotification
1313
} from '../types/notifications/chat';
1414

15+
import { ChatNotifications } from '../types/notificationFunctions/chat';
16+
1517
import {
1618
sendNotification,
1719
generateToolUseId,
@@ -20,15 +22,6 @@ import {
2022
createSuccessResponse
2123
} from './utils';
2224

23-
/**
24-
* Interface for chat notification functions
25-
*/
26-
export interface ChatNotifications {
27-
UserMessageRequestNotify(message: string, payload?: any, toolUseId?: string): void;
28-
AgentTextResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: AgentTextResponseNotification['data']): void;
29-
GetChatHistoryRequestNotify(data?: GetChatHistoryRequestNotification['data'], toolUseId?: string): void;
30-
GetChatHistoryResultNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
31-
}
3225

3326
/**
3427
* Sends a user message request

src/notificationfunctions/codeutils.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@ import {
1212
GlobSearchResponseNotification
1313
} from '../types/notifications/codeutils';
1414

15+
import { CodeutilsNotifications } from '../types/notificationFunctions/codeutils';
16+
1517
import {
1618
sendNotification,
1719
generateToolUseId,
1820
validateRequiredFields
1921
} from './utils';
2022

21-
/**
22-
* Interface for code utils notification functions
23-
*/
24-
export interface CodeutilsNotifications {
25-
GrepSearchRequestNotify(pattern: string, filePath?: string, recursive?: boolean, ignoreCase?: boolean, maxResults?: number, toolUseId?: string): void;
26-
GrepSearchResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: GrepSearchResponseNotification['data']): void;
27-
GlobSearchRequestNotify(pattern: string, basePath?: string, maxDepth?: number, includeDirectories?: boolean, toolUseId?: string): void;
28-
GlobSearchResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: GlobSearchResponseNotification['data']): void;
29-
}
3023

3124
/**
3225
* Sends a grep search request

src/notificationfunctions/crawler.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,14 @@ import {
1212
CrawlerStartResponseNotification
1313
} from '../types/notifications/crawler';
1414

15+
import { CrawlerNotifications } from '../types/notificationFunctions/crawler';
16+
1517
import {
1618
sendNotification,
1719
generateToolUseId,
18-
validateRequiredFields,
19-
createErrorResponse,
20-
createSuccessResponse
20+
validateRequiredFields
2121
} from './utils';
2222

23-
/**
24-
* Interface for crawler notification functions
25-
*/
26-
export interface CrawlerNotifications {
27-
CrawlerSearchRequestNotify(url: string, searchQuery?: string, maxDepth?: number, maxPages?: number, includeSubdomains?: boolean, followRedirects?: boolean, toolUseId?: string): void;
28-
CrawlerSearchResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: CrawlerSearchResponseNotification['data']): void;
29-
CrawlerStartRequestNotify(startUrl: string, options?: any, toolUseId?: string): void;
30-
CrawlerStartResponseNotify(content: string | any, isError?: boolean, toolUseId?: string, data?: CrawlerStartResponseNotification['data']): void;
31-
}
3223

3324
/**
3425
* Sends a request to perform a crawler search

src/notificationfunctions/dbmemory.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,14 @@ import {
1212
GetMemoryResultNotification
1313
} from '../types/notifications/dbmemory';
1414

15+
import { DbmemoryNotifications } from '../types/notificationFunctions/dbmemory';
16+
1517
import {
1618
sendNotification,
1719
generateToolUseId,
18-
validateRequiredFields,
19-
createErrorResponse,
20-
createSuccessResponse
20+
validateRequiredFields
2121
} from './utils';
2222

23-
/**
24-
* Interface for database memory notification functions
25-
*/
26-
export interface DbmemoryNotifications {
27-
AddMemoryRequestNotify(key: string, value: any, toolUseId?: string): void;
28-
AddMemoryResultNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
29-
GetMemoryRequestNotify(key: string, toolUseId?: string): void;
30-
GetMemoryResultNotify(content: string | any, isError?: boolean, toolUseId?: string): void;
31-
}
3223

3324
/**
3425
* Sends a request to add knowledge to memory

0 commit comments

Comments
 (0)