@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.
Files changed (124) hide show
  1. package/dist/core/Codebolt.d.ts +29 -5
  2. package/dist/core/Codebolt.js +58 -0
  3. package/dist/core/websocket.js +15 -17
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +6 -3
  6. package/dist/modules/dynamicPanel.d.ts +106 -0
  7. package/dist/modules/dynamicPanel.js +122 -0
  8. package/dist/modules/mcp.js +3 -0
  9. package/dist/modules/swarm.d.ts +8 -2
  10. package/dist/modules/swarm.js +14 -0
  11. package/dist/tools/actionBlock/action-block-start.js +1 -4
  12. package/dist/tools/actionPlan/action-plan-create.js +1 -2
  13. package/dist/tools/completion/attempt-completion.d.ts +25 -0
  14. package/dist/tools/completion/attempt-completion.js +45 -0
  15. package/dist/tools/completion/index.d.ts +3 -0
  16. package/dist/tools/completion/index.js +9 -0
  17. package/dist/tools/index.d.ts +6 -3
  18. package/dist/tools/index.js +11 -4
  19. package/dist/tools/job/index.d.ts +3 -1
  20. package/dist/tools/job/index.js +5 -1
  21. package/dist/tools/job/job-remove-dependency.d.ts +28 -0
  22. package/dist/tools/job/job-remove-dependency.js +86 -0
  23. package/dist/tools/requirementPlan/requirement-plan-review.js +1 -1
  24. package/dist/tools/thread/thread-create-background.js +1 -1
  25. package/dist/tools/utils/schema-validator.d.ts +1 -0
  26. package/dist/tools/utils/schema-validator.js +13 -1
  27. package/dist/types/job.d.ts +1 -1
  28. package/package.json +2 -2
  29. package/dist/modules/codeboltEvent.d.ts +0 -57
  30. package/dist/modules/codeboltEvent.js +0 -217
  31. package/dist/tools/browser/browser-action.d.ts +0 -56
  32. package/dist/tools/browser/browser-action.js +0 -265
  33. package/dist/tools/codeboltEvent/event-add-running-agent.d.ts +0 -25
  34. package/dist/tools/codeboltEvent/event-add-running-agent.js +0 -69
  35. package/dist/tools/codeboltEvent/event-check-background-agent-completion.d.ts +0 -19
  36. package/dist/tools/codeboltEvent/event-check-background-agent-completion.js +0 -64
  37. package/dist/tools/codeboltEvent/event-get-running-agent-count.d.ts +0 -19
  38. package/dist/tools/codeboltEvent/event-get-running-agent-count.js +0 -55
  39. package/dist/tools/codeboltEvent/event-on-background-agent-completion.d.ts +0 -19
  40. package/dist/tools/codeboltEvent/event-on-background-agent-completion.js +0 -56
  41. package/dist/tools/codeboltEvent/event-wait-for-external-event.d.ts +0 -19
  42. package/dist/tools/codeboltEvent/event-wait-for-external-event.js +0 -55
  43. package/dist/tools/codeboltEvent/index.d.ts +0 -19
  44. package/dist/tools/codeboltEvent/index.js +0 -33
  45. package/dist/tools/event/event-add-running-agent.d.ts +0 -32
  46. package/dist/tools/event/event-add-running-agent.js +0 -77
  47. package/dist/tools/event/event-check-agent-event.d.ts +0 -19
  48. package/dist/tools/event/event-check-agent-event.js +0 -63
  49. package/dist/tools/event/event-check-completion.d.ts +0 -19
  50. package/dist/tools/event/event-check-completion.js +0 -73
  51. package/dist/tools/event/event-check-grouped-completion.d.ts +0 -19
  52. package/dist/tools/event/event-check-grouped-completion.js +0 -63
  53. package/dist/tools/event/event-get-running-count.d.ts +0 -19
  54. package/dist/tools/event/event-get-running-count.js +0 -55
  55. package/dist/tools/event/event-on-agent-event.d.ts +0 -19
  56. package/dist/tools/event/event-on-agent-event.js +0 -63
  57. package/dist/tools/event/event-on-completion.d.ts +0 -19
  58. package/dist/tools/event/event-on-completion.js +0 -73
  59. package/dist/tools/event/event-on-grouped-completion.d.ts +0 -19
  60. package/dist/tools/event/event-on-grouped-completion.js +0 -63
  61. package/dist/tools/event/event-wait-any.d.ts +0 -19
  62. package/dist/tools/event/event-wait-any.js +0 -66
  63. package/dist/tools/event/index.d.ts +0 -25
  64. package/dist/tools/event/index.js +0 -48
  65. package/dist/tools/git/git-action.d.ts +0 -48
  66. package/dist/tools/git/git-action.js +0 -279
  67. package/dist/tools/kvStore/kv-store-create-instance.d.ts +0 -26
  68. package/dist/tools/kvStore/kv-store-create-instance.js +0 -79
  69. package/dist/tools/kvStore/kv-store-get.d.ts +0 -30
  70. package/dist/tools/kvStore/kv-store-get.js +0 -80
  71. package/dist/tools/kvStore/kv-store-set.d.ts +0 -38
  72. package/dist/tools/kvStore/kv-store-set.js +0 -86
  73. package/dist/tools/memoryIngestion/mi-create-pipeline.d.ts +0 -44
  74. package/dist/tools/memoryIngestion/mi-create-pipeline.js +0 -114
  75. package/dist/tools/memoryIngestion/mi-list.d.ts +0 -22
  76. package/dist/tools/memoryIngestion/mi-list.js +0 -66
  77. package/dist/tools/orchestration/agent-details.d.ts +0 -15
  78. package/dist/tools/orchestration/agent-details.js +0 -98
  79. package/dist/tools/orchestration/agent-find.d.ts +0 -18
  80. package/dist/tools/orchestration/agent-find.js +0 -125
  81. package/dist/tools/orchestration/agent-list.d.ts +0 -13
  82. package/dist/tools/orchestration/agent-list.js +0 -106
  83. package/dist/tools/orchestration/agent-management.d.ts +0 -44
  84. package/dist/tools/orchestration/agent-management.js +0 -250
  85. package/dist/tools/orchestration/agent-start.d.ts +0 -18
  86. package/dist/tools/orchestration/agent-start.js +0 -90
  87. package/dist/tools/orchestration/index.d.ts +0 -49
  88. package/dist/tools/orchestration/index.js +0 -102
  89. package/dist/tools/orchestration/task-assign.d.ts +0 -18
  90. package/dist/tools/orchestration/task-assign.js +0 -84
  91. package/dist/tools/orchestration/task-create.d.ts +0 -20
  92. package/dist/tools/orchestration/task-create.js +0 -97
  93. package/dist/tools/orchestration/task-delete.d.ts +0 -16
  94. package/dist/tools/orchestration/task-delete.js +0 -77
  95. package/dist/tools/orchestration/task-execute.d.ts +0 -18
  96. package/dist/tools/orchestration/task-execute.js +0 -84
  97. package/dist/tools/orchestration/task-get.d.ts +0 -16
  98. package/dist/tools/orchestration/task-get.js +0 -89
  99. package/dist/tools/orchestration/task-list.d.ts +0 -13
  100. package/dist/tools/orchestration/task-list.js +0 -74
  101. package/dist/tools/orchestration/task-management.d.ts +0 -52
  102. package/dist/tools/orchestration/task-management.js +0 -231
  103. package/dist/tools/orchestration/task-update.d.ts +0 -22
  104. package/dist/tools/orchestration/task-update.js +0 -96
  105. package/dist/tools/orchestration/thread-create-background.d.ts +0 -18
  106. package/dist/tools/orchestration/thread-create-background.js +0 -94
  107. package/dist/tools/orchestration/thread-create-start.d.ts +0 -16
  108. package/dist/tools/orchestration/thread-create-start.js +0 -85
  109. package/dist/tools/orchestration/thread-create.d.ts +0 -16
  110. package/dist/tools/orchestration/thread-create.js +0 -85
  111. package/dist/tools/orchestration/thread-delete.d.ts +0 -16
  112. package/dist/tools/orchestration/thread-delete.js +0 -77
  113. package/dist/tools/orchestration/thread-get-messages.d.ts +0 -24
  114. package/dist/tools/orchestration/thread-get-messages.js +0 -122
  115. package/dist/tools/orchestration/thread-get.d.ts +0 -16
  116. package/dist/tools/orchestration/thread-get.js +0 -85
  117. package/dist/tools/orchestration/thread-list.d.ts +0 -16
  118. package/dist/tools/orchestration/thread-list.js +0 -85
  119. package/dist/tools/orchestration/thread-start.d.ts +0 -16
  120. package/dist/tools/orchestration/thread-start.js +0 -82
  121. package/dist/tools/orchestration/thread-update-status.d.ts +0 -18
  122. package/dist/tools/orchestration/thread-update-status.js +0 -89
  123. package/dist/tools/orchestration/thread-update.d.ts +0 -18
  124. package/dist/tools/orchestration/thread-update.js +0 -89
