@codebolt/codeboltjs 5.0.6 → 5.0.8
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 +354 -350
- package/dist/core/Codebolt.js +2 -0
- package/dist/index.d.ts +65 -29
- package/dist/index.js +121 -9
- package/dist/modules/actionPlan.d.ts +6 -18
- package/dist/modules/agentDeliberation.d.ts +1 -1
- package/dist/modules/agentDeliberation.js +9 -9
- package/dist/modules/agentEventQueue.d.ts +45 -3
- package/dist/modules/agentEventQueue.js +172 -20
- package/dist/modules/autoTesting.d.ts +1 -1
- package/dist/modules/autoTesting.js +19 -19
- package/dist/modules/backgroundChildThreads.d.ts +16 -17
- package/dist/modules/backgroundChildThreads.js +39 -16
- package/dist/modules/browser.d.ts +7 -6
- package/dist/modules/browser.js +4 -4
- package/dist/modules/chat.d.ts +10 -14
- package/dist/modules/chat.js +7 -5
- package/dist/modules/codebaseSearch.d.ts +1 -1
- package/dist/modules/codemap.d.ts +1 -1
- package/dist/modules/contextAssembly.d.ts +1 -1
- package/dist/modules/contextRuleEngine.d.ts +1 -1
- package/dist/modules/eventLog.d.ts +1 -1
- package/dist/modules/fileUpdateIntent.d.ts +1 -1
- package/dist/modules/groupFeedback.d.ts +2 -2
- package/dist/modules/groupFeedback.js +8 -8
- package/dist/modules/hook.d.ts +1 -1
- package/dist/modules/job.d.ts +1 -1
- package/dist/modules/knowledgeGraph.d.ts +1 -1
- package/dist/modules/kvStore.d.ts +1 -1
- package/dist/modules/mail.d.ts +2 -91
- package/dist/modules/mcp.js +3 -3
- package/dist/modules/memoryIngestion.d.ts +1 -1
- package/dist/modules/orchestrator.d.ts +3 -43
- package/dist/modules/orchestrator.js +2 -2
- package/dist/modules/persistentMemory.d.ts +1 -1
- package/dist/modules/projectStructure.d.ts +1 -1
- package/dist/modules/projectStructureUpdateRequest.d.ts +1 -1
- package/dist/modules/reviewMergeRequest.d.ts +6 -2
- package/dist/modules/roadmap.d.ts +1 -1
- package/dist/modules/swarm.d.ts +2 -2
- package/dist/modules/terminal.d.ts +2 -2
- package/dist/modules/thread.d.ts +12 -10
- package/dist/modules/thread.js +11 -7
- package/dist/modules/user-message-manager.js +4 -4
- package/dist/tools/actionPlan/action-plan-add-task.d.ts +3 -2
- package/dist/tools/agentEventQueue/eventqueue-send-message.js +1 -1
- package/dist/tools/chat/chat-send.d.ts +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +54 -59
- package/dist/tools/planning/plan-add-task.d.ts +2 -22
- package/dist/tools/requirementPlan/requirement-plan-add-section.js +1 -1
- package/dist/tools/review/review-create.js +1 -1
- package/dist/tools/reviewMergeRequest/rmr-create.js +3 -2
- package/dist/tools/thread/thread-create-background.d.ts +7 -3
- package/dist/tools/thread/thread-create-background.js +31 -11
- package/package.json +5 -4
package/dist/modules/chat.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ChatMessage, UserMessage } from '@codebolt/types/sdk';
|
|
2
|
-
type
|
|
1
|
+
import { ChatMessage, UserMessage, ChatRequest, ChatResponseData, SteeringMessage, StopProcessMessage, ProcessControl, ProcessControlWithCleanup } from '@codebolt/types/sdk';
|
|
2
|
+
export type { ChatRequest, ChatResponseData, SteeringMessage, StopProcessMessage, ProcessControl, ProcessControlWithCleanup };
|
|
3
|
+
type RequestHandler = (request: ChatRequest, response: (data: ChatResponseData) => void) => Promise<void> | void;
|
|
3
4
|
/**
|
|
4
5
|
* Chat module to interact with the WebSocket server.
|
|
5
6
|
*/
|
|
@@ -17,8 +18,9 @@ declare const cbchat: {
|
|
|
17
18
|
/**
|
|
18
19
|
* Sends a message through the WebSocket connection.
|
|
19
20
|
* @param {string} message - The message to be sent.
|
|
21
|
+
* @param {object} payload - Optional additional payload data.
|
|
20
22
|
*/
|
|
21
|
-
sendMessage: (message: string, payload?:
|
|
23
|
+
sendMessage: (message: string, payload?: object) => void;
|
|
22
24
|
/**
|
|
23
25
|
* Waits for a reply to a sent message.
|
|
24
26
|
* @param {string} message - The message for which a reply is expected.
|
|
@@ -30,13 +32,7 @@ declare const cbchat: {
|
|
|
30
32
|
* @param {Function} onStopClicked - Callback function to handle stop process events.
|
|
31
33
|
* @returns An object containing a stopProcess method.
|
|
32
34
|
*/
|
|
33
|
-
processStarted: (onStopClicked?: (message:
|
|
34
|
-
stopProcess: () => void;
|
|
35
|
-
cleanup: () => void;
|
|
36
|
-
} | {
|
|
37
|
-
stopProcess: () => void;
|
|
38
|
-
cleanup?: undefined;
|
|
39
|
-
};
|
|
35
|
+
processStarted: (onStopClicked?: (message: StopProcessMessage) => void) => ProcessControl | ProcessControlWithCleanup;
|
|
40
36
|
/**
|
|
41
37
|
* Stops the ongoing process.
|
|
42
38
|
* Sends a specific message to the server to stop the process.
|
|
@@ -60,13 +56,13 @@ declare const cbchat: {
|
|
|
60
56
|
sendNotificationEvent: (notificationMessage: string, type: "debug" | "git" | "planner" | "browser" | "editor" | "terminal" | "preview") => void;
|
|
61
57
|
/**
|
|
62
58
|
* Checks if any steering message has been received.
|
|
63
|
-
* @returns
|
|
59
|
+
* @returns The message data if available, or null
|
|
64
60
|
*/
|
|
65
|
-
checkForSteeringMessage: () =>
|
|
61
|
+
checkForSteeringMessage: () => SteeringMessage | null;
|
|
66
62
|
/**
|
|
67
63
|
* Waits for a steering message.
|
|
68
|
-
* @returns
|
|
64
|
+
* @returns A promise that resolves with the message data
|
|
69
65
|
*/
|
|
70
|
-
onSteeringMessageReceived: () => Promise<
|
|
66
|
+
onSteeringMessageReceived: () => Promise<SteeringMessage | null>;
|
|
71
67
|
};
|
|
72
68
|
export default cbchat;
|
package/dist/modules/chat.js
CHANGED
|
@@ -8,7 +8,7 @@ const websocket_1 = __importDefault(require("../core/websocket"));
|
|
|
8
8
|
const crypto_1 = require("crypto");
|
|
9
9
|
const enum_1 = require("@codebolt/types/enum");
|
|
10
10
|
// Steering message state
|
|
11
|
-
|
|
11
|
+
const steeringMessageMap = new Map();
|
|
12
12
|
// Subscribe to steering messages
|
|
13
13
|
const steeringSubscription = websocket_1.default.messageManager.subscribe('steeringMessage');
|
|
14
14
|
steeringSubscription.on('message', (message) => {
|
|
@@ -62,6 +62,7 @@ const cbchat = {
|
|
|
62
62
|
/**
|
|
63
63
|
* Sends a message through the WebSocket connection.
|
|
64
64
|
* @param {string} message - The message to be sent.
|
|
65
|
+
* @param {object} payload - Optional additional payload data.
|
|
65
66
|
*/
|
|
66
67
|
sendMessage: (message, payload) => {
|
|
67
68
|
websocket_1.default.messageManager.send({
|
|
@@ -171,12 +172,13 @@ const cbchat = {
|
|
|
171
172
|
},
|
|
172
173
|
/**
|
|
173
174
|
* Checks if any steering message has been received.
|
|
174
|
-
* @returns
|
|
175
|
+
* @returns The message data if available, or null
|
|
175
176
|
*/
|
|
176
177
|
checkForSteeringMessage: () => {
|
|
177
178
|
if (steeringMessageMap.size > 0) {
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
179
|
+
const entry = steeringMessageMap.entries().next().value;
|
|
180
|
+
if (entry) {
|
|
181
|
+
const [key, value] = entry;
|
|
180
182
|
steeringMessageMap.delete(key);
|
|
181
183
|
return value;
|
|
182
184
|
}
|
|
@@ -185,7 +187,7 @@ const cbchat = {
|
|
|
185
187
|
},
|
|
186
188
|
/**
|
|
187
189
|
* Waits for a steering message.
|
|
188
|
-
* @returns
|
|
190
|
+
* @returns A promise that resolves with the message data
|
|
189
191
|
*/
|
|
190
192
|
onSteeringMessageReceived: async () => {
|
|
191
193
|
const message = cbchat.checkForSteeringMessage();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodebaseSearchResponse, McpToolSearchResponse } from '
|
|
1
|
+
import type { CodebaseSearchResponse, McpToolSearchResponse } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Codebase Search Module for codeboltjs
|
|
4
4
|
* Provides semantic code search functionality across the project.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Codemap, CodemapStatus, CreateCodemapData, UpdateCodemapData, CodemapListResponse, CodemapGetResponse, CodemapCreateResponse, CodemapSaveResponse, CodemapUpdateResponse, CodemapDeleteResponse } from '
|
|
1
|
+
import type { Codemap, CodemapStatus, CreateCodemapData, UpdateCodemapData, CodemapListResponse, CodemapGetResponse, CodemapCreateResponse, CodemapSaveResponse, CodemapUpdateResponse, CodemapDeleteResponse } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Codemap Module for codeboltjs
|
|
4
4
|
* Provides functionality for managing codemaps (visual representations of code structure).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Context Assembly Module
|
|
3
3
|
* Provides context assembly engine operations for building agent context
|
|
4
4
|
*/
|
|
5
|
-
import type { ContextAssemblyResponse, ContextValidateResponse, MemoryTypesResponse, RuleEvaluationResponse, RequiredVariablesResponse, ContextAssemblyRequest } from '
|
|
5
|
+
import type { ContextAssemblyResponse, ContextValidateResponse, MemoryTypesResponse, RuleEvaluationResponse, RequiredVariablesResponse, ContextAssemblyRequest } from '@codebolt/types/lib';
|
|
6
6
|
declare const contextAssembly: {
|
|
7
7
|
/**
|
|
8
8
|
* Assemble context from various memory sources
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Context Rule Engine Module
|
|
3
3
|
* Provides context rule engine operations for conditional memory inclusion
|
|
4
4
|
*/
|
|
5
|
-
import type { ContextRuleEngineResponse, ContextRuleEngineListResponse, ContextRuleEngineDeleteResponse, EvaluateRulesResponse, PossibleVariablesResponse, CreateContextRuleEngineParams, UpdateContextRuleEngineParams, EvaluateRulesParams } from '
|
|
5
|
+
import type { ContextRuleEngineResponse, ContextRuleEngineListResponse, ContextRuleEngineDeleteResponse, EvaluateRulesResponse, PossibleVariablesResponse, CreateContextRuleEngineParams, UpdateContextRuleEngineParams, EvaluateRulesParams } from '@codebolt/types/lib';
|
|
6
6
|
declare const contextRuleEngine: {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new rule engine
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Event Log Module
|
|
3
3
|
* Provides event logging operations for agent activities
|
|
4
4
|
*/
|
|
5
|
-
import type { EventLogInstanceResponse, EventLogInstanceListResponse, EventLogAppendResponse, EventLogAppendMultipleResponse, EventLogQueryResponse, EventLogStatsResponse, EventLogDSL, UpdateEventLogInstanceParams, AppendEventParams, AppendEventsParams } from '
|
|
5
|
+
import type { EventLogInstanceResponse, EventLogInstanceListResponse, EventLogAppendResponse, EventLogAppendMultipleResponse, EventLogQueryResponse, EventLogStatsResponse, EventLogDSL, UpdateEventLogInstanceParams, AppendEventParams, AppendEventsParams } from '@codebolt/types/lib';
|
|
6
6
|
declare const eventLog: {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new event log instance
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateFileUpdateIntentRequest, UpdateFileUpdateIntentRequest, FileUpdateIntentFilters, FileUpdateIntent, IntentOverlapResult, FileWithIntent } from '
|
|
1
|
+
import type { CreateFileUpdateIntentRequest, UpdateFileUpdateIntentRequest, FileUpdateIntentFilters, FileUpdateIntent, IntentOverlapResult, FileWithIntent } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* File Update Intent service client for codeboltjs.
|
|
4
4
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ICreateFeedbackParams, ICreateFeedbackResponse, IGetFeedbackParams, IGetFeedbackResponse, IListFeedbacksParams, IListFeedbacksResponse,
|
|
1
|
+
import { ICreateFeedbackParams, ICreateFeedbackResponse, IGetFeedbackParams, IGetFeedbackResponse, IListFeedbacksParams, IListFeedbacksResponse, IFeedbackRespondParams, IFeedbackRespondResponse, IReplyParams, IReplyResponse, IUpdateSummaryParams, IUpdateSummaryResponse, IUpdateStatusParams, IUpdateStatusResponse } from '@codebolt/types/lib';
|
|
2
2
|
declare const cbgroupFeedback: {
|
|
3
3
|
create: (params: ICreateFeedbackParams) => Promise<ICreateFeedbackResponse>;
|
|
4
4
|
get: (params: IGetFeedbackParams) => Promise<IGetFeedbackResponse>;
|
|
5
5
|
list: (params?: IListFeedbacksParams) => Promise<IListFeedbacksResponse>;
|
|
6
|
-
respond: (params:
|
|
6
|
+
respond: (params: IFeedbackRespondParams) => Promise<IFeedbackRespondResponse>;
|
|
7
7
|
reply: (params: IReplyParams) => Promise<IReplyResponse>;
|
|
8
8
|
updateSummary: (params: IUpdateSummaryParams) => Promise<IUpdateSummaryResponse>;
|
|
9
9
|
updateStatus: (params: IUpdateStatusParams) => Promise<IUpdateStatusResponse>;
|
|
@@ -4,28 +4,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const websocket_1 = __importDefault(require("../core/websocket"));
|
|
7
|
-
const
|
|
7
|
+
const lib_1 = require("@codebolt/types/lib");
|
|
8
8
|
const cbgroupFeedback = {
|
|
9
9
|
create: async (params) => {
|
|
10
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
10
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.CREATE, ...params }, lib_1.GroupFeedbackResponseType.CREATE_RESPONSE);
|
|
11
11
|
},
|
|
12
12
|
get: async (params) => {
|
|
13
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
13
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.GET, ...params }, lib_1.GroupFeedbackResponseType.GET_RESPONSE);
|
|
14
14
|
},
|
|
15
15
|
list: async (params) => {
|
|
16
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
16
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.LIST, ...(params || {}) }, lib_1.GroupFeedbackResponseType.LIST_RESPONSE);
|
|
17
17
|
},
|
|
18
18
|
respond: async (params) => {
|
|
19
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
19
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.RESPOND, ...params }, lib_1.GroupFeedbackResponseType.RESPOND_RESPONSE);
|
|
20
20
|
},
|
|
21
21
|
reply: async (params) => {
|
|
22
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
22
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.REPLY, ...params }, lib_1.GroupFeedbackResponseType.REPLY_RESPONSE);
|
|
23
23
|
},
|
|
24
24
|
updateSummary: async (params) => {
|
|
25
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
25
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.SUMMARY, ...params }, lib_1.GroupFeedbackResponseType.SUMMARY_RESPONSE);
|
|
26
26
|
},
|
|
27
27
|
updateStatus: async (params) => {
|
|
28
|
-
return websocket_1.default.messageManager.sendAndWaitForResponse({ type:
|
|
28
|
+
return websocket_1.default.messageManager.sendAndWaitForResponse({ type: lib_1.GroupFeedbackAction.UPDATE_STATUS, ...params }, lib_1.GroupFeedbackResponseType.UPDATE_STATUS_RESPONSE);
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
exports.default = cbgroupFeedback;
|
package/dist/modules/hook.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Hook Module
|
|
3
3
|
* Provides hook management for triggering actions
|
|
4
4
|
*/
|
|
5
|
-
import type { HookResponse, HookListResponse, HookInitializeResponse, HookDeleteResponse, HookConfig } from '
|
|
5
|
+
import type { HookResponse, HookListResponse, HookInitializeResponse, HookDeleteResponse, HookConfig } from '@codebolt/types/lib';
|
|
6
6
|
declare const hook: {
|
|
7
7
|
/**
|
|
8
8
|
* Initialize the hook manager for a project
|
package/dist/modules/job.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateJobData, CreateJobGroupData, DependencyType, JobCreateResponse, JobDeleteBulkResponse, JobDeleteResponse, JobDependencyResponse, JobGroupCreateResponse, JobLabelsResponse, JobListFilters, JobListResponse, JobReadyBlockedResponse, JobShowResponse, JobUpdateResponse, UpdateJobData, AddPheromoneTypeData, DepositPheromoneData, AddSplitProposalData, AddUnlockRequestData, AddBidData, AddBlockerData, JobPheromoneTypesResponse, JobPheromoneTypeResponse, JobPheromoneDepositResponse, JobPheromoneRemoveResponse, JobPheromoneListResponse, JobPheromoneAggregatedResponse, JobPheromoneSearchResponse, JobSplitProposeResponse, JobSplitDeleteResponse, JobSplitAcceptResponse, JobLockAcquireResponse, JobLockReleaseResponse, JobLockCheckResponse, JobUnlockRequestAddResponse, JobUnlockRequestApproveResponse, JobUnlockRequestRejectResponse, JobUnlockRequestDeleteResponse, JobBidAddResponse, JobBidWithdrawResponse, JobBidAcceptResponse, JobBidListResponse, JobBlockerAddResponse, JobBlockerRemoveResponse, JobBlockerResolveResponse } from '
|
|
1
|
+
import type { CreateJobData, CreateJobGroupData, DependencyType, JobCreateResponse, JobDeleteBulkResponse, JobDeleteResponse, JobDependencyResponse, JobGroupCreateResponse, JobLabelsResponse, JobListFilters, JobListResponse, JobReadyBlockedResponse, JobShowResponse, JobUpdateResponse, UpdateJobData, AddPheromoneTypeData, DepositPheromoneData, AddSplitProposalData, AddUnlockRequestData, AddBidData, AddBlockerData, JobPheromoneTypesResponse, JobPheromoneTypeResponse, JobPheromoneDepositResponse, JobPheromoneRemoveResponse, JobPheromoneListResponse, JobPheromoneAggregatedResponse, JobPheromoneSearchResponse, JobSplitProposeResponse, JobSplitDeleteResponse, JobSplitAcceptResponse, JobLockAcquireResponse, JobLockReleaseResponse, JobLockCheckResponse, JobUnlockRequestAddResponse, JobUnlockRequestApproveResponse, JobUnlockRequestRejectResponse, JobUnlockRequestDeleteResponse, JobBidAddResponse, JobBidWithdrawResponse, JobBidAcceptResponse, JobBidListResponse, JobBlockerAddResponse, JobBlockerRemoveResponse, JobBlockerResolveResponse } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Job service client for codeboltjs.
|
|
4
4
|
* Mirrors backend CLI job operations exposed via WebSocket (jobEvent).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Knowledge Graph Module
|
|
3
3
|
* Provides knowledge graph operations for structured memory
|
|
4
4
|
*/
|
|
5
|
-
import type { KGInstanceTemplateResponse, KGInstanceTemplateListResponse, KGInstanceResponse, KGInstanceListResponse, KGMemoryRecordResponse, KGMemoryRecordListResponse, KGEdgeResponse, KGEdgeListResponse, KGViewTemplateResponse, KGViewTemplateListResponse, KGViewResponse, KGViewListResponse, KGViewExecuteResponse, KGDeleteResponse, CreateKGInstanceTemplateParams, CreateKGInstanceParams, CreateKGMemoryRecordParams, CreateKGEdgeParams, CreateKGViewTemplateParams, CreateKGViewParams, ListKGMemoryRecordsParams, ListKGEdgesParams } from '
|
|
5
|
+
import type { KGInstanceTemplateResponse, KGInstanceTemplateListResponse, KGInstanceResponse, KGInstanceListResponse, KGMemoryRecordResponse, KGMemoryRecordListResponse, KGEdgeResponse, KGEdgeListResponse, KGViewTemplateResponse, KGViewTemplateListResponse, KGViewResponse, KGViewListResponse, KGViewExecuteResponse, KGDeleteResponse, CreateKGInstanceTemplateParams, CreateKGInstanceParams, CreateKGMemoryRecordParams, CreateKGEdgeParams, CreateKGViewTemplateParams, CreateKGViewParams, ListKGMemoryRecordsParams, ListKGEdgesParams } from '@codebolt/types/lib';
|
|
6
6
|
declare const knowledgeGraph: {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new instance template
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* KV Store Module
|
|
3
3
|
* Provides Key-Value store operations for agent state persistence
|
|
4
4
|
*/
|
|
5
|
-
import type { KVInstanceResponse, KVInstanceListResponse, KVGetResponse, KVSetResponse, KVDeleteResponse, KVDeleteNamespaceResponse, KVQueryResponse, KVNamespacesResponse, KVRecordCountResponse, KVQueryDSL, UpdateKVInstanceParams } from '
|
|
5
|
+
import type { KVInstanceResponse, KVInstanceListResponse, KVGetResponse, KVSetResponse, KVDeleteResponse, KVDeleteNamespaceResponse, KVQueryResponse, KVNamespacesResponse, KVRecordCountResponse, KVQueryDSL, UpdateKVInstanceParams } from '@codebolt/types/lib';
|
|
6
6
|
declare const kvStore: {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new KV store instance
|
package/dist/modules/mail.d.ts
CHANGED
|
@@ -1,94 +1,5 @@
|
|
|
1
|
-
import { IRegisterAgentParams, IRegisterAgentResponse, IFetchInboxParams, IFetchInboxResponse, ISendMessageParams, ISendMessageResponse, IReplyMessageParams, IReplyMessageResponse, IMarkReadParams, IMarkReadResponse, IAcknowledgeParams, IAcknowledgeResponse, ISearchParams, ISearchResponse, ISummarizeThreadParams, ISummarizeThreadResponse, IReserveFilesParams, IReserveFilesResponse, IReleaseFilesParams, IReleaseFilesResponse, IForceReserveFilesParams, IForceReserveFilesResponse, IListReservationsParams, IListReservationsResponse, ICheckConflictsParams, ICheckConflictsResponse } from '@codebolt/types/sdk';
|
|
2
|
-
export
|
|
3
|
-
success: boolean;
|
|
4
|
-
agents?: any[];
|
|
5
|
-
error?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface IGetAgentParams {
|
|
8
|
-
agentId: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IGetAgentResponse {
|
|
11
|
-
success: boolean;
|
|
12
|
-
agent?: any;
|
|
13
|
-
error?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ICreateThreadParams {
|
|
16
|
-
subject: string;
|
|
17
|
-
participants: string[];
|
|
18
|
-
type?: 'agent-to-agent' | 'agent-to-user' | 'broadcast';
|
|
19
|
-
metadata?: Record<string, unknown>;
|
|
20
|
-
}
|
|
21
|
-
export interface ICreateThreadResponse {
|
|
22
|
-
success: boolean;
|
|
23
|
-
thread?: any;
|
|
24
|
-
error?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface IFindOrCreateThreadParams {
|
|
27
|
-
subject: string;
|
|
28
|
-
participants: string[];
|
|
29
|
-
type?: 'agent-to-agent' | 'agent-to-user' | 'broadcast';
|
|
30
|
-
metadata?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
export interface IFindOrCreateThreadResponse {
|
|
33
|
-
success: boolean;
|
|
34
|
-
thread?: any;
|
|
35
|
-
created?: boolean;
|
|
36
|
-
error?: string;
|
|
37
|
-
}
|
|
38
|
-
export interface IListThreadsParams {
|
|
39
|
-
type?: 'agent-to-agent' | 'agent-to-user' | 'broadcast';
|
|
40
|
-
status?: 'open' | 'closed' | 'archived';
|
|
41
|
-
participant?: string;
|
|
42
|
-
search?: string;
|
|
43
|
-
limit?: number;
|
|
44
|
-
offset?: number;
|
|
45
|
-
}
|
|
46
|
-
export interface IListThreadsResponse {
|
|
47
|
-
success: boolean;
|
|
48
|
-
threads?: any[];
|
|
49
|
-
total?: number;
|
|
50
|
-
error?: string;
|
|
51
|
-
}
|
|
52
|
-
export interface IGetThreadParams {
|
|
53
|
-
threadId: string;
|
|
54
|
-
}
|
|
55
|
-
export interface IGetThreadResponse {
|
|
56
|
-
success: boolean;
|
|
57
|
-
thread?: any;
|
|
58
|
-
error?: string;
|
|
59
|
-
}
|
|
60
|
-
export interface IUpdateThreadStatusParams {
|
|
61
|
-
threadId: string;
|
|
62
|
-
status: 'open' | 'closed' | 'archived';
|
|
63
|
-
}
|
|
64
|
-
export interface IUpdateThreadStatusResponse {
|
|
65
|
-
success: boolean;
|
|
66
|
-
thread?: any;
|
|
67
|
-
error?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface IArchiveThreadParams {
|
|
70
|
-
threadId: string;
|
|
71
|
-
}
|
|
72
|
-
export interface IArchiveThreadResponse {
|
|
73
|
-
success: boolean;
|
|
74
|
-
error?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface IGetMessageParams {
|
|
77
|
-
messageId: string;
|
|
78
|
-
}
|
|
79
|
-
export interface IGetMessageResponse {
|
|
80
|
-
success: boolean;
|
|
81
|
-
message?: any;
|
|
82
|
-
error?: string;
|
|
83
|
-
}
|
|
84
|
-
export interface IGetMessagesParams {
|
|
85
|
-
threadId: string;
|
|
86
|
-
}
|
|
87
|
-
export interface IGetMessagesResponse {
|
|
88
|
-
success: boolean;
|
|
89
|
-
messages?: any[];
|
|
90
|
-
error?: string;
|
|
91
|
-
}
|
|
1
|
+
import { IRegisterAgentParams, IRegisterAgentResponse, IFetchInboxParams, IFetchInboxResponse, ISendMessageParams, ISendMessageResponse, IReplyMessageParams, IReplyMessageResponse, IMarkReadParams, IMarkReadResponse, IAcknowledgeParams, IAcknowledgeResponse, ISearchParams, ISearchResponse, ISummarizeThreadParams, ISummarizeThreadResponse, IReserveFilesParams, IReserveFilesResponse, IReleaseFilesParams, IReleaseFilesResponse, IForceReserveFilesParams, IForceReserveFilesResponse, IListReservationsParams, IListReservationsResponse, ICheckConflictsParams, ICheckConflictsResponse, MailAgentInfo, MailThread, MailMessage, IListAgentsResponse, IGetAgentParams, IGetAgentResponse, ICreateThreadParams, ICreateThreadResponse, IFindOrCreateThreadParams, IFindOrCreateThreadResponse, IListThreadsParams, IListThreadsResponse, IGetThreadParams, IGetThreadResponse, IUpdateThreadStatusParams, IUpdateThreadStatusResponse, IArchiveThreadParams, IArchiveThreadResponse, IGetMessageParams, IGetMessageResponse, IGetMessagesParams, IGetMessagesResponse } from '@codebolt/types/sdk';
|
|
2
|
+
export type { MailAgentInfo, MailThread, MailMessage, IListAgentsResponse, IGetAgentParams, IGetAgentResponse, ICreateThreadParams, ICreateThreadResponse, IFindOrCreateThreadParams, IFindOrCreateThreadResponse, IListThreadsParams, IListThreadsResponse, IGetThreadParams, IGetThreadResponse, IUpdateThreadStatusParams, IUpdateThreadStatusResponse, IArchiveThreadParams, IArchiveThreadResponse, IGetMessageParams, IGetMessageResponse, IGetMessagesParams, IGetMessagesResponse };
|
|
92
3
|
declare const cbmail: {
|
|
93
4
|
registerAgent: (params: IRegisterAgentParams) => Promise<IRegisterAgentResponse>;
|
|
94
5
|
listAgents: () => Promise<IListAgentsResponse>;
|
package/dist/modules/mcp.js
CHANGED
|
@@ -104,7 +104,7 @@ const codeboltMCP = {
|
|
|
104
104
|
const toolsList = [];
|
|
105
105
|
// Get local codebolt tools in OpenAI format (names prefixed as codebolt--<toolName>)
|
|
106
106
|
if (hasCodebolt) {
|
|
107
|
-
const localTools = tools_1.default.getAllTools().map(tool => convertLocalToolToOpenAIFormat(tool));
|
|
107
|
+
const localTools = tools_1.default.getRegistry().getAllTools().map(tool => convertLocalToolToOpenAIFormat(tool));
|
|
108
108
|
toolsList.push(...localTools);
|
|
109
109
|
}
|
|
110
110
|
// Get remote tools if needed
|
|
@@ -235,7 +235,7 @@ const codeboltMCP = {
|
|
|
235
235
|
let result = [];
|
|
236
236
|
// Include local codebolt tools (names prefixed as codebolt--<toolName>)
|
|
237
237
|
if (includesCodebolt) {
|
|
238
|
-
const localTools = tools_1.default.getAllTools().map(convertLocalToolToOpenAIFormat);
|
|
238
|
+
const localTools = tools_1.default.getRegistry().getAllTools().map(convertLocalToolToOpenAIFormat);
|
|
239
239
|
result = [...result, ...localTools];
|
|
240
240
|
}
|
|
241
241
|
// Get remote MCP tools if needed
|
|
@@ -269,7 +269,7 @@ const codeboltMCP = {
|
|
|
269
269
|
*/
|
|
270
270
|
getAllMcpTools: async () => {
|
|
271
271
|
// Get local codebolt tools
|
|
272
|
-
const localTools = tools_1.default.getAllTools().map(convertLocalToolToOpenAIFormat);
|
|
272
|
+
const localTools = tools_1.default.getRegistry().getAllTools().map(convertLocalToolToOpenAIFormat);
|
|
273
273
|
// Get remote MCP tools
|
|
274
274
|
const response = await websocket_1.default.messageManager.sendAndWaitForResponse({
|
|
275
275
|
"type": enum_1.EventType.CODEBOLT_TOOLS_EVENT,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Memory Ingestion Module
|
|
3
3
|
* Provides memory ingestion pipeline management
|
|
4
4
|
*/
|
|
5
|
-
import type { IngestionPipelineResponse, IngestionPipelineListResponse, IngestionExecuteResponse, IngestionValidateResponse, IngestionProcessorSpecsResponse, CreateIngestionPipelineParams, UpdateIngestionPipelineParams, ListIngestionPipelineParams, ExecuteIngestionParams } from '
|
|
5
|
+
import type { IngestionPipelineResponse, IngestionPipelineListResponse, IngestionExecuteResponse, IngestionValidateResponse, IngestionProcessorSpecsResponse, CreateIngestionPipelineParams, UpdateIngestionPipelineParams, ListIngestionPipelineParams, ExecuteIngestionParams } from '@codebolt/types/lib';
|
|
6
6
|
declare const memoryIngestion: {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new ingestion pipeline
|
|
@@ -1,45 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
agentId: string;
|
|
6
|
-
defaultWorkerAgentId?: string | null;
|
|
7
|
-
threadId: string;
|
|
8
|
-
status: 'idle' | 'running' | 'paused';
|
|
9
|
-
metadata?: Record<string, any>;
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
updatedAt: Date;
|
|
12
|
-
}
|
|
13
|
-
export interface OrchestratorResponse {
|
|
14
|
-
success: boolean;
|
|
15
|
-
requestId?: string;
|
|
16
|
-
data?: any;
|
|
17
|
-
error?: {
|
|
18
|
-
code: string;
|
|
19
|
-
message: string;
|
|
20
|
-
details?: any;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export interface CreateOrchestratorParams {
|
|
24
|
-
name: string;
|
|
25
|
-
description: string;
|
|
26
|
-
agentId: string;
|
|
27
|
-
defaultWorkerAgentId?: string;
|
|
28
|
-
metadata?: Record<string, any>;
|
|
29
|
-
}
|
|
30
|
-
export interface UpdateOrchestratorParams {
|
|
31
|
-
name?: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
agentId?: string;
|
|
34
|
-
defaultWorkerAgentId?: string;
|
|
35
|
-
metadata?: Record<string, any>;
|
|
36
|
-
}
|
|
37
|
-
export interface UpdateOrchestratorSettingsParams {
|
|
38
|
-
name?: string;
|
|
39
|
-
description?: string;
|
|
40
|
-
defaultWorkerAgentId?: string;
|
|
41
|
-
metadata?: Record<string, any>;
|
|
42
|
-
}
|
|
1
|
+
import type { OrchestratorEventType, OrchestratorError, OrchestratorInstance, OrchestratorResponse, OrchestratorStatus, CreateOrchestratorParams, UpdateOrchestratorParams, UpdateOrchestratorSettingsParams, ListOrchestratorsResponse, GetOrchestratorResponse, CreateOrchestratorResponse, UpdateOrchestratorResponse, DeleteOrchestratorResponse, UpdateOrchestratorStatusResponse } from '@codebolt/types/sdk';
|
|
2
|
+
export type { OrchestratorEventType, OrchestratorError, OrchestratorInstance, OrchestratorResponse, OrchestratorStatus, CreateOrchestratorParams, UpdateOrchestratorParams, UpdateOrchestratorSettingsParams, ListOrchestratorsResponse, GetOrchestratorResponse, CreateOrchestratorResponse, UpdateOrchestratorResponse, DeleteOrchestratorResponse, UpdateOrchestratorStatusResponse };
|
|
43
3
|
declare const orchestrator: {
|
|
44
4
|
/**
|
|
45
5
|
* Lists all orchestrators
|
|
@@ -72,7 +32,7 @@ declare const orchestrator: {
|
|
|
72
32
|
/**
|
|
73
33
|
* Updates orchestrator status
|
|
74
34
|
*/
|
|
75
|
-
updateOrchestratorStatus: (orchestratorId: string, status:
|
|
35
|
+
updateOrchestratorStatus: (orchestratorId: string, status: OrchestratorStatus) => Promise<OrchestratorResponse>;
|
|
76
36
|
/**
|
|
77
37
|
* Initiates a Codebolt JS update
|
|
78
38
|
*/
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const websocket_1 = __importDefault(require("../core/websocket"));
|
|
7
|
-
// We use a custom event type string for orchestrator events since we can't add to the enum
|
|
8
|
-
// The server parses 'orchestrator
|
|
7
|
+
// We use a custom event type string for orchestrator events since we can't add to the enum
|
|
8
|
+
// The server parses 'orchestrator.\<action\>' type strings
|
|
9
9
|
const ORCHESTRATOR_EVENT_PREFIX = 'orchestrator.';
|
|
10
10
|
const orchestrator = {
|
|
11
11
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Persistent Memory Module
|
|
3
3
|
* Provides persistent memory retrieval management for agents
|
|
4
4
|
*/
|
|
5
|
-
import type { PersistentMemoryResponse, PersistentMemoryListResponse, PersistentMemoryExecuteResponse, PersistentMemoryValidateResponse, PersistentMemoryStepSpecsResponse, CreatePersistentMemoryParams, UpdatePersistentMemoryParams, ListPersistentMemoryParams, PipelineExecutionIntent } from '
|
|
5
|
+
import type { PersistentMemoryResponse, PersistentMemoryListResponse, PersistentMemoryExecuteResponse, PersistentMemoryValidateResponse, PersistentMemoryStepSpecsResponse, CreatePersistentMemoryParams, UpdatePersistentMemoryParams, ListPersistentMemoryParams, PipelineExecutionIntent } from '@codebolt/types/lib';
|
|
6
6
|
declare const persistentMemory: {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new persistent memory configuration
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreatePackageData, UpdatePackageData, ApiRoute, DatabaseTable, Dependency, RunCommand, UiRoute, DeploymentConfig, GitInfo, DesignGuidelines, FrameworkInfo, ProjectStructureMetadataResponse, ProjectStructurePackagesResponse, ProjectStructurePackageResponse, ProjectStructureDeleteResponse, ProjectStructureUpdateResponse } from '
|
|
1
|
+
import type { CreatePackageData, UpdatePackageData, ApiRoute, DatabaseTable, Dependency, RunCommand, UiRoute, DeploymentConfig, GitInfo, DesignGuidelines, FrameworkInfo, ProjectStructureMetadataResponse, ProjectStructurePackagesResponse, ProjectStructurePackageResponse, ProjectStructureDeleteResponse, ProjectStructureUpdateResponse } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Project Structure Module for codeboltjs
|
|
4
4
|
* Provides functionality for managing project metadata, packages, routes, dependencies, etc.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateUpdateRequestData, UpdateUpdateRequestData, CreateDisputeData, AddCommentData, AddWatcherData, UpdateRequestFilters, UpdateRequestResponse, UpdateRequestListResponse } from '
|
|
1
|
+
import type { CreateUpdateRequestData, UpdateUpdateRequestData, CreateDisputeData, AddCommentData, AddWatcherData, UpdateRequestFilters, UpdateRequestResponse, UpdateRequestListResponse } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Project Structure Update Request Module for codeboltjs
|
|
4
4
|
* Allows agents to propose changes to the project structure
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReviewMergeRequest, CreateReviewMergeRequest, UpdateReviewMergeRequest, ReviewMergeRequestFilters, AddReviewFeedback, ReviewRequestStatus, MergeResult } from '
|
|
1
|
+
import type { ReviewMergeRequest, CreateReviewMergeRequest, UpdateReviewMergeRequest, ReviewMergeRequestFilters, AddReviewFeedback, ReviewRequestStatus, MergeResult } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Review Merge Request service client for codeboltjs.
|
|
4
4
|
*/
|
|
@@ -20,7 +20,11 @@ declare const reviewMergeRequestService: {
|
|
|
20
20
|
* Create a new review merge request
|
|
21
21
|
*/
|
|
22
22
|
create: (data: CreateReviewMergeRequest) => Promise<{
|
|
23
|
-
request
|
|
23
|
+
request?: ReviewMergeRequest;
|
|
24
|
+
data?: {
|
|
25
|
+
request: ReviewMergeRequest;
|
|
26
|
+
};
|
|
27
|
+
success?: boolean;
|
|
24
28
|
}>;
|
|
25
29
|
/**
|
|
26
30
|
* Update an existing review merge request
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreatePhaseData, UpdatePhaseData, CreateFeatureData, UpdateFeatureData, MoveFeatureData, CreateIdeaData, UpdateIdeaData, ReviewIdeaData, MoveIdeaToRoadmapData, RoadmapGetResponse, RoadmapPhasesResponse, RoadmapPhaseResponse, RoadmapDeleteResponse, RoadmapFeaturesResponse, RoadmapFeatureResponse, RoadmapIdeasResponse, RoadmapIdeaResponse, RoadmapMoveToRoadmapResponse } from '
|
|
1
|
+
import type { CreatePhaseData, UpdatePhaseData, CreateFeatureData, UpdateFeatureData, MoveFeatureData, CreateIdeaData, UpdateIdeaData, ReviewIdeaData, MoveIdeaToRoadmapData, RoadmapGetResponse, RoadmapPhasesResponse, RoadmapPhaseResponse, RoadmapDeleteResponse, RoadmapFeaturesResponse, RoadmapFeatureResponse, RoadmapIdeasResponse, RoadmapIdeaResponse, RoadmapMoveToRoadmapResponse } from '@codebolt/types/lib';
|
|
2
2
|
/**
|
|
3
3
|
* Roadmap Module for codeboltjs
|
|
4
4
|
* Provides functionality for managing project roadmaps, phases, features, and ideas.
|
package/dist/modules/swarm.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CreateSwarmRequest, AgentRegistration, CreateTeamRequest, CreateRoleRequest, CreateVacancyRequest, AgentStatusUpdate, CreateSwarmResponse, ListSwarmsResponse, GetSwarmResponse, GetSwarmAgentsResponse, RegisterAgentResponse, UnregisterAgentResponse, CreateTeamResponse, ListTeamsResponse, GetTeamResponse, JoinTeamResponse, LeaveTeamResponse, DeleteTeamResponse, CreateRoleResponse, ListRolesResponse, GetRoleResponse, AssignRoleResponse, UnassignRoleResponse, GetAgentsByRoleResponse, DeleteRoleResponse, CreateVacancyResponse, ListVacanciesResponse, ApplyForVacancyResponse, CloseVacancyResponse, UpdateStatusResponse, GetStatusSummaryResponse, GetDefaultJobGroupResponse } from '
|
|
2
|
-
export type { CreateSwarmRequest, AgentRegistration, CreateTeamRequest, CreateRoleRequest, CreateVacancyRequest, AgentStatusUpdate, Swarm, SwarmAgent, Team, Role, Vacancy, StatusSummary, SwarmResponse, CreateSwarmResponse, ListSwarmsResponse, GetSwarmResponse, GetSwarmAgentsResponse, RegisterAgentResponse, UnregisterAgentResponse, CreateTeamResponse, ListTeamsResponse, GetTeamResponse, JoinTeamResponse, LeaveTeamResponse, DeleteTeamResponse, CreateRoleResponse, ListRolesResponse, GetRoleResponse, AssignRoleResponse, UnassignRoleResponse, GetAgentsByRoleResponse, DeleteRoleResponse, CreateVacancyResponse, ListVacanciesResponse, ApplyForVacancyResponse, CloseVacancyResponse, UpdateStatusResponse, GetStatusSummaryResponse, GetDefaultJobGroupResponse } from '
|
|
1
|
+
import type { CreateSwarmRequest, AgentRegistration, CreateTeamRequest, CreateRoleRequest, CreateVacancyRequest, AgentStatusUpdate, CreateSwarmResponse, ListSwarmsResponse, GetSwarmResponse, GetSwarmAgentsResponse, RegisterAgentResponse, UnregisterAgentResponse, CreateTeamResponse, ListTeamsResponse, GetTeamResponse, JoinTeamResponse, LeaveTeamResponse, DeleteTeamResponse, CreateRoleResponse, ListRolesResponse, GetRoleResponse, AssignRoleResponse, UnassignRoleResponse, GetAgentsByRoleResponse, DeleteRoleResponse, CreateVacancyResponse, ListVacanciesResponse, ApplyForVacancyResponse, CloseVacancyResponse, UpdateStatusResponse, GetStatusSummaryResponse, GetDefaultJobGroupResponse } from '@codebolt/types/lib';
|
|
2
|
+
export type { CreateSwarmRequest, AgentRegistration, CreateTeamRequest, CreateRoleRequest, CreateVacancyRequest, AgentStatusUpdate, Swarm, SwarmAgent, Team, Role, Vacancy, StatusSummary, SwarmResponse, CreateSwarmResponse, ListSwarmsResponse, GetSwarmResponse, GetSwarmAgentsResponse, RegisterAgentResponse, UnregisterAgentResponse, CreateTeamResponse, ListTeamsResponse, GetTeamResponse, JoinTeamResponse, LeaveTeamResponse, DeleteTeamResponse, CreateRoleResponse, ListRolesResponse, GetRoleResponse, AssignRoleResponse, UnassignRoleResponse, GetAgentsByRoleResponse, DeleteRoleResponse, CreateVacancyResponse, ListVacanciesResponse, ApplyForVacancyResponse, CloseVacancyResponse, UpdateStatusResponse, GetStatusSummaryResponse, GetDefaultJobGroupResponse } from '@codebolt/types/lib';
|
|
3
3
|
/**
|
|
4
4
|
* Swarm Module
|
|
5
5
|
* Provides functionality for managing swarms, agents, teams, roles, and vacancies
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { CommandError, TerminalInterruptResponse } from '@codebolt/types/sdk';
|
|
2
|
+
import { CommandError, CommandFinish, CommandOutput, TerminalInterruptResponse } from '@codebolt/types/sdk';
|
|
3
3
|
/**
|
|
4
4
|
* CustomEventEmitter class that extends the Node.js EventEmitter class.
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ declare const cbterminal: {
|
|
|
19
19
|
* @param {string} command - The command to be executed.
|
|
20
20
|
* @returns {Promise<CommandOutput|CommandError>} A promise that resolves with the command's output, error, or finish signal.
|
|
21
21
|
*/
|
|
22
|
-
executeCommand: (command: string, returnEmptyStringOnSuccess?: boolean) => Promise<
|
|
22
|
+
executeCommand: (command: string, returnEmptyStringOnSuccess?: boolean) => Promise<CommandOutput | CommandError | CommandFinish>;
|
|
23
23
|
/**
|
|
24
24
|
* Executes a given command and keeps running until an error occurs.
|
|
25
25
|
* Listens for messages from the WebSocket and resolves the promise when an error is encountered.
|
package/dist/modules/thread.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThreadFileChange, ThreadFileChangesResponse, ThreadFileChangesSummaryResponse } from '@codebolt/types/sdk';
|
|
2
|
+
import type { CreateThreadOptions, UpdateThreadOptions, GetThreadListOptions, GetThreadDetailOptions, GetThreadMessagesOptions, CreateAndStartThreadOptions } from '@codebolt/types/agent-to-app-ws-schema';
|
|
2
3
|
import type { CreateThreadResponse, ListThreadsResponse, GetThreadResponse, GetThreadMessagesResponse, UpdateThreadResponse, DeleteThreadResponse, StartThreadResponse, UpdateThreadStatusResponse, ThreadAgentStartedResponse, ThreadAgentStartFailedResponse } from '@codebolt/types/app-to-agent-ws-schema';
|
|
4
|
+
export type { ThreadFileChange, ThreadFileChangesResponse, ThreadFileChangesSummaryResponse };
|
|
3
5
|
/**
|
|
4
6
|
* Thread service for managing conversation threads.
|
|
5
7
|
* This module provides a comprehensive API for thread management using thread-specific types.
|
|
@@ -7,10 +9,10 @@ import type { CreateThreadResponse, ListThreadsResponse, GetThreadResponse, GetT
|
|
|
7
9
|
declare const threadService: {
|
|
8
10
|
/**
|
|
9
11
|
* Creates a new thread with comprehensive options.
|
|
10
|
-
* @param
|
|
11
|
-
* @returns
|
|
12
|
+
* @param options - The thread creation parameters
|
|
13
|
+
* @returns A promise that resolves with the thread creation response
|
|
12
14
|
*/
|
|
13
|
-
createThread: (options:
|
|
15
|
+
createThread: (options: CreateThreadOptions) => Promise<CreateThreadResponse>;
|
|
14
16
|
/**
|
|
15
17
|
* Creates and immediately starts a new thread.
|
|
16
18
|
* @param {CreateAndStartThreadOptions} options - The thread creation and start parameters
|
|
@@ -69,16 +71,16 @@ declare const threadService: {
|
|
|
69
71
|
getThreadMessages: (options: GetThreadMessagesOptions) => Promise<GetThreadMessagesResponse>;
|
|
70
72
|
/**
|
|
71
73
|
* Retrieves file changes associated with a specific thread.
|
|
72
|
-
* @param
|
|
73
|
-
* @returns
|
|
74
|
+
* @param threadId - The thread ID
|
|
75
|
+
* @returns A promise that resolves with the file changes
|
|
74
76
|
*/
|
|
75
|
-
getThreadFileChanges: (threadId: string) => Promise<
|
|
77
|
+
getThreadFileChanges: (threadId: string) => Promise<ThreadFileChangesResponse>;
|
|
76
78
|
/**
|
|
77
79
|
* Retrieves file changes summary for ChangesSummaryPanel.
|
|
78
80
|
* Returns data in the format: { title, changes, files }
|
|
79
|
-
* @param
|
|
80
|
-
* @returns
|
|
81
|
+
* @param threadId - The thread ID
|
|
82
|
+
* @returns A promise that resolves with the file changes summary
|
|
81
83
|
*/
|
|
82
|
-
getThreadFileChangesSummary: (threadId: string) => Promise<
|
|
84
|
+
getThreadFileChangesSummary: (threadId: string) => Promise<ThreadFileChangesSummaryResponse>;
|
|
83
85
|
};
|
|
84
86
|
export default threadService;
|
package/dist/modules/thread.js
CHANGED
|
@@ -13,8 +13,8 @@ const backgroundChildThreads_1 = __importDefault(require("./backgroundChildThrea
|
|
|
13
13
|
const threadService = {
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new thread with comprehensive options.
|
|
16
|
-
* @param
|
|
17
|
-
* @returns
|
|
16
|
+
* @param options - The thread creation parameters
|
|
17
|
+
* @returns A promise that resolves with the thread creation response
|
|
18
18
|
*/
|
|
19
19
|
createThread: async (options) => {
|
|
20
20
|
const requestId = (0, crypto_1.randomUUID)();
|
|
@@ -39,7 +39,11 @@ const threadService = {
|
|
|
39
39
|
requestId,
|
|
40
40
|
message: options
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
const response = await websocket_1.default.messageManager.sendAndWaitForResponse(event, 'startThreadResponse');
|
|
43
|
+
if (response.threadId) {
|
|
44
|
+
backgroundChildThreads_1.default.addRunningAgent(response.threadId, response, options.groupId);
|
|
45
|
+
}
|
|
46
|
+
return response;
|
|
43
47
|
},
|
|
44
48
|
/**
|
|
45
49
|
* Creates a thread in the background and resolves when the agent starts or fails.
|
|
@@ -181,8 +185,8 @@ const threadService = {
|
|
|
181
185
|
},
|
|
182
186
|
/**
|
|
183
187
|
* Retrieves file changes associated with a specific thread.
|
|
184
|
-
* @param
|
|
185
|
-
* @returns
|
|
188
|
+
* @param threadId - The thread ID
|
|
189
|
+
* @returns A promise that resolves with the file changes
|
|
186
190
|
*/
|
|
187
191
|
getThreadFileChanges: async (threadId) => {
|
|
188
192
|
const requestId = (0, crypto_1.randomUUID)();
|
|
@@ -199,8 +203,8 @@ const threadService = {
|
|
|
199
203
|
/**
|
|
200
204
|
* Retrieves file changes summary for ChangesSummaryPanel.
|
|
201
205
|
* Returns data in the format: { title, changes, files }
|
|
202
|
-
* @param
|
|
203
|
-
* @returns
|
|
206
|
+
* @param threadId - The thread ID
|
|
207
|
+
* @returns A promise that resolves with the file changes summary
|
|
204
208
|
*/
|
|
205
209
|
getThreadFileChangesSummary: async (threadId) => {
|
|
206
210
|
const requestId = (0, crypto_1.randomUUID)();
|