@codebolt/codeboltjs 5.0.8 → 5.0.9
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 +29 -5
- package/dist/core/Codebolt.js +58 -0
- package/dist/core/websocket.js +15 -17
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -3
- package/dist/modules/dynamicPanel.d.ts +106 -0
- package/dist/modules/dynamicPanel.js +122 -0
- package/dist/modules/mcp.js +3 -0
- package/dist/modules/swarm.d.ts +8 -2
- package/dist/modules/swarm.js +14 -0
- package/dist/tools/actionBlock/action-block-start.js +1 -4
- package/dist/tools/actionPlan/action-plan-create.js +1 -2
- package/dist/tools/completion/attempt-completion.d.ts +25 -0
- package/dist/tools/completion/attempt-completion.js +45 -0
- package/dist/tools/completion/index.d.ts +3 -0
- package/dist/tools/completion/index.js +9 -0
- package/dist/tools/index.d.ts +6 -3
- package/dist/tools/index.js +11 -4
- package/dist/tools/job/index.d.ts +3 -1
- package/dist/tools/job/index.js +5 -1
- package/dist/tools/job/job-remove-dependency.d.ts +28 -0
- package/dist/tools/job/job-remove-dependency.js +86 -0
- package/dist/tools/requirementPlan/requirement-plan-review.js +1 -1
- package/dist/tools/thread/thread-create-background.js +1 -1
- package/dist/tools/utils/schema-validator.d.ts +1 -0
- package/dist/tools/utils/schema-validator.js +13 -1
- package/dist/types/job.d.ts +1 -1
- package/package.json +2 -2
- package/dist/modules/codeboltEvent.d.ts +0 -57
- package/dist/modules/codeboltEvent.js +0 -217
- package/dist/tools/browser/browser-action.d.ts +0 -56
- package/dist/tools/browser/browser-action.js +0 -265
- package/dist/tools/codeboltEvent/event-add-running-agent.d.ts +0 -25
- package/dist/tools/codeboltEvent/event-add-running-agent.js +0 -69
- package/dist/tools/codeboltEvent/event-check-background-agent-completion.d.ts +0 -19
- package/dist/tools/codeboltEvent/event-check-background-agent-completion.js +0 -64
- package/dist/tools/codeboltEvent/event-get-running-agent-count.d.ts +0 -19
- package/dist/tools/codeboltEvent/event-get-running-agent-count.js +0 -55
- package/dist/tools/codeboltEvent/event-on-background-agent-completion.d.ts +0 -19
- package/dist/tools/codeboltEvent/event-on-background-agent-completion.js +0 -56
- package/dist/tools/codeboltEvent/event-wait-for-external-event.d.ts +0 -19
- package/dist/tools/codeboltEvent/event-wait-for-external-event.js +0 -55
- package/dist/tools/codeboltEvent/index.d.ts +0 -19
- package/dist/tools/codeboltEvent/index.js +0 -33
- package/dist/tools/event/event-add-running-agent.d.ts +0 -32
- package/dist/tools/event/event-add-running-agent.js +0 -77
- package/dist/tools/event/event-check-agent-event.d.ts +0 -19
- package/dist/tools/event/event-check-agent-event.js +0 -63
- package/dist/tools/event/event-check-completion.d.ts +0 -19
- package/dist/tools/event/event-check-completion.js +0 -73
- package/dist/tools/event/event-check-grouped-completion.d.ts +0 -19
- package/dist/tools/event/event-check-grouped-completion.js +0 -63
- package/dist/tools/event/event-get-running-count.d.ts +0 -19
- package/dist/tools/event/event-get-running-count.js +0 -55
- package/dist/tools/event/event-on-agent-event.d.ts +0 -19
- package/dist/tools/event/event-on-agent-event.js +0 -63
- package/dist/tools/event/event-on-completion.d.ts +0 -19
- package/dist/tools/event/event-on-completion.js +0 -73
- package/dist/tools/event/event-on-grouped-completion.d.ts +0 -19
- package/dist/tools/event/event-on-grouped-completion.js +0 -63
- package/dist/tools/event/event-wait-any.d.ts +0 -19
- package/dist/tools/event/event-wait-any.js +0 -66
- package/dist/tools/event/index.d.ts +0 -25
- package/dist/tools/event/index.js +0 -48
- package/dist/tools/git/git-action.d.ts +0 -48
- package/dist/tools/git/git-action.js +0 -279
- package/dist/tools/kvStore/kv-store-create-instance.d.ts +0 -26
- package/dist/tools/kvStore/kv-store-create-instance.js +0 -79
- package/dist/tools/kvStore/kv-store-get.d.ts +0 -30
- package/dist/tools/kvStore/kv-store-get.js +0 -80
- package/dist/tools/kvStore/kv-store-set.d.ts +0 -38
- package/dist/tools/kvStore/kv-store-set.js +0 -86
- package/dist/tools/memoryIngestion/mi-create-pipeline.d.ts +0 -44
- package/dist/tools/memoryIngestion/mi-create-pipeline.js +0 -114
- package/dist/tools/memoryIngestion/mi-list.d.ts +0 -22
- package/dist/tools/memoryIngestion/mi-list.js +0 -66
- package/dist/tools/orchestration/agent-details.d.ts +0 -15
- package/dist/tools/orchestration/agent-details.js +0 -98
- package/dist/tools/orchestration/agent-find.d.ts +0 -18
- package/dist/tools/orchestration/agent-find.js +0 -125
- package/dist/tools/orchestration/agent-list.d.ts +0 -13
- package/dist/tools/orchestration/agent-list.js +0 -106
- package/dist/tools/orchestration/agent-management.d.ts +0 -44
- package/dist/tools/orchestration/agent-management.js +0 -250
- package/dist/tools/orchestration/agent-start.d.ts +0 -18
- package/dist/tools/orchestration/agent-start.js +0 -90
- package/dist/tools/orchestration/index.d.ts +0 -49
- package/dist/tools/orchestration/index.js +0 -102
- package/dist/tools/orchestration/task-assign.d.ts +0 -18
- package/dist/tools/orchestration/task-assign.js +0 -84
- package/dist/tools/orchestration/task-create.d.ts +0 -20
- package/dist/tools/orchestration/task-create.js +0 -97
- package/dist/tools/orchestration/task-delete.d.ts +0 -16
- package/dist/tools/orchestration/task-delete.js +0 -77
- package/dist/tools/orchestration/task-execute.d.ts +0 -18
- package/dist/tools/orchestration/task-execute.js +0 -84
- package/dist/tools/orchestration/task-get.d.ts +0 -16
- package/dist/tools/orchestration/task-get.js +0 -89
- package/dist/tools/orchestration/task-list.d.ts +0 -13
- package/dist/tools/orchestration/task-list.js +0 -74
- package/dist/tools/orchestration/task-management.d.ts +0 -52
- package/dist/tools/orchestration/task-management.js +0 -231
- package/dist/tools/orchestration/task-update.d.ts +0 -22
- package/dist/tools/orchestration/task-update.js +0 -96
- package/dist/tools/orchestration/thread-create-background.d.ts +0 -18
- package/dist/tools/orchestration/thread-create-background.js +0 -94
- package/dist/tools/orchestration/thread-create-start.d.ts +0 -16
- package/dist/tools/orchestration/thread-create-start.js +0 -85
- package/dist/tools/orchestration/thread-create.d.ts +0 -16
- package/dist/tools/orchestration/thread-create.js +0 -85
- package/dist/tools/orchestration/thread-delete.d.ts +0 -16
- package/dist/tools/orchestration/thread-delete.js +0 -77
- package/dist/tools/orchestration/thread-get-messages.d.ts +0 -24
- package/dist/tools/orchestration/thread-get-messages.js +0 -122
- package/dist/tools/orchestration/thread-get.d.ts +0 -16
- package/dist/tools/orchestration/thread-get.js +0 -85
- package/dist/tools/orchestration/thread-list.d.ts +0 -16
- package/dist/tools/orchestration/thread-list.js +0 -85
- package/dist/tools/orchestration/thread-start.d.ts +0 -16
- package/dist/tools/orchestration/thread-start.js +0 -82
- package/dist/tools/orchestration/thread-update-status.d.ts +0 -18
- package/dist/tools/orchestration/thread-update-status.js +0 -89
- package/dist/tools/orchestration/thread-update.d.ts +0 -18
- package/dist/tools/orchestration/thread-update.js +0 -89
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event Check Grouped Completion Tool - Checks if any grouped background agent has completed
|
|
4
|
-
* Wraps the SDK's codeboltEvent.checkForBackgroundGroupedAgentCompletion() method
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EventCheckGroupedCompletionTool = void 0;
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const base_tool_1 = require("../base-tool");
|
|
13
|
-
const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
|
|
14
|
-
class EventCheckGroupedCompletionInvocation extends base_tool_1.BaseToolInvocation {
|
|
15
|
-
constructor(params) {
|
|
16
|
-
super(params);
|
|
17
|
-
}
|
|
18
|
-
async execute() {
|
|
19
|
-
try {
|
|
20
|
-
const completion = codeboltEvent_1.default.checkForBackgroundGroupedAgentCompletion();
|
|
21
|
-
if (completion === null) {
|
|
22
|
-
return {
|
|
23
|
-
llmContent: 'No grouped background agent completions available.',
|
|
24
|
-
returnDisplay: 'No grouped completions',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
let llmContent = `Grouped background agent completion found.\n\n`;
|
|
28
|
-
llmContent += JSON.stringify(completion, null, 2);
|
|
29
|
-
return {
|
|
30
|
-
llmContent,
|
|
31
|
-
returnDisplay: 'Found grouped completion',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
36
|
-
return {
|
|
37
|
-
llmContent: `Error checking for grouped background agent completion: ${errorMessage}`,
|
|
38
|
-
returnDisplay: `Error: ${errorMessage}`,
|
|
39
|
-
error: {
|
|
40
|
-
message: errorMessage,
|
|
41
|
-
type: types_1.ToolErrorType.EXECUTION_FAILED,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Tool for checking if any grouped background agent has completed
|
|
49
|
-
*/
|
|
50
|
-
class EventCheckGroupedCompletionTool extends base_tool_1.BaseDeclarativeTool {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(EventCheckGroupedCompletionTool.Name, 'Check Grouped Agent Completion', 'Check if any grouped background agent has completed. Returns completion data if available, null otherwise. This is a non-blocking check.', types_1.Kind.Read, {
|
|
53
|
-
type: 'object',
|
|
54
|
-
properties: {},
|
|
55
|
-
required: []
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
createInvocation(params) {
|
|
59
|
-
return new EventCheckGroupedCompletionInvocation(params);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.EventCheckGroupedCompletionTool = EventCheckGroupedCompletionTool;
|
|
63
|
-
EventCheckGroupedCompletionTool.Name = 'event_check_grouped_completion';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Get Running Agent Count Tool - Gets the number of currently running background agents
|
|
3
|
-
* Wraps the SDK's codeboltEvent.getRunningAgentCount() method
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolInvocation, ToolResult } from '../types';
|
|
6
|
-
import { BaseDeclarativeTool } from '../base-tool';
|
|
7
|
-
/**
|
|
8
|
-
* Parameters for the EventGetRunningCount tool
|
|
9
|
-
*/
|
|
10
|
-
export interface EventGetRunningCountParams {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tool for getting the number of currently running background agents
|
|
14
|
-
*/
|
|
15
|
-
export declare class EventGetRunningCountTool extends BaseDeclarativeTool<EventGetRunningCountParams, ToolResult> {
|
|
16
|
-
static readonly Name: string;
|
|
17
|
-
constructor();
|
|
18
|
-
protected createInvocation(params: EventGetRunningCountParams): ToolInvocation<EventGetRunningCountParams, ToolResult>;
|
|
19
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event Get Running Agent Count Tool - Gets the number of currently running background agents
|
|
4
|
-
* Wraps the SDK's codeboltEvent.getRunningAgentCount() method
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EventGetRunningCountTool = void 0;
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const base_tool_1 = require("../base-tool");
|
|
13
|
-
const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
|
|
14
|
-
class EventGetRunningCountInvocation extends base_tool_1.BaseToolInvocation {
|
|
15
|
-
constructor(params) {
|
|
16
|
-
super(params);
|
|
17
|
-
}
|
|
18
|
-
async execute() {
|
|
19
|
-
try {
|
|
20
|
-
const count = codeboltEvent_1.default.getRunningAgentCount();
|
|
21
|
-
return {
|
|
22
|
-
llmContent: `Currently running background agents: ${count}`,
|
|
23
|
-
returnDisplay: `Running agents: ${count}`,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
28
|
-
return {
|
|
29
|
-
llmContent: `Error getting running agent count: ${errorMessage}`,
|
|
30
|
-
returnDisplay: `Error: ${errorMessage}`,
|
|
31
|
-
error: {
|
|
32
|
-
message: errorMessage,
|
|
33
|
-
type: types_1.ToolErrorType.EXECUTION_FAILED,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Tool for getting the number of currently running background agents
|
|
41
|
-
*/
|
|
42
|
-
class EventGetRunningCountTool extends base_tool_1.BaseDeclarativeTool {
|
|
43
|
-
constructor() {
|
|
44
|
-
super(EventGetRunningCountTool.Name, 'Get Running Agent Count', 'Get the number of currently running background agents.', types_1.Kind.Read, {
|
|
45
|
-
type: 'object',
|
|
46
|
-
properties: {},
|
|
47
|
-
required: []
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
createInvocation(params) {
|
|
51
|
-
return new EventGetRunningCountInvocation(params);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.EventGetRunningCountTool = EventGetRunningCountTool;
|
|
55
|
-
EventGetRunningCountTool.Name = 'event_get_running_count';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event On Agent Event Tool - Waits for an agent event
|
|
3
|
-
* Wraps the SDK's codeboltEvent.onAgentEventReceived() method
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolInvocation, ToolResult } from '../types';
|
|
6
|
-
import { BaseDeclarativeTool } from '../base-tool';
|
|
7
|
-
/**
|
|
8
|
-
* Parameters for the EventOnAgentEvent tool
|
|
9
|
-
*/
|
|
10
|
-
export interface EventOnAgentEventParams {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tool for waiting for an agent event
|
|
14
|
-
*/
|
|
15
|
-
export declare class EventOnAgentEventTool extends BaseDeclarativeTool<EventOnAgentEventParams, ToolResult> {
|
|
16
|
-
static readonly Name: string;
|
|
17
|
-
constructor();
|
|
18
|
-
protected createInvocation(params: EventOnAgentEventParams): ToolInvocation<EventOnAgentEventParams, ToolResult>;
|
|
19
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event On Agent Event Tool - Waits for an agent event
|
|
4
|
-
* Wraps the SDK's codeboltEvent.onAgentEventReceived() method
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EventOnAgentEventTool = void 0;
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const base_tool_1 = require("../base-tool");
|
|
13
|
-
const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
|
|
14
|
-
class EventOnAgentEventInvocation extends base_tool_1.BaseToolInvocation {
|
|
15
|
-
constructor(params) {
|
|
16
|
-
super(params);
|
|
17
|
-
}
|
|
18
|
-
async execute() {
|
|
19
|
-
try {
|
|
20
|
-
const event = await codeboltEvent_1.default.onAgentEventReceived();
|
|
21
|
-
if (event === null) {
|
|
22
|
-
return {
|
|
23
|
-
llmContent: 'No agent event received.',
|
|
24
|
-
returnDisplay: 'No event',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
let llmContent = `Agent event received.\n\n`;
|
|
28
|
-
llmContent += JSON.stringify(event, null, 2);
|
|
29
|
-
return {
|
|
30
|
-
llmContent,
|
|
31
|
-
returnDisplay: 'Received agent event',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
36
|
-
return {
|
|
37
|
-
llmContent: `Error waiting for agent event: ${errorMessage}`,
|
|
38
|
-
returnDisplay: `Error: ${errorMessage}`,
|
|
39
|
-
error: {
|
|
40
|
-
message: errorMessage,
|
|
41
|
-
type: types_1.ToolErrorType.EXECUTION_FAILED,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Tool for waiting for an agent event
|
|
49
|
-
*/
|
|
50
|
-
class EventOnAgentEventTool extends base_tool_1.BaseDeclarativeTool {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(EventOnAgentEventTool.Name, 'Wait for Agent Event', 'Wait for an agent event to be received. This is a blocking call that resolves when an agent event arrives.', types_1.Kind.Other, {
|
|
53
|
-
type: 'object',
|
|
54
|
-
properties: {},
|
|
55
|
-
required: []
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
createInvocation(params) {
|
|
59
|
-
return new EventOnAgentEventInvocation(params);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.EventOnAgentEventTool = EventOnAgentEventTool;
|
|
63
|
-
EventOnAgentEventTool.Name = 'event_on_agent_event';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event On Completion Tool - Waits for background agent completion
|
|
3
|
-
* Wraps the SDK's codeboltEvent.onBackgroundAgentCompletion() method
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolInvocation, ToolResult } from '../types';
|
|
6
|
-
import { BaseDeclarativeTool } from '../base-tool';
|
|
7
|
-
/**
|
|
8
|
-
* Parameters for the EventOnCompletion tool
|
|
9
|
-
*/
|
|
10
|
-
export interface EventOnCompletionParams {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tool for waiting for background agent completion
|
|
14
|
-
*/
|
|
15
|
-
export declare class EventOnCompletionTool extends BaseDeclarativeTool<EventOnCompletionParams, ToolResult> {
|
|
16
|
-
static readonly Name: string;
|
|
17
|
-
constructor();
|
|
18
|
-
protected createInvocation(params: EventOnCompletionParams): ToolInvocation<EventOnCompletionParams, ToolResult>;
|
|
19
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event On Completion Tool - Waits for background agent completion
|
|
4
|
-
* Wraps the SDK's codeboltEvent.onBackgroundAgentCompletion() method
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EventOnCompletionTool = void 0;
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const base_tool_1 = require("../base-tool");
|
|
13
|
-
const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
|
|
14
|
-
class EventOnCompletionInvocation extends base_tool_1.BaseToolInvocation {
|
|
15
|
-
constructor(params) {
|
|
16
|
-
super(params);
|
|
17
|
-
}
|
|
18
|
-
async execute() {
|
|
19
|
-
try {
|
|
20
|
-
const completion = await codeboltEvent_1.default.onBackgroundAgentCompletion();
|
|
21
|
-
if (completion === null) {
|
|
22
|
-
return {
|
|
23
|
-
llmContent: 'No background agent completion received.',
|
|
24
|
-
returnDisplay: 'No completion',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const count = Array.isArray(completion) ? completion.length : 1;
|
|
28
|
-
let llmContent = `Background agent completion received.\n\n`;
|
|
29
|
-
if (Array.isArray(completion)) {
|
|
30
|
-
llmContent += `${count} agent(s) completed:\n`;
|
|
31
|
-
for (let i = 0; i < completion.length; i++) {
|
|
32
|
-
llmContent += `\nCompletion ${i + 1}:\n`;
|
|
33
|
-
llmContent += JSON.stringify(completion[i], null, 2) + '\n';
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
llmContent += JSON.stringify(completion, null, 2);
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
llmContent,
|
|
41
|
-
returnDisplay: `Received ${count} completion(s)`,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
46
|
-
return {
|
|
47
|
-
llmContent: `Error waiting for background agent completion: ${errorMessage}`,
|
|
48
|
-
returnDisplay: `Error: ${errorMessage}`,
|
|
49
|
-
error: {
|
|
50
|
-
message: errorMessage,
|
|
51
|
-
type: types_1.ToolErrorType.EXECUTION_FAILED,
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Tool for waiting for background agent completion
|
|
59
|
-
*/
|
|
60
|
-
class EventOnCompletionTool extends base_tool_1.BaseDeclarativeTool {
|
|
61
|
-
constructor() {
|
|
62
|
-
super(EventOnCompletionTool.Name, 'Wait for Background Agent Completion', 'Wait for a background agent to complete. This is a blocking call that resolves when an agent completes.', types_1.Kind.Other, {
|
|
63
|
-
type: 'object',
|
|
64
|
-
properties: {},
|
|
65
|
-
required: []
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
createInvocation(params) {
|
|
69
|
-
return new EventOnCompletionInvocation(params);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.EventOnCompletionTool = EventOnCompletionTool;
|
|
73
|
-
EventOnCompletionTool.Name = 'event_on_completion';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event On Grouped Completion Tool - Waits for grouped background agent completion
|
|
3
|
-
* Wraps the SDK's codeboltEvent.onBackgroundGroupedAgentCompletion() method
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolInvocation, ToolResult } from '../types';
|
|
6
|
-
import { BaseDeclarativeTool } from '../base-tool';
|
|
7
|
-
/**
|
|
8
|
-
* Parameters for the EventOnGroupedCompletion tool
|
|
9
|
-
*/
|
|
10
|
-
export interface EventOnGroupedCompletionParams {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tool for waiting for grouped background agent completion
|
|
14
|
-
*/
|
|
15
|
-
export declare class EventOnGroupedCompletionTool extends BaseDeclarativeTool<EventOnGroupedCompletionParams, ToolResult> {
|
|
16
|
-
static readonly Name: string;
|
|
17
|
-
constructor();
|
|
18
|
-
protected createInvocation(params: EventOnGroupedCompletionParams): ToolInvocation<EventOnGroupedCompletionParams, ToolResult>;
|
|
19
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event On Grouped Completion Tool - Waits for grouped background agent completion
|
|
4
|
-
* Wraps the SDK's codeboltEvent.onBackgroundGroupedAgentCompletion() method
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EventOnGroupedCompletionTool = void 0;
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const base_tool_1 = require("../base-tool");
|
|
13
|
-
const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
|
|
14
|
-
class EventOnGroupedCompletionInvocation extends base_tool_1.BaseToolInvocation {
|
|
15
|
-
constructor(params) {
|
|
16
|
-
super(params);
|
|
17
|
-
}
|
|
18
|
-
async execute() {
|
|
19
|
-
try {
|
|
20
|
-
const completion = await codeboltEvent_1.default.onBackgroundGroupedAgentCompletion();
|
|
21
|
-
if (completion === null) {
|
|
22
|
-
return {
|
|
23
|
-
llmContent: 'No grouped background agent completion received.',
|
|
24
|
-
returnDisplay: 'No grouped completion',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
let llmContent = `Grouped background agent completion received.\n\n`;
|
|
28
|
-
llmContent += JSON.stringify(completion, null, 2);
|
|
29
|
-
return {
|
|
30
|
-
llmContent,
|
|
31
|
-
returnDisplay: 'Received grouped completion',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
36
|
-
return {
|
|
37
|
-
llmContent: `Error waiting for grouped background agent completion: ${errorMessage}`,
|
|
38
|
-
returnDisplay: `Error: ${errorMessage}`,
|
|
39
|
-
error: {
|
|
40
|
-
message: errorMessage,
|
|
41
|
-
type: types_1.ToolErrorType.EXECUTION_FAILED,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Tool for waiting for grouped background agent completion
|
|
49
|
-
*/
|
|
50
|
-
class EventOnGroupedCompletionTool extends base_tool_1.BaseDeclarativeTool {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(EventOnGroupedCompletionTool.Name, 'Wait for Grouped Agent Completion', 'Wait for a grouped background agent to complete. This is a blocking call that resolves when a grouped agent completes.', types_1.Kind.Other, {
|
|
53
|
-
type: 'object',
|
|
54
|
-
properties: {},
|
|
55
|
-
required: []
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
createInvocation(params) {
|
|
59
|
-
return new EventOnGroupedCompletionInvocation(params);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.EventOnGroupedCompletionTool = EventOnGroupedCompletionTool;
|
|
63
|
-
EventOnGroupedCompletionTool.Name = 'event_on_grouped_completion';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Wait Any Tool - Waits for any external event
|
|
3
|
-
* Wraps the SDK's codeboltEvent.waitForAnyExternalEvent() method
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolInvocation, ToolResult } from '../types';
|
|
6
|
-
import { BaseDeclarativeTool } from '../base-tool';
|
|
7
|
-
/**
|
|
8
|
-
* Parameters for the EventWaitAny tool
|
|
9
|
-
*/
|
|
10
|
-
export interface EventWaitAnyParams {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tool for waiting for any external event
|
|
14
|
-
*/
|
|
15
|
-
export declare class EventWaitAnyTool extends BaseDeclarativeTool<EventWaitAnyParams, ToolResult> {
|
|
16
|
-
static readonly Name: string;
|
|
17
|
-
constructor();
|
|
18
|
-
protected createInvocation(params: EventWaitAnyParams): ToolInvocation<EventWaitAnyParams, ToolResult>;
|
|
19
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event Wait Any Tool - Waits for any external event
|
|
4
|
-
* Wraps the SDK's codeboltEvent.waitForAnyExternalEvent() method
|
|
5
|
-
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.EventWaitAnyTool = void 0;
|
|
11
|
-
const types_1 = require("../types");
|
|
12
|
-
const base_tool_1 = require("../base-tool");
|
|
13
|
-
const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
|
|
14
|
-
class EventWaitAnyInvocation extends base_tool_1.BaseToolInvocation {
|
|
15
|
-
constructor(params) {
|
|
16
|
-
super(params);
|
|
17
|
-
}
|
|
18
|
-
async execute() {
|
|
19
|
-
try {
|
|
20
|
-
const result = await codeboltEvent_1.default.waitForAnyExternalEvent();
|
|
21
|
-
if (!result) {
|
|
22
|
-
return {
|
|
23
|
-
llmContent: 'No external event received.',
|
|
24
|
-
returnDisplay: 'No event',
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const eventType = result.type;
|
|
28
|
-
const eventData = result.data;
|
|
29
|
-
let llmContent = `External event received.\n`;
|
|
30
|
-
llmContent += `Type: ${eventType}\n\n`;
|
|
31
|
-
llmContent += `Data:\n${JSON.stringify(eventData, null, 2)}`;
|
|
32
|
-
return {
|
|
33
|
-
llmContent,
|
|
34
|
-
returnDisplay: `Received: ${eventType}`,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
39
|
-
return {
|
|
40
|
-
llmContent: `Error waiting for external event: ${errorMessage}`,
|
|
41
|
-
returnDisplay: `Error: ${errorMessage}`,
|
|
42
|
-
error: {
|
|
43
|
-
message: errorMessage,
|
|
44
|
-
type: types_1.ToolErrorType.EXECUTION_FAILED,
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Tool for waiting for any external event
|
|
52
|
-
*/
|
|
53
|
-
class EventWaitAnyTool extends base_tool_1.BaseDeclarativeTool {
|
|
54
|
-
constructor() {
|
|
55
|
-
super(EventWaitAnyTool.Name, 'Wait for Any External Event', 'Wait for any external event (Background Completion, Group Completion, or Agent Event). This is a blocking call that resolves when any of these events occur.', types_1.Kind.Other, {
|
|
56
|
-
type: 'object',
|
|
57
|
-
properties: {},
|
|
58
|
-
required: []
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
createInvocation(params) {
|
|
62
|
-
return new EventWaitAnyInvocation(params);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.EventWaitAnyTool = EventWaitAnyTool;
|
|
66
|
-
EventWaitAnyTool.Name = 'event_wait_any';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event tools
|
|
3
|
-
*/
|
|
4
|
-
export { EventAddRunningAgentTool, type EventAddRunningAgentParams } from './event-add-running-agent';
|
|
5
|
-
export { EventGetRunningCountTool, type EventGetRunningCountParams } from './event-get-running-count';
|
|
6
|
-
export { EventCheckCompletionTool, type EventCheckCompletionParams } from './event-check-completion';
|
|
7
|
-
export { EventOnCompletionTool, type EventOnCompletionParams } from './event-on-completion';
|
|
8
|
-
export { EventCheckGroupedCompletionTool, type EventCheckGroupedCompletionParams } from './event-check-grouped-completion';
|
|
9
|
-
export { EventOnGroupedCompletionTool, type EventOnGroupedCompletionParams } from './event-on-grouped-completion';
|
|
10
|
-
export { EventCheckAgentEventTool, type EventCheckAgentEventParams } from './event-check-agent-event';
|
|
11
|
-
export { EventOnAgentEventTool, type EventOnAgentEventParams } from './event-on-agent-event';
|
|
12
|
-
export { EventWaitAnyTool, type EventWaitAnyParams } from './event-wait-any';
|
|
13
|
-
import { EventAddRunningAgentTool } from './event-add-running-agent';
|
|
14
|
-
import { EventGetRunningCountTool } from './event-get-running-count';
|
|
15
|
-
import { EventCheckCompletionTool } from './event-check-completion';
|
|
16
|
-
import { EventOnCompletionTool } from './event-on-completion';
|
|
17
|
-
import { EventCheckGroupedCompletionTool } from './event-check-grouped-completion';
|
|
18
|
-
import { EventOnGroupedCompletionTool } from './event-on-grouped-completion';
|
|
19
|
-
import { EventCheckAgentEventTool } from './event-check-agent-event';
|
|
20
|
-
import { EventOnAgentEventTool } from './event-on-agent-event';
|
|
21
|
-
import { EventWaitAnyTool } from './event-wait-any';
|
|
22
|
-
/**
|
|
23
|
-
* All event tools
|
|
24
|
-
*/
|
|
25
|
-
export declare const eventTools: (EventAddRunningAgentTool | EventCheckAgentEventTool | EventCheckCompletionTool | EventCheckGroupedCompletionTool | EventGetRunningCountTool | EventOnAgentEventTool | EventOnCompletionTool | EventOnGroupedCompletionTool | EventWaitAnyTool)[];
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Event tools
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.eventTools = exports.EventWaitAnyTool = exports.EventOnAgentEventTool = exports.EventCheckAgentEventTool = exports.EventOnGroupedCompletionTool = exports.EventCheckGroupedCompletionTool = exports.EventOnCompletionTool = exports.EventCheckCompletionTool = exports.EventGetRunningCountTool = exports.EventAddRunningAgentTool = void 0;
|
|
7
|
-
var event_add_running_agent_1 = require("./event-add-running-agent");
|
|
8
|
-
Object.defineProperty(exports, "EventAddRunningAgentTool", { enumerable: true, get: function () { return event_add_running_agent_1.EventAddRunningAgentTool; } });
|
|
9
|
-
var event_get_running_count_1 = require("./event-get-running-count");
|
|
10
|
-
Object.defineProperty(exports, "EventGetRunningCountTool", { enumerable: true, get: function () { return event_get_running_count_1.EventGetRunningCountTool; } });
|
|
11
|
-
var event_check_completion_1 = require("./event-check-completion");
|
|
12
|
-
Object.defineProperty(exports, "EventCheckCompletionTool", { enumerable: true, get: function () { return event_check_completion_1.EventCheckCompletionTool; } });
|
|
13
|
-
var event_on_completion_1 = require("./event-on-completion");
|
|
14
|
-
Object.defineProperty(exports, "EventOnCompletionTool", { enumerable: true, get: function () { return event_on_completion_1.EventOnCompletionTool; } });
|
|
15
|
-
var event_check_grouped_completion_1 = require("./event-check-grouped-completion");
|
|
16
|
-
Object.defineProperty(exports, "EventCheckGroupedCompletionTool", { enumerable: true, get: function () { return event_check_grouped_completion_1.EventCheckGroupedCompletionTool; } });
|
|
17
|
-
var event_on_grouped_completion_1 = require("./event-on-grouped-completion");
|
|
18
|
-
Object.defineProperty(exports, "EventOnGroupedCompletionTool", { enumerable: true, get: function () { return event_on_grouped_completion_1.EventOnGroupedCompletionTool; } });
|
|
19
|
-
var event_check_agent_event_1 = require("./event-check-agent-event");
|
|
20
|
-
Object.defineProperty(exports, "EventCheckAgentEventTool", { enumerable: true, get: function () { return event_check_agent_event_1.EventCheckAgentEventTool; } });
|
|
21
|
-
var event_on_agent_event_1 = require("./event-on-agent-event");
|
|
22
|
-
Object.defineProperty(exports, "EventOnAgentEventTool", { enumerable: true, get: function () { return event_on_agent_event_1.EventOnAgentEventTool; } });
|
|
23
|
-
var event_wait_any_1 = require("./event-wait-any");
|
|
24
|
-
Object.defineProperty(exports, "EventWaitAnyTool", { enumerable: true, get: function () { return event_wait_any_1.EventWaitAnyTool; } });
|
|
25
|
-
// Create instances for convenience
|
|
26
|
-
const event_add_running_agent_2 = require("./event-add-running-agent");
|
|
27
|
-
const event_get_running_count_2 = require("./event-get-running-count");
|
|
28
|
-
const event_check_completion_2 = require("./event-check-completion");
|
|
29
|
-
const event_on_completion_2 = require("./event-on-completion");
|
|
30
|
-
const event_check_grouped_completion_2 = require("./event-check-grouped-completion");
|
|
31
|
-
const event_on_grouped_completion_2 = require("./event-on-grouped-completion");
|
|
32
|
-
const event_check_agent_event_2 = require("./event-check-agent-event");
|
|
33
|
-
const event_on_agent_event_2 = require("./event-on-agent-event");
|
|
34
|
-
const event_wait_any_2 = require("./event-wait-any");
|
|
35
|
-
/**
|
|
36
|
-
* All event tools
|
|
37
|
-
*/
|
|
38
|
-
exports.eventTools = [
|
|
39
|
-
new event_add_running_agent_2.EventAddRunningAgentTool(),
|
|
40
|
-
new event_get_running_count_2.EventGetRunningCountTool(),
|
|
41
|
-
new event_check_completion_2.EventCheckCompletionTool(),
|
|
42
|
-
new event_on_completion_2.EventOnCompletionTool(),
|
|
43
|
-
new event_check_grouped_completion_2.EventCheckGroupedCompletionTool(),
|
|
44
|
-
new event_on_grouped_completion_2.EventOnGroupedCompletionTool(),
|
|
45
|
-
new event_check_agent_event_2.EventCheckAgentEventTool(),
|
|
46
|
-
new event_on_agent_event_2.EventOnAgentEventTool(),
|
|
47
|
-
new event_wait_any_2.EventWaitAnyTool(),
|
|
48
|
-
];
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git Action Tool - Performs various Git operations
|
|
3
|
-
* Wraps the SDK's gitService methods
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolInvocation, ToolResult } from '../types';
|
|
6
|
-
import { BaseDeclarativeTool } from '../base-tool';
|
|
7
|
-
/**
|
|
8
|
-
* Supported Git actions
|
|
9
|
-
*/
|
|
10
|
-
export type GitActionType = 'init' | 'status' | 'add' | 'commit' | 'push' | 'pull' | 'checkout' | 'branch' | 'logs' | 'diff' | 'clone';
|
|
11
|
-
/**
|
|
12
|
-
* Parameters for the GitAction tool
|
|
13
|
-
*/
|
|
14
|
-
export interface GitActionToolParams {
|
|
15
|
-
/**
|
|
16
|
-
* The Git action to perform
|
|
17
|
-
*/
|
|
18
|
-
action: GitActionType;
|
|
19
|
-
/**
|
|
20
|
-
* Path for init/logs/clone operations
|
|
21
|
-
*/
|
|
22
|
-
path?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Commit message for commit operation
|
|
25
|
-
*/
|
|
26
|
-
message?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Branch name for checkout/branch operations
|
|
29
|
-
*/
|
|
30
|
-
branch?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Commit hash for diff operation
|
|
33
|
-
*/
|
|
34
|
-
commit_hash?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Repository URL for clone operation
|
|
37
|
-
*/
|
|
38
|
-
url?: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Implementation of the GitAction tool logic
|
|
42
|
-
*/
|
|
43
|
-
export declare class GitActionTool extends BaseDeclarativeTool<GitActionToolParams, ToolResult> {
|
|
44
|
-
static readonly Name: string;
|
|
45
|
-
constructor();
|
|
46
|
-
protected validateToolParamValues(params: GitActionToolParams): string | null;
|
|
47
|
-
protected createInvocation(params: GitActionToolParams): ToolInvocation<GitActionToolParams, ToolResult>;
|
|
48
|
-
}
|