@@ -1,64 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event Check Background Agent Completion Tool
4
- *
5
- * Checks if any background agent has completed (non-blocking).
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.EventCheckBackgroundAgentCompletionTool = void 0;
12
- const types_1 = require("../types");
13
- const base_tool_1 = require("../base-tool");
14
- const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
15
- class EventCheckBackgroundAgentCompletionInvocation extends base_tool_1.BaseToolInvocation {
16
- constructor(params) {
17
- super(params);
18
- }
19
- async execute(_signal) {
20
- try {
21
- const completion = codeboltEvent_1.default.checkForBackgroundAgentCompletion();
22
- if (completion) {
23
- const count = Array.isArray(completion) ? completion.length : 1;
24
- return {
25
- llmContent: `Found ${count} completed background agent(s)`,
26
- returnDisplay: `Found ${count} completed agent(s)`,
27
- };
28
- }
29
- else {
30
- return {
31
- llmContent: 'No completed background agents found',
32
- returnDisplay: 'No completed agents',
33
- };
34
- }
35
- }
36
- catch (error) {
37
- const errorMessage = error instanceof Error ? error.message : String(error);
38
- return {
39
- llmContent: `Error: ${errorMessage}`,
40
- returnDisplay: `Error: ${errorMessage}`,
41
- error: {
42
- message: errorMessage,
43
- type: types_1.ToolErrorType.EXECUTION_FAILED,
44
- },
45
- };
46
- }
47
- }
48
- }
49
- /**
50
- * Tool for checking background agent completion
51
- */
52
- class EventCheckBackgroundAgentCompletionTool extends base_tool_1.BaseDeclarativeTool {
53
- constructor() {
54
- super('event_check_background_agent_completion', 'Check Background Agent Completion', 'Checks if any background agent has completed (non-blocking). Returns completion data if available, or null.', types_1.Kind.Other, {
55
- type: 'object',
56
- properties: {},
57
- required: [],
58
- });
59
- }
60
- createInvocation(params) {
61
- return new EventCheckBackgroundAgentCompletionInvocation(params);
62
- }
63
- }
64
- exports.EventCheckBackgroundAgentCompletionTool = EventCheckBackgroundAgentCompletionTool;
@@ -1,19 +0,0 @@
1
- /**
2
- * Event Get Running Agent Count Tool
3
- *
4
- * Gets the number of currently running background agents.
5
- */
6
- import type { ToolInvocation, ToolResult } from '../types';
7
- import { BaseDeclarativeTool } from '../base-tool';
8
- /**
9
- * Parameters for getting running agent count (none required)
10
- */
11
- export interface EventGetRunningAgentCountParams {
12
- }
13
- /**
14
- * Tool for getting running agent count
15
- */
16
- export declare class EventGetRunningAgentCountTool extends BaseDeclarativeTool<EventGetRunningAgentCountParams, ToolResult> {
17
- constructor();
18
- protected createInvocation(params: EventGetRunningAgentCountParams): ToolInvocation<EventGetRunningAgentCountParams, ToolResult>;
19
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event Get Running Agent Count Tool
4
- *
5
- * Gets the number of currently running background agents.
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.EventGetRunningAgentCountTool = void 0;
12
- const types_1 = require("../types");
13
- const base_tool_1 = require("../base-tool");
14
- const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
15
- class EventGetRunningAgentCountInvocation extends base_tool_1.BaseToolInvocation {
16
- constructor(params) {
17
- super(params);
18
- }
19
- async execute(_signal) {
20
- try {
21
- const count = codeboltEvent_1.default.getRunningAgentCount();
22
- return {
23
- llmContent: `Currently ${count} running background agents`,
24
- returnDisplay: `${count} running agents`,
25
- };
26
- }
27
- catch (error) {
28
- const errorMessage = error instanceof Error ? error.message : String(error);
29
- return {
30
- llmContent: `Error: ${errorMessage}`,
31
- returnDisplay: `Error: ${errorMessage}`,
32
- error: {
33
- message: errorMessage,
34
- type: types_1.ToolErrorType.EXECUTION_FAILED,
35
- },
36
- };
37
- }
38
- }
39
- }
40
- /**
41
- * Tool for getting running agent count
42
- */
43
- class EventGetRunningAgentCountTool extends base_tool_1.BaseDeclarativeTool {
44
- constructor() {
45
- super('event_get_running_agent_count', 'Get Running Agent Count', 'Gets the number of currently running background agents.', types_1.Kind.Other, {
46
- type: 'object',
47
- properties: {},
48
- required: [],
49
- });
50
- }
51
- createInvocation(params) {
52
- return new EventGetRunningAgentCountInvocation(params);
53
- }
54
- }
55
- exports.EventGetRunningAgentCountTool = EventGetRunningAgentCountTool;
@@ -1,19 +0,0 @@
1
- /**
2
- * Event On Background Agent Completion Tool
3
- *
4
- * Waits for background agent completion (blocking).
5
- */
6
- import type { ToolInvocation, ToolResult } from '../types';
7
- import { BaseDeclarativeTool } from '../base-tool';
8
- /**
9
- * Parameters for waiting for background agent completion (none required)
10
- */
11
- export interface EventOnBackgroundAgentCompletionParams {
12
- }
13
- /**
14
- * Tool for waiting for background agent completion
15
- */
16
- export declare class EventOnBackgroundAgentCompletionTool extends BaseDeclarativeTool<EventOnBackgroundAgentCompletionParams, ToolResult> {
17
- constructor();
18
- protected createInvocation(params: EventOnBackgroundAgentCompletionParams): ToolInvocation<EventOnBackgroundAgentCompletionParams, ToolResult>;
19
- }
@@ -1,56 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event On Background Agent Completion Tool
4
- *
5
- * Waits for background agent completion (blocking).
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.EventOnBackgroundAgentCompletionTool = void 0;
12
- const types_1 = require("../types");
13
- const base_tool_1 = require("../base-tool");
14
- const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
15
- class EventOnBackgroundAgentCompletionInvocation extends base_tool_1.BaseToolInvocation {
16
- constructor(params) {
17
- super(params);
18
- }
19
- async execute(_signal) {
20
- try {
21
- const completion = await codeboltEvent_1.default.onBackgroundAgentCompletion();
22
- const count = Array.isArray(completion) ? completion.length : 1;
23
- return {
24
- llmContent: `Background agent(s) completed: ${count} agent(s)`,
25
- returnDisplay: `${count} agent(s) completed`,
26
- };
27
- }
28
- catch (error) {
29
- const errorMessage = error instanceof Error ? error.message : String(error);
30
- return {
31
- llmContent: `Error: ${errorMessage}`,
32
- returnDisplay: `Error: ${errorMessage}`,
33
- error: {
34
- message: errorMessage,
35
- type: types_1.ToolErrorType.EXECUTION_FAILED,
36
- },
37
- };
38
- }
39
- }
40
- }
41
- /**
42
- * Tool for waiting for background agent completion
43
- */
44
- class EventOnBackgroundAgentCompletionTool extends base_tool_1.BaseDeclarativeTool {
45
- constructor() {
46
- super('event_on_background_agent_completion', 'Wait for Background Agent Completion', 'Waits for background agent completion (blocking). Returns when an agent completes.', types_1.Kind.Other, {
47
- type: 'object',
48
- properties: {},
49
- required: [],
50
- });
51
- }
52
- createInvocation(params) {
53
- return new EventOnBackgroundAgentCompletionInvocation(params);
54
- }
55
- }
56
- exports.EventOnBackgroundAgentCompletionTool = EventOnBackgroundAgentCompletionTool;
@@ -1,19 +0,0 @@
1
- /**
2
- * Event Wait For External Event Tool
3
- *
4
- * Waits for any external event (Background Completion, Group Completion, Agent Event).
5
- */
6
- import type { ToolInvocation, ToolResult } from '../types';
7
- import { BaseDeclarativeTool } from '../base-tool';
8
- /**
9
- * Parameters for waiting for external event (none required)
10
- */
11
- export interface EventWaitForExternalEventParams {
12
- }
13
- /**
14
- * Tool for waiting for any external event
15
- */
16
- export declare class EventWaitForExternalEventTool extends BaseDeclarativeTool<EventWaitForExternalEventParams, ToolResult> {
17
- constructor();
18
- protected createInvocation(params: EventWaitForExternalEventParams): ToolInvocation<EventWaitForExternalEventParams, ToolResult>;
19
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event Wait For External Event Tool
4
- *
5
- * Waits for any external event (Background Completion, Group Completion, Agent Event).
6
- */
7
- var __importDefault = (this && this.__importDefault) || function (mod) {
8
- return (mod && mod.__esModule) ? mod : { "default": mod };
9
- };
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.EventWaitForExternalEventTool = void 0;
12
- const types_1 = require("../types");
13
- const base_tool_1 = require("../base-tool");
14
- const codeboltEvent_1 = __importDefault(require("../../modules/codeboltEvent"));
15
- class EventWaitForExternalEventInvocation extends base_tool_1.BaseToolInvocation {
16
- constructor(params) {
17
- super(params);
18
- }
19
- async execute(_signal) {
20
- try {
21
- const event = await codeboltEvent_1.default.waitForAnyExternalEvent();
22
- return {
23
- llmContent: `External event received: ${event.type}`,
24
- returnDisplay: `Event: ${event.type}`,
25
- };
26
- }
27
- catch (error) {
28
- const errorMessage = error instanceof Error ? error.message : String(error);
29
- return {
30
- llmContent: `Error: ${errorMessage}`,
31
- returnDisplay: `Error: ${errorMessage}`,
32
- error: {
33
- message: errorMessage,
34
- type: types_1.ToolErrorType.EXECUTION_FAILED,
35
- },
36
- };
37
- }
38
- }
39
- }
40
- /**
41
- * Tool for waiting for any external event
42
- */
43
- class EventWaitForExternalEventTool extends base_tool_1.BaseDeclarativeTool {
44
- constructor() {
45
- super('event_wait_for_external_event', 'Wait for External Event', 'Waits for any external event (Background Completion, Group Completion, or Agent Event). Returns the event type and data.', types_1.Kind.Other, {
46
- type: 'object',
47
- properties: {},
48
- required: [],
49
- });
50
- }
51
- createInvocation(params) {
52
- return new EventWaitForExternalEventInvocation(params);
53
- }
54
- }
55
- exports.EventWaitForExternalEventTool = EventWaitForExternalEventTool;
@@ -1,19 +0,0 @@
1
- /**
2
- * Codebolt Event Tools
3
- *
4
- * Tools for event handling and coordination.
5
- */
6
- export { EventAddRunningAgentTool } from './event-add-running-agent';
7
- export { EventGetRunningAgentCountTool } from './event-get-running-agent-count';
8
- export { EventCheckBackgroundAgentCompletionTool } from './event-check-background-agent-completion';
9
- export { EventOnBackgroundAgentCompletionTool } from './event-on-background-agent-completion';
10
- export { EventWaitForExternalEventTool } from './event-wait-for-external-event';
11
- import { EventAddRunningAgentTool } from './event-add-running-agent';
12
- import { EventGetRunningAgentCountTool } from './event-get-running-agent-count';
13
- import { EventCheckBackgroundAgentCompletionTool } from './event-check-background-agent-completion';
14
- import { EventOnBackgroundAgentCompletionTool } from './event-on-background-agent-completion';
15
- import { EventWaitForExternalEventTool } from './event-wait-for-external-event';
16
- /**
17
- * Array of all codebolt event tools
18
- */
19
- export declare const codeboltEventTools: (EventAddRunningAgentTool | EventGetRunningAgentCountTool | EventCheckBackgroundAgentCompletionTool | EventOnBackgroundAgentCompletionTool | EventWaitForExternalEventTool)[];
@@ -1,33 +0,0 @@
1
- "use strict";
2
- /**
3
- * Codebolt Event Tools
4
- *
5
- * Tools for event handling and coordination.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.codeboltEventTools = exports.EventWaitForExternalEventTool = exports.EventOnBackgroundAgentCompletionTool = exports.EventCheckBackgroundAgentCompletionTool = exports.EventGetRunningAgentCountTool = exports.EventAddRunningAgentTool = void 0;
9
- var event_add_running_agent_1 = require("./event-add-running-agent");
10
- Object.defineProperty(exports, "EventAddRunningAgentTool", { enumerable: true, get: function () { return event_add_running_agent_1.EventAddRunningAgentTool; } });
11
- var event_get_running_agent_count_1 = require("./event-get-running-agent-count");
12
- Object.defineProperty(exports, "EventGetRunningAgentCountTool", { enumerable: true, get: function () { return event_get_running_agent_count_1.EventGetRunningAgentCountTool; } });
13
- var event_check_background_agent_completion_1 = require("./event-check-background-agent-completion");
14
- Object.defineProperty(exports, "EventCheckBackgroundAgentCompletionTool", { enumerable: true, get: function () { return event_check_background_agent_completion_1.EventCheckBackgroundAgentCompletionTool; } });
15
- var event_on_background_agent_completion_1 = require("./event-on-background-agent-completion");
16
- Object.defineProperty(exports, "EventOnBackgroundAgentCompletionTool", { enumerable: true, get: function () { return event_on_background_agent_completion_1.EventOnBackgroundAgentCompletionTool; } });
17
- var event_wait_for_external_event_1 = require("./event-wait-for-external-event");
18
- Object.defineProperty(exports, "EventWaitForExternalEventTool", { enumerable: true, get: function () { return event_wait_for_external_event_1.EventWaitForExternalEventTool; } });
19
- const event_add_running_agent_2 = require("./event-add-running-agent");
20
- const event_get_running_agent_count_2 = require("./event-get-running-agent-count");
21
- const event_check_background_agent_completion_2 = require("./event-check-background-agent-completion");
22
- const event_on_background_agent_completion_2 = require("./event-on-background-agent-completion");
23
- const event_wait_for_external_event_2 = require("./event-wait-for-external-event");
24
- /**
25
- * Array of all codebolt event tools
26
- */
27
- exports.codeboltEventTools = [
28
- new event_add_running_agent_2.EventAddRunningAgentTool(),
29
- new event_get_running_agent_count_2.EventGetRunningAgentCountTool(),
30
- new event_check_background_agent_completion_2.EventCheckBackgroundAgentCompletionTool(),
31
- new event_on_background_agent_completion_2.EventOnBackgroundAgentCompletionTool(),
32
- new event_wait_for_external_event_2.EventWaitForExternalEventTool(),
33
- ];
@@ -1,32 +0,0 @@
1
- /**
2
- * Event Add Running Agent Tool - Adds a running background agent to tracking
3
- * Wraps the SDK's codeboltEvent.addRunningAgent() method
4
- */
5
- import type { ToolInvocation, ToolResult } from '../types';
6
- import { BaseDeclarativeTool } from '../base-tool';
7
- /**
8
- * Parameters for the EventAddRunningAgent tool
9
- */
10
- export interface EventAddRunningAgentParams {
11
- /**
12
- * The thread ID of the background agent
13
- */
14
- thread_id: string;
15
- /**
16
- * The agent data to store
17
- */
18
- data: any;
19
- /**
20
- * Optional group ID for grouping agents
21
- */
22
- group_id?: string;
23
- }
24
- /**
25
- * Tool for adding a running background agent to tracking
26
- */
27
- export declare class EventAddRunningAgentTool extends BaseDeclarativeTool<EventAddRunningAgentParams, ToolResult> {
28
- static readonly Name: string;
29
- constructor();
30
- protected validateToolParamValues(params: EventAddRunningAgentParams): string | null;
31
- protected createInvocation(params: EventAddRunningAgentParams): ToolInvocation<EventAddRunningAgentParams, ToolResult>;
32
- }
@@ -1,77 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event Add Running Agent Tool - Adds a running background agent to tracking
4
- * Wraps the SDK's codeboltEvent.addRunningAgent() 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.EventAddRunningAgentTool = 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 EventAddRunningAgentInvocation extends base_tool_1.BaseToolInvocation {
15
- constructor(params) {
16
- super(params);
17
- }
18
- async execute() {
19
- try {
20
- codeboltEvent_1.default.addRunningAgent(this.params.thread_id, this.params.data, this.params.group_id);
21
- let llmContent = `Background agent added to tracking.\nThread ID: ${this.params.thread_id}`;
22
- if (this.params.group_id) {
23
- llmContent += `\nGroup ID: ${this.params.group_id}`;
24
- }
25
- return {
26
- llmContent,
27
- returnDisplay: `Agent added: ${this.params.thread_id}`,
28
- };
29
- }
30
- catch (error) {
31
- const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
32
- return {
33
- llmContent: `Error adding running agent: ${errorMessage}`,
34
- returnDisplay: `Error: ${errorMessage}`,
35
- error: {
36
- message: errorMessage,
37
- type: types_1.ToolErrorType.EXECUTION_FAILED,
38
- },
39
- };
40
- }
41
- }
42
- }
43
- /**
44
- * Tool for adding a running background agent to tracking
45
- */
46
- class EventAddRunningAgentTool extends base_tool_1.BaseDeclarativeTool {
47
- constructor() {
48
- super(EventAddRunningAgentTool.Name, 'Add Running Agent', 'Add a running background agent to the tracking system. This allows monitoring and waiting for agent completion.', types_1.Kind.Other, {
49
- type: 'object',
50
- properties: {
51
- thread_id: {
52
- type: 'string',
53
- description: 'The thread ID of the background agent'
54
- },
55
- data: {
56
- description: 'The agent data to store'
57
- },
58
- group_id: {
59
- type: 'string',
60
- description: 'Optional group ID for grouping agents'
61
- }
62
- },
63
- required: ['thread_id', 'data']
64
- });
65
- }
66
- validateToolParamValues(params) {
67
- if (!params.thread_id || params.thread_id.trim() === '') {
68
- return "The 'thread_id' parameter must be non-empty.";
69
- }
70
- return null;
71
- }
72
- createInvocation(params) {
73
- return new EventAddRunningAgentInvocation(params);
74
- }
75
- }
76
- exports.EventAddRunningAgentTool = EventAddRunningAgentTool;
77
- EventAddRunningAgentTool.Name = 'event_add_running_agent';
@@ -1,19 +0,0 @@
1
- /**
2
- * Event Check Agent Event Tool - Checks if any agent event has been received
3
- * Wraps the SDK's codeboltEvent.checkForAgentEventReceived() method
4
- */
5
- import type { ToolInvocation, ToolResult } from '../types';
6
- import { BaseDeclarativeTool } from '../base-tool';
7
- /**
8
- * Parameters for the EventCheckAgentEvent tool
9
- */
10
- export interface EventCheckAgentEventParams {
11
- }
12
- /**
13
- * Tool for checking if any agent event has been received
14
- */
15
- export declare class EventCheckAgentEventTool extends BaseDeclarativeTool<EventCheckAgentEventParams, ToolResult> {
16
- static readonly Name: string;
17
- constructor();
18
- protected createInvocation(params: EventCheckAgentEventParams): ToolInvocation<EventCheckAgentEventParams, ToolResult>;
19
- }
@@ -1,63 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event Check Agent Event Tool - Checks if any agent event has been received
4
- * Wraps the SDK's codeboltEvent.checkForAgentEventReceived() 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.EventCheckAgentEventTool = 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 EventCheckAgentEventInvocation extends base_tool_1.BaseToolInvocation {
15
- constructor(params) {
16
- super(params);
17
- }
18
- async execute() {
19
- try {
20
- const event = codeboltEvent_1.default.checkForAgentEventReceived();
21
- if (event === null) {
22
- return {
23
- llmContent: 'No agent events available.',
24
- returnDisplay: 'No events',
25
- };
26
- }
27
- let llmContent = `Agent event found.\n\n`;
28
- llmContent += JSON.stringify(event, null, 2);
29
- return {
30
- llmContent,
31
- returnDisplay: 'Found agent event',
32
- };
33
- }
34
- catch (error) {
35
- const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
36
- return {
37
- llmContent: `Error checking 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 checking if any agent event has been received
49
- */
50
- class EventCheckAgentEventTool extends base_tool_1.BaseDeclarativeTool {
51
- constructor() {
52
- super(EventCheckAgentEventTool.Name, 'Check for Agent Event', 'Check if any agent event has been received. Returns event 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 EventCheckAgentEventInvocation(params);
60
- }
61
- }
62
- exports.EventCheckAgentEventTool = EventCheckAgentEventTool;
63
- EventCheckAgentEventTool.Name = 'event_check_agent_event';
@@ -1,19 +0,0 @@
1
- /**
2
- * Event Check Completion Tool - Checks if any background agent has completed
3
- * Wraps the SDK's codeboltEvent.checkForBackgroundAgentCompletion() method
4
- */
5
- import type { ToolInvocation, ToolResult } from '../types';
6
- import { BaseDeclarativeTool } from '../base-tool';
7
- /**
8
- * Parameters for the EventCheckCompletion tool
9
- */
10
- export interface EventCheckCompletionParams {
11
- }
12
- /**
13
- * Tool for checking if any background agent has completed
14
- */
15
- export declare class EventCheckCompletionTool extends BaseDeclarativeTool<EventCheckCompletionParams, ToolResult> {
16
- static readonly Name: string;
17
- constructor();
18
- protected createInvocation(params: EventCheckCompletionParams): ToolInvocation<EventCheckCompletionParams, ToolResult>;
19
- }
@@ -1,73 +0,0 @@
1
- "use strict";
2
- /**
3
- * Event Check Completion Tool - Checks if any background agent has completed
4
- * Wraps the SDK's codeboltEvent.checkForBackgroundAgentCompletion() 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.EventCheckCompletionTool = 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 EventCheckCompletionInvocation extends base_tool_1.BaseToolInvocation {
15
- constructor(params) {
16
- super(params);
17
- }
18
- async execute() {
19
- try {
20
- const completions = codeboltEvent_1.default.checkForBackgroundAgentCompletion();
21
- if (completions === null) {
22
- return {
23
- llmContent: 'No background agent completions available.',
24
- returnDisplay: 'No completions',
25
- };
26
- }
27
- const count = Array.isArray(completions) ? completions.length : 1;
28
- let llmContent = `Found ${count} background agent completion(s).\n\n`;
29
- if (Array.isArray(completions)) {
30
- for (let i = 0; i < completions.length; i++) {
31
- const completion = completions[i];
32
- llmContent += `Completion ${i + 1}:\n`;
33
- llmContent += JSON.stringify(completion, null, 2) + '\n\n';
34
- }
35
- }
36
- else {
37
- llmContent += JSON.stringify(completions, null, 2);
38
- }
39
- return {
40
- llmContent,
41
- returnDisplay: `Found ${count} completion(s)`,
42
- };
43
- }
44
- catch (error) {
45
- const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
46
- return {
47
- llmContent: `Error checking 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 checking if any background agent has completed
59
- */
60
- class EventCheckCompletionTool extends base_tool_1.BaseDeclarativeTool {
61
- constructor() {
62
- super(EventCheckCompletionTool.Name, 'Check Background Agent Completion', 'Check if any background agent has completed. Returns completion data if available, null otherwise. This is a non-blocking check.', types_1.Kind.Read, {
63
- type: 'object',
64
- properties: {},
65
- required: []
66
- });
67
- }
68
- createInvocation(params) {
69
- return new EventCheckCompletionInvocation(params);
70
- }
71
- }
72
- exports.EventCheckCompletionTool = EventCheckCompletionTool;
73
- EventCheckCompletionTool.Name = 'event_check_completion';
@@ -1,19 +0,0 @@
1
- /**
2
- * Event Check Grouped Completion Tool - Checks if any grouped background agent has completed
3
- * Wraps the SDK's codeboltEvent.checkForBackgroundGroupedAgentCompletion() method
4
- */
5
- import type { ToolInvocation, ToolResult } from '../types';
6
- import { BaseDeclarativeTool } from '../base-tool';
7
- /**
8
- * Parameters for the EventCheckGroupedCompletion tool
9
- */
10
- export interface EventCheckGroupedCompletionParams {
11
- }
12
- /**
13
- * Tool for checking if any grouped background agent has completed
14
- */
15
- export declare class EventCheckGroupedCompletionTool extends BaseDeclarativeTool<EventCheckGroupedCompletionParams, ToolResult> {
16
- static readonly Name: string;
17
- constructor();
18
- protected createInvocation(params: EventCheckGroupedCompletionParams): ToolInvocation<EventCheckGroupedCompletionParams, ToolResult>;
19
- }