@codebolt/codeboltjs 5.0.8 → 5.1.10

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 (160) hide show
  1. package/dist/core/Codebolt.d.ts +48 -5
  2. package/dist/core/Codebolt.js +76 -16
  3. package/dist/core/websocket.js +16 -18
  4. package/dist/index.d.ts +3 -0
  5. package/dist/index.js +9 -3
  6. package/dist/modules/agentDeliberation.js +3 -1
  7. package/dist/modules/dynamicPanel.d.ts +106 -0
  8. package/dist/modules/dynamicPanel.js +122 -0
  9. package/dist/modules/environment.d.ts +24 -0
  10. package/dist/modules/environment.js +51 -0
  11. package/dist/modules/mcp.js +3 -0
  12. package/dist/tools/actionBlock/action-block-start.js +1 -4
  13. package/dist/tools/actionPlan/action-plan-create.js +1 -2
  14. package/dist/tools/completion/attempt-completion.d.ts +25 -0
  15. package/dist/tools/completion/attempt-completion.js +45 -0
  16. package/dist/tools/completion/index.d.ts +3 -0
  17. package/dist/tools/completion/index.js +9 -0
  18. package/dist/tools/environment/environment-create.d.ts +23 -0
  19. package/dist/tools/environment/environment-create.js +90 -0
  20. package/dist/tools/environment/environment-delete.d.ts +17 -0
  21. package/dist/tools/environment/environment-delete.js +70 -0
  22. package/dist/tools/environment/environment-get.d.ts +17 -0
  23. package/dist/tools/environment/environment-get.js +73 -0
  24. package/dist/tools/environment/environment-list.d.ts +15 -0
  25. package/dist/tools/environment/environment-list.js +72 -0
  26. package/dist/tools/environment/environment-providers.d.ts +24 -0
  27. package/dist/tools/environment/environment-providers.js +130 -0
  28. package/dist/tools/environment/environment-restart.d.ts +17 -0
  29. package/dist/tools/environment/environment-restart.js +70 -0
  30. package/dist/tools/environment/environment-send-message.d.ts +19 -0
  31. package/dist/tools/environment/environment-send-message.js +74 -0
  32. package/dist/tools/environment/environment-start.d.ts +17 -0
  33. package/dist/tools/environment/environment-start.js +70 -0
  34. package/dist/tools/environment/environment-statistics.d.ts +15 -0
  35. package/dist/tools/environment/environment-statistics.js +69 -0
  36. package/dist/tools/environment/environment-status.d.ts +17 -0
  37. package/dist/tools/environment/environment-status.js +72 -0
  38. package/dist/tools/environment/environment-stop.d.ts +17 -0
  39. package/dist/tools/environment/environment-stop.js +70 -0
  40. package/dist/tools/environment/environment-update.d.ts +19 -0
  41. package/dist/tools/environment/environment-update.js +74 -0
  42. package/dist/tools/environment/index.d.ts +31 -0
  43. package/dist/tools/environment/index.js +61 -0
  44. package/dist/tools/index.d.ts +20 -3
  45. package/dist/tools/index.js +55 -8
  46. package/dist/tools/job/index.d.ts +3 -1
  47. package/dist/tools/job/index.js +5 -1
  48. package/dist/tools/job/job-remove-dependency.d.ts +28 -0
  49. package/dist/tools/job/job-remove-dependency.js +86 -0
  50. package/dist/tools/registry.d.ts +21 -0
  51. package/dist/tools/registry.js +38 -1
  52. package/dist/tools/requirementPlan/requirement-plan-review.js +1 -1
  53. package/dist/tools/thread/thread-create-background.js +1 -1
  54. package/dist/tools/tool-search.d.ts +49 -0
  55. package/dist/tools/tool-search.js +140 -0
  56. package/dist/tools/toolSearch/index.d.ts +9 -0
  57. package/dist/tools/toolSearch/index.js +15 -0
  58. package/dist/tools/toolSearch/tool-search-tool.d.ts +32 -0
  59. package/dist/tools/toolSearch/tool-search-tool.js +110 -0
  60. package/dist/tools/utils/schema-validator.d.ts +1 -0
  61. package/dist/tools/utils/schema-validator.js +13 -1
  62. package/dist/types/agentDeliberation.d.ts +15 -1
  63. package/dist/types/agentDeliberation.js +2 -0
  64. package/package.json +20 -19
  65. package/dist/modules/codeboltEvent.d.ts +0 -57
  66. package/dist/modules/codeboltEvent.js +0 -217
  67. package/dist/tools/browser/browser-action.d.ts +0 -56
  68. package/dist/tools/browser/browser-action.js +0 -265
  69. package/dist/tools/codeboltEvent/event-add-running-agent.d.ts +0 -25
  70. package/dist/tools/codeboltEvent/event-add-running-agent.js +0 -69
  71. package/dist/tools/codeboltEvent/event-check-background-agent-completion.d.ts +0 -19
  72. package/dist/tools/codeboltEvent/event-check-background-agent-completion.js +0 -64
  73. package/dist/tools/codeboltEvent/event-get-running-agent-count.d.ts +0 -19
  74. package/dist/tools/codeboltEvent/event-get-running-agent-count.js +0 -55
  75. package/dist/tools/codeboltEvent/event-on-background-agent-completion.d.ts +0 -19
  76. package/dist/tools/codeboltEvent/event-on-background-agent-completion.js +0 -56
  77. package/dist/tools/codeboltEvent/event-wait-for-external-event.d.ts +0 -19
  78. package/dist/tools/codeboltEvent/event-wait-for-external-event.js +0 -55
  79. package/dist/tools/codeboltEvent/index.d.ts +0 -19
  80. package/dist/tools/codeboltEvent/index.js +0 -33
  81. package/dist/tools/event/event-add-running-agent.d.ts +0 -32
  82. package/dist/tools/event/event-add-running-agent.js +0 -77
  83. package/dist/tools/event/event-check-agent-event.d.ts +0 -19
  84. package/dist/tools/event/event-check-agent-event.js +0 -63
  85. package/dist/tools/event/event-check-completion.d.ts +0 -19
  86. package/dist/tools/event/event-check-completion.js +0 -73
  87. package/dist/tools/event/event-check-grouped-completion.d.ts +0 -19
  88. package/dist/tools/event/event-check-grouped-completion.js +0 -63
  89. package/dist/tools/event/event-get-running-count.d.ts +0 -19
  90. package/dist/tools/event/event-get-running-count.js +0 -55
  91. package/dist/tools/event/event-on-agent-event.d.ts +0 -19
  92. package/dist/tools/event/event-on-agent-event.js +0 -63
  93. package/dist/tools/event/event-on-completion.d.ts +0 -19
  94. package/dist/tools/event/event-on-completion.js +0 -73
  95. package/dist/tools/event/event-on-grouped-completion.d.ts +0 -19
  96. package/dist/tools/event/event-on-grouped-completion.js +0 -63
  97. package/dist/tools/event/event-wait-any.d.ts +0 -19
  98. package/dist/tools/event/event-wait-any.js +0 -66
  99. package/dist/tools/event/index.d.ts +0 -25
  100. package/dist/tools/event/index.js +0 -48
  101. package/dist/tools/git/git-action.d.ts +0 -48
  102. package/dist/tools/git/git-action.js +0 -279
  103. package/dist/tools/kvStore/kv-store-create-instance.d.ts +0 -26
  104. package/dist/tools/kvStore/kv-store-create-instance.js +0 -79
  105. package/dist/tools/kvStore/kv-store-get.d.ts +0 -30
  106. package/dist/tools/kvStore/kv-store-get.js +0 -80
  107. package/dist/tools/kvStore/kv-store-set.d.ts +0 -38
  108. package/dist/tools/kvStore/kv-store-set.js +0 -86
  109. package/dist/tools/memoryIngestion/mi-create-pipeline.d.ts +0 -44
  110. package/dist/tools/memoryIngestion/mi-create-pipeline.js +0 -114
  111. package/dist/tools/memoryIngestion/mi-list.d.ts +0 -22
  112. package/dist/tools/memoryIngestion/mi-list.js +0 -66
  113. package/dist/tools/orchestration/agent-details.d.ts +0 -15
  114. package/dist/tools/orchestration/agent-details.js +0 -98
  115. package/dist/tools/orchestration/agent-find.d.ts +0 -18
  116. package/dist/tools/orchestration/agent-find.js +0 -125
  117. package/dist/tools/orchestration/agent-list.d.ts +0 -13
  118. package/dist/tools/orchestration/agent-list.js +0 -106
  119. package/dist/tools/orchestration/agent-management.d.ts +0 -44
  120. package/dist/tools/orchestration/agent-management.js +0 -250
  121. package/dist/tools/orchestration/agent-start.d.ts +0 -18
  122. package/dist/tools/orchestration/agent-start.js +0 -90
  123. package/dist/tools/orchestration/index.d.ts +0 -49
  124. package/dist/tools/orchestration/index.js +0 -102
  125. package/dist/tools/orchestration/task-assign.d.ts +0 -18
  126. package/dist/tools/orchestration/task-assign.js +0 -84
  127. package/dist/tools/orchestration/task-create.d.ts +0 -20
  128. package/dist/tools/orchestration/task-create.js +0 -97
  129. package/dist/tools/orchestration/task-delete.d.ts +0 -16
  130. package/dist/tools/orchestration/task-delete.js +0 -77
  131. package/dist/tools/orchestration/task-execute.d.ts +0 -18
  132. package/dist/tools/orchestration/task-execute.js +0 -84
  133. package/dist/tools/orchestration/task-get.d.ts +0 -16
  134. package/dist/tools/orchestration/task-get.js +0 -89
  135. package/dist/tools/orchestration/task-list.d.ts +0 -13
  136. package/dist/tools/orchestration/task-list.js +0 -74
  137. package/dist/tools/orchestration/task-management.d.ts +0 -52
  138. package/dist/tools/orchestration/task-management.js +0 -231
  139. package/dist/tools/orchestration/task-update.d.ts +0 -22
  140. package/dist/tools/orchestration/task-update.js +0 -96
  141. package/dist/tools/orchestration/thread-create-background.d.ts +0 -18
  142. package/dist/tools/orchestration/thread-create-background.js +0 -94
  143. package/dist/tools/orchestration/thread-create-start.d.ts +0 -16
  144. package/dist/tools/orchestration/thread-create-start.js +0 -85
  145. package/dist/tools/orchestration/thread-create.d.ts +0 -16
  146. package/dist/tools/orchestration/thread-create.js +0 -85
  147. package/dist/tools/orchestration/thread-delete.d.ts +0 -16
  148. package/dist/tools/orchestration/thread-delete.js +0 -77
  149. package/dist/tools/orchestration/thread-get-messages.d.ts +0 -24
  150. package/dist/tools/orchestration/thread-get-messages.js +0 -122
  151. package/dist/tools/orchestration/thread-get.d.ts +0 -16
  152. package/dist/tools/orchestration/thread-get.js +0 -85
  153. package/dist/tools/orchestration/thread-list.d.ts +0 -16
  154. package/dist/tools/orchestration/thread-list.js +0 -85
  155. package/dist/tools/orchestration/thread-start.d.ts +0 -16
  156. package/dist/tools/orchestration/thread-start.js +0 -82
  157. package/dist/tools/orchestration/thread-update-status.d.ts +0 -18
  158. package/dist/tools/orchestration/thread-update-status.js +0 -89
  159. package/dist/tools/orchestration/thread-update.d.ts +0 -18
  160. package/dist/tools/orchestration/thread-update.js +0 -89
@@ -1,79 +0,0 @@
1
- "use strict";
2
- /**
3
- * Create KV Store Instance Tool - Creates a new key-value store instance
4
- */
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CreateKVInstanceTool = void 0;
10
- const base_tool_1 = require("../base-tool");
11
- const kvStore_1 = __importDefault(require("../../modules/kvStore"));
12
- class CreateKVInstanceInvocation extends base_tool_1.BaseToolInvocation {
13
- constructor(params) {
14
- super(params);
15
- }
16
- toolLocations() {
17
- return [];
18
- }
19
- async execute() {
20
- try {
21
- const response = await kvStore_1.default.createInstance(this.params.name, this.params.description);
22
- if (!response.success || !response.instance) {
23
- return {
24
- llmContent: `Error creating KV store instance: ${response.error || 'Unknown error'}`,
25
- returnDisplay: `Error creating KV store instance: ${response.error || 'Unknown error'}`,
26
- error: {
27
- message: response.error || 'Unknown error',
28
- type: 'unknown',
29
- },
30
- };
31
- }
32
- const instance = response.instance;
33
- const content = `KV store instance created successfully:\n` +
34
- `ID: ${instance.id}\n` +
35
- `Name: ${instance.name}\n` +
36
- `Description: ${instance.description || 'N/A'}`;
37
- return {
38
- llmContent: content,
39
- returnDisplay: content,
40
- };
41
- }
42
- catch (error) {
43
- return {
44
- llmContent: `Error creating KV store instance: ${error}`,
45
- returnDisplay: `Error creating KV store instance: ${error}`,
46
- error: {
47
- message: String(error),
48
- type: 'unknown',
49
- },
50
- };
51
- }
52
- }
53
- }
54
- class CreateKVInstanceTool extends base_tool_1.BaseDeclarativeTool {
55
- constructor() {
56
- super('kvStore_createInstance', 'Create a new key-value store instance for agent state persistence', {
57
- type: 'object',
58
- properties: {
59
- name: {
60
- type: 'string',
61
- description: 'Instance name',
62
- },
63
- description: {
64
- type: 'string',
65
- description: 'Optional description',
66
- },
67
- explanation: {
68
- type: 'string',
69
- description: 'One sentence explanation of why this tool is being used',
70
- },
71
- },
72
- required: ['name'],
73
- });
74
- }
75
- createInvocation(params, invocationId) {
76
- return new CreateKVInstanceInvocation(params);
77
- }
78
- }
79
- exports.CreateKVInstanceTool = CreateKVInstanceTool;
@@ -1,30 +0,0 @@
1
- /**
2
- * KV Store Get Tool - Gets a value from the key-value store
3
- */
4
- import type { ToolInvocation, ToolResult } from '../types';
5
- import { BaseDeclarativeTool } from '../base-tool';
6
- /**
7
- * Parameters for the KVGet tool
8
- */
9
- export interface KVGetParams {
10
- /**
11
- * Instance ID
12
- */
13
- instanceId: string;
14
- /**
15
- * Key to retrieve
16
- */
17
- key: string;
18
- /**
19
- * Optional namespace
20
- */
21
- namespace?: string;
22
- /**
23
- * One sentence explanation of why this tool is being used
24
- */
25
- explanation?: string;
26
- }
27
- export declare class KVGetTool extends BaseDeclarativeTool<KVGetParams, ToolResult> {
28
- constructor();
29
- createInvocation(params: KVGetParams, invocationId: string): ToolInvocation;
30
- }
@@ -1,80 +0,0 @@
1
- "use strict";
2
- /**
3
- * KV Store Get Tool - Gets a value from the key-value store
4
- */
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.KVGetTool = void 0;
10
- const base_tool_1 = require("../base-tool");
11
- const kvStore_1 = __importDefault(require("../../modules/kvStore"));
12
- class KVGetInvocation extends base_tool_1.BaseToolInvocation {
13
- constructor(params) {
14
- super(params);
15
- }
16
- toolLocations() {
17
- return [];
18
- }
19
- async execute() {
20
- try {
21
- const response = await kvStore_1.default.get(this.params.instanceId, this.params.key, this.params.namespace);
22
- if (!response.success) {
23
- return {
24
- llmContent: `Error getting value from KV store: ${response.error || 'Unknown error'}`,
25
- returnDisplay: `Error getting value from KV store: ${response.error || 'Unknown error'}`,
26
- error: {
27
- message: response.error || 'Unknown error',
28
- type: 'unknown',
29
- },
30
- };
31
- }
32
- const value = response.value !== undefined ? JSON.stringify(response.value, null, 2) : 'undefined';
33
- const content = `Retrieved value for key "${this.params.key}":\n${value}`;
34
- return {
35
- llmContent: content,
36
- returnDisplay: content,
37
- };
38
- }
39
- catch (error) {
40
- return {
41
- llmContent: `Error getting value from KV store: ${error}`,
42
- returnDisplay: `Error getting value from KV store: ${error}`,
43
- error: {
44
- message: String(error),
45
- type: 'unknown',
46
- },
47
- };
48
- }
49
- }
50
- }
51
- class KVGetTool extends base_tool_1.BaseDeclarativeTool {
52
- constructor() {
53
- super('kvStore_get', 'Get a value from the key-value store by key', {
54
- type: 'object',
55
- properties: {
56
- instanceId: {
57
- type: 'string',
58
- description: 'Instance ID',
59
- },
60
- key: {
61
- type: 'string',
62
- description: 'Key to retrieve',
63
- },
64
- namespace: {
65
- type: 'string',
66
- description: 'Optional namespace',
67
- },
68
- explanation: {
69
- type: 'string',
70
- description: 'One sentence explanation of why this tool is being used',
71
- },
72
- },
73
- required: ['instanceId', 'key'],
74
- });
75
- }
76
- createInvocation(params, invocationId) {
77
- return new KVGetInvocation(params);
78
- }
79
- }
80
- exports.KVGetTool = KVGetTool;
@@ -1,38 +0,0 @@
1
- /**
2
- * KV Store Set Tool - Sets a value in the key-value store
3
- */
4
- import type { ToolInvocation, ToolResult } from '../types';
5
- import { BaseDeclarativeTool } from '../base-tool';
6
- /**
7
- * Parameters for the KVSet tool
8
- */
9
- export interface KVSetParams {
10
- /**
11
- * Instance ID
12
- */
13
- instanceId: string;
14
- /**
15
- * Key to set
16
- */
17
- key: string;
18
- /**
19
- * Value to set (will be JSON stringified)
20
- */
21
- value: any;
22
- /**
23
- * Optional namespace
24
- */
25
- namespace?: string;
26
- /**
27
- * Optional TTL in seconds
28
- */
29
- ttl?: number;
30
- /**
31
- * One sentence explanation of why this tool is being used
32
- */
33
- explanation?: string;
34
- }
35
- export declare class KVSetTool extends BaseDeclarativeTool<KVSetParams, ToolResult> {
36
- constructor();
37
- createInvocation(params: KVSetParams, invocationId: string): ToolInvocation;
38
- }
@@ -1,86 +0,0 @@
1
- "use strict";
2
- /**
3
- * KV Store Set Tool - Sets a value in the key-value store
4
- */
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.KVSetTool = void 0;
10
- const base_tool_1 = require("../base-tool");
11
- const kvStore_1 = __importDefault(require("../../modules/kvStore"));
12
- class KVSetInvocation extends base_tool_1.BaseToolInvocation {
13
- constructor(params) {
14
- super(params);
15
- }
16
- toolLocations() {
17
- return [];
18
- }
19
- async execute() {
20
- try {
21
- const response = await kvStore_1.default.set(this.params.instanceId, this.params.key, this.params.value, this.params.namespace, this.params.ttl);
22
- if (!response.success) {
23
- return {
24
- llmContent: `Error setting value in KV store: ${response.error || 'Unknown error'}`,
25
- returnDisplay: `Error setting value in KV store: ${response.error || 'Unknown error'}`,
26
- error: {
27
- message: response.error || 'Unknown error',
28
- type: 'unknown',
29
- },
30
- };
31
- }
32
- const content = `Value set successfully for key "${this.params.key}" in instance "${this.params.instanceId}"`;
33
- return {
34
- llmContent: content,
35
- returnDisplay: content,
36
- };
37
- }
38
- catch (error) {
39
- return {
40
- llmContent: `Error setting value in KV store: ${error}`,
41
- returnDisplay: `Error setting value in KV store: ${error}`,
42
- error: {
43
- message: String(error),
44
- type: 'unknown',
45
- },
46
- };
47
- }
48
- }
49
- }
50
- class KVSetTool extends base_tool_1.BaseDeclarativeTool {
51
- constructor() {
52
- super('kvStore_set', 'Set a value in the key-value store by key', {
53
- type: 'object',
54
- properties: {
55
- instanceId: {
56
- type: 'string',
57
- description: 'Instance ID',
58
- },
59
- key: {
60
- type: 'string',
61
- description: 'Key to set',
62
- },
63
- value: {
64
- description: 'Value to set (will be JSON stringified)',
65
- },
66
- namespace: {
67
- type: 'string',
68
- description: 'Optional namespace',
69
- },
70
- ttl: {
71
- type: 'number',
72
- description: 'Optional TTL in seconds',
73
- },
74
- explanation: {
75
- type: 'string',
76
- description: 'One sentence explanation of why this tool is being used',
77
- },
78
- },
79
- required: ['instanceId', 'key', 'value'],
80
- });
81
- }
82
- createInvocation(params, invocationId) {
83
- return new KVSetInvocation(params);
84
- }
85
- }
86
- exports.KVSetTool = KVSetTool;
@@ -1,44 +0,0 @@
1
- /**
2
- * Create Memory Ingestion Pipeline Tool - Creates a new memory ingestion pipeline
3
- */
4
- import type { ToolInvocation, ToolResult } from '../types';
5
- import { BaseDeclarativeTool } from '../base-tool';
6
- /**
7
- * Parameters for the CreateMemoryIngestionPipeline tool
8
- */
9
- export interface CreateMemoryIngestionPipelineParams {
10
- /**
11
- * Pipeline ID
12
- */
13
- pipelineId: string;
14
- /**
15
- * Pipeline label/name
16
- */
17
- label: string;
18
- /**
19
- * Pipeline description
20
- */
21
- description?: string;
22
- /**
23
- * Source configuration
24
- */
25
- source: {
26
- type: string;
27
- [key: string]: any;
28
- };
29
- /**
30
- * Processors configuration
31
- */
32
- processors: Array<{
33
- type: string;
34
- [key: string]: any;
35
- }>;
36
- /**
37
- * One sentence explanation of why this tool is being used
38
- */
39
- explanation?: string;
40
- }
41
- export declare class CreateMemoryIngestionPipelineTool extends BaseDeclarativeTool<CreateMemoryIngestionPipelineParams, ToolResult> {
42
- constructor();
43
- createInvocation(params: CreateMemoryIngestionPipelineParams, invocationId: string): ToolInvocation;
44
- }
@@ -1,114 +0,0 @@
1
- "use strict";
2
- /**
3
- * Create Memory Ingestion Pipeline Tool - Creates a new memory ingestion pipeline
4
- */
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CreateMemoryIngestionPipelineTool = void 0;
10
- const base_tool_1 = require("../base-tool");
11
- const memoryIngestion_1 = __importDefault(require("../../modules/memoryIngestion"));
12
- class CreateMemoryIngestionPipelineInvocation extends base_tool_1.BaseToolInvocation {
13
- constructor(params) {
14
- super(params);
15
- }
16
- toolLocations() {
17
- return [];
18
- }
19
- async execute() {
20
- try {
21
- const response = await memoryIngestion_1.default.create({
22
- pipelineId: this.params.pipelineId,
23
- label: this.params.label,
24
- description: this.params.description,
25
- source: this.params.source,
26
- processors: this.params.processors,
27
- });
28
- if (!response.success || !response.pipeline) {
29
- return {
30
- llmContent: `Error creating memory ingestion pipeline: ${response.error || 'Unknown error'}`,
31
- returnDisplay: `Error creating memory ingestion pipeline: ${response.error || 'Unknown error'}`,
32
- error: {
33
- message: response.error || 'Unknown error',
34
- type: 'unknown',
35
- },
36
- };
37
- }
38
- const pipeline = response.pipeline;
39
- const content = `Memory ingestion pipeline created successfully:\n` +
40
- `ID: ${pipeline.id}\n` +
41
- `Label: ${pipeline.label}\n` +
42
- `Status: ${pipeline.status}`;
43
- return {
44
- llmContent: content,
45
- returnDisplay: content,
46
- };
47
- }
48
- catch (error) {
49
- return {
50
- llmContent: `Error creating memory ingestion pipeline: ${error}`,
51
- returnDisplay: `Error creating memory ingestion pipeline: ${error}`,
52
- error: {
53
- message: String(error),
54
- type: 'unknown',
55
- },
56
- };
57
- }
58
- }
59
- }
60
- class CreateMemoryIngestionPipelineTool extends base_tool_1.BaseDeclarativeTool {
61
- constructor() {
62
- super('memoryIngestion_create', 'Create a new memory ingestion pipeline for processing data into memory', {
63
- type: 'object',
64
- properties: {
65
- pipelineId: {
66
- type: 'string',
67
- description: 'Pipeline ID',
68
- },
69
- label: {
70
- type: 'string',
71
- description: 'Pipeline label/name',
72
- },
73
- description: {
74
- type: 'string',
75
- description: 'Pipeline description',
76
- },
77
- source: {
78
- type: 'object',
79
- description: 'Source configuration',
80
- properties: {
81
- type: {
82
- type: 'string',
83
- description: 'Source type',
84
- },
85
- },
86
- required: ['type'],
87
- },
88
- processors: {
89
- type: 'array',
90
- description: 'Processors configuration',
91
- items: {
92
- type: 'object',
93
- properties: {
94
- type: {
95
- type: 'string',
96
- description: 'Processor type',
97
- },
98
- },
99
- required: ['type'],
100
- },
101
- },
102
- explanation: {
103
- type: 'string',
104
- description: 'One sentence explanation of why this tool is being used',
105
- },
106
- },
107
- required: ['pipelineId', 'label', 'source', 'processors'],
108
- });
109
- }
110
- createInvocation(params, invocationId) {
111
- return new CreateMemoryIngestionPipelineInvocation(params);
112
- }
113
- }
114
- exports.CreateMemoryIngestionPipelineTool = CreateMemoryIngestionPipelineTool;
@@ -1,22 +0,0 @@
1
- /**
2
- * List Memory Ingestion Pipelines Tool - Lists memory ingestion pipelines
3
- */
4
- import type { ToolInvocation, ToolResult } from '../types';
5
- import { BaseDeclarativeTool } from '../base-tool';
6
- /**
7
- * Parameters for the ListMemoryIngestionPipelines tool
8
- */
9
- export interface ListMemoryIngestionPipelinesParams {
10
- /**
11
- * Optional status filter
12
- */
13
- status?: string;
14
- /**
15
- * One sentence explanation of why this tool is being used
16
- */
17
- explanation?: string;
18
- }
19
- export declare class ListMemoryIngestionPipelinesTool extends BaseDeclarativeTool<ListMemoryIngestionPipelinesParams, ToolResult> {
20
- constructor();
21
- createInvocation(params: ListMemoryIngestionPipelinesParams, invocationId: string): ToolInvocation;
22
- }
@@ -1,66 +0,0 @@
1
- "use strict";
2
- /**
3
- * List Memory Ingestion Pipelines Tool - Lists memory ingestion pipelines
4
- */
5
- var __importDefault = (this && this.__importDefault) || function (mod) {
6
- return (mod && mod.__esModule) ? mod : { "default": mod };
7
- };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.ListMemoryIngestionPipelinesTool = void 0;
10
- const base_tool_1 = require("../base-tool");
11
- const memoryIngestion_1 = __importDefault(require("../../modules/memoryIngestion"));
12
- class ListMemoryIngestionPipelinesInvocation extends base_tool_1.BaseToolInvocation {
13
- constructor(params) {
14
- super(params);
15
- }
16
- toolLocations() {
17
- return [];
18
- }
19
- async execute() {
20
- try {
21
- const filters = {};
22
- if (this.params.status) {
23
- filters.status = this.params.status;
24
- }
25
- const response = await memoryIngestion_1.default.list(filters);
26
- const pipelines = response.pipelines || [];
27
- const content = `Found ${pipelines.length} memory ingestion pipeline(s):\n` +
28
- pipelines.map((p) => `- ${p.id}: ${p.label} (${p.status})${p.description ? ' - ' + p.description : ''}`).join('\n');
29
- return {
30
- llmContent: content,
31
- returnDisplay: content,
32
- };
33
- }
34
- catch (error) {
35
- return {
36
- llmContent: `Error listing memory ingestion pipelines: ${error}`,
37
- returnDisplay: `Error listing memory ingestion pipelines: ${error}`,
38
- error: {
39
- message: String(error),
40
- type: 'unknown',
41
- },
42
- };
43
- }
44
- }
45
- }
46
- class ListMemoryIngestionPipelinesTool extends base_tool_1.BaseDeclarativeTool {
47
- constructor() {
48
- super('memoryIngestion_list', 'List all memory ingestion pipelines with optional status filter', {
49
- type: 'object',
50
- properties: {
51
- status: {
52
- type: 'string',
53
- description: 'Optional status filter',
54
- },
55
- explanation: {
56
- type: 'string',
57
- description: 'One sentence explanation of why this tool is being used',
58
- },
59
- },
60
- });
61
- }
62
- createInvocation(params, invocationId) {
63
- return new ListMemoryIngestionPipelinesInvocation(params);
64
- }
65
- }
66
- exports.ListMemoryIngestionPipelinesTool = ListMemoryIngestionPipelinesTool;
@@ -1,15 +0,0 @@
1
- /**
2
- * Agent Details Tool - Gets details of specific agents
3
- * Wraps the SDK's codeboltAgent.getAgentsDetail() method
4
- */
5
- import type { ToolInvocation, ToolResult } from '../types';
6
- import { BaseDeclarativeTool } from '../base-tool';
7
- export interface AgentDetailsParams {
8
- /** List of agent IDs to get details for */
9
- agent_list?: string[];
10
- }
11
- export declare class AgentDetailsTool extends BaseDeclarativeTool<AgentDetailsParams, ToolResult> {
12
- static readonly Name: string;
13
- constructor();
14
- protected createInvocation(params: AgentDetailsParams): ToolInvocation<AgentDetailsParams, ToolResult>;
15
- }
@@ -1,98 +0,0 @@
1
- "use strict";
2
- /**
3
- * Agent Details Tool - Gets details of specific agents
4
- * Wraps the SDK's codeboltAgent.getAgentsDetail() 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.AgentDetailsTool = void 0;
11
- const types_1 = require("../types");
12
- const base_tool_1 = require("../base-tool");
13
- const agent_1 = __importDefault(require("../../modules/agent"));
14
- class AgentDetailsInvocation extends base_tool_1.BaseToolInvocation {
15
- constructor(params) {
16
- super(params);
17
- }
18
- async execute() {
19
- var _a;
20
- try {
21
- const response = await agent_1.default.getAgentsDetail(this.params.agent_list || []);
22
- if (response && response.success === false) {
23
- const errorMsg = typeof response.error === 'string'
24
- ? response.error
25
- : (response.error && typeof response.error === 'object' && 'message' in response.error)
26
- ? String(response.error.message)
27
- : 'Agent details failed';
28
- return {
29
- llmContent: `Agent details failed: ${errorMsg}`,
30
- returnDisplay: `Error: ${errorMsg}`,
31
- error: {
32
- message: errorMsg,
33
- type: types_1.ToolErrorType.AGENT_NOT_FOUND,
34
- },
35
- };
36
- }
37
- let output = 'Retrieved agent details';
38
- const agents = (_a = response.payload) === null || _a === void 0 ? void 0 : _a.agents;
39
- if (agents && Array.isArray(agents)) {
40
- output += `\n\nAgent Details:\n`;
41
- for (const agent of agents) {
42
- if (agent && typeof agent === 'object') {
43
- const agentId = ('id' in agent || 'name' in agent)
44
- ? String(agent.id || agent.name)
45
- : 'Unknown';
46
- output += `\n--- ${agentId} ---\n`;
47
- const agentDesc = ('description' in agent)
48
- ? String(agent.description || 'N/A')
49
- : 'N/A';
50
- output += `Description: ${agentDesc}\n`;
51
- if ('capabilities' in agent && Array.isArray(agent.capabilities)) {
52
- const capabilities = agent.capabilities;
53
- output += `Capabilities: ${capabilities.map(c => String(c)).join(', ')}\n`;
54
- }
55
- if ('status' in agent) {
56
- output += `Status: ${String(agent.status)}\n`;
57
- }
58
- }
59
- }
60
- }
61
- return {
62
- llmContent: output,
63
- returnDisplay: 'Retrieved agent details',
64
- };
65
- }
66
- catch (error) {
67
- const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
68
- return {
69
- llmContent: `Error getting agent details: ${errorMessage}`,
70
- returnDisplay: `Error: ${errorMessage}`,
71
- error: {
72
- message: errorMessage,
73
- type: types_1.ToolErrorType.EXECUTION_FAILED,
74
- },
75
- };
76
- }
77
- }
78
- }
79
- class AgentDetailsTool extends base_tool_1.BaseDeclarativeTool {
80
- constructor() {
81
- super(AgentDetailsTool.Name, 'AgentDetails', 'Retrieves details of specific agents.', types_1.Kind.Read, {
82
- properties: {
83
- agent_list: {
84
- description: 'List of agent IDs to get details for.',
85
- type: 'array',
86
- items: { type: 'string' },
87
- },
88
- },
89
- required: [],
90
- type: 'object',
91
- });
92
- }
93
- createInvocation(params) {
94
- return new AgentDetailsInvocation(params);
95
- }
96
- }
97
- exports.AgentDetailsTool = AgentDetailsTool;
98
- AgentDetailsTool.Name = 'agent_details';